[arch-commits] Commit in haskell-czipwith/repos (3 files)
Felix Yan
felixonmars at archlinux.org
Thu Jun 17 17:40:21 UTC 2021
Date: Thursday, June 17, 2021 @ 17:40:20
Author: felixonmars
Revision: 964675
archrelease: copy trunk to community-staging-x86_64
Added:
haskell-czipwith/repos/community-staging-x86_64/
haskell-czipwith/repos/community-staging-x86_64/PKGBUILD
(from rev 964674, haskell-czipwith/trunk/PKGBUILD)
haskell-czipwith/repos/community-staging-x86_64/ghc9.patch
(from rev 964674, haskell-czipwith/trunk/ghc9.patch)
------------+
PKGBUILD | 51 ++++++++++++++++++++++++++++++++++++++++++
ghc9.patch | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 122 insertions(+)
Copied: haskell-czipwith/repos/community-staging-x86_64/PKGBUILD (from rev 964674, haskell-czipwith/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2021-06-17 17:40:20 UTC (rev 964675)
@@ -0,0 +1,51 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=czipwith
+pkgname=haskell-czipwith
+pkgver=1.0.1.3
+pkgrel=5
+pkgdesc="CZipWith class and deriving via TH"
+url="https://github.com/lspitzner/czipwith/"
+license=("BSD")
+arch=('x86_64')
+depends=('ghc-libs')
+makedepends=('ghc')
+source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz"
+ ghc9.patch)
+sha256sums=('2dc48540e574ebc924fe13ca2b08be103d228fd42ef90db2896e3727eb0f6687'
+ 'd9ed14f362bad5db6e9bf9fd9a6114c638f0ffcf1887dd7f0dfd104fb79d1698')
+
+prepare() {
+ patch -d $_hkgname-$pkgver -p1 < ghc9.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 \
+ --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
+ --ghc-option='-pie'
+
+ 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 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
+ rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE
+}
Copied: haskell-czipwith/repos/community-staging-x86_64/ghc9.patch (from rev 964674, haskell-czipwith/trunk/ghc9.patch)
===================================================================
--- community-staging-x86_64/ghc9.patch (rev 0)
+++ community-staging-x86_64/ghc9.patch 2021-06-17 17:40:20 UTC (rev 964675)
@@ -0,0 +1,71 @@
+From b6245884ae83e00dd2b5261762549b37390179f8 Mon Sep 17 00:00:00 2001
+From: Tristan Seligmann <mithrandi at mithrandi.net>
+Date: Sun, 7 Feb 2021 13:26:59 +0200
+Subject: [PATCH] Fix GHC 9 compatibility
+
+---
+ czipwith.cabal | 4 ++--
+ src/Data/CZipWith.hs | 15 +++++++++++++++
+ 2 files changed, 17 insertions(+), 2 deletions(-)
+
+diff --git a/czipwith.cabal b/czipwith.cabal
+index 116c120..d8a98a9 100644
+--- a/czipwith.cabal
++++ b/czipwith.cabal
+@@ -27,8 +27,8 @@ library
+ -- other-modules:
+ -- other-extensions:
+ build-depends:
+- { base >=4.11 && <4.15
+- , template-haskell >=2.9 && <2.17
++ { base >=4.11 && <4.16
++ , template-haskell >=2.9 && <2.18
+ }
+ hs-source-dirs: src
+ default-language: Haskell2010
+diff --git a/src/Data/CZipWith.hs b/src/Data/CZipWith.hs
+index dafdd8f..9993c04 100644
+--- a/src/Data/CZipWith.hs
++++ b/src/Data/CZipWith.hs
+@@ -223,8 +223,13 @@ deriveCPointed name = do
+ ++ show con
+ ++ ")"
+ let tyvar = case _tyvarbnd of
++#if MIN_VERSION_template_haskell(2,17,0)
++ PlainTV n _ -> n
++ KindedTV n _ _ -> n
++#else
+ PlainTV n -> n
+ KindedTV n _ -> n
++#endif
+ let fQ = mkName "f"
+ let pats = [varP fQ]
+ let
+@@ -310,8 +315,13 @@ deriveCZipWith name = do
+ ++ show con
+ ++ ")"
+ let tyvar = case tyvarbnd of
++#if MIN_VERSION_template_haskell(2,17,0)
++ PlainTV n _ -> n
++ KindedTV n _ _ -> n
++#else
+ PlainTV n -> n
+ KindedTV n _ -> n
++#endif
+ let fQ = mkName "f"
+ let indexTys = zip [1 ..] elemTys
+ let indexTysVars = indexTys <&> \(i :: Int, ty) ->
+@@ -403,8 +413,13 @@ deriveCZipWithM name = do
+ ++ show con
+ ++ ")"
+ let tyvar = case tyvarbnd of
++#if MIN_VERSION_template_haskell(2,17,0)
++ PlainTV n _ -> n
++ KindedTV n _ _ -> n
++#else
+ PlainTV n -> n
+ KindedTV n _ -> n
++#endif
+ let fQ = mkName "f"
+ let indexTys = zip [1 ..] elemTys
+ let indexTysVars = indexTys <&> \(i :: Int, ty) ->
More information about the arch-commits
mailing list