[arch-commits] Commit in haskell-src-meta/repos (3 files)

Felix Yan felixonmars at archlinux.org
Thu Jan 31 20:52:57 UTC 2019


    Date: Thursday, January 31, 2019 @ 20:52:56
  Author: felixonmars
Revision: 428813

archrelease: copy trunk to community-staging-x86_64

Added:
  haskell-src-meta/repos/community-staging-x86_64/
  haskell-src-meta/repos/community-staging-x86_64/PKGBUILD
    (from rev 428812, haskell-src-meta/trunk/PKGBUILD)
  haskell-src-meta/repos/community-staging-x86_64/haskell-src-exts-1.21.patch
    (from rev 428812, haskell-src-meta/trunk/haskell-src-exts-1.21.patch)

-----------------------------+
 PKGBUILD                    |   51 ++++++++++++++++++++++++++++++++++++++++++
 haskell-src-exts-1.21.patch |   41 +++++++++++++++++++++++++++++++++
 2 files changed, 92 insertions(+)

Copied: haskell-src-meta/repos/community-staging-x86_64/PKGBUILD (from rev 428812, haskell-src-meta/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2019-01-31 20:52:56 UTC (rev 428813)
@@ -0,0 +1,51 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell at haskell.org>
+
+_hkgname=haskell-src-meta
+pkgname=haskell-src-meta
+pkgver=0.8.0.3
+pkgrel=32
+pkgdesc="Parse source to template-haskell abstract syntax"
+url="https://github.com/bmillwood/haskell-src-meta"
+license=("BSD")
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-src-exts' 'haskell-syb' 'haskell-th-orphans')
+makedepends=('ghc' 'haskell-test-framework' 'haskell-test-framework-hunit')
+source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz"
+        haskell-src-exts-1.21.patch)
+sha512sums=('aaa17f71f8105abca0047cfa34a941bfe8b5cffb31cf788356f1f8e7c51b446d58b9fcb343c9206746b126b8360a2d0198a06400f0868382e59d9ddec312ad13'
+            'f1dde1ef4921d31d2be50e5e0080cb39ef40a8ab16c31640b2166f62921a5f83cf52d6e3cada579fb0a9798e24f507bf6a8d394271baeedad2afb383efb49024')
+
+prepare() {
+    cd $_hkgname-$pkgver
+    patch -p1 -i ../haskell-src-exts-1.21.patch
+    sed -i -e 's/< *2.14/<3/' -e 's/< *4.12/<5/' -e 's/< *1.21/<2/' $_hkgname.cabal
+}
+
+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
+    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
+}
+
+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 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+    rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE"
+}

Copied: haskell-src-meta/repos/community-staging-x86_64/haskell-src-exts-1.21.patch (from rev 428812, haskell-src-meta/trunk/haskell-src-exts-1.21.patch)
===================================================================
--- community-staging-x86_64/haskell-src-exts-1.21.patch	                        (rev 0)
+++ community-staging-x86_64/haskell-src-exts-1.21.patch	2019-01-31 20:52:56 UTC (rev 428813)
@@ -0,0 +1,41 @@
+From 109ee29d5fd0f4e23fdd2f80eb122d66341b64a9 Mon Sep 17 00:00:00 2001
+From: Galen Huntington <galen at alumni.reed.edu>
+Date: Sun, 23 Dec 2018 22:57:21 -0800
+Subject: [PATCH] Support haskell-src-exts 1.21.
+
+---
+ haskell-src-meta.cabal                        | 2 +-
+ src/Language/Haskell/Meta/Syntax/Translate.hs | 2 ++
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/haskell-src-meta.cabal b/haskell-src-meta.cabal
+index 5c45b07..c189c3b 100644
+--- a/haskell-src-meta.cabal
++++ b/haskell-src-meta.cabal
+@@ -18,7 +18,7 @@ extra-source-files: ChangeLog README.md examples/*.hs
+ 
+ library
+   build-depends:   base >= 4.6 && < 4.12,
+-                   haskell-src-exts >= 1.18 && < 1.21,
++                   haskell-src-exts >= 1.18 && < 1.22,
+                    pretty >= 1.0 && < 1.2,
+                    syb >= 0.1 && < 0.8,
+                    template-haskell >= 2.8 && < 2.14,
+diff --git a/src/Language/Haskell/Meta/Syntax/Translate.hs b/src/Language/Haskell/Meta/Syntax/Translate.hs
+index 0dba4f5..aa95cff 100644
+--- a/src/Language/Haskell/Meta/Syntax/Translate.hs
++++ b/src/Language/Haskell/Meta/Syntax/Translate.hs
+@@ -314,11 +314,13 @@ instance ToName TyVarBndr where
+   toName (PlainTV n) = n
+   toName (KindedTV n _) = n
+ 
++#if !MIN_VERSION_haskell_src_exts(1,21,0)
+ instance ToType (Hs.Kind l) where
+   toType (Hs.KindStar _) = StarT
+   toType (Hs.KindFn _ k1 k2) = toType k1 .->. toType k2
+   toType (Hs.KindParen _ kp) = toType kp
+   toType (Hs.KindVar _ n) = VarT (toName n)
++#endif
+ 
+ toKind :: Hs.Kind l -> Kind
+ toKind = toType



More information about the arch-commits mailing list