[arch-commits] Commit in haskell-optparse-simple/repos (3 files)
Felix Yan
felixonmars at archlinux.org
Fri Jul 2 17:19:12 UTC 2021
Date: Friday, July 2, 2021 @ 17:19:12
Author: felixonmars
Revision: 970898
archrelease: copy trunk to community-staging-x86_64
Added:
haskell-optparse-simple/repos/community-staging-x86_64/
haskell-optparse-simple/repos/community-staging-x86_64/PKGBUILD
(from rev 970897, haskell-optparse-simple/trunk/PKGBUILD)
haskell-optparse-simple/repos/community-staging-x86_64/ghc9.patch
(from rev 970897, haskell-optparse-simple/trunk/ghc9.patch)
------------+
PKGBUILD | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
ghc9.patch | 21 +++++++++++++++++++++
2 files changed, 72 insertions(+)
Copied: haskell-optparse-simple/repos/community-staging-x86_64/PKGBUILD (from rev 970897, haskell-optparse-simple/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2021-07-02 17:19:12 UTC (rev 970898)
@@ -0,0 +1,51 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell at haskell.org>
+
+_hkgname=optparse-simple
+pkgname=haskell-optparse-simple
+pkgver=0.1.1.3
+pkgrel=172
+pkgdesc="Simple interface to optparse-applicative"
+url="https://hackage.haskell.org/package/${_hkgname}"
+license=("BSD")
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-githash' 'haskell-optparse-applicative' 'haskell-th-compat')
+makedepends=('ghc')
+source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz"
+ ghc9.patch)
+sha512sums=('9ab7208b459a196ec54511de6b51c98eabe29f5756c09c1f23653a0ff12cbd402ab8366ccfdc12467dce4be0fa1cae96571925ac5858d12478f0ed41168ecdf9'
+ '26ba7c0d512d648fb86ea1e11bd89c55d9241a1a67438be6a0c8ee054bc99b590c57dd5c2c6445c14888f1835da4c345ff7cb4365c70eca101d0f9acfb2917a8')
+
+prepare() {
+ patch -d $_hkgname-$pkgver -p1 < ghc9.patch
+ sed -i '/githash/a \ , th-compat' $_hkgname-$pkgver/$_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 \
+ -f-build-example
+ 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 "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+ rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE
+}
Copied: haskell-optparse-simple/repos/community-staging-x86_64/ghc9.patch (from rev 970897, haskell-optparse-simple/trunk/ghc9.patch)
===================================================================
--- community-staging-x86_64/ghc9.patch (rev 0)
+++ community-staging-x86_64/ghc9.patch 2021-07-02 17:19:12 UTC (rev 970898)
@@ -0,0 +1,21 @@
+diff --git a/src/Options/Applicative/Simple.hs b/src/Options/Applicative/Simple.hs
+index f5d2dac..defcdcb 100644
+--- a/src/Options/Applicative/Simple.hs
++++ b/src/Options/Applicative/Simple.hs
+@@ -52,6 +52,7 @@ import Data.Version
+ import GitHash (GitInfo, giDirty, giHash, tGitInfoCwdTry)
+ import Language.Haskell.TH (Q,Exp)
+ import qualified Language.Haskell.TH.Syntax as TH
++import Language.Haskell.TH.Syntax.Compat
+ import Options.Applicative
+ import System.Environment
+
+@@ -89,7 +90,7 @@ simpleVersion version =
+ [|concat (["Version "
+ ,$(TH.lift $ showVersion version)
+ ] ++
+- case $(TH.unTypeQ tGitInfoCwdTry) :: Either String GitInfo of
++ case $(unTypeSplice tGitInfoCwdTry) :: Either String GitInfo of
+ Left _ -> []
+ Right gi -> [ ", Git revision "
+ , giHash gi
More information about the arch-commits
mailing list