summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2021-03-15 19:32:10 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2021-03-15 22:32:52 +0000
commit885d1e4a0d09e6316a0c98fa8c983751fb0864a7 (patch)
tree7408b336ed8e45939bcc002c1303e432607dc81a /dev-haskell
parentdev-haskell/cairo: bump up to 0.13.8.1 (diff)
downloadgentoo-885d1e4a0d09e6316a0c98fa8c983751fb0864a7.tar.gz
gentoo-885d1e4a0d09e6316a0c98fa8c983751fb0864a7.tar.bz2
gentoo-885d1e4a0d09e6316a0c98fa8c983751fb0864a7.zip
dev-haskell/gtk2hs-buildtools: allow gcc-11
Package-Manager: Portage-3.0.17, Repoman-3.0.2 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'dev-haskell')
-rw-r--r--dev-haskell/gtk2hs-buildtools/files/gtk2hs-buildtools-0.13.8.0-gcc-11.patch32
-rw-r--r--dev-haskell/gtk2hs-buildtools/gtk2hs-buildtools-0.13.8.0-r1.ebuild37
2 files changed, 69 insertions, 0 deletions
diff --git a/dev-haskell/gtk2hs-buildtools/files/gtk2hs-buildtools-0.13.8.0-gcc-11.patch b/dev-haskell/gtk2hs-buildtools/files/gtk2hs-buildtools-0.13.8.0-gcc-11.patch
new file mode 100644
index 000000000000..123c1359ff1b
--- /dev/null
+++ b/dev-haskell/gtk2hs-buildtools/files/gtk2hs-buildtools-0.13.8.0-gcc-11.patch
@@ -0,0 +1,32 @@
+Same fix as https://github.com/visq/language-c/issues/74
+
+"""
+Lexer: 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.
+"""
+--- a/c2hs/c/CLexer.x
++++ b/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)
diff --git a/dev-haskell/gtk2hs-buildtools/gtk2hs-buildtools-0.13.8.0-r1.ebuild b/dev-haskell/gtk2hs-buildtools/gtk2hs-buildtools-0.13.8.0-r1.ebuild
new file mode 100644
index 000000000000..30ffca890e99
--- /dev/null
+++ b/dev-haskell/gtk2hs-buildtools/gtk2hs-buildtools-0.13.8.0-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# ebuild generated by hackport 0.6.4
+
+CABAL_FEATURES="lib profile haddock hoogle hscolour"
+inherit haskell-cabal
+
+DESCRIPTION="Tools to build the Gtk2Hs suite of User Interface libraries"
+HOMEPAGE="http://projects.haskell.org/gtk2hs/"
+SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="+closuresignals"
+
+RDEPEND=">=dev-haskell/cabal-1.24.0.0:=[profile?]
+ dev-haskell/fail:=[profile?]
+ dev-haskell/hashtables:=[profile?]
+ dev-haskell/random:=[profile?]
+ >=dev-lang/ghc-7.8.2:=
+"
+DEPEND="${RDEPEND}
+ dev-haskell/alex
+ >=dev-haskell/cabal-1.18.1.3
+ dev-haskell/happy
+"
+
+PATCHES=("${FILESDIR}"/${PN}-0.13.8.0-gcc-11.patch)
+
+src_configure() {
+ haskell-cabal_src_configure \
+ $(cabal_flag closuresignals closuresignals)
+}