[arch-commits] Commit in haskell-language-haskell-extract/repos (3 files)

Felix Yan felixonmars at archlinux.org
Sun Jun 6 22:32:08 UTC 2021


    Date: Sunday, June 6, 2021 @ 22:32:07
  Author: felixonmars
Revision: 956440

archrelease: copy trunk to community-staging-x86_64

Added:
  haskell-language-haskell-extract/repos/community-staging-x86_64/
  haskell-language-haskell-extract/repos/community-staging-x86_64/PKGBUILD
    (from rev 956439, haskell-language-haskell-extract/trunk/PKGBUILD)
  haskell-language-haskell-extract/repos/community-staging-x86_64/ghc-8.10.patch
    (from rev 956439, haskell-language-haskell-extract/trunk/ghc-8.10.patch)

----------------+
 PKGBUILD       |   49 +++++++++++++++++++++++++++++++++++++++++++++++++
 ghc-8.10.patch |   22 ++++++++++++++++++++++
 2 files changed, 71 insertions(+)

Copied: haskell-language-haskell-extract/repos/community-staging-x86_64/PKGBUILD (from rev 956439, haskell-language-haskell-extract/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2021-06-06 22:32:07 UTC (rev 956440)
@@ -0,0 +1,49 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=language-haskell-extract
+pkgname=haskell-language-haskell-extract
+pkgver=0.2.4
+pkgrel=11
+pkgdesc="Module to automatically extract functions from the local code"
+url="https://github.com/finnsson/language-haskell-extract"
+license=('BSD')
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-regex-posix')
+makedepends=('ghc')
+source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz
+        ghc-8.10.patch)
+sha512sums=('6408459abf9d531ccbe7d65766d38fcb93f4d3f9c77db1a706231bf6d8ad6f845fcefc4fbb03833f45c74f21f324a44760f3c89ff093c69f1f9999e64344ab4d'
+            '2992e1e0ca320b4689388e8ff0588611de0ae54ea1c0dde537cda708957e95f2c03f56d818862470ca354d321f032867546cf2c1c72bfeec148fe71befcd9e32')
+
+prepare() {
+    cd $_hkgname-$pkgver
+    patch -p1 -i ../ghc-8.10.patch
+}
+
+build() {
+    cd $_hkgname-$pkgver
+
+    runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
+        --prefix=/usr --docdir=/usr/share/doc/$pkgname --enable-tests \
+        --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid
+    runhaskell Setup build $MAKEFLAGS
+    runhaskell Setup register --gen-script
+    runhaskell Setup unregister --gen-script
+    sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
+    sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+check() {
+    cd $_hkgname-$pkgver
+    runhaskell Setup test --show-details=direct
+}
+
+package() {
+    cd $_hkgname-$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
+    runhaskell Setup copy --destdir="$pkgdir"
+    install -D -m644 "BSD3.txt" "${pkgdir}/usr/share/licenses/${pkgname}/BSD3.txt"
+    rm -f "${pkgdir}/usr/share/doc/${pkgname}/BSD3.txt"
+}

Copied: haskell-language-haskell-extract/repos/community-staging-x86_64/ghc-8.10.patch (from rev 956439, haskell-language-haskell-extract/trunk/ghc-8.10.patch)
===================================================================
--- community-staging-x86_64/ghc-8.10.patch	                        (rev 0)
+++ community-staging-x86_64/ghc-8.10.patch	2021-06-06 22:32:07 UTC (rev 956440)
@@ -0,0 +1,22 @@
+diff --git a/src/Language/Haskell/Extract.hs b/src/Language/Haskell/Extract.hs
+index 3e8958b..43dfe04 100644
+--- a/src/Language/Haskell/Extract.hs
++++ b/src/Language/Haskell/Extract.hs
+@@ -1,3 +1,4 @@
++{-# LANGUAGE CPP #-}
+ module Language.Haskell.Extract (
+   functionExtractor,
+   functionExtractorMap,
+@@ -25,7 +26,11 @@ extractAllFunctions pattern =
+ functionExtractor :: String -> ExpQ
+ functionExtractor pattern =
+   do functions <- extractAllFunctions pattern
+-     let makePair n = TupE [ LitE $ StringL n , VarE $ mkName n]
++     let makePair n = TupE
++#if MIN_VERSION_template_haskell(2,16,0)
++                           $ map Just
++#endif
++                           [ LitE $ StringL n , VarE $ mkName n]
+      return $ ListE $ map makePair functions
+ 
+ 



More information about the arch-commits mailing list