diff options
author | matoro <matoro@users.noreply.github.com> | 2022-07-13 14:47:19 -0400 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-07-22 22:14:47 +0000 |
commit | ba7a7c2811d41d7708a22e0953c3b71acb37d6c0 (patch) | |
tree | a9bb75d610ec47d53d77fd8fea8d4ae9ecdd3daf /dev-lang/ghc | |
parent | app-shells/fzf: add 0.31.0 (diff) | |
download | gentoo-ba7a7c2811d41d7708a22e0953c3b71acb37d6c0.tar.gz gentoo-ba7a7c2811d41d7708a22e0953c3b71acb37d6c0.tar.bz2 gentoo-ba7a7c2811d41d7708a22e0953c3b71acb37d6c0.zip |
dev-lang/ghc: keyword 9.0.2 for ~amd64, ~ppc64, ~x86
Closes: https://bugs.gentoo.org/583400
Signed-off-by: matoro <matoro@users.noreply.github.com>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-lang/ghc')
-rw-r--r-- | dev-lang/ghc/Manifest | 1 | ||||
-rw-r--r-- | dev-lang/ghc/files/ghc-9.0.2-modorigin-semigroup.patch | 27 | ||||
-rw-r--r-- | dev-lang/ghc/ghc-9.0.2.ebuild | 40 |
3 files changed, 51 insertions, 17 deletions
diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest index fde4b8f1e0c6..93729b3b026b 100644 --- a/dev-lang/ghc/Manifest +++ b/dev-lang/ghc/Manifest @@ -21,4 +21,5 @@ DIST ghc-bin-8.8.4-x86_64-pc-linux-gnu.tbz2 118897883 BLAKE2B a180b2dd1a3bc22204 DIST ghc-bin-9.0.1-i686-pc-linux-gnu.tbz2 122955511 BLAKE2B b870f46cc78fcc1d715aafe7108951582cfd12495b4e9d804d4b66562c66a6a2b2d9513031aedc8f3630a0cdbb3257943304b05732301a084f89487452f2f2d9 SHA512 aafd4233c40f93b71e6ac1acc8a75e30d49b826e4bce6d9832836966fd5f6c4898963bd4c2f34577f4199c1d9a3f537ac1e7d87eab11e9fb5e849573580ed3fb DIST ghc-bin-9.0.1-x86_64-pc-linux-gnu.tbz2 121542968 BLAKE2B 837870e68138f8d97dc8b2aae90090cf02416628602ca4ba4417ac92b49155f10028b05ac465665b8872b32372a5cee075616983f2eacdebb0188bd2ce6a93d2 SHA512 0e8c6d2e6f32fac95588f7323a4e02dddfc9ec2476a82b97bf5a106d3810f7e638fda7124c53b5bbc563fce70f4436553c282d8ea2f1f5fdf4fcccfb15a2b079 DIST ghc-bin-9.0.2-i686-pc-linux-gnu.tbz2 123509908 BLAKE2B 45614984803a7bfa266f99d4adb4b5f2ab7b9e5e89c6ecd501296fc99a1d96e798ccb9c832f8dcb15fff9725beb918a7b63e62ff13f59b6506a2ef17930c45d2 SHA512 e0b7f4474c16f0763a2f787027fbdfeb3125b48c987fa1196bc189fefad9f0bfa2806da62af46d61ca911f5275b578076e2b326acf39e0894a8daa9deda0843a +DIST ghc-bin-9.0.2-powerpc64le-unknown-linux-gnu.tar.gz 275228045 BLAKE2B d1c68d8396d675f5d4f3712b2ed5bc3c328a4304f9ae4441be586d24eaf3e7d34c36c6cd3bc4d85def3647919a44c3d97cf9199b43c158e3dcc6a304cfb9220b SHA512 2a277eb854b33d7361b5d93dee2747f81fc93dcc08bb3579d6706634313352675a15429eec0b6f4f19a8bd36e8f51f1c09729a2bf4a3bba34ba35dcf2b37f4e0 DIST ghc-bin-9.0.2-x86_64-pc-linux-gnu.tbz2 121536759 BLAKE2B 4433e2d266f065d2b2944b711d622ec26288a2187ac03562257a671744b44da35110ce16ac6d76f7062a563488885326be073e0ff03c7e48250051c3b4763d96 SHA512 2de29a9ddbfd0fac797cdd628f3657ff38e6a153151849508bba75d36f84394ed77750435ff5cc1bdfcd30ef2b6e009bde965bd0a83e0496b5027239642f4b6c diff --git a/dev-lang/ghc/files/ghc-9.0.2-modorigin-semigroup.patch b/dev-lang/ghc/files/ghc-9.0.2-modorigin-semigroup.patch new file mode 100644 index 000000000000..75e84df4ab66 --- /dev/null +++ b/dev-lang/ghc/files/ghc-9.0.2-modorigin-semigroup.patch @@ -0,0 +1,27 @@ +From bad99a0bb7981c0287dbc383176338acea98a2d5 Mon Sep 17 00:00:00 2001 +From: Sylvain Henry <sylvain@haskus.fr> +Date: Fri, 18 Feb 2022 11:01:04 +0100 +Subject: [PATCH] Quick and dirty fix for ModuleOrigin SemiGroup instance +Bug: https://github.com/gentoo-haskell/gentoo-haskell/issues/1250#issuecomment-1044257595 +Bug: https://gitlab.haskell.org/ghc/ghc/-/issues/21097 +Signed-off-by: hololeap <hololeap@protonmail.com> + +--- +diff -urN ghc-9.0.2/compiler/GHC/Unit/State.hs ghc-9.0.2-r1/compiler/GHC/Unit/State.hs +--- ghc-9.0.2/compiler/GHC/Unit/State.hs 2021-10-19 05:20:00.000000000 -0600 ++++ ghc-9.0.2-r1/compiler/GHC/Unit/State.hs 2022-02-19 20:26:16.756489309 -0700 +@@ -235,6 +235,14 @@ + | otherwise = panic "ModOrigin: package both exposed/hidden" + g Nothing x = x + g x Nothing = x ++ ModHidden <> ModHidden = ModHidden ++ ModUnusable x <> ModUnusable _y = ModUnusable x ++ ++ ModUnusable _ <> ModHidden = ModHidden ++ ModHidden <> ModUnusable _ = ModHidden ++ ModUnusable _x <> y@ModOrigin{} = y ++ x@ModOrigin{} <> ModUnusable _y = x ++ + _x <> _y = panic "ModOrigin: hidden module redefined" + + instance Monoid ModuleOrigin where diff --git a/dev-lang/ghc/ghc-9.0.2.ebuild b/dev-lang/ghc/ghc-9.0.2.ebuild index b39fe464ab9a..0d233e32318e 100644 --- a/dev-lang/ghc/ghc-9.0.2.ebuild +++ b/dev-lang/ghc/ghc-9.0.2.ebuild @@ -33,7 +33,7 @@ arch_binaries="$arch_binaries amd64? ( https://eidetic.codes/ghc-bin-${PV}-x86_6 #arch_binaries="$arch_binaries ia64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )" #arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )" #arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )" -#arch_binaries="$arch_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tbz2 ) )" +arch_binaries="$arch_binaries ppc64? ( !big-endian? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tar.gz ) )" #arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )" arch_binaries="$arch_binaries x86? ( https://eidetic.codes/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )" @@ -49,10 +49,9 @@ yet_binary() { amd64) return 0 ;; #ia64) return 0 ;; #ppc) return 0 ;; - #ppc64) - # use big-endian && return 0 - # return 0 - # ;; + ppc64) + use big-endian || return 0 + ;; #sparc) return 0 ;; x86) return 0 ;; *) return 1 ;; @@ -77,7 +76,7 @@ BUMP_LIBRARIES=( LICENSE="BSD" SLOT="0/${PV}" -KEYWORDS="" +KEYWORDS="~amd64 ~ppc64 ~x86" IUSE="big-endian +doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test" IUSE+=" binary" RESTRICT="!test? ( test )" @@ -273,15 +272,6 @@ ghc_setup_cflags() { for flag in ${LDFLAGS}; do append-ghc-cflags link ${flag} done - - # GHC uses ${CBUILD}-gcc, ${CHOST}-gcc and ${CTARGET}-gcc at a single build. - # Skip any gentoo-specific tweaks for cross-case to avoid passing unsupported - # options to gcc. - if is_native; then - # prevent from failing to build unregisterised ghc: - # https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html - use ppc64 && append-ghc-cflags persistent compile -mminimal-toc - fi } # substitutes string $1 to $2 in files $3 $4 ... @@ -425,6 +415,16 @@ src_prepare() { pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/bin/ghc" fi + # binpkg may have been built with FEATURES=splitdebug + [[ -d "${WORKDIR}/usr/lib/debug" ]] && rm -rf "${WORKDIR}/usr/lib/debug" || die + find "${WORKDIR}/usr/lib" -type d -empty -delete 2>/dev/null # do not die on failure here + + # ffi headers don't get included in the binpkg for some reason + for f in "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/include/"{ffi.h,ffitarget.h} + do + [[ -e "${f}" ]] || ln -sf "$($(tc-getPKG_CONFIG) --cflags-only-I libffi | sed "s/-I//g" | tr -d " ")/$(basename "${f}")" "${f}" || die + done + if use binary; then if use prefix; then relocate_ghc "${EPREFIX}" @@ -499,11 +499,17 @@ src_prepare() { eapply "${FILESDIR}"/${PN}-9.0.2-CHOST-prefix.patch eapply "${FILESDIR}"/${PN}-9.0.2-darwin.patch + # Incompatible with ghc-9.0.2-modorigin-semigroup.patch # Below patch should not be needed by ghc-9.2 - eapply "${FILESDIR}"/${PN}-9.0.2-modorigin.patch + #eapply "${FILESDIR}"/${PN}-9.0.2-modorigin.patch # ModUnusable pretty-printing should include the reason - eapply "${FILESDIR}/${PN}-9.0.2-verbose-modunusable.patch" + #eapply "${FILESDIR}/${PN}-9.0.2-verbose-modunusable.patch" + + # Fixes panic when compiling some packages + # https://github.com/gentoo-haskell/gentoo-haskell/issues/1250#issuecomment-1044257595 + # https://gitlab.haskell.org/ghc/ghc/-/issues/21097 + eapply "${FILESDIR}/${PN}-9.0.2-modorigin-semigroup.patch" # Needed for testing with python-3.10 use test && eapply "${FILESDIR}/${PN}-9.0.2-fix-tests-python310.patch" |