[arch-commits] Commit in haskell-gtk2hs-buildtools/repos (3 files)
Felix Yan
felixonmars at gemini.archlinux.org
Fri Dec 31 06:07:33 UTC 2021
Date: Friday, December 31, 2021 @ 06:07:33
Author: felixonmars
Revision: 1089566
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 1089565, haskell-gtk2hs-buildtools/trunk/PKGBUILD)
haskell-gtk2hs-buildtools/repos/community-staging-x86_64/gcc-11.patch
(from rev 1089565, haskell-gtk2hs-buildtools/trunk/gcc-11.patch)
--------------+
PKGBUILD | 44 ++++++++++++++++++++++++++++++++++++++++++++
gcc-11.patch | 37 +++++++++++++++++++++++++++++++++++++
2 files changed, 81 insertions(+)
Copied: haskell-gtk2hs-buildtools/repos/community-staging-x86_64/PKGBUILD (from rev 1089565, haskell-gtk2hs-buildtools/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2021-12-31 06:07:33 UTC (rev 1089566)
@@ -0,0 +1,44 @@
+# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
+
+pkgname=haskell-gtk2hs-buildtools
+pkgver=0.13.8.0
+pkgrel=135
+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"
+ gcc-11.patch)
+sha512sums=('fa427979f20f10ca8baf38c80c28a5190d18b767046de347950ea799660e1d54939d668c01c469da36d2df6c347f7ba67e2e85f3a7000021f8d37852093e03fd'
+ 'd7e2c4b9bb8ef71f4f2deda6e81aa1b7a0e5bc5f534334513fcd95be6386448b8c1516224be421f450f16e1efbc10aaeba30f485cb5f3a1c31ac2e3aa435733b')
+
+prepare() {
+ cd gtk2hs-buildtools-$pkgver
+ patch -p2 -i ../gcc-11.patch
+}
+
+build() {
+ cd 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 # --ghc-option=-fllvm
+ 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
+}
+
+package() {
+ cd 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/gcc-11.patch (from rev 1089565, haskell-gtk2hs-buildtools/trunk/gcc-11.patch)
===================================================================
--- community-staging-x86_64/gcc-11.patch (rev 0)
+++ community-staging-x86_64/gcc-11.patch 2021-12-31 06:07:33 UTC (rev 1089566)
@@ -0,0 +1,37 @@
+commit f4e880b934a2ddcb7f65a68185a84043f2f152a7
+Author: Felix Yan <felixonmars at archlinux.org>
+Date: Fri May 14 21:28:55 2021 +0800
+
+ CLexer: allow zeros as line numbers in preprocessed directives
+
+ Starting from `gcc-11` initial line numbers not related to
+ actual files are marked as zeros. See the "preprocessor:
+ Better line info for <builtin> & <command-line>"
+ https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=6bf2ff0d52a9
+
+ language-c's grammar did not allow it (by accident)
+
+ ```
+ Prelude> Language.C.parseC (Data.ByteString.Char8.pack "# 0 \"/dev/null\"\n") Language.C.nopos
+ Left <no file>:: [ERROR] >>> Syntax Error !
+ Lexical error !
+ The character '#' does not fit here.
+ ```
+
+ The change allows '0' in line numbers as well.
+
+ Backported from https://github.com/visq/language-c/commit/8133e1526750ab74ca4d5180fb140a7e172d473f
+
+diff --git a/tools/c2hs/c/CLexer.x b/tools/c2hs/c/CLexer.x
+index 0099af5c..9ed0bfba 100644
+--- a/tools/c2hs/c/CLexer.x
++++ b/tools/c2hs/c/CLexer.x
+@@ -130,7 +130,7 @@ $white+ ;
+ -- * allows further ints after the file name a la GCC; as the GCC CPP docu
+ -- doesn't say how many ints there can be, we allow an unbound number
+ --
+-\#$space*@int$space*(\"($infname|@charesc)*\"$space*)?(@int$space*)*$eol
++\#$space*@digits$space*(\"($infname|@charesc)*\"$space*)?(@int$space*)*$eol
+ { \pos len str -> setPos (adjustPos (take len str) pos) >> lexToken }
+
+ -- #pragma directive (K&R A12.8)
More information about the arch-commits
mailing list