diff options
Diffstat (limited to 'dev-lang/ghc')
-rw-r--r-- | dev-lang/ghc/Manifest | 4 | ||||
-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 | 46 |
3 files changed, 57 insertions, 20 deletions
diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest index 1738e4056d91..68c9dcbe84ce 100644 --- a/dev-lang/ghc/Manifest +++ b/dev-lang/ghc/Manifest @@ -15,6 +15,7 @@ AUX ghc-8.8.4-autoconf-2.71.patch 705 BLAKE2B 8f2de61be130832fafe44d10ee5608a78b AUX ghc-9.0.2-CHOST-prefix.patch 282 BLAKE2B e0a2505c2ae91d5aad41fa3faf4fa7ece8ebcf0677377b76ff16ceea648eb4fde4f198a94574649d5cd7aeaa7d70ad4ea93a2636ba5868c470d2f47209a1065d SHA512 ce17006d5635ba24576bf80b3aabce9eb132ff65d820e22fd430178d3abf8536d3696b72d226384d1c42d9a6969fdcee5a05b260d55015c250fb72c45a1708e5 AUX ghc-9.0.2-darwin.patch 916 BLAKE2B ece65347ee4d40ce729642766273792c5f619c5f2788366f5f1e1784d630efadf59fa1c1e2e03dbd81633ad4202c81fc39a6c94472db52af2f99362ee1e67093 SHA512 300167a4c5c4b4bf6b18cdce242c8e27def88f4f3d810da0e5b60bdb77a186975716c2ac2ced8365e2f6a17b799e77eba8b3b77ae4b9efe69339dec48e78963a AUX ghc-9.0.2-fix-tests-python310.patch 1116 BLAKE2B fc7a7390cbbc737c66ea8401c9211318d078499bfd103f07ec2df0db9824041dfee279e364601a21d4d37a694a9442f3570c0333b2baab6173d6daa366c931da SHA512 0620ebffc49a06a65bd45bf324de4674b98e874291e6bebae1a95d585bbdf38cc201a734f7f20133880b46e9abf0839b59278688b00c892b94091d1c0257352b +AUX ghc-9.0.2-modorigin-semigroup.patch 1210 BLAKE2B e29917dd740bded98257366ca37d3ac8fdc8ffd0e988e6286b8cf21fb9f0232ce1584a1a22665f4afad36e5585c29091040cac16b1204022f5a5f3328420c4ff SHA512 dc54fb02dfed55f5a9309c61ec23859ad4f80fd271fe0ccb41b786fc7d44bc0d9722069e2f56731c6af5ad1703c5081ba9e4b4e683911af4ad9b498f53b67a5e AUX ghc-9.0.2-modorigin.patch 1169 BLAKE2B 33a02689b5404bf28cd2a04dc601412db54ae1bb64611c3d7831a8478aadf38848f76042206b441983f07d505ad81fc3593625ee91c96e9bdacfb1621c4408a6 SHA512 f319ce4e4af1bdacefc0cc34e508bc9cb37307e5dd4e3b573af8c40232ec5669e094e9231b8fe9a6d21a2bce32fda2e443953ac5f14a7104232c03231cd337df AUX ghc-9.0.2-verbose-modunusable.patch 572 BLAKE2B 425b5cea58690a8856ee8f7054263dc65c40badedc88c819e7de0b466cac4e87246e03555b39823e5886a5ca28ac26f64d56cec1bf0b0654294ff61c9679bb2d SHA512 b84e459b12815d7fd42b87ecca95514e0f2f8132c53299f6e289efc4c47d618e49f19795249e1a9a328baa270a92b018184e6e9eb05062c01355ce06fd76b9e9 AUX ghc-bash-completion 6496 BLAKE2B dc94a1979e886026a2fbe04bf7b45718ffa3e025a0e8945262e21a1243bfce6517fa1794f2ba6cd54cc853e93ad5d80472b9019b95762f10b5be83634a479955 SHA512 ede79ccf23555f60f48297d29bd98e3ccfd67d2cf27462153e00beb930398cb497e34ba8316e91df44c577ed11fdbe5606f7c6a2777e35d5e783590e49ccfeb5 @@ -41,11 +42,12 @@ 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 EBUILD ghc-8.10.4-r1.ebuild 26011 BLAKE2B 3b7e8346d9a786924ed2cd28907236c858b5ae6ed54c8f0cbd3726778bf42931720620ebbb7afe52b4a34c30bfa0f3ee3443f6967243fbe80daf774b87bda5bd SHA512 c9a5fd0cca03a63cbcb41c1b839ed99b04b2b0d795bc3907b65ef4cd3acbb586c8a2d8b086c15aa78e21c49ba05e036e70ca3872dd0a45cd5d50f7592c5ecdd9 EBUILD ghc-8.10.5-r1.ebuild 25945 BLAKE2B 6e7621ff08f0f641de72ab9f3abff034a78a5801daecd191a891312451da43a99dabe3967d9eba1af430e817919f644c8d31967b89bb9f685cc68d5a532192d5 SHA512 c43a34d5635db4e536b3a8de3ae33297b1c67e3a8506fbd4410ae7782491b14564b82625f2cca6ff87ecbe2fc798f4f5847fc36c6c68a8bba3d758ebfd91be0d EBUILD ghc-8.10.6.ebuild 25970 BLAKE2B 1368c5a3835cfaefaee4cf1f4b110e5718931adec663a6de2c57c2d638f015f7dfdb4841f40b6937b960371308dec44ed5e6cc87803c184a09b2ee20426db2b1 SHA512 5c54d4862233a59c5f027d80a187e0ee325a82a93effd3964655063f1fca3d96b0b65223fbb05957a5da2908e21445484fe4d2e40f3882750225e7dfe0711e73 EBUILD ghc-8.8.4-r1.ebuild 26648 BLAKE2B d1d083422c0b3bd6094baadf515e924c490c6f9098d7a4e766f82186fe202879900f15c3c9899110c4768d91e76ad54e53975dc8e46acda79fcf3a19faaefc79 SHA512 d2a474989a695e162306559c2a7c25c81fa6b1cb8b790c9e4e03173f14bb0305aee0b96115b1393e26b9347423531c835e85f401e5aa2b9e9e84e6a62efdab70 EBUILD ghc-9.0.1-r1.ebuild 25915 BLAKE2B a8a64db3c55b23d8422c1fca113729e47d73aa2953e1fe3f6442f9a5d2befe5ea1f69bf99166899362144ccfdfd85bd17001e47c895cacaed67b8817438ad51a SHA512 63adbfd4aa9835557ba0ee6b0c0e47234a56f7e1d94decefc0d5d99376e0b3a1c3d8af529dd7448d80bd5a97ad39e7fd448492be6a5f71a3d080b3f943201cf4 -EBUILD ghc-9.0.2.ebuild 26331 BLAKE2B 676b21c1e129810c3f065fc75f044faaa0ae73d15a3f8852c2f5b5ff561ff221b2a0f31c73ddbd372b68106a60a071ce87002f1287c7c50054714d13e4911d22 SHA512 07c7ebf1f654557d64071cae3d4049c3873c2d7652f5ece9a0b0631f57ce651b7bf4c970889f97cb9817453f4d615f02ae699ede4446d03a2cab7a2059cb9abd +EBUILD ghc-9.0.2.ebuild 26777 BLAKE2B cbbcd06dc58efa664e5bd461c1163b66fc0c66bab008cab21c29918250c856e424188285169c0cf19625ced5d1f70f0c81467cee4073cb8f407db4477ca2ea3f SHA512 db4c9f7b20216c456fd9e103f3faac28537deec17a35014353b4129215abd313ca74c33011a6ceb0ed80942fba56c3601bc3578cbaf173b7b03efa804c55ec62 MISC metadata.xml 878 BLAKE2B 4c5b78fa8dad9e9bf02a03735076171939be552cdb58e3022d66a75c4a7b8e6df363fc6eba192bf3c7ef725e6fff5c9db08deb1920040e535fee81d72e3157b9 SHA512 cd15a92e0d529ac9e8a031d98288de6327adcf48500cdfbef561039fa879b03f9b8c2cdb01835c6d8ade648ff95252f61759f3e471c5033f1153fce43aba3cc7 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..49acb75d8338 100644 --- a/dev-lang/ghc/ghc-9.0.2.ebuild +++ b/dev-lang/ghc/ghc-9.0.2.ebuild @@ -15,8 +15,8 @@ fi PYTHON_COMPAT=( python3_{8..10} ) inherit python-any-r1 -inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package -inherit multilib multiprocessing pax-utils toolchain-funcs prefix +inherit autotools bash-completion-r1 flag-o-matic ghc-package +inherit multiprocessing pax-utils toolchain-funcs prefix inherit check-reqs DESCRIPTION="The Glasgow Haskell Compiler" HOMEPAGE="https://www.haskell.org/ghc/" @@ -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,18 @@ src_prepare() { pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/bin/ghc" fi + # binpkg may have been built with FEATURES=splitdebug + if [[ -d "${WORKDIR}/usr/lib/debug" ]] ; then + rm -rf "${WORKDIR}/usr/lib/debug" || die + fi + 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 +501,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" |