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

Felix Yan felixonmars at archlinux.org
Fri Feb 14 21:10:24 UTC 2020


    Date: Friday, February 14, 2020 @ 21:10:23
  Author: felixonmars
Revision: 571230

archrelease: copy trunk to community-staging-x86_64

Added:
  haskell-bencode/repos/community-staging-x86_64/
  haskell-bencode/repos/community-staging-x86_64/PKGBUILD
    (from rev 571229, haskell-bencode/trunk/PKGBUILD)
  haskell-bencode/repos/community-staging-x86_64/ghc-8.8.patch
    (from rev 571229, haskell-bencode/trunk/ghc-8.8.patch)

---------------+
 PKGBUILD      |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 ghc-8.8.patch |   38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 85 insertions(+)

Copied: haskell-bencode/repos/community-staging-x86_64/PKGBUILD (from rev 571229, haskell-bencode/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2020-02-14 21:10:23 UTC (rev 571230)
@@ -0,0 +1,47 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell at haskell.org>
+
+_hkgname=bencode
+pkgname=haskell-bencode
+pkgver=0.6.0.0
+pkgrel=22
+pkgdesc="Parser and printer for bencoded data."
+url="https://hackage.haskell.org/package/${_hkgname}"
+license=("BSD")
+arch=('x86_64')
+depends=('ghc-libs')
+makedepends=('ghc')
+source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz"
+        ghc-8.8.patch)
+sha512sums=('be05a5a086d095e8ed79318c7b0a6e5e29f2483f8c9cbfe768c339353d473f8eb5c3060aaed9d60675bdfd13686e02b2261939ca6d34cc9488318daf2cc664d1'
+            'a1e2daff64d7e2d624df45630ac94d801b13b575a4c2dd6d20c08fec5e996203e08394e7a1da6dd8251a8a1ecbf378d2921973eff7cc0ca88aa93ebfcf175326')
+
+prepare() {
+    cd $_hkgname-$pkgver
+    patch -p1 -i ../ghc-8.8.patch
+
+    echo -e "import Distribution.Simple\nmain = defaultMain" > Setup.hs
+}
+
+build() {
+    cd $_hkgname-$pkgver
+    
+    runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
+        --prefix=/usr --docdir=/usr/share/doc/$pkgname \
+        --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
+}
+
+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-bencode/repos/community-staging-x86_64/ghc-8.8.patch (from rev 571229, haskell-bencode/trunk/ghc-8.8.patch)
===================================================================
--- community-staging-x86_64/ghc-8.8.patch	                        (rev 0)
+++ community-staging-x86_64/ghc-8.8.patch	2020-02-14 21:10:23 UTC (rev 571230)
@@ -0,0 +1,38 @@
+From 8de5d71748c70144acc93e56c0f86065638f92ca Mon Sep 17 00:00:00 2001
+From: Peter Simons <simons at cryp.to>
+Date: Sat, 19 Oct 2019 16:13:18 +0200
+Subject: [PATCH] Support the new MonadFail class introduced by ghc-8.8.1.
+
+https://prime.haskell.org/wiki/Libraries/Proposals/MonadFail
+---
+ bencode.cabal              | 2 ++
+ src/Data/BEncode/Parser.hs | 5 +++++
+ 2 files changed, 7 insertions(+)
+
+diff --git a/src/Data/BEncode/Parser.hs b/src/Data/BEncode/Parser.hs
+index 8e4cb0b..55a6160 100644
+--- a/src/Data/BEncode/Parser.hs
++++ b/src/Data/BEncode/Parser.hs
+@@ -1,3 +1,4 @@
++{-# LANGUAGE CPP #-}
+ -----------------------------------------------------------------------------
+ -- |
+ -- Module      :  BParser
+@@ -27,6 +28,7 @@ module Data.BEncode.Parser {-#
+ 
+ import           Control.Applicative        hiding (optional)
+ import           Control.Monad
++import qualified Control.Monad.Fail         as Fail
+ import           Data.BEncode
+ import qualified Data.ByteString.Lazy.Char8 as L
+ import qualified Data.Map                   as Map
+@@ -61,6 +63,9 @@ instance Monad BParser where
+                                           Ok a b' -> runB (f a) b'
+                                           Error str -> Error str
+     return val = BParser $ Ok val
++#if MIN_VERSION_base(4,13,0)
++instance Fail.MonadFail BParser where
++#endif
+     fail str = BParser $ \_ -> Error str
+ 
+ instance Functor BParser where



More information about the arch-commits mailing list