summaryrefslogtreecommitdiff
path: root/dev-lang/ghc
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/ghc')
-rw-r--r--dev-lang/ghc/Manifest6
-rw-r--r--dev-lang/ghc/files/ghc-9.0.2-llvm-13.patch26
-rw-r--r--dev-lang/ghc/ghc-9.0.2.ebuild36
-rw-r--r--dev-lang/ghc/metadata.xml1
4 files changed, 61 insertions, 8 deletions
diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index 249c29f51ca1..f197ea854948 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -10,6 +10,7 @@ AUX ghc-9.0.2-CHOST-prefix.patch 282 BLAKE2B e0a2505c2ae91d5aad41fa3faf4fa7ece8e
AUX ghc-9.0.2-darwin.patch 916 BLAKE2B ece65347ee4d40ce729642766273792c5f619c5f2788366f5f1e1784d630efadf59fa1c1e2e03dbd81633ad4202c81fc39a6c94472db52af2f99362ee1e67093 SHA512 300167a4c5c4b4bf6b18cdce242c8e27def88f4f3d810da0e5b60bdb77a186975716c2ac2ced8365e2f6a17b799e77eba8b3b77ae4b9efe69339dec48e78963a
AUX ghc-9.0.2-disable-unboxed-arrays.patch 1298 BLAKE2B d3d8cf5b8f7f012cb93f6481822348c68e7ff79896664f51de5e4b248f8de68ea04144791bf8959b83ea265f384c055100fc27caf0da17f9a5a173c333928c4b SHA512 cc979c2fdb877716dee3fb75d9ee0734737f2f9a5611a0a1d20e2d603b48ebeaa339d09a130a79fce45eebe659a3741cf862b17eafecf814f408399139250806
AUX ghc-9.0.2-fix-tests-python310.patch 1116 BLAKE2B fc7a7390cbbc737c66ea8401c9211318d078499bfd103f07ec2df0db9824041dfee279e364601a21d4d37a694a9442f3570c0333b2baab6173d6daa366c931da SHA512 0620ebffc49a06a65bd45bf324de4674b98e874291e6bebae1a95d585bbdf38cc201a734f7f20133880b46e9abf0839b59278688b00c892b94091d1c0257352b
+AUX ghc-9.0.2-llvm-13.patch 988 BLAKE2B dee0a02ffb7b79981981615e7933f5ba3348f700794dac1a34fa71987ab9d267af9a79a40db7d66f6bf6ffdb26bed57bdd7dc157f3f27efa296c4152b8e81070 SHA512 a20213400f48882e8c8521a950088fa9dcbfe7cc2ae678d76fd6f1298f019dae9ed334f03050116527554d9ada60b649694d6674a914ce48fa1b5bbf918aa712
AUX ghc-9.0.2-modorigin-semigroup.patch 1210 BLAKE2B e29917dd740bded98257366ca37d3ac8fdc8ffd0e988e6286b8cf21fb9f0232ce1584a1a22665f4afad36e5585c29091040cac16b1204022f5a5f3328420c4ff SHA512 dc54fb02dfed55f5a9309c61ec23859ad4f80fd271fe0ccb41b786fc7d44bc0d9722069e2f56731c6af5ad1703c5081ba9e4b4e683911af4ad9b498f53b67a5e
AUX ghc-bash-completion 6496 BLAKE2B dc94a1979e886026a2fbe04bf7b45718ffa3e025a0e8945262e21a1243bfce6517fa1794f2ba6cd54cc853e93ad5d80472b9019b95762f10b5be83634a479955 SHA512 ede79ccf23555f60f48297d29bd98e3ccfd67d2cf27462153e00beb930398cb497e34ba8316e91df44c577ed11fdbe5606f7c6a2777e35d5e783590e49ccfeb5
DIST ghc-8.10.6-src.tar.xz 19932832 BLAKE2B f5d0c43aa5df87648e32beeb5ed6866b231cbce4f344fb03110db826b36bbac435f5e89d9ffeef3f87c15e830fdee6b95150b7bdcd06906575bfcd9c83797dff SHA512 6314eb9744d47d803b30b621bd12bf6179dad5cc578ec267b3a65b89e9c9b431bdb4913936f040c7ca4fcc71a676a43e78b5f6173d123a844e7f29004405b8b6
@@ -18,10 +19,11 @@ DIST ghc-9.0.2-src.tar.xz 27270396 BLAKE2B 0a73d910d3ef11161f895849025fe37ce2319
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-9.0.2-aarch64-unknown-linux-gnu.tar.gz 304621314 BLAKE2B d38b8571d41b5703da6b29f43664293761865166a7e3ab6b9c4b039f1af15faa4aa2013a32eb00059d6e595984895762eadff7b62141157d2dea6eb9b035138d SHA512 94e0e00329a18b494b509b3f8190cf6fed2399a2ac2d2d96fdfd90bf5dbeb8db68b6759f719ad85f8873961b0e983ff0006ce0bf109e96462169cbd9fa7b6784
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-x86_64-pc-linux-gnu.tbz2 121536759 BLAKE2B 4433e2d266f065d2b2944b711d622ec26288a2187ac03562257a671744b44da35110ce16ac6d76f7062a563488885326be073e0ff03c7e48250051c3b4763d96 SHA512 2de29a9ddbfd0fac797cdd628f3657ff38e6a153151849508bba75d36f84394ed77750435ff5cc1bdfcd30ef2b6e009bde965bd0a83e0496b5027239642f4b6c
EBUILD ghc-8.10.6.ebuild 26291 BLAKE2B 65b357344617731495555bad893674de98d6425059ea5ea357dae5754a589c61d9fb30fbd241bc42f9efe91b567216ec6c4be130665eec34887a47e39a40d970 SHA512 910f2cd0421f4c5731ed3b35325f59d89883c8041b26aafbd384c51a680f2fcba67aecf1fa86b1db3a6fb543ee51c17d35734e037b5455d02ce1d909b7808f8c
-EBUILD ghc-9.0.2.ebuild 26658 BLAKE2B 2ef9b6d6ac5692425fb2b315280ee2173408f00add75b7dfd09a40b41ec13ce9d9b4d58b3ef69b11a6101ab6131712d48cd72b4da1c1cac51706e2760237b4a6 SHA512 cfc871bc4a8d548c26cc9dbd06e86804fbd0eb790841a3b281f1631b6a0fb578f8e97fd19520eb3c9c4489d9346a0dcf6221f4cbf312c5cdbe56d2cffccdf72a
-MISC metadata.xml 950 BLAKE2B c719d48919a318bbb52aedebc27c7d2edcc445f885c5b0ecc0b32666ea7a4ac227f42ca08a1c7443eab0d92d8961b196c9a507a5796194be5d5b3f2f6943d3ab SHA512 4fc6c71895c07d8b73d58b71e4e4cdd3a12e366dbc971621e026fadba8ee1b3711e7ae0f5905f28e338e4b850119cef5bff05650be1b83696f2c6fd85fb925d9
+EBUILD ghc-9.0.2.ebuild 27272 BLAKE2B fccb05ddaa2b6b559e0e9d21237d9532ad6373a58d0f1ae45468e507880defd2072e0835d0f8068fa533b3e3dd949f9c078f5cc9999db579daa250016e62033d SHA512 ab4945e4a67d48a72afa9d8ee592e52cea1d075b55994f1a974e83ead2e5acf0f0c9bb4461d2c465196364b779dac31c2583098fb284ad3017c9adef7d4802f2
+MISC metadata.xml 1049 BLAKE2B ff2f7b83ed8c8920b4786665514793c1acbebd4e61c87ec3e47a74e85eba9862cb319eec3ad00c18d1e3baaa92ed7113036beef27e52c160f3acfaa14236a6fd SHA512 31f40575501646ba7596e4ad2a9e8fcdb2ad347eef0eca45488c4af168ea3dbce642e066634ece6c6ff4b5c0502e0f00a5b5c8eb16d7f8ecdd4ccb2d47cd9727
diff --git a/dev-lang/ghc/files/ghc-9.0.2-llvm-13.patch b/dev-lang/ghc/files/ghc-9.0.2-llvm-13.patch
new file mode 100644
index 000000000000..835eb0374847
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-9.0.2-llvm-13.patch
@@ -0,0 +1,26 @@
+https://salsa.debian.org/haskell-team/DHG_packages/-/commit/b16997ae9270c8f88b7f8548e5cb6fdf93a07c43
+
+From 78db231ffdf8385662812781c1d09c630cfad313 Mon Sep 17 00:00:00 2001
+From: Cheng Shao <astrohavoc@gmail.com>
+Date: Thu, 27 Jan 2022 12:12:14 +0000
+Subject: [PATCH] configure: bump LlvmMaxVersion to 14
+
+LLVM 13.0.0 is released in Oct 2021, and latest head validates against
+LLVM 13 just fine if LlvmMaxVersion is bumped.
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index e8a95726a35..71879adeb04 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -681,7 +681,7 @@ AC_SUBST(InstallNameToolCmd)
+ # versions of LLVM simultaneously, but that stopped working around
+ # 3.5/3.6 release of LLVM.
+ LlvmMinVersion=9 # inclusive
+-LlvmMaxVersion=13 # not inclusive
++LlvmMaxVersion=14 # not inclusive
+ AC_SUBST([LlvmMinVersion])
+ AC_SUBST([LlvmMaxVersion])
+ sUPPORTED_LLVM_VERSION_MIN=$(echo \($LlvmMinVersion\) | sed 's/\./,/')
diff --git a/dev-lang/ghc/ghc-9.0.2.ebuild b/dev-lang/ghc/ghc-9.0.2.ebuild
index e0cd53611f2c..dc0d530b0785 100644
--- a/dev-lang/ghc/ghc-9.0.2.ebuild
+++ b/dev-lang/ghc/ghc-9.0.2.ebuild
@@ -17,7 +17,7 @@ PYTHON_COMPAT=( python3_{8..10} )
inherit python-any-r1
inherit autotools bash-completion-r1 flag-o-matic ghc-package
inherit multiprocessing pax-utils toolchain-funcs prefix
-inherit check-reqs
+inherit check-reqs llvm
DESCRIPTION="The Glasgow Haskell Compiler"
HOMEPAGE="https://www.haskell.org/ghc/"
@@ -28,7 +28,7 @@ BIN_PV=${PV}
# sorted!
#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
-#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries arm64? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tar.gz )"
arch_binaries="$arch_binaries amd64? ( https://eidetic.codes/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
#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 )"
@@ -46,7 +46,7 @@ arch_binaries="$arch_binaries x86? ( https://eidetic.codes/ghc-bin-${PV}-i686-pc
yet_binary() {
case "${ARCH}" in
#alpha) return 0 ;;
- #arm64) return 0 ;;
+ arm64) return 0 ;;
#arm) return 0 ;;
amd64) return 0 ;;
#ia64) return 0 ;;
@@ -76,11 +76,12 @@ BUMP_LIBRARIES=(
LICENSE="BSD"
SLOT="0/${PV}"
-KEYWORDS="~amd64 ~ppc64 ~x86"
-IUSE="big-endian +doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+IUSE="big-endian +doc elfutils ghcbootstrap ghcmakebinary +gmp llvm numa profile test"
IUSE+=" binary"
RESTRICT="!test? ( test )"
+LLVM_MAX_SLOT="13"
RDEPEND="
>=dev-lang/perl-5.6.1
dev-libs/gmp:0=
@@ -88,6 +89,12 @@ RDEPEND="
elfutils? ( dev-libs/elfutils )
!ghcmakebinary? ( dev-libs/libffi:= )
numa? ( sys-process/numactl )
+ llvm? (
+ <sys-devel/llvm-$((${LLVM_MAX_SLOT} + 1)):=
+ || (
+ sys-devel/llvm:13
+ )
+ )
"
# This set of dependencies is needed to run
@@ -356,6 +363,15 @@ ghc-check-reqs() {
"$@"
}
+llvmize() {
+ [[ -z "${1}" ]] && return
+ ( find "${1}" -type f \
+ | file -if- \
+ | grep "text/x-shellscript" \
+ | awk -F: '{print $1}' \
+ | xargs sed -i "s#^exec #PATH=\"$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin:\${PATH}\" exec #") || die
+}
+
pkg_pretend() {
ghc-check-reqs check-reqs_pkg_pretend
}
@@ -385,6 +401,8 @@ pkg_setup() {
if needs_python; then
python-any-r1_pkg_setup
fi
+
+ use llvm && llvm_pkg_setup
}
src_unpack() {
@@ -420,6 +438,8 @@ src_prepare() {
pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/bin/ghc"
fi
+ use llvm && llvmize "${WORKDIR}/usr/bin"
+
# binpkg may have been built with FEATURES=splitdebug
if [[ -d "${WORKDIR}/usr/lib/debug" ]] ; then
rm -rf "${WORKDIR}/usr/lib/debug" || die
@@ -514,6 +534,7 @@ src_prepare() {
use test && eapply "${FILESDIR}/${PN}-9.0.2-fix-tests-python310.patch"
eapply "${FILESDIR}"/${PN}-8.10.1-allow-cross-bootstrap.patch
eapply "${FILESDIR}"/${PN}-9.0.2-disable-unboxed-arrays.patch
+ eapply "${FILESDIR}"/${PN}-9.0.2-llvm-13.patch
# mingw32 target
pushd "${S}/libraries/Win32"
@@ -661,7 +682,8 @@ src_configure() {
econf ${econf_args[@]} \
--enable-bootstrap-with-devel-snapshot \
$(use_enable elfutils dwarf-unwind) \
- $(use_enable numa)
+ $(use_enable numa) \
+ --disable-unregisterised # all targets are registerised for now
if [[ ${PV} == *9999* ]]; then
GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
@@ -718,6 +740,8 @@ src_install() {
# '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
emake -j1 install DESTDIR="${D}"
+ use llvm && llvmize "${ED}/usr/bin"
+
# Skip for cross-targets as they all share target location:
# /usr/share/doc/ghc-9999/
if ! is_crosscompile; then
diff --git a/dev-lang/ghc/metadata.xml b/dev-lang/ghc/metadata.xml
index eaaa78bf4cf7..8e188c0a7af4 100644
--- a/dev-lang/ghc/metadata.xml
+++ b/dev-lang/ghc/metadata.xml
@@ -11,6 +11,7 @@
<flag name="ghcbootstrap">Internal: Bootstrap GHC from an existing GHC installation.</flag>
<flag name="ghcmakebinary">Internal: Build binary friendly for redistribution.</flag>
<flag name="gmp">Use <pkg>dev-libs/gmp</pkg> for integer operations (works faster, but an external depend).</flag>
+ <flag name="llvm">Pull in dependencies for the <pkg>sys-devel/llvm</pkg> codegen backend.</flag>
<flag name="numa">Enable NUMA thread balancing policy using <pkg>sys-process/numactl</pkg>.</flag>
</use>
<upstream>