[arch-commits] Commit in haskell-hiedb/trunk (PKGBUILD ghc9.patch)

2021-07-08 Thread Felix Yan via arch-commits
Date: Friday, July 9, 2021 @ 04:56:50
  Author: felixonmars
Revision: 975893

upgpkg: haskell-hiedb 0.4.0.0-1: rebuild with ghcide 1.4.0.3, hiedb 0.4.0.0

Modified:
  haskell-hiedb/trunk/PKGBUILD
Deleted:
  haskell-hiedb/trunk/ghc9.patch

+
 PKGBUILD   |   31 -
 ghc9.patch | 1061 ---
 2 files changed, 12 insertions(+), 1080 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2021-07-09 04:38:13 UTC (rev 975892)
+++ PKGBUILD2021-07-09 04:56:50 UTC (rev 975893)
@@ -2,8 +2,8 @@
 
 _hkgname=hiedb
 pkgname=haskell-hiedb
-pkgver=0.3.0.1
-pkgrel=48
+pkgver=0.4.0.0
+pkgrel=1
 pkgdesc="Generates a references DB from .hie files"
 url="https://github.com/wz1000/HieDb;
 license=("BSD")
@@ -10,24 +10,18 @@
 arch=('x86_64')
 depends=('ghc-libs' 'haskell-algebraic-graphs' 'haskell-ansi-terminal' 
'haskell-extra' 'haskell-ghc'
  'haskell-ghc-api-compat' 'haskell-ghc-paths' 'haskell-hie-compat' 
'haskell-lucid'
- 'haskell-optparse-applicative' 'haskell-sqlite-simple')
-makedepends=('ghc' 'uusi' 'haskell-hspec' 'haskell-temporary')
-# https://github.com/wz1000/HieDb/pull/27
-#source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz;)
-source=("https://github.com/wz1000/HieDb/archive/$pkgver/$pkgname-$pkgver.tar.gz;
-ghc9.patch)
-sha256sums=('7c0d3c56f7c0ea9b5af84f9c9f8547dc2a12abf0ab3e599c9ebdff3d2bf7b980'
-'2c86858d805a69603ffa4680b2a989b5732f43ec47ab42e5de1d37794b097372')
+ 'haskell-optparse-applicative' 'haskell-sqlite-simple' 
'haskell-terminal-size')
+makedepends=('ghc' 'haskell-hspec' 'haskell-temporary')
+source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz;)
+sha512sums=('b45bb1e08544379c61a9bd3f38613be844320cd5bed65d181cc01c7f77724daf63e4cf6930db7f14873de8f2122efe7e10b933bd5d53d3a4df4c55f8343c0d7b')
 
 prepare() {
-  cd HieDb-$pkgver
-  patch -p1 -i ../ghc9.patch
-  sed -i 's/callProcess "ghc" \$/callProcess "ghc" $ "-dynamic" :/' 
test/Main.hs
-  uusi -u base $_hkgname.cabal
+  cd hiedb-$pkgver
+  sed -i 's/callProcess hc args/callProcess hc (["-dynamic"] ++ args)/' 
test/Main.hs
 }
 
 build() {
-  cd HieDb-$pkgver
+  cd hiedb-$pkgver
 
   runhaskell Setup configure -O --enable-shared --enable-executable-dynamic 
--disable-library-vanilla \
 --prefix=/usr --docdir=/usr/share/doc/$pkgname --enable-tests \
@@ -43,13 +37,12 @@
 }
 
 check() {
-  cd HieDb-$pkgver
-  # https://github.com/wz1000/HieDb/issues/28
-  PATH="$PWD/dist/build/hiedb:$PATH" LD_LIBRARY_PATH="$PWD/dist/build" 
runhaskell Setup test || echo "Tests failed"
+  cd hiedb-$pkgver
+  PATH="$PWD/dist/build/hiedb:$PATH" LD_LIBRARY_PATH="$PWD/dist/build" 
runhaskell Setup test --show-details=direct
 }
 
 package() {
-  cd HieDb-$pkgver
+  cd hiedb-$pkgver
 
   install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
   install -D -m744 unregister.sh 
"$pkgdir"/usr/share/haskell/unregister/$pkgname.sh

Deleted: ghc9.patch
===
--- ghc9.patch  2021-07-09 04:38:13 UTC (rev 975892)
+++ ghc9.patch  2021-07-09 04:56:50 UTC (rev 975893)
@@ -1,1061 +0,0 @@
-From ddd3c1ee822c2759f9b67a6e199770e6097b5ef0 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20K=C3=A4llberg?= 
-Date: Tue, 30 Mar 2021 00:52:11 +0800
-Subject: [PATCH 1/7] Add non-backwards compatible support for ghc-9.0.1
-

- hiedb.cabal  |  4 +++-
- src/HieDb/Create.hs  | 15 +--
- src/HieDb/Query.hs   | 28 ++--
- src/HieDb/Run.hs | 41 +
- src/HieDb/Types.hs   | 25 -
- src/HieDb/Utils.hs   | 34 ++
- test/Main.hs | 26 ++
- test/Test/Orphans.hs |  4 ++--
- 8 files changed, 105 insertions(+), 72 deletions(-)
-
-diff --git a/hiedb.cabal b/hiedb.cabal
-index 82fc7b6..f198504 100644
 a/hiedb.cabal
-+++ b/hiedb.cabal
-@@ -25,7 +25,7 @@ source-repository head
- 
- common common-options
-   default-language:Haskell2010
--  build-depends:   base >= 4.12 && < 4.15
-+  build-depends:   base >= 4.12 && < 4.16
-   ghc-options: -Wall
--Wincomplete-uni-patterns
--Wincomplete-record-updates
-@@ -69,6 +69,7 @@ library
-  , optparse-applicative
-  , extra
-  , ansi-terminal
-+ , ghc-api-compat
- 
- test-suite hiedb-tests
-   import: common-options
-@@ -85,3 +86,4 @@ test-suite hiedb-tests
- , hspec
- , process
- , temporary
-+, ghc-api-compat
-diff --git a/src/HieDb/Create.hs b/src/HieDb/Create.hs
-index 3572843..57c3fac 100644
 a/src/HieDb/Create.hs

[arch-commits] Commit in haskell-hiedb/trunk (PKGBUILD ghc9.patch)

2021-06-28 Thread Felix Yan via arch-commits
Date: Monday, June 28, 2021 @ 12:26:36
  Author: felixonmars
Revision: 967689

upgpkg: haskell-hiedb 0.3.0.1-45: rebuild with ghc 9.0.1

Added:
  haskell-hiedb/trunk/ghc9.patch
Modified:
  haskell-hiedb/trunk/PKGBUILD

+
 PKGBUILD   |   13 
 ghc9.patch | 1061 +++
 2 files changed, 1069 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2021-06-28 11:47:38 UTC (rev 967688)
+++ PKGBUILD2021-06-28 12:26:36 UTC (rev 967689)
@@ -3,22 +3,25 @@
 _hkgname=hiedb
 pkgname=haskell-hiedb
 pkgver=0.3.0.1
-pkgrel=44
+pkgrel=45
 pkgdesc="Generates a references DB from .hie files"
 url="https://github.com/wz1000/HieDb;
 license=("BSD")
 arch=('x86_64')
 depends=('ghc-libs' 'haskell-algebraic-graphs' 'haskell-ansi-terminal' 
'haskell-extra' 'haskell-ghc'
- 'haskell-ghc-paths' 'haskell-hie-compat' 'haskell-lucid' 
'haskell-optparse-applicative'
- 'haskell-sqlite-simple')
+ 'haskell-ghc-api-compat' 'haskell-ghc-paths' 'haskell-hie-compat' 
'haskell-lucid'
+ 'haskell-optparse-applicative' 'haskell-sqlite-simple')
 makedepends=('ghc' 'haskell-hspec' 'haskell-temporary')
 # https://github.com/wz1000/HieDb/pull/27
 
#source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz;)
-source=("https://github.com/wz1000/HieDb/archive/$pkgver/$pkgname-$pkgver.tar.gz;)
-sha256sums=('7c0d3c56f7c0ea9b5af84f9c9f8547dc2a12abf0ab3e599c9ebdff3d2bf7b980')
+source=("https://github.com/wz1000/HieDb/archive/$pkgver/$pkgname-$pkgver.tar.gz;
+ghc9.patch)
+sha256sums=('7c0d3c56f7c0ea9b5af84f9c9f8547dc2a12abf0ab3e599c9ebdff3d2bf7b980'
+'2c86858d805a69603ffa4680b2a989b5732f43ec47ab42e5de1d37794b097372')
 
 prepare() {
   cd HieDb-$pkgver
+  patch -p1 -i ../ghc9.patch
   sed -i 's/callProcess "ghc" \$/callProcess "ghc" $ "-dynamic" :/' 
test/Main.hs
 }
 

Added: ghc9.patch
===
--- ghc9.patch  (rev 0)
+++ ghc9.patch  2021-06-28 12:26:36 UTC (rev 967689)
@@ -0,0 +1,1061 @@
+From ddd3c1ee822c2759f9b67a6e199770e6097b5ef0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20K=C3=A4llberg?= 
+Date: Tue, 30 Mar 2021 00:52:11 +0800
+Subject: [PATCH 1/7] Add non-backwards compatible support for ghc-9.0.1
+
+---
+ hiedb.cabal  |  4 +++-
+ src/HieDb/Create.hs  | 15 +--
+ src/HieDb/Query.hs   | 28 ++--
+ src/HieDb/Run.hs | 41 +
+ src/HieDb/Types.hs   | 25 -
+ src/HieDb/Utils.hs   | 34 ++
+ test/Main.hs | 26 ++
+ test/Test/Orphans.hs |  4 ++--
+ 8 files changed, 105 insertions(+), 72 deletions(-)
+
+diff --git a/hiedb.cabal b/hiedb.cabal
+index 82fc7b6..f198504 100644
+--- a/hiedb.cabal
 b/hiedb.cabal
+@@ -25,7 +25,7 @@ source-repository head
+ 
+ common common-options
+   default-language:Haskell2010
+-  build-depends:   base >= 4.12 && < 4.15
++  build-depends:   base >= 4.12 && < 4.16
+   ghc-options: -Wall
+-Wincomplete-uni-patterns
+-Wincomplete-record-updates
+@@ -69,6 +69,7 @@ library
+  , optparse-applicative
+  , extra
+  , ansi-terminal
++ , ghc-api-compat
+ 
+ test-suite hiedb-tests
+   import: common-options
+@@ -85,3 +86,4 @@ test-suite hiedb-tests
+ , hspec
+ , process
+ , temporary
++, ghc-api-compat
+diff --git a/src/HieDb/Create.hs b/src/HieDb/Create.hs
+index 3572843..57c3fac 100644
+--- a/src/HieDb/Create.hs
 b/src/HieDb/Create.hs
+@@ -34,6 +34,7 @@ import Database.SQLite.Simple
+ 
+ import HieDb.Types
+ import HieDb.Utils
++import GHC.Data.FastString  as FS  ( FastString )
+ 
+ sCHEMA_VERSION :: Integer
+ sCHEMA_VERSION = 5
+@@ -60,7 +61,7 @@ checkVersion k db@(getConn -> conn) = do
+ withHieDb :: FilePath -> (HieDb -> IO a) -> IO a
+ withHieDb fp f = withConnection fp (checkVersion f . HieDb)
+ 
+-{-| Given GHC LibDir and path to @.hiedb@ file, 
++{-| Given GHC LibDir and path to @.hiedb@ file,
+ constructs DynFlags (required for printing info from @.hie@ files)
+ and 'HieDb' and passes them to given function.
+ -}
+@@ -150,7 +151,7 @@ initConn (getConn -> conn) = do
+   execute_ conn "CREATE INDEX IF NOT EXISTS typerefs_mod ON typerefs(hieFile)"
+ 
+ {-| Add names of types from @.hie@ file to 'HieDb'.
+-Returns an Array mapping 'TypeIndex' to database ID assigned to the 
++Returns an Array mapping 'TypeIndex' to database ID assigned to the
+ corresponding record in DB.
+ -}
+ addArr :: HieDb -> A.Array TypeIndex HieTypeFlat -> IO (A.Array TypeIndex 
(Maybe Int64))
+@@ -166,7 +167,7 @@ addArr