summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhololeap <hololeap@users.noreply.github.com>2023-03-14 18:23:00 -0600
committerSam James <sam@gentoo.org>2023-03-17 18:12:51 +0000
commita1da3240d10339cbd40203f86e4caf7586c9ce31 (patch)
treece8e458b05b929e3fc3e63cf5b14f2a2ab14b5b6 /dev-lang/ghc
parentvirtual/pandoc: stabilize 0 for amd64 (diff)
downloadgentoo-a1da3240d10339cbd40203f86e4caf7586c9ce31.tar.gz
gentoo-a1da3240d10339cbd40203f86e4caf7586c9ce31.tar.bz2
gentoo-a1da3240d10339cbd40203f86e4caf7586c9ce31.zip
dev-lang/ghc: Migrate to gpkg binaries
Use newer gpkg format for binaries, compressed with XZ. Signed-off-by: hololeap <hololeap@users.noreply.github.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-lang/ghc')
-rw-r--r--dev-lang/ghc/Manifest8
-rw-r--r--dev-lang/ghc/ghc-8.10.6-r3.ebuild61
-rw-r--r--dev-lang/ghc/ghc-9.0.2-r4.ebuild44
3 files changed, 69 insertions, 44 deletions
diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index dbcaf352afc1..67e7a921c719 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -3,14 +3,14 @@ DIST ghc-8.10.6-testsuite.tar.xz 2265044 BLAKE2B 72a1e955acecc92a720ee2747d96cac
DIST ghc-9.0.2-riscv64-llvm.patch.xz 7148 BLAKE2B 01a0d4036b649f663aebebab06990ac041533e7462d3ee9e143444f1119b736f2f8f2dfc293d61da1fac9f0d3ef12e98bab5b0c9fe8440ed1eab22a1d45fb9d7 SHA512 8afb62d5363d8a1a8f63e85335f3c8fa35b7d22899ebe334218a60ce9519852325c8ce93bb0be794c36cbc3c1cc031b7b1e2f4d7665d71f49e95f737bd91ba1a
DIST ghc-9.0.2-src.tar.xz 27270396 BLAKE2B 0a73d910d3ef11161f895849025fe37ce231932f7cde441fdf620cf8c51678060a804467879eb0ee5c0a30413604c56e28e2aa1cde01e45c620b76987d9c0c0e SHA512 32994c7d2b8f47bae604cd825bfcf9c788d79ce26d1d5f58bd73a7093e11ae6c3c17b31dc0c9e454dbf67ca169b942f92213c388d615768cae86055bf6094dee
DIST ghc-9.0.2-testsuite.tar.xz 2403564 BLAKE2B 0e7f6fefb9c972f94073aca8b15147913ffa8d3cd3ff7fc63ef7e20b4efd8b443cf21f12e1ab0f5044790f6d8af6cf7788bda85a21b2f356ddface86eb896670 SHA512 b2375500ae837d74af8085d099899b5a7a589c59bdcc033ca0bd6e00f33c4f8d90b481e0c7c3de113e607fcfafdfe8edde4713e6d242b2d4ee87df2eb960c9c7
-DIST ghc-bin-8.10.6-i686-pc-linux-gnu.tbz2 124324289 BLAKE2B afb34984872b35fdedbdedeb8756cc7c33e5b943dba57dd86910b076d483bb643265d0ab0027784dec5dc489eabd65b5ab17474f25fb2ce657925aa0efaa9033 SHA512 4be13e6dba298d12a4d49ae4633eec83cfaaaf22b5f8cfca5f5952aa294ae52fb3601490beed3bda5a7f7b6a5bd81e0ecc9fc39e8df836cc8fd377a0d0b783a0
-DIST ghc-bin-8.10.6-x86_64-pc-linux-gnu.tbz2 122871118 BLAKE2B 527b36abf60390c91f91bc650ee25484d39d377739da87b5b6fd1a752705c1f3bc0ce0c68644657c9a7c1fc9a3b858b9dd7d84b25eab1a89125fccb6eb1f6250 SHA512 42b7fae339e82a6078fae8920efea8d0992e4774ea66b100e22dd9df168be57d8bce52558b8501c3c567c40776389d94bde3f17d26d63535140ce26ac16c27e1
+DIST ghc-bin-8.10.6-r3-i686-pc-linux-gnu.gpkg.tar 73062400 BLAKE2B c0701c16434ae5918f5ec1c55ab06aa036b98947f0f68c58aaa59b2a23ebb408f60f1886c76271351f2e99a334d6e1feeb47b6c4c14c09040b197eebbbcf3142 SHA512 d75bb6d06d32a5f60b020e9d8d77485ea8c391fd88a4583d0ddfd33a0e75506dc23b736fa6a15da25116c6c90c53b2d75dae38935581c5145d5b247d3c19f2a6
+DIST ghc-bin-8.10.6-r3-x86_64-pc-linux-gnu.gpkg.tar 123996160 BLAKE2B 3279a3f312225cae30196467b6f61b749f8ea037b2b65adaafdea1668c81a5ed402bd3acedc02aaee371a6d27c3c01c0f4c837bb9058a0ed8b61715afab5ccc9 SHA512 ea24551137b5057a2c29e0bd9a22ce247669dc38bcebac7ff3bac746b1fc9bd46b1fe2d894fd862745bb97af0d92be2a0563c18fc29e7565c5506552edb0c3e1
DIST ghc-bin-9.0.2-aarch64-unknown-linux-gnu.tar.gz 304621314 BLAKE2B d38b8571d41b5703da6b29f43664293761865166a7e3ab6b9c4b039f1af15faa4aa2013a32eb00059d6e595984895762eadff7b62141157d2dea6eb9b035138d SHA512 94e0e00329a18b494b509b3f8190cf6fed2399a2ac2d2d96fdfd90bf5dbeb8db68b6759f719ad85f8873961b0e983ff0006ce0bf109e96462169cbd9fa7b6784
-DIST ghc-bin-9.0.2-i686-pc-linux-gnu-r4.tbz2 118374393 BLAKE2B 5fdb0125bc76570923b8c7238d6fd0e4e8a3fb50b4bf7e1921fe43cbb64c23a259627d6d1ce86141462bbf716d0b41a4afda9defd235dc3bc92d389a7e9414ca SHA512 d4b0530d81a01adfd4878e663700b9e444e1194a7a020b42fd8f620c141fafef9bef0f24cd2c90f36680818797e883f61933d8da1adb041aa945a7c4d10c09d7
DIST ghc-bin-9.0.2-i686-pc-linux-gnu.tbz2 123509908 BLAKE2B 45614984803a7bfa266f99d4adb4b5f2ab7b9e5e89c6ecd501296fc99a1d96e798ccb9c832f8dcb15fff9725beb918a7b63e62ff13f59b6506a2ef17930c45d2 SHA512 e0b7f4474c16f0763a2f787027fbdfeb3125b48c987fa1196bc189fefad9f0bfa2806da62af46d61ca911f5275b578076e2b326acf39e0894a8daa9deda0843a
DIST ghc-bin-9.0.2-powerpc64-unknown-linux-gnu.tar.gz 235636284 BLAKE2B 878ac300cca5d2cbc5cb21dbb347da755b4027cbf63ec77464740854fa8010569de5e03acef67cd877da13665c906b2fd04e24e226e9eb39b57ba979093c732b SHA512 28f096e965abdac9cc370c882639f10285b9073ba5332f7af215eccff948e41c01c3d6bb3bc8e3b4e809e12867a95b49f82dd76e0090b974088f75ab9d1bc199
DIST ghc-bin-9.0.2-powerpc64le-unknown-linux-gnu.tar.gz 275226316 BLAKE2B 10ade2359432b0ede7431ee543f0ff47f4b203465d81719da579ad63ca467359eb9fcf7336a12feb6ff75a480f349576ff8ea1b4ebe1094fff228ae4fd00d6e0 SHA512 64b4c84d149358b8d3a6cb29a6d3a75af11e7b14e6d910c9789c9949262e4ed2a17f8a0d1e5dd297121957061fe2395d6f43acae6b4ab28851e3cd414cd9c89c
+DIST ghc-bin-9.0.2-r4-i686-pc-linux-gnu.gpkg.tar 81059840 BLAKE2B 655405cd402cc7af424baf5b715f64af3ce97d474c883c618cd8e6fae40274dc6f584872c607cbe3553141a199729df98ddbdb5947a50520b67f53946f20d25a SHA512 401ab9ae646e18519ba1b06705944862d3f802068c4eae19fc019899eb14ceef95fa57e51b5527e5c5314c2433aff7e418e1d35c2de425c142c34e8fa21a5f46
+DIST ghc-bin-9.0.2-r4-x86_64-pc-linux-gnu.gpkg.tar 123955200 BLAKE2B b1f45eea658f496997e63c21e3ef190749c122ee3a058d5f25fd90a2e2c33841817c540b9bf87e27e6981d9fb28d9201454217fa8ba9c1d9fc4ccf3d20652158 SHA512 06a240f7117f30179073e075634510d9ffe880010de16c93a001dce7b3020666b0b26d51c2c08cdaee7fc6513d9ffc7082f20b233d62b9149419abba2b4bd4ee
DIST ghc-bin-9.0.2-riscv64-unknown-linux-gnu.tar.gz 313475807 BLAKE2B a5e1bbd4630eaff63dd01d79fdcb26a663771c0241d3211aa3a0033cb58addbe8e696177500ac06ae727fc645bfc6f16a3df763a6a0ae039b8823bcbfb9918bb SHA512 5e462f6f9d3f3507b3e09230729faa2a3e1fa92a8024fac602d75b804fff25f27e335871658f4b7b2c671f9e066373ca0285720da315a6c22f6f2c9c3cfea927
DIST ghc-bin-9.0.2-x86_64-pc-linux-gnu-r1.tbz2 121347519 BLAKE2B 6bd41cdb8ba1661735e46df4709888e6461cff969678716c82681a0a0b0e8d0a32532a070f52efb0ab99ca126207998e8883d01902071e797a7a0f19881d5925 SHA512 c7de43577fd97e6fbde7bbffba4e1d2b83cdda405cff46f95c9eff23260542b426091d8dba75605d81ed41740a793a409e7448538e5adc7a391a901f20e8f2e4
-DIST ghc-bin-9.0.2-x86_64-pc-linux-gnu-r4.tbz2 117160553 BLAKE2B 6314d6ae30f83325cbe5d620399f2517b90b32e6b54d5570acafe0266307013c729afc1de93be092bdb86e1f276f55e7bd19392c74f1a123110a76800982a446 SHA512 f12e0861276f92e23e5fb42ee702cac04f9726895b8dde29e29d549fe41cad417d8f60aa6cb537e64c8de1a3550a31f62f9ce391bf3fc866f05f511b5b2463f1
DIST process-1.6.16.0.tar.gz 87354 BLAKE2B 8c2977d6801faef8825ed35f058a6207a518f72eb87ac3144f630bc028f4753cefb9ed4d3fc29185438bcb4f38d33f5a45aebec6a8101e4cdc1b3570ada2e5dc SHA512 1663f2746a05a5a4c29d249db54eaa49edbbadfe8d189eab02276c3f6f3d6b84c81cc4333318c42c7a7265638402cb13276f08aeea134a7f5dd98da050a34341
diff --git a/dev-lang/ghc/ghc-8.10.6-r3.ebuild b/dev-lang/ghc/ghc-8.10.6-r3.ebuild
index 2478db3c35bd..7e379a6cf352 100644
--- a/dev-lang/ghc/ghc-8.10.6-r3.ebuild
+++ b/dev-lang/ghc/ghc-8.10.6-r3.ebuild
@@ -13,11 +13,11 @@ if [[ ${CTARGET} = ${CHOST} ]] ; then
fi
fi
-PYTHON_COMPAT=( python3_{9..10} )
+PYTHON_COMPAT=( python3_{9..11} )
inherit python-any-r1
inherit autotools bash-completion-r1 flag-o-matic ghc-package
-inherit multilib multiprocessing pax-utils toolchain-funcs prefix
-inherit check-reqs
+inherit multiprocessing pax-utils toolchain-funcs prefix
+inherit check-reqs unpacker
DESCRIPTION="The Glasgow Haskell Compiler"
HOMEPAGE="https://www.haskell.org/ghc/"
@@ -25,19 +25,24 @@ HOMEPAGE="https://www.haskell.org/ghc/"
arch_binaries=""
BIN_PV=${PV}
+[[ $PR != r0 ]] && BIN_REV=${PR}
# Differentiate glibc/musl
#glibc_binaries="$glibc_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
-glibc_binaries="$glibc_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
+glibc_binaries+=" amd64? ( https://eidetic.codes/${PN}-bin-${PVR}-x86_64-pc-linux-gnu.gpkg.tar )"
#glibc_binaries="$glibc_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
#glibc_binaries="$glibc_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
#glibc_binaries="$glibc_binaries ia64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
#glibc_binaries="$glibc_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
#glibc_binaries="$glibc_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
-#glibc_binaries="$glibc_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tbz2 ) )"
+#glibc_binaries="$glibc_binaries ppc64? (
+# big-endian? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-powerpc64-unknown-linux-gnu.tar.gz )
+# !big-endian? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tar.gz )
+#)"
+#glibc_binaries="$glibc_binaries riscv? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-riscv64-unknown-linux-gnu.tar.gz )"
#glibc_binaries="$glibc_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-glibc_binaries="$glibc_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+glibc_binaries+=" x86? ( https://eidetic.codes/${PN}-bin-${PVR}-i686-pc-linux-gnu.gpkg.tar )"
#musl_binaries="$musl_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
#musl_binaries="$musl_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-musl.tbz2 )"
@@ -46,12 +51,13 @@ glibc_binaries="$glibc_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/g
#musl_binaries="$musl_binaries ia64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
#musl_binaries="$musl_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
#musl_binaries="$musl_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
-#musl_binaries="$musl_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-musl.tbz2 ) )"
+#musl_binaries="$musl_binaries ppc64? ( !big-endian? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-powerpc64le-unknown-linux-musl.tar.gz ) )"
+#musl_binaries="$musl_binaries riscv? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-riscv64-unknown-linux-musl.tar.gz )"
#musl_binaries="$musl_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
#musl_binaries="$musl_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-musl.tbz2 )"
-[[ -n $glibc_binaries ]] && arch_binaries="$arch_binaries elibc_glibc? ( $glibc_binaries )"
-[[ -n $musl_binaries ]] && arch_binaries="$arch_binaries elibc_musl? ( $musl_binaries )"
+[[ -n $glibc_binaries ]] && arch_binaries+=" elibc_glibc? ( $glibc_binaries )"
+[[ -n $musl_binaries ]] && arch_binaries+=" elibc_musl? ( $musl_binaries )"
# various ports:
#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
@@ -67,9 +73,8 @@ yet_binary() {
amd64) return 0 ;;
#ia64) return 0 ;;
#ppc) return 0 ;;
- #ppc64)
- # use big-endian || return 0
- # ;;
+ #ppc64) return 0 ;;
+ #riscv) return 0 ;;
#sparc) return 0 ;;
x86) return 0 ;;
*) return 1 ;;
@@ -86,6 +91,7 @@ yet_binary() {
#ppc64)
# use big-endian || return 0
# ;;
+ #riscv) return 0 ;;
#sparc) return 0 ;;
#x86) return 0 ;;
*) return 1 ;;
@@ -444,7 +450,7 @@ src_unpack() {
case ${CHOST} in
*-darwin* | *-solaris*) ONLYA=${GHC_P}-src.tar.xz ;;
esac
- unpack ${ONLYA}
+ unpacker ${ONLYA}
}
src_prepare() {
@@ -455,16 +461,24 @@ src_prepare() {
ghc_setup_cflags
- if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
- # Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
- # See bug #313635.
- sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
- "${WORKDIR}/usr/bin/ghc-${BIN_PV}"
-
- # allow hardened users use vanilla binary to bootstrap ghc
- # ghci uses mmap with rwx protection at it implements dynamic
- # linking on it's own (bug #299709)
- pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/bin/ghc"
+ if ! use ghcbootstrap; then
+ # The switch to gpkg binaries means that they are unpacked in the wrong
+ # location. They are now unnpacked in the $orig_bindir and need to be
+ # moved so that usr/ is in $WORKDIR.
+ local orig_bindir="${WORKDIR}/${PN}-${BIN_PV}${BIN_REV:+-${BIN_REV}}"
+ mv -v "${orig_bindir}/image/usr" "${WORKDIR}" || die
+
+ if [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
+ # Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
+ # See bug #313635.
+ sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+ "${WORKDIR}/usr/bin/ghc-${BIN_PV}"
+
+ # allow hardened users use vanilla binary to bootstrap ghc
+ # ghci uses mmap with rwx protection at it implements dynamic
+ # linking on it's own (bug #299709)
+ pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/bin/ghc"
+ fi
fi
if use binary; then
@@ -545,6 +559,7 @@ src_prepare() {
eapply "${FILESDIR}"/${PN}-8.10.1-allow-cross-bootstrap.patch
eapply "${FILESDIR}"/${PN}-8.10.5-modorigin-verbose-conflict.patch
eapply "${FILESDIR}"/${PN}-8.10.6-aclocal.patch
+ eapply "${FILESDIR}"/${PN}-9.0.2-sphinx-6.patch
# a bunch of crosscompiler patches
# needs newer version:
diff --git a/dev-lang/ghc/ghc-9.0.2-r4.ebuild b/dev-lang/ghc/ghc-9.0.2-r4.ebuild
index 4ad8fb52d320..49fe791713c5 100644
--- a/dev-lang/ghc/ghc-9.0.2-r4.ebuild
+++ b/dev-lang/ghc/ghc-9.0.2-r4.ebuild
@@ -13,11 +13,11 @@ if [[ ${CTARGET} = ${CHOST} ]] ; then
fi
fi
-PYTHON_COMPAT=( python3_{9..10} )
+PYTHON_COMPAT=( python3_{9..11} )
inherit python-any-r1
inherit autotools bash-completion-r1 flag-o-matic ghc-package
inherit multiprocessing pax-utils toolchain-funcs prefix
-inherit check-reqs llvm
+inherit check-reqs llvm unpacker
DESCRIPTION="The Glasgow Haskell Compiler"
HOMEPAGE="https://www.haskell.org/ghc/"
@@ -25,11 +25,12 @@ HOMEPAGE="https://www.haskell.org/ghc/"
arch_binaries=""
BIN_PV=${PV}
+[[ $PR != r0 ]] && BIN_REV=${PR}
# Differentiate glibc/musl
#glibc_binaries="$glibc_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
-glibc_binaries="$glibc_binaries amd64? ( https://eidetic.codes/ghc-bin-${PV}-x86_64-pc-linux-gnu-r4.tbz2 )"
+glibc_binaries+=" amd64? ( https://eidetic.codes/${PN}-bin-${PVR}-x86_64-pc-linux-gnu.gpkg.tar )"
#glibc_binaries="$glibc_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
#glibc_binaries="$glibc_binaries arm64? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tar.gz )"
#glibc_binaries="$glibc_binaries ia64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
@@ -41,7 +42,7 @@ glibc_binaries="$glibc_binaries amd64? ( https://eidetic.codes/ghc-bin-${PV}-x86
#)"
#glibc_binaries="$glibc_binaries riscv? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-riscv64-unknown-linux-gnu.tar.gz )"
#glibc_binaries="$glibc_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-glibc_binaries="$glibc_binaries x86? ( https://eidetic.codes/ghc-bin-${PV}-i686-pc-linux-gnu-r4.tbz2 )"
+glibc_binaries+=" x86? ( https://eidetic.codes/${PN}-bin-${PVR}-i686-pc-linux-gnu.gpkg.tar )"
#musl_binaries="$musl_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
#musl_binaries="$musl_binaries amd64? ( https://eidetic.codes/ghc-bin-${PV}-x86_64-pc-linux-musl.tbz2 )"
@@ -55,8 +56,8 @@ glibc_binaries="$glibc_binaries x86? ( https://eidetic.codes/ghc-bin-${PV}-i686-
#musl_binaries="$musl_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
#musl_binaries="$musl_binaries x86? ( https://eidetic.codes/ghc-bin-${PV}-i686-pc-linux-musl.tbz2 )"
-[[ -n $glibc_binaries ]] && arch_binaries="$arch_binaries elibc_glibc? ( $glibc_binaries )"
-[[ -n $musl_binaries ]] && arch_binaries="$arch_binaries elibc_musl? ( $musl_binaries )"
+[[ -n $glibc_binaries ]] && arch_binaries+=" elibc_glibc? ( $glibc_binaries )"
+[[ -n $musl_binaries ]] && arch_binaries+=" elibc_musl? ( $musl_binaries )"
# various ports:
#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
@@ -96,6 +97,7 @@ yet_binary() {
*) return 1 ;;
esac
;;
+ *) return 1 ;;
esac
}
@@ -460,7 +462,7 @@ src_unpack() {
case ${CHOST} in
*-darwin* | *-solaris*) ONLYA=${GHC_P}-src.tar.xz ;;
esac
- unpack ${ONLYA}
+ unpacker ${ONLYA}
}
src_prepare() {
@@ -476,16 +478,24 @@ src_prepare() {
# https://src.fedoraproject.org/rpms/ghc9.0/blob/rawhide/f/ghc9.0.spec#_327
rm -rf "libraries/containers/containers/dist-install" || die
- if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
- # Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
- # See bug #313635.
- sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
- "${WORKDIR}/usr/bin/ghc-${BIN_PV}"
-
- # allow hardened users use vanilla binary to bootstrap ghc
- # ghci uses mmap with rwx protection at it implements dynamic
- # linking on it's own (bug #299709)
- pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/bin/ghc"
+ if ! use ghcbootstrap; then
+ # The switch to gpkg binaries means that they are unpacked in the wrong
+ # location. They are now unnpacked in the $orig_bindir and need to be
+ # moved so that usr/ is in $WORKDIR.
+ local orig_bindir="${WORKDIR}/${PN}-${BIN_PV}${BIN_REV:+-${BIN_REV}}"
+ mv -v "${orig_bindir}/image/usr" "${WORKDIR}" || die
+
+ if [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
+ # Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
+ # See bug #313635.
+ sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+ "${WORKDIR}/usr/bin/ghc-${BIN_PV}"
+
+ # allow hardened users use vanilla binary to bootstrap ghc
+ # ghci uses mmap with rwx protection at it implements dynamic
+ # linking on it's own (bug #299709)
+ pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/bin/ghc"
+ fi
fi
use llvm && ! use ghcbootstrap && llvmize "${WORKDIR}/usr/bin"