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

Felix Yan felixonmars at archlinux.org
Tue Nov 6 22:28:25 UTC 2018


    Date: Tuesday, November 6, 2018 @ 22:28:25
  Author: felixonmars
Revision: 402352

archrelease: copy trunk to community-staging-x86_64

Added:
  haskell-gtk2hs-buildtools/repos/community-staging-x86_64/
  haskell-gtk2hs-buildtools/repos/community-staging-x86_64/PKGBUILD
    (from rev 402351, haskell-gtk2hs-buildtools/trunk/PKGBUILD)
  haskell-gtk2hs-buildtools/repos/community-staging-x86_64/base-4.12.patch
    (from rev 402351, haskell-gtk2hs-buildtools/trunk/base-4.12.patch)

-----------------+
 PKGBUILD        |   44 ++++++++++++++++++++++++++++++++++++++++++++
 base-4.12.patch |   44 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 88 insertions(+)

Copied: haskell-gtk2hs-buildtools/repos/community-staging-x86_64/PKGBUILD (from rev 402351, haskell-gtk2hs-buildtools/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2018-11-06 22:28:25 UTC (rev 402352)
@@ -0,0 +1,44 @@
+# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
+
+pkgname=haskell-gtk2hs-buildtools
+pkgver=0.13.4.0
+pkgrel=8
+pkgdesc="Tools to build the Gtk2Hs suite of User Interface libraries."
+url="https://hackage.haskell.org/package/gtk2hs-buildtools"
+license=('GPL2')
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-random' 'haskell-hashtables')
+makedepends=('alex' 'happy' 'ghc')
+provides=('gtk2hs-buildtools')
+conflicts=('gtk2hs-buildtools')
+replaces=('gtk2hs-buildtools')
+source=("https://hackage.haskell.org/packages/archive/gtk2hs-buildtools/${pkgver}/gtk2hs-buildtools-${pkgver}.tar.gz"
+        base-4.12.patch)
+sha512sums=('ac7bfd5a1abffefc5eddd97c2e5030a86f413fac1449dca93302cf54abf7def83ab49498cb471aa284f28612d7399116fc5f3d02a0d5108fb9b3eded9248f750'
+            '67f515a9985e3188ba3ae4923027a4fd4a5d88acd5881431d9a3073e45924fa3eff46ab1ece3b7591cb5743391f4e090d4ce91b91845ba7b450bf65d097118f7')
+
+prepare() {
+    cd gtk2hs-buildtools-$pkgver
+    patch -p2 -i ../base-4.12.patch
+}
+
+build() {
+    cd "${srcdir}/gtk2hs-buildtools-${pkgver}"
+
+    runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
+        --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir="$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 "${srcdir}/gtk2hs-buildtools-${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"
+}

Copied: haskell-gtk2hs-buildtools/repos/community-staging-x86_64/base-4.12.patch (from rev 402351, haskell-gtk2hs-buildtools/trunk/base-4.12.patch)
===================================================================
--- community-staging-x86_64/base-4.12.patch	                        (rev 0)
+++ community-staging-x86_64/base-4.12.patch	2018-11-06 22:28:25 UTC (rev 402352)
@@ -0,0 +1,44 @@
+diff --git a/tools/c2hs/base/state/StateBase.hs b/tools/c2hs/base/state/StateBase.hs
+index aebd885b..c07d29fc 100644
+--- a/tools/c2hs/base/state/StateBase.hs
++++ b/tools/c2hs/base/state/StateBase.hs
+@@ -58,6 +58,7 @@ where
+ 
+ import Control.Applicative (Applicative(..))
+ import Control.Monad (liftM, ap)
++import Control.Monad.Fail (MonadFail (..))
+ 
+ import Position   (Position)
+ import UNames     (NameSupply)
+@@ -110,6 +111,8 @@ instance Monad (PreCST e s) where
+   (>>=)  = (+>=)
+   (>>)   = (+>)
+ 
++instance MonadFail (PreCST e s) where
++  fail = error
+ 
+ -- unwrapper coercion function (EXPORTED)
+ --
+diff --git a/tools/c2hs/c/CParserMonad.hs b/tools/c2hs/c/CParserMonad.hs
+index 12c4ffa6..ef720b93 100644
+--- a/tools/c2hs/c/CParserMonad.hs
++++ b/tools/c2hs/c/CParserMonad.hs
+@@ -63,6 +63,7 @@ import Idents    (Ident, lexemeToIdent, identToLexeme)
+ 
+ import Control.Applicative (Applicative(..))
+ import Control.Monad (liftM, ap)
++import Control.Monad.Fail (MonadFail (..))
+ import Data.Set  (Set)
+ import qualified Data.Set as Set (fromList, insert, member, delete)
+ 
+@@ -83,6 +84,9 @@ data PState = PState {
+ 
+ newtype P a = P { unP :: PState -> ParseResult a }
+ 
++instance MonadFail P where
++  fail m = getPos >>= \pos -> failP pos [m]
++
+ instance Functor P where
+   fmap = liftM
+ 
+


More information about the arch-commits mailing list