summaryrefslogtreecommitdiff
path: root/dev-lang
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-03-20 14:27:17 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-03-20 14:27:17 +0000
commit5bb9ff1ee56d2b5e75e01a7f066d8b0cec84ec02 (patch)
tree66e860a5099bcad013f1cf667255dc372a7c11b3 /dev-lang
parent7218e1b46bceac05841e90472501742d905fb3fc (diff)
gentoo resync : 20.03.2021
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/Manifest.gzbin16999 -> 17009 bytes
-rw-r--r--dev-lang/R/Manifest2
-rw-r--r--dev-lang/R/R-4.0.4.ebuild2
-rw-r--r--dev-lang/crystal/Manifest2
-rw-r--r--dev-lang/crystal/metadata.xml1
-rw-r--r--dev-lang/elixir/Manifest4
-rw-r--r--dev-lang/elixir/elixir-1.11.4.ebuild38
-rw-r--r--dev-lang/elixir/metadata.xml4
-rw-r--r--dev-lang/erlang/Manifest2
-rw-r--r--dev-lang/erlang/metadata.xml4
-rw-r--r--dev-lang/gforth/Manifest2
-rw-r--r--dev-lang/gforth/metadata.xml2
-rw-r--r--dev-lang/ghc/Manifest126
-rw-r--r--dev-lang/ghc/files/ghc-7.10.1-rc3-ghc-7.10-bootstrap.patch78
-rw-r--r--dev-lang/ghc/files/ghc-7.10.3-hardfloat.patch26
-rw-r--r--dev-lang/ghc/files/ghc-7.10.3-relnotes.patch45
-rw-r--r--dev-lang/ghc/files/ghc-7.6.3-preserve-inplace-xattr.patch14
-rw-r--r--dev-lang/ghc/files/ghc-7.8.1_rc1-libbfd.patch81
-rw-r--r--dev-lang/ghc/files/ghc-7.8.2-cgen-constify.patch34
-rw-r--r--dev-lang/ghc/files/ghc-7.8.3-linker-warn.patch35
-rw-r--r--dev-lang/ghc/files/ghc-7.8.3-pic-sparc.patch31
-rw-r--r--dev-lang/ghc/files/ghc-7.8.3-ppc32-fPIC.patch351
-rw-r--r--dev-lang/ghc/files/ghc-7.8.4-gold.patch27
-rw-r--r--dev-lang/ghc/files/ghc-7.8.4-ia64-CLOSUREs.patch66
-rw-r--r--dev-lang/ghc/files/ghc-8.0.1-limit-jN.patch50
-rw-r--r--dev-lang/ghc/files/ghc-8.0.1-par-g0-on-A32.patch65
-rw-r--r--dev-lang/ghc/files/ghc-8.0.1-ww-args-limit.patch127
-rw-r--r--dev-lang/ghc/files/ghc-8.0.1_rc1-cgen-constify.patch34
-rw-r--r--dev-lang/ghc/files/ghc-8.0.2-O2-unreg.patch35
-rw-r--r--dev-lang/ghc/files/ghc-8.0.2-binutils-2.30.patch65
-rw-r--r--dev-lang/ghc/files/ghc-8.0.2-libffi-alpha.patch57
-rw-r--r--dev-lang/ghc/files/ghc-8.0.2_rc2-old-sphinx.patch12
-rw-r--r--dev-lang/ghc/files/ghc-8.10.1-no-relax-everywhere.patch19
-rw-r--r--dev-lang/ghc/files/ghc-8.10.2-revert-linker-rtsSymbols_more_linker_symbols.patch296
-rw-r--r--dev-lang/ghc/files/ghc-8.2.1_rc1-cgen-constify.patch378
-rw-r--r--dev-lang/ghc/files/ghc-8.2.1_rc1-ghci-cross.patch60
-rw-r--r--dev-lang/ghc/files/ghc-8.2.1_rc1-stage2-cross.patch81
-rw-r--r--dev-lang/ghc/files/ghc-8.2.1_rc1-staged-cross.patch43
-rw-r--r--dev-lang/ghc/files/ghc-8.2.1_rc1-unphased-cross.patch30
-rw-r--r--dev-lang/ghc/files/ghc-8.2.1_rc1-win32-cross-1.patch124
-rw-r--r--dev-lang/ghc/files/ghc-8.2.1_rc2-O2-unreg.patch35
-rw-r--r--dev-lang/ghc/files/ghc-8.2.1_rc3-any-vendor.patch44
-rw-r--r--dev-lang/ghc/files/ghc-8.2.1_rc3-stginit-data.patch27
-rw-r--r--dev-lang/ghc/files/ghc-8.8.1-no-alex.patch33
-rw-r--r--dev-lang/ghc/ghc-7.10.3.ebuild674
-rw-r--r--dev-lang/ghc/ghc-7.8.4.ebuild600
-rw-r--r--dev-lang/ghc/ghc-8.0.2.ebuild672
-rw-r--r--dev-lang/ghc/ghc-8.10.1.ebuild797
-rw-r--r--dev-lang/ghc/ghc-8.10.2.ebuild797
-rw-r--r--dev-lang/ghc/ghc-8.10.3.ebuild796
-rw-r--r--dev-lang/ghc/ghc-8.10.4.ebuild3
-rw-r--r--dev-lang/ghc/ghc-8.2.1.ebuild754
-rw-r--r--dev-lang/ghc/ghc-8.2.2.ebuild755
-rw-r--r--dev-lang/ghc/ghc-8.4.1.ebuild755
-rw-r--r--dev-lang/ghc/ghc-8.4.2.ebuild760
-rw-r--r--dev-lang/ghc/ghc-8.4.3.ebuild759
-rw-r--r--dev-lang/ghc/ghc-8.6.4.ebuild775
-rw-r--r--dev-lang/ghc/ghc-8.6.5.ebuild784
-rw-r--r--dev-lang/ghc/ghc-8.8.1.ebuild804
-rw-r--r--dev-lang/ghc/ghc-8.8.2.ebuild803
-rw-r--r--dev-lang/ghc/ghc-8.8.3.ebuild808
-rw-r--r--dev-lang/go/Manifest14
-rw-r--r--dev-lang/go/go-1.14.14.ebuild197
-rw-r--r--dev-lang/go/go-1.14.15.ebuild197
-rw-r--r--dev-lang/go/go-1.15.10.ebuild2
-rw-r--r--dev-lang/go/go-1.15.7.ebuild197
-rw-r--r--dev-lang/go/go-1.15.8.ebuild197
-rw-r--r--dev-lang/go/go-1.16.2.ebuild2
-rw-r--r--dev-lang/go/go-1.16.ebuild197
-rw-r--r--dev-lang/icon/Manifest4
-rw-r--r--dev-lang/icon/icon-9.5.20i.ebuild123
-rw-r--r--dev-lang/icon/metadata.xml4
-rw-r--r--dev-lang/janet/Manifest2
-rw-r--r--dev-lang/janet/metadata.xml4
-rw-r--r--dev-lang/jimtcl/Manifest3
-rw-r--r--dev-lang/jimtcl/files/jimtcl-0.75-bootstrap.patch15
-rw-r--r--dev-lang/jimtcl/jimtcl-0.76.ebuild69
-rw-r--r--dev-lang/jsonnet/Manifest2
-rw-r--r--dev-lang/jsonnet/metadata.xml2
-rw-r--r--dev-lang/julia-bin/Manifest2
-rw-r--r--dev-lang/julia-bin/metadata.xml4
-rw-r--r--dev-lang/jwasm/Manifest2
-rw-r--r--dev-lang/jwasm/metadata.xml2
-rw-r--r--dev-lang/metadata.xml1
-rw-r--r--dev-lang/mlton/Manifest9
-rw-r--r--dev-lang/mlton/files/mlton-20070826-no-execmem.patch29
-rw-r--r--dev-lang/mlton/files/mlton-20130715-no-PIE.patch66
-rw-r--r--dev-lang/mlton/files/mlton-20130715-split-make-for-pax-mark.patch11
-rw-r--r--dev-lang/mlton/mlton-20130715.ebuild119
-rw-r--r--dev-lang/mlton/mlton-20180207.ebuild13
-rw-r--r--dev-lang/moarvm/Manifest2
-rw-r--r--dev-lang/moarvm/moarvm-2021.02.ebuild1
-rw-r--r--dev-lang/mujs/Manifest4
-rw-r--r--dev-lang/mujs/mujs-1.0.9.ebuild2
-rw-r--r--dev-lang/mujs/mujs-1.1.0.ebuild2
-rw-r--r--dev-lang/ocaml/Manifest4
-rw-r--r--dev-lang/ocaml/ocaml-4.10.0.ebuild89
-rw-r--r--dev-lang/ocaml/ocaml-4.11.1.ebuild85
-rw-r--r--dev-lang/perl/Manifest2
-rw-r--r--dev-lang/perl/metadata.xml2
-rw-r--r--dev-lang/polyml/Manifest2
-rw-r--r--dev-lang/polyml/polyml-5.6.ebuild59
-rw-r--r--dev-lang/python-exec-conf/Manifest2
-rw-r--r--dev-lang/python-exec-conf/metadata.xml2
-rw-r--r--dev-lang/python-exec/Manifest2
-rw-r--r--dev-lang/python-exec/metadata.xml2
-rw-r--r--dev-lang/python/Manifest12
-rw-r--r--dev-lang/python/python-2.7.18_p7.ebuild4
-rw-r--r--dev-lang/python/python-3.10.0_alpha6-r2.ebuild2
-rw-r--r--dev-lang/python/python-3.6.13.ebuild4
-rw-r--r--dev-lang/python/python-3.7.10.ebuild4
-rw-r--r--dev-lang/python/python-3.8.8.ebuild4
-rw-r--r--dev-lang/python/python-3.9.2.ebuild4
-rw-r--r--dev-lang/ruby/Manifest3
-rw-r--r--dev-lang/ruby/ruby-2.6.6-r3.ebuild259
-rw-r--r--dev-lang/ruby/ruby-2.7.2-r1.ebuild263
-rw-r--r--dev-lang/ruby/ruby-3.0.0-r2.ebuild264
-rw-r--r--dev-lang/sassc/Manifest2
-rw-r--r--dev-lang/sassc/sassc-3.6.0.ebuild25
-rw-r--r--dev-lang/teyjus/Manifest2
-rw-r--r--dev-lang/teyjus/metadata.xml2
-rw-r--r--dev-lang/vala/Manifest4
-rw-r--r--dev-lang/vala/vala-0.40.24.ebuild2
-rw-r--r--dev-lang/vala/vala-0.48.12.ebuild2
-rw-r--r--dev-lang/xsb/Manifest4
-rw-r--r--dev-lang/xsb/xsb-3.8.0.ebuild4
-rw-r--r--dev-lang/zig/Manifest2
-rw-r--r--dev-lang/zig/metadata.xml4
128 files changed, 1034 insertions, 16281 deletions
diff --git a/dev-lang/Manifest.gz b/dev-lang/Manifest.gz
index b307ae5383af..8d457eab42d1 100644
--- a/dev-lang/Manifest.gz
+++ b/dev-lang/Manifest.gz
Binary files differ
diff --git a/dev-lang/R/Manifest b/dev-lang/R/Manifest
index f64bcf7cfba9..f34ed6d8c8e1 100644
--- a/dev-lang/R/Manifest
+++ b/dev-lang/R/Manifest
@@ -10,5 +10,5 @@ DIST R-78d6830e28ea90a046da79a9b4f70c39594bb6d6.bash_completion 13596 BLAKE2B 53
EBUILD R-3.4.1.ebuild 6227 BLAKE2B c9c50a779452d2689119c1de9fd9b6b14dd915fb6ee263c655e998a0a690fe98d1a68f138ef82bf6e70b3ca58ecb02a9f8638a1a7b0f95fe474c37efb78be492 SHA512 b3d1e0f0a92c9f31c8a091736c507f0618ed0a5534b13905017715fc7ea114310a03baf963e0cc961a49cc0fc34e70d46c10eb886d170a74e462bace3465b702
EBUILD R-3.6.3-r1.ebuild 7177 BLAKE2B 81e09b4946c208068077008d711858f49b799245ef2097b0e3c984b2261d79fa707be0d892991bc8ce0c3f5bf3c592c8e81ff4492a97f2da41ca903d4ca67351 SHA512 f1a41aae1e951fd48af91b92e76efb569d0cc4d1d5f7d34d010d5882e90a0bdc3b26997c22fa8f1725d739fde61cf189f5032c15a4b6be913958b597727b9ad8
EBUILD R-4.0.2.ebuild 7331 BLAKE2B f170e5884f52ca8f1fa7a53c6a37487c35331b1464da87e2371ad73989870838ab6a2f1acc3d2e59b7e0cbbb48ebb42954df7aec2062407f6026276e0bd90cbf SHA512 d1bd84790276a6a8804e29373c534b75ed41bd4b2e0084aae990016e8d8918e58612a777aad246a44769b97515c6f5a1afb18ba7e2b13db782c46fadb130b389
-EBUILD R-4.0.4.ebuild 7315 BLAKE2B 77445afa767b02617d92ad61c3c8af84e9a4eb3715579228129c254341382e08b474dae18b819bfe1b559f0e3a48e09a8bde653a16106047a10237c43ed1bb95 SHA512 3c8bbd24aca4985049f7bb6c13dddf22e0eb454658bbc7bd973920a802a35a7f180ba91792a5ca42f72887181d878647a60556d0d64611bd29eef241a3fab225
+EBUILD R-4.0.4.ebuild 7314 BLAKE2B bb5cae73a12cf63b0b6d4bb6171fd04217a134671dc86d674d55d3f0c7c920597fd339cbb3db20f24fc1ed03849bc06ecc156c3382e393e26ac2d005caa90a10 SHA512 11bb80ce27c047394a6e4130507ce8a927c091a95fb371889b33ed9af055c6baaa9bd2fcbd3c7adea29cb2a815978e3b2ddfe45d885f3eb4cd5921eb3f3af885
MISC metadata.xml 1140 BLAKE2B 774221eb531b4e80f0650b627b9ce53d9a2daf6342b1f19579d2d046e1c83aa497cc764870406b7ea3cf6cbae899cb6d460af92991d62bc6aea8da026a441822 SHA512 297c7e17998f92fb836b0599ce5221aee1ba1e7b1504edb348a602b695faf381d51f32f6118f5ef4bb353f02e92ffc5b3520b8d317d3e30a68a3cce0254fa6b1
diff --git a/dev-lang/R/R-4.0.4.ebuild b/dev-lang/R/R-4.0.4.ebuild
index 560e83d01f72..71c2eb33b3f1 100644
--- a/dev-lang/R/R-4.0.4.ebuild
+++ b/dev-lang/R/R-4.0.4.ebuild
@@ -16,7 +16,7 @@ SRC_URI="
LICENSE="|| ( GPL-2 GPL-3 ) LGPL-2.1"
SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~hppa ~ia64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+KEYWORDS="amd64 ~arm64 ~hppa ~ia64 ~sparc ~x86 ~amd64-linux ~x86-linux"
IUSE="cairo doc icu java jpeg lapack minimal nls openmp perl png prefix profile readline static-libs test tiff tk X"
# One test required profiling in v4.0.2, check the upstream bug:
diff --git a/dev-lang/crystal/Manifest b/dev-lang/crystal/Manifest
index c27487d6ee42..ca9625689446 100644
--- a/dev-lang/crystal/Manifest
+++ b/dev-lang/crystal/Manifest
@@ -9,4 +9,4 @@ DIST crystal-0.36.1-1-linux-i686.tar.gz 30873747 BLAKE2B 43cde4b61d2947012e860df
DIST crystal-0.36.1-1-linux-x86_64.tar.gz 28360836 BLAKE2B ee9fef20c252ae0efbaafae3426b384318cd141669ce929f723dfa9e6fd9485961c46c948a3aae2fcb2780b92b759fb74e0a4aeec45e198ee9541b0a959072cd SHA512 12389aee0bf863606a620e9e5a1600081aef3be5eef091f592d000f00e9925cbd36cc2e55485c4d295b3a2fcde033425eb2b225a92fd2b49b2e3f18b2b38510f
DIST crystal-0.36.1.tar.gz 2413747 BLAKE2B 19b78217a37394b163859a536fddcd93e201209dae55713743a459414a48eae38458c28fa17e1ac6e8d361ccdc498a23026ee83c7c2a744f9d51c55bd6e5f0d8 SHA512 86ce295aed0cb601820c727615fffe6816bee0e98e5d91c912f43354448d59f449a6ffb895f5914b3e6564f72f35a50880cec4513826068a2e3e470b4f06048b
EBUILD crystal-0.36.1.ebuild 3078 BLAKE2B 6eab0ead27ef8d8786f0bc6267817c9cbdc31178074013c3d5842df1bfe7f2bfdd30c95c459bea12b55720abb654c3d237add40ee74b69e0ae1045c2cc8dc3bc SHA512 b0cf132093890c200190248529c44b217a7aed694e47597d503767774f8565e60cc6c831d1d738a34c9b460118ea5c51bfab2c94d0efd587b79c4e051acf2618
-MISC metadata.xml 995 BLAKE2B 00f6cfc63cec16ab8c6f983316f5872e63573f2d680da810b9b97d88c2ff6e21c15327a1508d62234e324f7145ca248a9ce1aa7286b0e34d9ee3dcba1481ff25 SHA512 da6a6f834b0d961477b95045756c539df7a968fe240f9f0c1c8183eef3052dddefb8d20547d668b07fece74c96b94bbf18baaac59e7328ff322355227d1adf02
+MISC metadata.xml 994 BLAKE2B a4e4884456baf95cbfd22e489dfeeddb038230a9f4a0c609e89b1f154fb68cb8ae388a0169741359dc4f2bfc7d1d3e6fe75e70bde39ef4a8c1d309024862edfb SHA512 672eb799dfa83b2abc52222c3bbf448148b3d480f21ebc6eba18e2ffbc5fa2d4dd4d3cd6a35df8a6247d57549d1fbbcbbfd0518b71aae1ea875f8e20ccff94e2
diff --git a/dev-lang/crystal/metadata.xml b/dev-lang/crystal/metadata.xml
index 76b2f7772585..372dd996e6ec 100644
--- a/dev-lang/crystal/metadata.xml
+++ b/dev-lang/crystal/metadata.xml
@@ -30,4 +30,3 @@
<remote-id type="github">manastech/crystal</remote-id>
</upstream>
</pkgmetadata>
-
diff --git a/dev-lang/elixir/Manifest b/dev-lang/elixir/Manifest
index 7caba4d78245..094c2e0fa045 100644
--- a/dev-lang/elixir/Manifest
+++ b/dev-lang/elixir/Manifest
@@ -4,6 +4,8 @@ AUX elixir-1.11.2-mksh.patch 2058 BLAKE2B 45e14921fc59f5707ee9bc2aaebea5f090a599
AUX elixir-1.9.1-disable-network-tests.patch 569 BLAKE2B fda6b9b99f80e81883723280de31933c1740167d41ef4783dc663bad277cf58b8782326abc4a72e0d989c513afb9cdf4494e7d79754b18d62baf75255a74aa45 SHA512 465831a389891680412d51d9209497d5b750ff0a5ff72d45807a7dba6ec7757156ee96048bbc81f46c9c24a5b13cdd5161539fdeb4ffcea655c407e29f6675fc
DIST elixir-1.10.4.tar.gz 2331003 BLAKE2B 8cb54bcb16762ae345ad9d36a25c28696fd5bb57cf97c5037c21458671e001cfe51a722287243c6a70fe3cea65c9c219e759c8312fc168e93974ac5f0870b47a SHA512 844e405cf344539a9d32dc7f1ead0dc1dfb0d70a9ab718269f4e25e5262f611f96346f5be93cf8e34a75c58c6aabb12e8a796c5cb182955922510c270ef169e7
DIST elixir-1.11.3.tar.gz 2394406 BLAKE2B 066e11651265d63c713809f1968b7dc7faf70e8254ef0aec1978a3db0f92da6bb894e882a1a6c1ba8da13d234c91dc84d2d750b0e044e4cd8706986ec7b2f382 SHA512 4962bb9fcf5f4190a8da22a3e42df5b4e521d73771f6a067edb482b911b0f9fbd2883841d06d94ae4ad6b1db2f61f691e5de4c118c722a16f95830c67ce3e45b
+DIST elixir-1.11.4.tar.gz 2396885 BLAKE2B f63e835991420bce8cacd38a920637aa5656c0372bd09e8c0a357a24bcca9a06350973f1453f482d3854a48712471c55389c3bd530df46a19c20a359376b779d SHA512 5dc940a31a31ae1c1537f874c15e58311cc0b0452f61e923bdfde0a5cfef3d8003eb3e85be320eb0acfb7bc0c0c0dc8ac965dec6727257c244048268fbf38ceb
EBUILD elixir-1.10.4.ebuild 883 BLAKE2B c8945f6c84ce2ba4ef99b42f5f0f3c262cfb6d743cd418f66113cab8a9a90caf1ddc71441d96b3755e9025974688909d8306b63ded24d871733d263c54df1d56 SHA512 a3581664d0fe5c49bd7c4ed2b6f2fba7c4b402944daf7c79e79acbd7ffbb463c17e559d961f7abd3c54c5ca5e6d23520e379a5712d7d232439b5c878291cb3d7
EBUILD elixir-1.11.3.ebuild 922 BLAKE2B 718117a8aee4294e70930d45d6b39d6522026c48165b9af54eae4b612458509e456586e8c6a256175ed4e66a6e36293d22d65d69b1fb40ec28efb6ee1b511fbf SHA512 e77cad093155fbcbab5247c18c4c45db407df167c296d9587c19826d303c0e38f431bb4c3ea61537dbfd0c211d4917ce08a38c6f6a2c7fb1c6040c0e279c9b8a
-MISC metadata.xml 790 BLAKE2B 33e4a37225c8f5bd142c5cbbe097ad3330f6c5b1115f834c1c20613281bdc0afa0927734ec3b0a2b1da595980abeec2fcf2bb20e725f5701590d1c3629972910 SHA512 5489797d3771c405edb4c9883082f780279470d7821dbdd1a4790bcdc74c0e31327c8f15286dc421bfe426d7371d6be2819e707389f425101e2d0d0577475586
+EBUILD elixir-1.11.4.ebuild 925 BLAKE2B b0dc8a5e279524bf5683c635558992fb91e7dc943c6991601537b2273bac0b0a03b78618198bfbd4d8c40d55ca3e385bcac9c375d6a63dfd26af5c2530ca9441 SHA512 07c8f268f96f3fdaec2ae82762475fa1a94e4d5250786b2cbdb4ee5991d6486fead55e9d6d2c70aa11ed494e79c0720b4da65f79fe53533b9d22fefc971b511b
+MISC metadata.xml 820 BLAKE2B 7fd55cc9f7450d46060069909506fb74e93234ccd319b5f5b428580fd4f55c59c2ada78770ae744d784838574d87522d3e94f101eba06b5a64ebcb513db4eef3 SHA512 11300d8d6d6cbb73b55d4dfb44d04fc087867bab1fc3fcb0564473d911844d3be148170c03a9247c6a407d8de88442ca6017c00177d93be46b37166d3ba42593
diff --git a/dev-lang/elixir/elixir-1.11.4.ebuild b/dev-lang/elixir/elixir-1.11.4.ebuild
new file mode 100644
index 000000000000..4c9e14b12b16
--- /dev/null
+++ b/dev-lang/elixir/elixir-1.11.4.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="Elixir programming language"
+HOMEPAGE="https://elixir-lang.org"
+SRC_URI="https://github.com/elixir-lang/elixir/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0 ErlPL-1.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~sparc ~x86"
+IUSE="test"
+
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ >=dev-lang/erlang-21:0=[ssl]
+"
+# 'mix' tool collides with sci-biology/phylip, bug #537514
+RDEPEND="${DEPEND}
+ !!sci-biology/phylip
+"
+DEPEND+="
+ test? ( dev-vcs/git )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.9.1-disable-network-tests.patch
+ "${FILESDIR}"/${PN}-1.10.3-no-Q.patch
+ "${FILESDIR}"/${PN}-1.10.3-epmd-daemon.patch
+ "${FILESDIR}"/${PN}-1.11.2-mksh.patch
+)
+
+src_install() {
+ emake DESTDIR="${D}" LIBDIR="$(get_libdir)" PREFIX="${EPREFIX}/usr" install
+ dodoc README.md CHANGELOG.md CODE_OF_CONDUCT.md
+}
diff --git a/dev-lang/elixir/metadata.xml b/dev-lang/elixir/metadata.xml
index fbe86b3bebe7..3220cf329e6c 100644
--- a/dev-lang/elixir/metadata.xml
+++ b/dev-lang/elixir/metadata.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
+ <maintainer type="person" proxied="yes">
<email>styx.mp@gmail.com</email>
<name>Mikhail</name>
</maintainer>
- <maintainer type="project">
+ <maintainer type="project" proxied="proxy">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
diff --git a/dev-lang/erlang/Manifest b/dev-lang/erlang/Manifest
index beae406370c1..58c82807ae25 100644
--- a/dev-lang/erlang/Manifest
+++ b/dev-lang/erlang/Manifest
@@ -16,4 +16,4 @@ DIST erlang_doc_man_23.2.tar.gz 1386417 BLAKE2B 91fb2646461330c2f3793e7819e4c77b
EBUILD erlang-23.0.4.ebuild 4563 BLAKE2B d144bc5d0c8f802d720fd36a53663692f8e335f766ced3c9bfab0c9dc5086c875df2b6cb42fb840304a659f203c70ec150fffea072d9e04dc5e151a55325c067 SHA512 a16aa96dafb7729c137e06c5d4c654965437a80becd9a5913d33ced734063e0947d61c2a2672e1ef6fff8dbec14b9a736e8d4b94a839a7da4e8add656645269e
EBUILD erlang-23.2.3.ebuild 4563 BLAKE2B 32e12007a6f1414bf47bf4ecc4ba714c5f6ed8b1845a410e49b8ae796b9c349cdf4216d97fb93779f0104c83bb743b6359b1313d1689d0c9cae4a11fe7bb7333 SHA512 64ea869b959a0c8cc2b179ee5f817d773db388f3a30c73dddfeab0cc92ef5aa7b19e09c56d64be77a14ec568a250883495a667fc884bed9019901d784e9b7adc
EBUILD erlang-23.2.7.ebuild 4568 BLAKE2B afa013bfe43d1c6c8a9853f4ffaa3ce26095d5eba4dba1383f56ac0378fe1f3d73f2cfbfdb17df4c689764eaedcb349d65ea2b99aac67ff452f14a3d2d17be44 SHA512 7e8a5cb7c184d4e0ae500593764f6fbd9866e0ffc22c33359d0b2911b0b98a546da0998fb0aba17534e97ddb7ebc981f2e470c542378b0def45897383d26bd8a
-MISC metadata.xml 834 BLAKE2B 1f394278eed4a3ac5e1c04f4ffced7042cc910d9e84ed4ad955cf91240446410f0ffbf1c138cc76cfa55d40c0eb0f110da98cd49c59df2b12ae70c13afd45a06 SHA512 7c067d233ffae83e4b1b55ba9e8adffe125d27f5f81401a4e4262d9b713b08bdaa4dd927570b2d32591092ca387372ee206e25e0b939ca721c96317fcd3d2be2
+MISC metadata.xml 864 BLAKE2B fb20217a05650be9d9f454a7ffe45aeb7e41ad4f9b1616efa94f5609db4d8de1b5848268e6224c256c2ff86b0d3bad578d6e4f0e43c4e8bf433e7a7e9210ae98 SHA512 c4aae8e974789ce095eeaf7d7517da16351b1ebb60cc98abdeebc41147be4bce084081d4f7a03727f9070434a9e1347c0ebf809a99931bc7177525726cb9c161
diff --git a/dev-lang/erlang/metadata.xml b/dev-lang/erlang/metadata.xml
index 7e9a773063d1..580f0687c1a7 100644
--- a/dev-lang/erlang/metadata.xml
+++ b/dev-lang/erlang/metadata.xml
@@ -5,11 +5,11 @@
<email>slyfox@gentoo.org</email>
<name>Sergei Trofimovich</name>
</maintainer>
- <maintainer type="person">
+ <maintainer type="person" proxied="yes">
<email>arkamar@atlas.cz</email>
<name>Petr Vaněk</name>
</maintainer>
- <maintainer type="project">
+ <maintainer type="project" proxied="proxy">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
diff --git a/dev-lang/gforth/Manifest b/dev-lang/gforth/Manifest
index 0487d4a8598a..5022fea64335 100644
--- a/dev-lang/gforth/Manifest
+++ b/dev-lang/gforth/Manifest
@@ -4,4 +4,4 @@ AUX gforth-0.7.3-rdynamic-auto.patch 634 BLAKE2B c824db023b690ef4e196715589017f2
AUX gforth-0.7.3-rdynamic.patch 578 BLAKE2B 10e978a2f4edef4d66e839d2f9d047526e54235ed8c6a1a0b754a38149c2a2db2481bee898dfbc209cf8559b6f2cc408b13d594b7007b7710f3c619549321197 SHA512 2bb1491b82b87bcd387822da501078daad171950cf870f8644d909a848a4843e3fa99d8782d16524353edbffb71f704ff7bf5fa7bf326501f7dde2c294b2c8ee
DIST gforth-0.7.3.tar.gz 2523433 BLAKE2B 1ba9095af7958aabf0d671f982c483f2046392fd9872678a58f314357875d286bee7f0d7bc38e9b21331acda80fd285c0489fed44d59c148ff6ec6b6bea7c174 SHA512 f034234acfb0fc727f28b564432219a100b916c6df4b847794a55b2fc3b8ed8714eca6de0df67c7c427b7c2bb4dd00f65cfd34e6eb60181e41ab84fea30304e4
EBUILD gforth-0.7.3-r1.ebuild 1313 BLAKE2B 783f8030fb856719b5cac67216f21a6c3517e7b7c20772ec5fb6486033f6eb3eb6a3f313ed29ef38dde2f6dfc8bdc1da1239dddaeb98d057153947a676904654 SHA512 c970bfa352e8ca1ea1b46c0c5ff8bc3397577668616668b348f6d09ad99050210e26d9e06f1fc5aec8d56d79012cf8aab73fd28e73fb875fe6e366dd480f41ac
-MISC metadata.xml 326 BLAKE2B 45cd0a4ebaa69033fd5844d0c5b775ae70129eeafb2074faa26e6f5267f959cc21fccead3e55b7624092447b4af42b2adfc4a0815b0b2a4f5f04b822877e1095 SHA512 23c89da79edf3a0886758d0b3c1fd1c45de90b3eddae943614e25e8188891e2f097e03a3beaae36ef0be916fb8ce24f9cec8d5060664929b3d55f910d651dac4
+MISC metadata.xml 326 BLAKE2B 6da20ce2a24c972471a238851ab8507c86dbadeb31012151be42584e9d57bebdce2756f559de384330dc046643f488d5c1113a14ee062c3876af781ec06bd0de SHA512 ddc827fdf3ad56400315226a9a396689925918c60a9bfec1c3f927a3408b16da0c2df51e987fd8943e5575446f98fe7a83547fa168fc6863f7bbff0bc5272dae
diff --git a/dev-lang/gforth/metadata.xml b/dev-lang/gforth/metadata.xml
index 03e8585377c7..c14f5a586840 100644
--- a/dev-lang/gforth/metadata.xml
+++ b/dev-lang/gforth/metadata.xml
@@ -6,6 +6,6 @@
<name>Sergei Trofimovich</name>
</maintainer>
<use>
- <flag name='check'>Enable build-time sanity check.</flag>
+ <flag name="check">Enable build-time sanity check.</flag>
</use>
</pkgmetadata>
diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index d0e41fbda30d..df45f4d6a9fb 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -1,152 +1,28 @@
AUX ghc-7.0.4-CHOST-prefix.patch 276 BLAKE2B 77c706d291928a229edad6bcde37786b2c11cf52f42b22f44d3bbb7cfe12f83b8725cae020f95994e0f12022989b125d1f1e6f43ad0cc6698452264b8634651c SHA512 9d5d30b95c0467bb77f320c82458be5eaace5bbd77684725b9f3fd70d9640accdd771e36aa957c66f9bfb01e45088d32a5f811444b472058574ccbf89e10efbb
-AUX ghc-7.10.1-rc3-ghc-7.10-bootstrap.patch 2648 BLAKE2B 82145d17ff3f7535b80b76d98a30355895d1a43ab9cd5cab1606f989764f77b5b00d8d098ad327bfb6f3318ea8d188fcd55bcba15789234fceb0de5c132e9cbc SHA512 ea2c9cd8fde754803950e29b2eea113227ca5504c58392847090e13640bdfa6b39ef714eff985947aa27e66c2506ef2a2867696f68a7ff34418a7fbf49765d48
-AUX ghc-7.10.3-hardfloat.patch 747 BLAKE2B e2a328372ddd113752400957aa697d171b3367693c3d098c9b5b8b02b9e1ef1cc0cb86c2af4a0385a142791b4e7efbf4c7d64835f7e296a03abff2fccc9e9ef6 SHA512 a9a186ff62236d63b4b841bcfb1da1a902b3f300eb7d768c5316b5d636190d58fc71177f2d1670df261d0b681b104621f98cfdd76b30a0fb6917525874759264
-AUX ghc-7.10.3-relnotes.patch 1584 BLAKE2B e247668b1fb2a5b8ff69b00f31b8b642a7ba47cba0cacf9ac254b08cd736ee0d5276e77f64665ce37d8d85250c7cf4cc9924c86e21b35a3abfffded45b72ae9b SHA512 20d61d9f73bd0efa39c920897bdb18b69cff453f5ab24193aa3f7fafa70a9aa346ab4402604f81471f989c2401ca28d901fb85b8862577790559a35cfa3d3f05
-AUX ghc-7.6.3-preserve-inplace-xattr.patch 495 BLAKE2B f9f32485af27b76d62466bc03a17826e18efa40a87858a46b41d4f094e1c0989d2773ddd92e206d4285ae1791bf00daaabd4f19dedcd80610db1127b440394fd SHA512 98504e3b72446607deb520521c4abdd15e41e4ff69ad64e2ad13faca396bd7c7784b92c2bc7b5d8190668da480d5b1dd886f5e47e2e192d76b7fbbd58a42d44b
-AUX ghc-7.8.1_rc1-libbfd.patch 2771 BLAKE2B 8730551d3900012d04eafed69894740f603618ae59bef59e71194efb5b1e417799647c4aa1cda4cea9041504d116d74085bb99b0e9f0c543d2429529e030faca SHA512 e232596342675769c6bf97686aff0fa7a8991e1edd3bf607068482cd0d0c9f9a9500e5b15f176a2025732474c9e547c0bae603d373c81b374c96787d46bbfa4a
-AUX ghc-7.8.2-cgen-constify.patch 1173 BLAKE2B f61bef77e23e47becb8b5f99e8cfdb5f4e8858787da21b62215f5538c02d5c8d92bf58d29b080468c81d8b732dafa34969e5138df7c113e2e805c7b4e4ccdb1f SHA512 3e1bca7d7f9062d231c45a6765485291871df833da31b0a5573bb04639791c554dd5c0d8fe33bab05455fe06d3f36fe81dd1db6d3819c739284a3af5c4ec8fb0
-AUX ghc-7.8.3-linker-warn.patch 1317 BLAKE2B 399c117a216cbeff9d863893ef821b965d91428e55b447e72469ccc6940d0eccd4bca33f2ceaaea096de23789e74ca7ffe38a5fdd08005bbcc016c06db4ec8c2 SHA512 3b0ece4a6536ef43f15e97e723d036401dcf41d47c15e29dd8fe30c9f1563894102922617982db7b6c7cf3ed8aea64458b540ef92ffe690ff72994b1246834c9
-AUX ghc-7.8.3-pic-sparc.patch 1007 BLAKE2B 64a1214b1df6cc2d894e898dc21983a3df17da95f6ace2b7dfb2469ca62bf10b548a65c6242bd97e63a70fe7ae6e921e3e5828b664fa1ce04d10323fd8a4dfa6 SHA512 d3d81142a1e606c85c22127e2fbb26ceaeb2116435bf0bbc3743273577f04991e28c38a375a78b3f633a9b0e25f10951146d1f322e0ad7972089c1e5d977d16b
-AUX ghc-7.8.3-ppc32-fPIC.patch 14549 BLAKE2B 05811de54b2896c75456a0f61c64325fd347ccd3a47f86d7e9697d04266f11af0b3f3b8081b39318e8d90d76e3f763ad292adeb0114d8b7bf60157b5a90b13a1 SHA512 aa6f13e04a52e7f25db456c02031b63c01b71adf41262361b36ca97aec18965f618ebba73494b4283ad3c0224f15d5c80dbd43076553e604d86a07baf7fa86db
AUX ghc-7.8.3-prim-lm.patch 444 BLAKE2B a930bb9657441a48941debf79711e06223c5680df0f60d7d972e0150950109bf8f8a99c35c7dbcda21172dddcb15d8a379085813e44647583e3888f27f597568 SHA512 6979e002589a54c870c70eee8357dad4feb55b4e5102350cc09a466145677dacaa1bab5ebe4818cf0d3cd8ab50ee0ec2ab642ab0fb3fd34f4a266e5e90f9f389
-AUX ghc-7.8.4-gold.patch 1025 BLAKE2B f62a45f9761690a685217654e45c037c63e2cf0ae297f14f3c70c038c4b02e048899b1a787fedfd30fa4e41839f729d20c2442ec3410fb59508da57222ac19fd SHA512 3087084d8b6a202496fc7ac71fadde06f7d1622d0e3f44f1b52fd04f1451d690f54b6bd8ee0da85663d252c6110340402bd1864f746117e59ce7b02e0247ec94
-AUX ghc-7.8.4-ia64-CLOSUREs.patch 2243 BLAKE2B 7bfdd4f42917a7b856ce18b85a2131bc0b566151fda16a77412331f38a4465efa080f6aa3eb52cfe12fb9c2c3fdefc1fe4a533fa5b339f4f22ac70c2a4a404b1 SHA512 9981d13f294fe0a28d1cabfd4db98bfb18110c6adb390f509667e3166a931c7d9f7b4b0079dfb1a22c174556944fef62f0e67ec855a9c3bccc5b54b0d0952c09
-AUX ghc-8.0.1-limit-jN.patch 1896 BLAKE2B 3acabcf982c0520d628d502cf2ddc01d6fda8ead7341d8f0341a309b4cc314d01b4e9237afe810b5265b7a952c847e605dbc3fb2e35d76a35ec2c832cc7653f3 SHA512 5eb69e0d5f87e326da82f018f0466a62e307f3acec47d991c7735ddf828c98c836dbff5d8164a4dfd08829b36a9d573828b9553fe89d65f5ac6be6c0190a110a
-AUX ghc-8.0.1-par-g0-on-A32.patch 2276 BLAKE2B da7f6dd5d68e911886448afe04e3d0da6cddbdae686e040e8b060ade871075b87e464cf350f1272d33a7ee16e8e73cfa2d7f4c64ab7540980c0283b898817602 SHA512 0aab32a6f289c2a4e83bea2479c04cbd226f3399b5cb4a8a596ed756769a1b29bbbad261d7006c28ab56faa48c1c02e9e52cd35a7bba56ccc87f49ac1d17b0a5
-AUX ghc-8.0.1-ww-args-limit.patch 5212 BLAKE2B 1079855da7599a83d6e950eb1caf40da4bbb5b856746dc7d2e2e50651071e3acca45773cb0f1db35a6c7c9657ffd40c911ae4c1085b9e33ba4ab815d1773a8bb SHA512 5b3e34f52406649dca1cb3079565cfd068872387956dda296902c2e1ae8a092be0e70a1fc1d96f0e578fef0b82ff48b655d35a1e21911484f04d34809b295428
-AUX ghc-8.0.1_rc1-cgen-constify.patch 1185 BLAKE2B 3fc5807f31cbb5c30ec5782d27539987195bd83a6be28dc510568f0cc2d4d328cada1f111838e1ac79a3790ee197a4fb5cc41c040fbde66ca279c1fad01f9f5c SHA512 338c887a643b31ce6df2cbc28df03d1b98f48ae6b66afd0440cde7fafdc8ee51520f18c7f026645c3c995f106f78f451733b80abcdf8d4e4c3e9fcbcea597394
-AUX ghc-8.0.2-O2-unreg.patch 1203 BLAKE2B fd0ec53968fec2f4415a367c729b9b69e15f6e2c76f8ec39d6b3de24fdb0de0b9c87559b04f8b1031a05fee8a653c5f0b2ec09064f43eb9a6afaa8cf4f179e8d SHA512 0d0252bb7c49cce2a38fb81673e6f6a6aad16728f66be6287f5a765064ebe5e5fa43f30f247fecaadc7fdd07af416522e5eb28656b3220ff3832ef8164c94019
-AUX ghc-8.0.2-binutils-2.30.patch 2115 BLAKE2B 5affd1954283773ab1f4717b5cc735f864db9ea3eff3f859cff5548b059ef00e66230795aed8c3866f8b839d74e24bc5d767bd73bb928bf19c1bcd17acdfde5c SHA512 d7542cbf8ad2ccbf6a3b5f50125c98521f10872e319043eb048c06ffc416c6c835772190d58f6a09d10e55942168ca9588f3f1bb1cb835e1c1993a44403329a4
-AUX ghc-8.0.2-libffi-alpha.patch 2133 BLAKE2B 596410d5bead5a3c5f1f4a1e33a767bf2ade92204e469652e3ce005dd275a54e0e084799af2967529008654f4c45148b955e5e0b299a48cd5e78cf1c209e3d7c SHA512 77964b82be47219d709ed4b79ac255c4762986decadef2d65d6643cb2d1b6cb0f3210cce1bd46bc16b6e6c51a4aabc73c5bc5e1bdaa8797a5f23033194f91a4a
AUX ghc-8.0.2-no-relax-everywhere.patch 766 BLAKE2B 76ca925d56a9d2961cd342971ef8fb0165158d707f0089f3726560511e57ee5c08adeaf996595378d1cef3ec7b59ddf1df06d0255bf20da51c5b26e817f4057b SHA512 b729ddc27bbf089324f0b4d7229925226b59c0047cec0c0230e022fb8554389373e309e93a108f0aaa155fd9ff6957a7d41cdd35a90c6ca59b216381ff21483b
-AUX ghc-8.0.2_rc2-old-sphinx.patch 434 BLAKE2B ede17cd4e5848b452edeaa3b429a7485f324cf1c9133098c7d9f84a22816eedeaf55143fea082e514b5e987ca40f65b68a476060e0c18d19bb5f8b5b993fda92 SHA512 fc8fd8d40c70a77a3aecfbdb0993bee9ef1582402b7220ed3066e1c6d4bc480c5b569cab44b58b3c54d1e68f506dc5b86ff87518d744a5a846d4de6cb1093db2
AUX ghc-8.10.1-allow-cross-bootstrap.patch 541 BLAKE2B b77b3c9ebb7a33af6f82ec1b9927664e9bfce04450560a8e436ffa87feca50d606824192b7333e3b98d5552622592b6d39d0b184037ce646d6f7ebd205deb348 SHA512 d87a99ac96846e161d8c939079f8314d380be8e1dc62f956e3afcce1339a76447a14002b30bac1c86c807fd8eba23a0648912a3d074248f3513f9aadacd27489
-AUX ghc-8.10.1-no-relax-everywhere.patch 910 BLAKE2B 3afdc92313cb48a00698b8c4cc8af822b843dd107d546a95d598fa0d7e7fc4507e3e7dc8ab06faaafcb0cd24770df28826987088898a6cc2d1b914fc7576ec75 SHA512 21f1c64ed75c5b062a00f48b7439753aab15083c583a1cbea76b63398873ac14f52a45fe62e4cf3751c5dbb623e75a4f96c416f5e8f7a1f7822798b21cadcbb1
-AUX ghc-8.10.2-revert-linker-rtsSymbols_more_linker_symbols.patch 13879 BLAKE2B 6e36243742c4b4bdd900bd9f049f06c480e1582154f2dbc0071c1ba07e8e4dc4b9e37c3425840f35fee6cfe290036b6ac12493da574efa65260589ce63aa28f2 SHA512 3b14656faa2ba0416f01693fae43f856032e6607f1e27b22bf86e39f56e31dd06878d340fb4e7bf297af59fe6f3d2f32458e49efdc18191c2b887ac47ebf3d8e
AUX ghc-8.10.3-C99-typo-ac270.patch 348 BLAKE2B 8d23baffa0ae781db4610ee78fea812ebc25450c94e942d8008c591cca78c6072c24b042e7a9dab08ae5213ed4ba931ff932ad4685fc029fc004039494a70c7f SHA512 9e224c6863b5f0f0deb032d4554dd41f2396a8cbc373b860294ba76feaf1abe7594711ac02e9a06356c024df8d6fc6a7a064ca428eaa1e4e6209b3a29d4317fb
AUX ghc-8.2.1-darwin.patch 910 BLAKE2B 2f1a44dd7ead59301b5dd59c8cab932710655416640f2c8d5273cf07da4a45bf702d840768e2d32822e89f1b07cc9ed3a6110e1847e11468fca5c515e9e26f70 SHA512 0177fda8717d9158a99d96853feb1bf40ff13df8f5c5669c7c48f33accf69d6ddb05876776cda66705e85ee56c5ecff8f81722d8e748b6c2ed6b9bf611e42a2c
-AUX ghc-8.2.1_rc1-cgen-constify.patch 14371 BLAKE2B 96f9607cf857bb113b475d173a62998f2b0424f09f14c20ae3cab8497a25ab2df7523850f46e3b2867dcd75a499b3487345376b7cdd8e6f4a5e8008e160cf3d0 SHA512 8715c2f7c497eeefffd13b578ff718f36ec22bfe397501f685db0c781c614ebaa1178a9ca7550a722876d1cf9ace39aaa44493ecb934a828fa5010471672acfa
-AUX ghc-8.2.1_rc1-ghci-cross.patch 2828 BLAKE2B 89776c87d4ca8c0b74f0d7ef11680d2cea217774389bf297df1a61f9d95ea515b5f9d44387eac7715fec59d9c91e91bd06215c851c94f091c05b03f84d0b8699 SHA512 55e8f2e6bf69ff26976005e0b89c400df9facda5eb974f7340af89625361adce48371616a5d292dafbd4d98cbfbc0b656d36749f2e16918b275a0469ed88cea2
AUX ghc-8.2.1_rc1-hp2ps-cross.patch 3865 BLAKE2B d68b1e15c091047d086be780dc0bb5ce2a1b713244ee240ae045052ccac947baf6a5bdea8cad50d0fac2984700069af7dcd320b96ca09af8c7b81021329da41c SHA512 d2ed48701216f5c03567e61c207e32d6218009380941275c690edd8eb0197728e7e3c0edb00d512792dc2041a958de82ceef393e96d3324b690157162e28d29a
-AUX ghc-8.2.1_rc1-stage2-cross.patch 2986 BLAKE2B c50b502adca0730fc382831631851c61aeb067bc9f7c028d983bc9b528c22fe75839e63589a714f06c848e72cffb77d4c80d6a617908e7bbec87166652a38624 SHA512 7dcae0f9ff090e521befc9aa593a674ae9175ec07ebab91bc5a72097be509a89de12bf7c959870b12219074919eef115096b74f78e7cef00360aea32126ec8fa
-AUX ghc-8.2.1_rc1-staged-cross.patch 1605 BLAKE2B 5b5f203e17912396539530f40c5a93f72f1982a07ee8eb2b367d6b02ca82a2b41ac38d06e8694abe226da7761f169822b74c8c3ed1025a55bc2dc61214fe8996 SHA512 d9005f0310002f87972b0db8484b714d15664209b41eb84ce26950c4a19e854203e9b78e959755ec65a2a50a73bbce4999b39a3ad4da844cfe65098e65171450
-AUX ghc-8.2.1_rc1-unphased-cross.patch 1066 BLAKE2B aa29454f12ba0073779df08885c587cc5ef5ef21d72247d52b9f71bd455ba5fd0c01b144f0cf071e712c5e60c5ff1b96afdaad6c701fbaf8b7c418dbcef54efe SHA512 24b9b864e984cf3e34c2a23e0ba24a7f2c961dc590c6bb8e6461afeee7bc4a6361e5bbccf17754486c81136b60e12ae7e9ed06f485ef2f178084bcb2caa5edd9
-AUX ghc-8.2.1_rc1-win32-cross-1.patch 4535 BLAKE2B 546af93363a16fdcc7dc7b4167b30e81fac5dca126fac8d1421632d4fe9d2c3803f1a2ad3bedb7e270bd442e2ca95f99d18ec8d17ca9633079c6d486c6ec9ee2 SHA512 16e8be604af1e856bcec0603caa9d4fa66d5e4773a68fecaf4a57f509cd241cc7fb37fb9705d253e28d871ce2afc942e940ca171b45d41715acae5ef6e0fde8b
AUX ghc-8.2.1_rc1-win32-cross-2-hack.patch 6231 BLAKE2B 8ad4428ebe9a373e08e94e5373ad9578cafdf95b866ced2a4000434d9e5d4298b129e832e13e8e175e8977b9dda9351d01a896e2c320a1a40551d5892b0efc33 SHA512 8617c1346ba7aa2b41ee01feaa47f2ca477353f9b825be48c5d3505a134e0a80b613efc6cb92e7fbd3fe062e77450e197c826151a42c0c77177fc6ef8e65287f
-AUX ghc-8.2.1_rc2-O2-unreg.patch 1199 BLAKE2B 7f3fe4b40e026736a3f1c58336274b49eb2cbbdf06c20ccced7cc83fd740128e4c30716cafbb251abe4d963ad224d3c406ec9f66b4b980af5f5c523f01136722 SHA512 708f68234f3678af3d41e7a50f9b914030536aad081b1a09a6169b12ed61ffd9db207a03f8f73d1761a93c5f2a21e92cdc23475501f96cac3bf98b046f3a6dba
-AUX ghc-8.2.1_rc3-any-vendor.patch 1288 BLAKE2B ea451228b0304d35ea1047a997e26efba4eab4159b8f84fac833a8561682be15b38734434459d17a02bac8da5df97c957a7f76091c5393dd87121c3ea599c1ba SHA512 934d6d91a434ef1ec8fbeb8b13f7a20b0654a97df05d10e8d4f577567b5a0498eed484261bc1348926e112c6d4429304f74f10e4ba819120cf5840e9dd2d8329
-AUX ghc-8.2.1_rc3-stginit-data.patch 1179 BLAKE2B c67a01bf0dc9b04334592b85ce8c238d34096857759a47d37a91e305d363f1acfd2b7ebb1a65f1dba7a558db65fd4448a11e4309e2c0f4cd7b0c8075e8680990 SHA512 351b78bce46699c63ba9e02103eda0e80eeb92cba9b364049a11e61bfec3f0bbd9317a4d221b51ea29e42e6735ea4d5e3a6357d0180dc91647b11ccbe5f885e4
AUX ghc-8.4.2-allow-cross-bootstrap.patch 768 BLAKE2B b697a54fde6687d49592398be33ea4feb6404ff24f51b5b82bd71fe8234ad2d0d3322199b12770b23a0fe27ebb5a10eab2400a5c84d28c29f3d8f3d4521cf214 SHA512 1a58408a96d2e35b021f7298b399153973905e6ff8338de8a137c126f0e2598306e0c9cf2925253717c8d7125796094a0490a03947982961f583537b5188fbec
AUX ghc-8.6.5-numa.patch 850 BLAKE2B bc15c4e24a8a395f5f3540469e5e769285b705fae05790b9d9a76e87490ec1103a89c1b1a0166b05f29f9d6e07b847fba9c9b7ec01e9cb9f3c8aa0078e4caa68 SHA512 89ee983384cfb07211f37ebcc32c74f93d82541c9459857cf317a8c947d4325a9d50caf051cd68fda2c648c0f0305f7df12eef7dfaa86ada79fb5816269f76ce
-AUX ghc-8.8.1-no-alex.patch 1080 BLAKE2B 7e7d6f445f77eb5b86ff36400240d322646c4495d669c8c6dd0f3e4471170f83a2966746673b292c8cebcbb0a7a9b07602eb0fabcf5ab8820159d3b0b22d16ef SHA512 84b784c44d471a56771661a9f1a75f12ba6312e76a2b42bcfcba68b64faddda50c8c8ef93a6dca3051de13535df177f6111a1428c514f60a1e72513c10e871dc
AUX ghc-8.8.1-revert-CPP.patch 2236 BLAKE2B f793a9e9516f9f484234311372715116dfdd588a6682113914c17feedc635371779f0c0591e1f0caf3ff3e5ca5d4c7cc8b052045306f3df4085873d0df25f2af SHA512 b324c6873a802e20ee690f0574f9f2f312f3ba4331345504b7170f52ab2b1adeb9d047a0e5526053d006d67fc261e771a284bdb8f7b76653c21d9bf9337d7cf5
AUX ghc-bash-completion 6496 BLAKE2B dc94a1979e886026a2fbe04bf7b45718ffa3e025a0e8945262e21a1243bfce6517fa1794f2ba6cd54cc853e93ad5d80472b9019b95762f10b5be83634a479955 SHA512 ede79ccf23555f60f48297d29bd98e3ccfd67d2cf27462153e00beb930398cb497e34ba8316e91df44c577ed11fdbe5606f7c6a2777e35d5e783590e49ccfeb5
-DIST binary-0.7.6.1.tar.gz 47086 BLAKE2B 7d81b9c254902d5ff2bafbef4c31a6f6f0396202d8585690c1ae3b63ae6ed157db7221d65a62e393ee8f6725ffd5d80e51030c0351e954b06004fcb70e5867cd SHA512 655daa93a52b845a85d440810452933d7bc3398ad1b51e1e955b2d19a0a32679325a0d1751ad50d252531e493528262e14dab32af4b9a515855fe7f64e0730b2
-DIST ghc-7.10.3-src.tar.bz2 13281867 BLAKE2B 51b0a94cc63269926fd5d04c0fb0871266c45b3168187b891127db71980d180668fb8ef7adc51a7a3df947ecc93b4d4a06965ccf9ef53eb74ed063c54adfebde SHA512 97a8282d8a75399c78d85d6faab7ac253a993dc69f1840358572f1878b8fd1a527c28801e5823c8200b5690e268e4a0c00941945ada13790852c75a83b612c17
-DIST ghc-7.8.4-ia64-CLOSUREs-regenerated.patch.gz 13268 BLAKE2B 35af21163e3a46ee340e29eb88daf617eeb094f02da7fdcb80e947c1d26234232b12d9eb2c38c02c3207c047573521fef3ac5e7b87609e66f0c57072fef1038e SHA512 a655713e06324b56f0041edf70837487e296d28e6f3ee35fe116b9938765aaf3469d25e92645e0940655ed3607dff27d3826fe0f995c84e81b51bfc956816e7d
-DIST ghc-7.8.4-src.tar.bz2 10600755 BLAKE2B 6cf27f663178513b25032b648cf36b016e01361966725dbfc219079961e8eb9b1ab3531427c7012dc599e8e102dc87ed6dd43b31e7bd4e231e2d989936eb2c66 SHA512 079a53891d8ebd8d9b88da96170e60981608a619f8282e4b7948f35244e99bd87277649ac7fcebc227a61a4d21960db8d5e5b9e92f2c69c82d8d68d7fd0a41d3
-DIST ghc-8.0.2-src.tar.xz 10687760 BLAKE2B 3b2a487c115680342ce308ff1a42d2b6fa6fb1f31e2670b27a305b4d44160056611b77273c9d47f2e37a1ef01b1aba59c36e76b65c83142a5f09812bf3b1ea02 SHA512 58ea3853cd93b556ecdc4abd0be079b2621171b8491f59004ea4e036a4cba4470aaafe6591b942e0a50a64bdc47540e01fe6900212a1ef7087850112d9bfc5ef
-DIST ghc-8.10.1-src.tar.xz 19781652 BLAKE2B 61ff73d3a895cfa0c836e25a684d7a31cf099dcc33d1f308eaf56aa4b2a75b8f38cf963197c11dad9d027270845af20e00a7d81e5417b0fb8b4a98ddbadd53d8 SHA512 e6bb5c326f8354f0892324586c164c6e04168215d8bfeccb594173a838a535e37bac38db6fbdb01fb37150099c12842c53be5e912dfb6a6feeae3c75d4ae24d0
-DIST ghc-8.10.1-testsuite.tar.xz 2091988 BLAKE2B 88796f0fb6ea2bdd749161c84ec88768f3bf87063d2224a083db24f69282e615227626fe3c7b41d4abec10883e22042abed6a231582bab4ea530feffd683ed0b SHA512 35147f98301c5bfb6c939e108de48b2a1133adc1028aaa720ce49d60faa06a4b486a9eded658295e3f203731b4dd53475b57e8213491c45b05959430030be269
-DIST ghc-8.10.2-src.tar.xz 21880680 BLAKE2B 0c1b67c1576cfd1067d11838301f96041cabf66b94cfd546cfe6bef57babe940fc3814918ff9327e59fe73a8e230fa1d62d7816d7c6cae274dd8c53de6e81736 SHA512 6c3f1311feab3665419a301b17fcb09d303ec822f8eb8c4021edfacff00d9b52e71895bed0e58f11d8f7970415bd8c6f95ffde1294afe795e15607199b20cefc
-DIST ghc-8.10.2-testsuite.tar.xz 2101788 BLAKE2B 0d4528223471dfd68cadcda47931d53508c9eafa415716ca5990ea519eb89bfa2bdd444280057be33467382dd3d178887262d54ef633aa8ce88ea91eb9d58ece SHA512 043faaf2f0dc34a868c481b284b94afd78aa1ec1a4056d1f3c97ca3f7dadb3e9cff0517a4cfb378fe5187389db7c9027763bf066328e7dcfd264b737f6d09e41
-DIST ghc-8.10.3-src.tar.xz 19872356 BLAKE2B 043f41a21becc826b3cd13ee81b138cf2edfa18484f98361dc85b12f784df85571522347d5fafe40a19ea8ddf12390cd766db8fc21cf4971e797bc61404304cc SHA512 6f3248e728d3677dfddf2f02609167c67a194750418f2a5e34ed68f1135960761c5a5768255bfc8b2ef5640395609424878375184d2dde8e2d69021a3baf9ec8
-DIST ghc-8.10.3-testsuite.tar.xz 2261376 BLAKE2B cd03d569c30637d531d9a13fa926a28f854a37d48ef0d4e2fde684664ae000f3c941b5113ccafd42fec019428bafb5344b1ddf8f84a71b21bca8831ed4784907 SHA512 4c9d20a27ed71eb7c73bd86c1049ea5adcc8a0b12040386b7d0dddb46b3cf704c52a3392e19ae4ff1c76b8868665c599391d47e47dba516fcadf8abbc30e28df
DIST ghc-8.10.4-src.tar.xz 19818108 BLAKE2B 069dd8436c373ccf73c20d8b577243792ffdd3a031e869edd612fe1e273126e60803326542695012dbe62e57654ada18af9342bbe1a741b2bebb41cdb0d86035 SHA512 9bb078cb72535a352243b83b671c871392564efd09e478549f27ae58fc6f46e337a0782f5500d26d5704ad96eace22e77bb36031a1fe9b7e175f265b0b9c028b
DIST ghc-8.10.4-testsuite.tar.xz 2236932 BLAKE2B 17d0520ad5c6daa0cc60530279ae7e617e4d79328b9f436abbe75e72f0803d9a997fb9e1ae61425326b070f45794a488d8507957fec9a6ed49eea86d30a1e579 SHA512 1bf129c8d872e3ceff7c19929605adc5d68daab9ded9aa2e5109b0de162089631472c66f04993adf8481291f8128bf804fe64a9d344c81e257f1b962ba5e382c
-DIST ghc-8.2.1-src.tar.xz 10736016 BLAKE2B 60993cfc9569e83b0c383591ef30a7280e0138fbb7bd696ad62d87e68dcbccf31c0b8ba211b6647922b8595c7aec2c783648f12c67da53e0766b71c7d7c923fc SHA512 d9aa2aa7f9414db8f4e51d6c275694b46df515e68331a1a2b6018256333a2c63ebd877b75ee90407ecce5be672ec9afc6bebd62aadbf8ae06b94f1760d1736be
-DIST ghc-8.2.2-src.tar.xz 10753272 BLAKE2B 6fd792390d3df20f84836466705c3f3c931ba2d594dcbe2b808ea0ae284460000b443df8aae74903eabf05ff9064d68a303086cf888ea68222eb1c60959c8f21 SHA512 6549416f470b599973d409fa45f59c25b07e6a94798cef1a19ad432547dc225338cf4dbc4a4793114b4a417798a3b59b122b92b020251074405c5302b7ffe799
-DIST ghc-8.4.1-src.tar.xz 11301528 BLAKE2B 6dcf467d04cace856b68315c85b80f19b517dcbc8ae6e2a08c60afa141c9e0261e012738452c9ca208f9fc40c48bd1a0817e5e0fe9f4737383cd7b44ca65c8d9 SHA512 f8ae11f498bf2911fb92635534c6906c96f1fbe5072c7b7447bd3f69e408026b674564515af02a8aaddc57ee6905ce78d10005b12478a39c220580aaec13a9f7
-DIST ghc-8.4.2-src.tar.xz 11313140 BLAKE2B d6fe90f3c68b137c6029bf08918a51ff43c210ba0485aca8d77541cd455f6f9c94287cd011ecd710a8e5a14a27e8a27c04c517417c5748966afd63a5ba6ed19e SHA512 aeb17c986c597762381d9887679eb0eec194c2938a92b5a33e66b4c80002ead02d672b4aa968e1061ab5652b74e46a3c9f9e3d58d5be4a0ae47aa8aed288cf1f
-DIST ghc-8.4.3-src.tar.xz 11315068 BLAKE2B cfb858051aff0c4fb3cdbbe96627cacc82665a6bfc4f863b0353eb3d93d358f7ed4efd7b131280763786f397aabc5c4825f60c3890649303fc97187f2b996d21 SHA512 c6cea84264f32ae888f9931f834a1d721889242f656d14262e787ec54a1793d1862ce76daacaf1006c12b8af12919501afce1dc02571373e24830e4d51803414
-DIST ghc-8.6.4-src.tar.xz 19029904 BLAKE2B 80676923866417cbf674c3cfadc2ecf9a673e9dcefb4561be7125c83edad38990ea9427c302aeeb9ef04b2c3eeea4fa9fabc72d89c742c6714163ea280802122 SHA512 9237e45b26852cc8a6d64c80da2b28c910349bbbed60f6575035f39bcb064a5ce80ec73cd85e2298e4abefead378e19b7d7ec3ffeea09e362f20eb0b09b36798
-DIST ghc-8.6.4-testsuite.tar.xz 1906656 BLAKE2B b0e55b415c885479c3573fe86436338971e685edc95e106043f36e92e1ee6a7e86add9e86a35c8bd685916f18a7bcf08d4a7b845da41dd855132b131ccbc4a37 SHA512 b1bbe1759ec528914cbfa6b3789c596e46b6266568972b9f5d1cf13e31b7206400b65536e7acea698161e46b8ca11285b3282ebd9336d23b68d34feb4f0bf314
-DIST ghc-8.6.5-src.tar.xz 19092168 BLAKE2B 2ac0926b186c43fd179170a0690492129e9ffb6651608875db7167113becf324dcf99a82f56e578c67051f813007c0ffa32ca5b12588f0d370330c8274a2d74d SHA512 c08a7480200cb99e1ffbe4ce7669f552b1054054966f7e7efcbc5f98af8032e1249fa391c4fc4c7d62cc8e0be5d17fa05845177f3cea3dbcf86e6c92d40fc0f9
-DIST ghc-8.6.5-testsuite.tar.xz 1910060 BLAKE2B 71136207e3eccb4ec6756661ffa64c0a82475704c071cd8f060855a9f40d7d1fc4be2da7ff265df38fb918b8ee2ce21a54ee4b224aacaa3026ad1ddb1e1e4ab2 SHA512 980f3934bb18876cc80b80a0eb64a9ca1dfaa7f4d8b0761f5d733a6583053e38b231445388b992b26ec1ad5f569b6385dbe60f96381794f5577964979c253e16
-DIST ghc-8.8.1-src.tar.xz 28634672 BLAKE2B 3a012db5d9798efddf806542a88cd9fef1d0972f7f025d377c247961cf8d8071fcf390aa130ac11f1a5556fb572499b9288a8698c49bbd594f0bb5fec4130a2f SHA512 7268b012c3a6c34e7eac05c7d6959de6005651d33e870860bbfe589295502e8794a76580130b8f4da2f88032b68116dbbdbc4c1e900e0c862aaa9891fa788bef
-DIST ghc-8.8.1-testsuite.tar.xz 1959220 BLAKE2B 8606a6439f7d5b4c837b2325c4ef5705dbcea17c4b59daf7aafd0de68e55179bb2c03ce7a4f376398b185b6dbfb361d18592756558461ee43722d2142370d815 SHA512 e13b651c60deb86522efbfe8aa42679cc81a413475f70580d9ef28dbb711617c523951441a30fb46f3be9418c4c0bb4dbc522b04aaa51313afd2d39027696c30
-DIST ghc-8.8.2-src.tar.xz 19365816 BLAKE2B 85dbd2a4696755f43c28ec578d5ecfe706b27ba7f640f66b464b7aa7b959ca5f02b8b51d130299c30d024c46b9ce6a115606bde46be400fb8ee221ff18177d65 SHA512 11eec0bc03254ea848a5c86bc3e2da317801a1227dd91406a157e11cb675891d77d61177b740b6df88bd823063f6cb2af5a928a7540e25392d9d0769ea121069
-DIST ghc-8.8.2-testsuite.tar.xz 1976924 BLAKE2B cec6c5dab1782332aca6364f995cffc1e9f3506649c3410b6eaa220e665b66f033dfad8ab6cae7677e15a6a1bd51237ed491b7fd04a19fa1d4f9cd8904617c64 SHA512 0fc41a0b3cb5f172442863c8a3b1cf549f2f660a070965e6083baa2c90c27b6a7c17550625105799010f4329dc189f4e392c86991844a9704a3e3a72a6d4e2f5
-DIST ghc-8.8.3-src.tar.xz 19343672 BLAKE2B 4b33b4a386926f0ee625c7c18a3997f02bf664b8f553d7cdfb231553bf9510f44f72c0b46911539f6209f28ecab52ee520e61e2c9e750cc217b170b3596ffca0 SHA512 7db0d820a288e56bd32935cc03584295900605f6e7cac6fe6adcb3ec6c24d8d2cebf7a8efa421f2d2fa192602d7f24dfad1ddeeba252455e4cb8baa9889dcaa9
-DIST ghc-8.8.3-testsuite.tar.xz 1965236 BLAKE2B 9cd10769336513284d8e0fbca1c3fce9e298ec67eb63eb10d41087fccba0f6281f1509aee684778fd23710ffe65843c43b4042e6692940af67766056c4503273 SHA512 4ebf3eabcd7591762dfcf45716b06293fb14c00b51307f7788c90dcf4e01f67e6bbb7a887b74d8d30272919486441ac236b42a54c4874aac69d90391b76f81c9
DIST ghc-8.8.4-src.tar.xz 19395252 BLAKE2B 6fa898b9552398a724f0452f5cc88ba073264a5645288c73507258959efec40ce5a56a0eaafdabe58f15c5a9210b2c9da5954411dff5c81c52e061569d6a350a SHA512 efd23bd819f7429486696a3a929a040471db7ea8a2d1f1d832e4cf0825b9e1e0c5e6ecad0ab8376f58b74e9c28c1d2f773bd126596d6d853c9e57d57e5ceb090
DIST ghc-8.8.4-testsuite.tar.xz 1965820 BLAKE2B 3b715700561788b8abdc986961d533b91399461d57a1686ededb4ccc36881503cdc3fc126b9a7b204a728c24b9a9ca97320142348644367aca9b47c87a5b3b51 SHA512 79d8fb0ba8de0fb48c938bd54c8c3278f1895d8ce5c700ce8cf6b3fc550073bb757208e85d4f9818400ebecca96f51d9248b8bbdac9eb2995671756164d08c16
DIST ghc-9.0.1-src.tar.xz 20782336 BLAKE2B 53eaf903081d705d641459fbc1e6fa7387a6039f9cd466b4708bda86e81252a84d80878d6eb956ec2e1e5b721a313e68eeb796f8345244ca62f536a7a3f0c6df SHA512 bee7950a5118be8d8cefe0db5070139a5a93ca21c5bc6f8bf453429831f0c44f5e0fb5ee569865d6b8b92749044ee4123be06920928ac7a1ec9cffa9404a3e53
DIST ghc-9.0.1-testsuite.tar.xz 2322432 BLAKE2B 350df763c607dd89ba58ad6e856d815556159a9f088dc0b069de48ae87c1e874a45fad51159e65a3c9a9beed68602eeb2a2728dbce86277bd287455f46f6c53a SHA512 13fbe0f0ab5e2426820d0fb37f0a75e1198ef2a660398508806e8ef094fd23647ca3d386815a2118168d12253d8df3273043678dbb37cf3924c689dd0fd1932e
-DIST ghc-bin-7.10.3-alpha.tbz2 183558856 BLAKE2B 2bb02aafa49c6a91bec016e8bec2d07257d602e53c9df55792ec6fbbf8e2e46de1d5f3f72c0ccf74d6bd7f7987f53412063ccb02ae85455fce11fa928cbf5291 SHA512 08709fe9b4036ab41715c9a637a2a160104e3ab9e0ed9efaaf73428e3cfe19619e50c42b72c60bbbd27be2b9c2ea68f63d72c1a27d4519756e7c0d909f724230
-DIST ghc-bin-7.10.3-amd64.tbz2 112040431 BLAKE2B 3e59b70ca309a1cd704266c54a7983f9a58362bf700ced89c5649c780c664c650ec091e14026a7b84e339d2ebff39eba1772eebcd9fb4b99b9c99d179453d5cc SHA512 e1554b3944edbe8e16537de5a29132dc6a22d780d9a700cdc9b76387b94191164398d6f2242bf8199527802572e2bb02545569d4f0930a0ee0dbfdeb25978558
-DIST ghc-bin-7.10.3-ia64.tbz2 238680956 BLAKE2B 08593718d376051edfb0c86131e54dafc5c15056757fbeef90c653a7d217e49ff34ffaf7cd4083144c9277e73a290b822a0f889aaf806341375708e4b92654b2 SHA512 3694011aec8a6dc37889418b318993cb82f9b46a5175dd837713f396c8f59a19a920e0b0669fe3b4ec37d5bd8837c115264c0a8fc97c5a4ce06a3bdd52fcfce5
-DIST ghc-bin-7.10.3-ppc.tbz2 125832171 BLAKE2B cbf9c87200062606fddc6fa705666aeabceef954dad17166e24e181d210d7d86aad684e9af5ca05abcc89c947bea295dec3223735a6a915b680667ad32d850a5 SHA512 4eb111e3686656a83515f59d4ace8bc28806dcabfcee5201ce29aee38b8efcefaaf70c50bee55202c2d2abbfbf231a6b41df8b13199332c53055adb1754a3191
-DIST ghc-bin-7.10.3-ppc64.tbz2 142469712 BLAKE2B 05e6ca2498180399dd8a1a209843dd1229a1668d7504c424b9182fff00f78ec9aa2848d562f293dd388dc983851e0e28d481b12f0ae860b5c3a36eb616c3f1cf SHA512 eb59d3abc8b10010311d59df9473c5ea649eb0dd7f9ad41a1929a540a0ef8c20abaccd68254f8abab037fb1fc94d824f474e18e4316b8f2a7a954d0645a2a2a4
-DIST ghc-bin-7.10.3-sparc.tbz2 163105069 BLAKE2B 4a535472bf9ed83164f4da8280215a156b973a3a1f93a742a46050a112b7073d0a5f252686ee2ebde97140748cf3f164f33f1ba9df0b11fe2b35a86a7211b3a5 SHA512 d467a42487378d7dee311eb33aa1c151f5c16a6e7a4ab5bd8177df229f474adf19da3e1ca1064943a40abafcab6852b0589dd34413da82b33a03ede1ac17bf5d
-DIST ghc-bin-7.10.3-x86.tbz2 113877175 BLAKE2B 2f3064174f82f3ad6fda615d1f47f30b11f9dbd4a4b721673e5db49013a11ba80e850a0f392460651408fd3b31f8e677f1488fe2c94160881ab34740846b0390 SHA512 75096fe9106d975c15e646b0a559c544621fd02791f491bce54926efabf0e55b97150069ddfa7a9f02cc30bb6975d3d3121a82207a9f67b8dda5ebfe17ec4744
-DIST ghc-bin-7.8.4-alpha.tbz2 210691009 BLAKE2B 7a59cd1dbbe76fcf37ec7d1b2e81a76bd35f268c10614890cc8a39dcd846f6e5fb524ce1851036c315a9e5fe219d3abbb78d55f3e93f4ab5ad1dbf6c946146b7 SHA512 f08230de82f0c4112da9d0b48227ca74d5d0b4a84046d746b023557b7aeeb9678f5ac037fe89a863178df4b9036e5c5c63182d14dfbb42c772011de883e3966f
-DIST ghc-bin-7.8.4-amd64.tbz2 100573133 BLAKE2B da6bfb26eac8ef6c996ed10a56da9c535fb5fff4c69474de2cd979fe185876059f9e87940d24db8c52a0f04e81cf312982da75d04f3b96e7a11f2f134b512058 SHA512 e4416d6dae3c644f74bafb3aecf1a123f985427aba32d0e0c43143a137d64a9220fc5947cd9bde8a3bc44555ae71184fc06a3f7df7976aadd065ad5681b90954
-DIST ghc-bin-7.8.4-ia64.tbz2 222789275 BLAKE2B 2e0fc3ea11885b739156dcfbb4d52ded6492bf992ea18be2f91302d82e541a4de52e4bbe215f4d0cdbe54b32aa59e142ad10ae2fb20e8f0dfea22368a88620dd SHA512 2d8b89e399cbe9bfeae29cf3ceea736bfaa65ea21483fa2ee95d9814e122fcfbb67ce22ad8175493fab088e9a9d0139610c67e9d5c8b4f797b5e14846df32b6e
-DIST ghc-bin-7.8.4-ppc.tbz2 112803496 BLAKE2B fa60eda8b87dca0e23cbb971bc1f361f280735846cbe628e632981dc86baba0e877112e5c03d09fbb7f256cc078f8bf3248007c013208dab41c5205a82fab494 SHA512 9581f55a088e53edcc969960e45c9ad7227d71198ce2d241a4a066a138450a879287e55e7d2210e86143670539711387e36c7f60660c4422dc1b4122278fe4a0
-DIST ghc-bin-7.8.4-ppc64.tbz2 129284515 BLAKE2B 2e9a1e70830930dda7dcbd696ef3c27e7b64d571042cc0fc26bed42d13b9707ffeb337ffab38e2e04a7dabc56d8305fd77df508928d61fd0c653945afac8984d SHA512 53974e15c26cf6b62d8f838607abd209ec57cf0f45fcc48b90ad62736f5e4e7ff263dcd326ae03d8d5557a22eb9730e5eb8ae4eda55e52dd3d973bc73c84935e
-DIST ghc-bin-7.8.4-sparc.tbz2 147340595 BLAKE2B 8e39d6b144f4fce5196ad758f89887476e0482e8b98a012874d293d5e57756659cb9acb897476593a28f98f5c859548efa2e130f3806bfa2bb9e74795078a506 SHA512 ee5f0b2f1cf2693a0f2be9df71ef61b52bc2327225d40b8be955c1584b9901ffc6aaab63c1e46bf9bb352633b605c98378f8fd3e6cd71aef1c089007e4110217
-DIST ghc-bin-7.8.4-x86.tbz2 102312459 BLAKE2B 256cca9b2353af30dd7c239db0e21781d9d8aa352e38b3dd678b1429be6251e81f8955ac6ee0f766cc55f4de71c68acd98bc7b9434c3ea4b056d446ca59adc97 SHA512 cabc5bd6d8760ce4120e7053f6c1dffca7d161ba454b6201087760096c037c932e3ff8c82e53346c8278855bf0cff1c2f5fb8046242ca4d8307355b060a9556e
-DIST ghc-bin-8.0.2-alpha.tbz2 234361847 BLAKE2B 8e3439f3bbae1d3f6ab71f69669ea065f5f36c9cb4b334f06161cc1b9507aae56297d5eeb8a9cf72916aa012fab0b444a179a0336f00d5f17a8d402d5807c6f8 SHA512 c8b588feeab85f7b8fd60e2e8bf755d46790d4882d2ecf6b2c8b8e02c62a11b7e6453bf0cfbc646bfbf24310fdc775337f3957ba5783675a271b68f0af2e9070
-DIST ghc-bin-8.0.2-arm64.tbz2 191332951 BLAKE2B 305c4d618a6221e1322a5665544883624de4646e0186c6eab56d0b32877645f0b2bad8381848914751fbd2e11598727c46ab136de74c57207b75ecc6cce9572a SHA512 b9cabfda8fc6e851ba99f53274c1a63c5a6a365311a9203f1247ecf90ab843dd94960ad44c4e67032f4690f07d67bfd8bdfbe59f857d6c63344430539e2082fc
-DIST ghc-bin-8.0.2-i686-pc-linux-gnu.tbz2 133679542 BLAKE2B c50597857b53a2bf9d8047c048f86aa1782f74d5d9816d44b7bad7302181b407257ad0b52a03b4ad4936de3a15010b0ff5ca877b9578af6d3e7684dda2284718 SHA512 7f33e0b20a21fe076db142a58a81f68ab8f230ac9ce0167aba31aa0843bce20a9cf4065acc1c0ee2aaa01ea2ad4a8234388b0cf3ef886dccf25d7072602b430b
-DIST ghc-bin-8.0.2-ia64-unknown-linux-gnu.tbz2 256581880 BLAKE2B 7a9b41fccf3a097a19e169dcd8f553d38ffb96ebce3a3f0df15af79de77f6e33835a955fb7cc2c373f7bb6bfd3508a45ecf19f8b3e74bb058d2d6cdb6576bc6b SHA512 5d14521cc4f2a8fae1e5f43fce70cb976e4412df468c3bc611c99f57806816c349f4186c8a064c579858a82cc070e5942dd7b0c2d57b88d507215acddcbfcfc1
-DIST ghc-bin-8.0.2-ppc.tbz2 144760090 BLAKE2B 32410f3563f7f2555350806db460d2083c7248c57223c9c681d0b4913df942f023c7c1f5fda145179a524ee7ef105a9b8309ba87c20dc393a9f49151579b6767 SHA512 bc6bf8998064ffc1692c3bb83c44d1787760a3f4a1e6b79dedaefda5fe32b9052049a60f0ddd3c0b0bd24a722fb35e310e0189b3511721ff89d4d02b3d7c14bb
-DIST ghc-bin-8.0.2-ppc64.tbz2 117432068 BLAKE2B cae202f0d6e825127d543996b2fe7ae02578c47325674cbf22fddc53b1c4c9413f45c60d76ec3d07860cb8d0aae1ec792e4141822cc5c08ef9013308c5d29bf5 SHA512 0eaff0557b68649a15bbeb2019f46fa9e9e7b8a916aa210ab56888090a5b887d20d818e7987177bc6a8e7fde503de560026e6bb55fe39679b8b1ee13c6b7c4f9
-DIST ghc-bin-8.0.2-x86_64-pc-linux-gnu.tbz2 130852973 BLAKE2B 24d2032bbfc664d924800c1a317334e2342c8ec1e529178f9d1bb99bb4772a9cc100603bf70111b8cfafa715c1cccc643f115c77cf6adcdfb17d1f1735ee6682 SHA512 c36e0e2600fc7c284562a323d396a03062cb6e8fa63c353e672be61e76d2ec5c7698485e3a370a57cf512db9e5ba6a68338fff2ab404d9fe67b1a468ed72638f
-DIST ghc-bin-8.10.1-i686-pc-linux-gnu.tbz2 123398571 BLAKE2B 3650f9dbaaa5af684abad589953bcef5b1684a91a4cc2695d0ef735536057bb031231fe3d73dd74bc38a199f0890ef91764b551e5e158c120affc0d7bc3175b7 SHA512 52cc172de08ef30d6e89384e86eda1b8bbdef2bbff526041eb47d85d77b70ab49314ac7f33f18b40864c16fa546256f1b4c7964e65aa5d3cfbb7f9cbec505dc9
-DIST ghc-bin-8.10.1-x86_64-pc-linux-gnu.tbz2 122227601 BLAKE2B 84340866c70044eb1444a70b0cbed6814808037b697db28f567d2b14bb791cbe7d9bf2a327cc47ae85ce3c4970ba039854b4a6df44eb85cdc18040c5a4d15f4f SHA512 81df9de95aec47d60ad8d699756ad323eb525c3a16536fac8c6717e1754272061bd8d7d70cd38f5c509a2fc323305333e4f898c9b6dc27645521bb29ee218bdb
-DIST ghc-bin-8.10.2-i686-pc-linux-gnu.tbz2 123683156 BLAKE2B a486076ea6e67f124c850e037be0e63a873181c3fd746f437861f7367a968e0df6723afc934c966432274a55936c0fe48a9a43a48199840b37636843da4caccc SHA512 29cc1703bbdbfcbef8aa2a5a563b83b0663970f5902a1fc70230515a128ef47e27a3a6df2b47a01009c3976b4936cf8e64e5da4dfdda0c1bcf73ab7ea5ac0b6d
-DIST ghc-bin-8.10.2-x86_64-pc-linux-gnu.tbz2 122818630 BLAKE2B 030a68e2aca0eb0a273e0d48a3e180d92b219b2d1826d1d58fa133d0a6cae1316b3ccceadb55a4fa5870f87c3df85df2998e7611b93dbc1fea592437748b2daf SHA512 23bf47ee45fae54a843de9e6991b67fccb79c14ad8d08eff9f38a68a3530496c8ce4bc8cae8a731bb690ddd6cd0bf36d6d5bf37eb68ddae8ce646a0bf3916d8f
-DIST ghc-bin-8.10.3-i686-pc-linux-gnu.tbz2 123802832 BLAKE2B a770dd43bee7a1d60fec2eb9aaa7de715eed01c19d9514e04678801827879977a5c91f5e191d026ca83aa5e5fc5f518593053b2e78b27b08df64b39058dbaec3 SHA512 f810432a56ddcd773e6118f038cdacd2f5e3a508d87bfa468ee861aef0cfc434ec5766a8a74360d8cec6cb9c664928290901c025496100e7c8465408635227f5
-DIST ghc-bin-8.10.3-x86_64-pc-linux-gnu.tbz2 122993247 BLAKE2B e3395ebc7e87b4ae8f66dbbd9441c214c4d9535e55bfb14f78ebb92d30b1e100efc4893b3cdc65564d47bd53a21cb30106572b3fce13be022946171112c3218e SHA512 2ea4295bcaf6e3fd0db54ba67465e979cd85d3370c6c49f2381478ae9824ad89df53d7d93ccf06bdff5f4849f14306c9f50c13e6f6ba45f79e5b8c13ad63ae4f
DIST ghc-bin-8.10.4-i686-pc-linux-gnu.tbz2 123831294 BLAKE2B 1ca4c1b5c34c948011049a73d409c741db89658d10e311cffbe464c631c3733278fc7dede6ad27474832295ded2c26fd4d6419c760505255e29f7cb232a670a4 SHA512 1f87cf63651f7c0e5f7f55d1f4d7d7c48b0a911cc6673a899d4b92190d765b359f9c7d73c329969c1b76f1af102b7e2c18a80382c81d5dade9ac7dd57de4ef65
DIST ghc-bin-8.10.4-x86_64-pc-linux-gnu.tbz2 122558873 BLAKE2B 9f07c7bdc3beccfa629d28b2524ccd2f4688a5c0036a45408f5ace2d530a2a0e42f95b3cda5037ebb365317999e1ae776c6f9d21692867abfe85e33f2892b1be SHA512 68bd70f94961547746a696aa2839e156c95858fda0c7ec5b2ecf802070724ab7102b0aa86bcbf93432170d521cce4af10f46b851b470e5dc49dfa5b07380f46d
-DIST ghc-bin-8.2.1-i686-pc-linux-gnu.tbz2 96157437 BLAKE2B 2b9608845db8cea78db07209fa054b3b05085d5c3ac07cbe3de02a93c87fb0cff12b1820f08757221c59c8a0a9e7a5563c44266b181525d916825e5cf5bac34c SHA512 e891e76557fa61853e28829b8bedc4a6abb92954f90cc1ebcf22a13cc137556bbe9262e7398b7e1aedbabeb997916b008bf1561a52f16a569f3d58ea9404f41e
-DIST ghc-bin-8.2.1-x86_64-pc-linux-gnu.tbz2 97490496 BLAKE2B 3666ea70cb8b3645db071040d2069fe244042c11954b34e5d92aaa90132d2316c0ee8c176cd4e674772bea3b99df150404f62bd8745c046cdaf102ecf0a0fa54 SHA512 52630a185d0eab56bce0469a612a54109895bfee041ec362ced59a9b35ba3b9c185e86bc7dbf0a5939081d3626baa19fbb3306e36d1857530248a7b9bfc100bb
-DIST ghc-bin-8.2.2-i686-pc-linux-gnu.tbz2 96638908 BLAKE2B b470f838e77330969f162196b0f1035fa764f5d123687fbf67c14323280bfe55216af0e16f8b79c62f290905d96abc8bfafee650f8d27c81608853e78329b2c9 SHA512 15b1525890477539878385efc15ce5f1cf2f126cc785c42923be958cabe3298cebe73526a2370cf4c630124160a7ca0f0f9062aebbf035dce807a0374eaddd14
-DIST ghc-bin-8.2.2-x86_64-pc-linux-gnu.tbz2 97696152 BLAKE2B b481cfea186220ee402f9f215dd48b002288766b643f3d8352579735347136c6349d242a9a56728d88ce80f72367dc9fdb6e40c47a0331910dadbb9a4998e17b SHA512 531df6505e8987fb5c5cc0aac59adc6aa153a4757b96936d3f09f27f3614589ff41c227568b780114b2e87c6c8656f2c88683cce86925628d12723f14b893eff
-DIST ghc-bin-8.4.1-i686-pc-linux-gnu.tbz2 116995839 BLAKE2B f94f2206d603d57f7fa64bdf63bcd2528019284fbf6641273ea1d8c62324e2f0b26b2cfa50c6ef96e12beba550bcedd17aa824e7cf9a27c794e962526326e105 SHA512 8167ea80fa627a1b55d28363513ac79985229326019288e7334cc87c3017d39781f4d129081d62da112420152a41d23d2dffb0c13721b80cca72d2a21fbd2c0a
-DIST ghc-bin-8.4.1-x86_64-pc-linux-gnu.tbz2 117369638 BLAKE2B 583db924a50a3d7d261d2f392a74e0ff487ee662af055ac292ff1943534fb305d6c9f6f0045ba4bdd5afa268d75beb50f64b4760e49cddabe1f56776a5f4769f SHA512 801f4ecd538c7a035a0f573f301769984814fa3ce4cf5b09a914ba012bebe0583b6695a6a93f92c7e6e2b7d58caf812a1214b5b778d7b7835d7eab988ad69ba0
-DIST ghc-bin-8.4.2-i686-pc-linux-gnu.tbz2 117083472 BLAKE2B 7dac18523ed693efb0ec42b31bf7b910e6bb8289cdc13eb309bdb30230fc87fbb060baf41eb4f18af2bb265b42e6aca535ceb70cf0fe09046b0e4650f11bb37c SHA512 f9799bdf7a2a66d1db34b828860203872d7398bab2d667e8982c9ee89301654c3f7f54705b639df2d7adebcfb7a05e071b83d994f5e52a72f604b62098be51cd
-DIST ghc-bin-8.4.2-x86_64-pc-linux-gnu.tbz2 117604406 BLAKE2B 644ef535497eb73a2d1ceaab7ff96228e8d4021c09bc061a3f397dc27b3b86bd6d5300736e478671cee0a160bfaa5aa4611f06012285079b40973f468b59664a SHA512 7bf4bcdce954319422b8b8f09e56294012fac145662ba3de1c7765ed86ae9f8b61dcf6dd8febcf85d60db8d1a26edcaf4e89c3644ffa24c7b5b5c41a14105936
-DIST ghc-bin-8.4.3-i686-pc-linux-gnu.tbz2 117028296 BLAKE2B 0c99a2f6fe4af4a1342d948cbda53b178fe9709673e0d09bc3b6a4e0f3ec4e4b8f77830829f149993f51e490692de39024900fb188116816e41441153eac3622 SHA512 13147ae0d6b941b3bc2f0239071a2f6f854a39cb6a381f0e2fda7069ac29bb2c64fb3ccc6191e7527b5f27fe616bd62f2e487b5d50679789927b401f02c62ad7
-DIST ghc-bin-8.4.3-x86_64-pc-linux-gnu.tbz2 117537996 BLAKE2B 2be0102fcc0f1fef5aae194620a43c1c90538215d4eec2550419634ed9c5bbfb17391d57519c20ab53987a36b42488ac43ff968690a4f65b96c52c3485589d10 SHA512 5f26810ec1f0a483f03ef01f56130eba0287b49b912efba03158336ce521000b611192cf021b72c1a0d902532cc4c9470ca1b3233ccba7c7e7c2ac490c6099fa
-DIST ghc-bin-8.6.4-i686-pc-linux-gnu.tbz2 121639881 BLAKE2B 51d223b654ff23bbdd594801f4ec92b016a58b952ba98007abb56c1c4b184a672e51eb9847b42160febcc4ada0f28f18325cc27f8a025dd9fcf656e3bab73918 SHA512 6b58b080c5fb18ea7b76632b4b48726af61b52d8829f57a2ddd55e6bc109c1fe1a133d2a0ca974a168ffee0013a6dfdc4922577bad01c50a42dad8b9db70e061
-DIST ghc-bin-8.6.4-x86_64-pc-linux-gnu.tbz2 121695747 BLAKE2B 39c745f5f9946bbae622e09bbdabdde4d62eec472fe14e693f37cba6b93ff66e4e56f66df8f0f073686339d252dce71f79f4c2aaef620c3dffbc26a67b1119c3 SHA512 c60bac50e7879bda1d6dcc7c1f12fdac915b18c3ebbfcfad575b2b01fcb57a487496ce7935f7ee4ae934162209ab66370fbcc8a4f021628e5f9a2aa7ef95e119
-DIST ghc-bin-8.6.5-i686-pc-linux-gnu.tbz2 121938050 BLAKE2B 17b6d15af21390e28a025505da76d39a2f8656f74c88a81fc75e7c8e799e54171c0d964d8a977c01576603a781c139b5363ea79eeaa2252622913d2a08a79f0e SHA512 9eb33b4670ee15f53c988885a119f3ef7be896ddcb318019628cdd04e21ec0c61876e08466d9d10d6cb1e16d89cd318e0ba42f0f0ae512f48590fe87483739cd
-DIST ghc-bin-8.6.5-powerpc64le-unknown-linux-gnu.tbz2 173549697 BLAKE2B 296bf4e0745f56dfefc3ffc96b4e492ddbfd8bcbbc28a8bc9b3172c616d0e7da1081834384ab69e387808331b607104f015632d59963a87f4e257f290ff286c3 SHA512 81261614a7939adb0ffad3657cd33588ff729bb1e3a7dd228cf869afc1f21b74cb4dce6369a4c4cdc9f45f8d8ae64f25d71cd0f2dc34f36d3022afc149538a78
-DIST ghc-bin-8.6.5-x86_64-pc-linux-gnu.tbz2 121728723 BLAKE2B 6620b2a116b5696dd2d776350a43251c093e117338a4407ae8c41ae27763a4614d7e761b2684b90aa9317dafe7cb67481a6bc141c812d335d5231724ae3db2a7 SHA512 69681eab137f6713339f8912d0d92f6af865630053bcd7a32cb8a31e01628e969951db976533196794fe39e0e57f0fcd8778d9fc9fed4f4231e965b9a603dd8e
-DIST ghc-bin-8.8.1-i686-pc-linux-gnu.tbz2 120789855 BLAKE2B 386f37696d956078fad5cad50cbf5b9d9d7765615a1d9cc91a376fb5394648afe8ca956e24ef210f2ff0e51f339b63b16a50f6dc35f30babf019aa57de50b27b SHA512 193c29889693befba863d3c5a26d38d8182bb7e1932b61115dc0a21b6582f818b05db144a9fae5aee06af2044ea59f884825cf1081b62a1c67feb3041d184d3a
-DIST ghc-bin-8.8.1-powerpc64le-unknown-linux-gnu.tbz2 173653088 BLAKE2B 6c29777b596b35fee8e3a17f965e6a21dc40dc2387988f55d4ca5fef0ea9677b558ed210054216a6578b93fbf844df9e407770df184f707f8203f846f4929d2d SHA512 d338b8912c1632410c43a0df75ce69f961924a7c51049a3ac27c22f7c6cfc07388815813713d594fc38b721127df80b65f72b1b0cc6fbf0e10fa15970b8b6f46
-DIST ghc-bin-8.8.1-x86_64-pc-linux-gnu.tbz2 119317594 BLAKE2B 98f0fb262ac485dcfd6a8a67304912ffad2bf2634111fcc3b60346697a836867006bbacaab1e1be0cd5be34b4595d12bec13af644c451c10f7e3843ebaf5922f SHA512 e6acb11755db18fd86a346de642b8579a6b48b303c19795949757f5e351ad3b8892906e989dc57a7fd4471d0efe30fc8175df5bac741d7faecfe42a855a67980
-DIST ghc-bin-8.8.2-i686-pc-linux-gnu.tbz2 120289601 BLAKE2B df65bc6aa4ee22c979b9d8eda29f51188c96700d61fb4cf141ebad8a55e26b6cd959fce3ec0b8d780b68e7baf15a1ce7654dc4ef084aa4671fe05f00f9c4e9aa SHA512 da059f3fea00e14df346143e714da6484ae51d362d9e237607817791e02ec81e29e1ff7f9929fac44044f63196b395287c42f5829884c34391289179b4f6e204
-DIST ghc-bin-8.8.2-x86_64-pc-linux-gnu.tbz2 118957404 BLAKE2B cddedbb0fe8d38e9821bd8f51f5177d35922b25bf4fc8a537e921443560f141cdef44e54a0b4ef2dde07dbe33d9c1cba2e67ba80db4313f67e9bac089d967f56 SHA512 b0b801dd6abe9f5e6217e18568e2911dbfea11b1b45ff526950e87c73a34bcd597afc5105fcff2dc46bb13cf95e63db90c0d24ca9babf174b397a53001e8e0ac
-DIST ghc-bin-8.8.3-i686-pc-linux-gnu.tbz2 120243899 BLAKE2B 7f932523a71dcfd4cdd468bf67f470a942c314888c0093c21c211d54b3e158f45f051f027c78644a651047d81e809e1422bbaa5043e8559c6a4622ac0472f7e4 SHA512 12bf08b85652fd061849b9adb528d7a5c6fe9c2260cf02b92fab470fff16c3121bcb4e0f7044d05f252012083d622a1a490fa7f7c949142a3b5d03ccf0dd3ebc
-DIST ghc-bin-8.8.3-x86_64-pc-linux-gnu.tbz2 118988294 BLAKE2B 4e5aa3844934ae2726bf9c8690acd5a887f10cd49386ffadbc536f9309d33b3894b49507964eaf0d8a052747eb33aeabbe4d2cd22493297c295cf9414fcb766c SHA512 dd656157fe744c1df1c8ed34d1129ec358b26f3042c6da68e704e0f6a45d8114789000479e28a06dc16961afb283b3c666b427025590498a3d2da9b741b435c7
DIST ghc-bin-8.8.4-i686-pc-linux-gnu.tbz2 120336081 BLAKE2B 55dfbb90d5e55c2af5e93c69249828a85cd9171c164b80dfdaf86512972b2c6854c8e4f07426af4ab52a5fb1a85d96a58c2cf003fb02372c55428001cfaea491 SHA512 ad3b83344349976d3253934195b2dc6299648391572b13735943c5ea2239c031c19b0cafd86c16cfb0c061e73bc72e9248f9c1731494a9a15fbe188f02913c12
DIST ghc-bin-8.8.4-x86_64-pc-linux-gnu.tbz2 118897883 BLAKE2B a180b2dd1a3bc222044ece809ad700aee29d0c3e75b57ee9af3ca33c9c0f59dbf36f68202f746d99f80915cb717a9c41fc12db507f1cb469981732703a06b9cc SHA512 9d4be02dbd9704c93ef18feb92ea30bd5d590df31f288bf1b364818424c5019ca9ada26eec88418199f90ae8f4459d0a9352104e3f3186bbdc241891eb1b66c4
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 hoopl-3.10.2.0.tar.gz 241940 BLAKE2B 0ed7bf80486767c81415f99da8780a525401c388dea0b3f380bbecceae9cc7f66d8b5d0d7b31f8cb41796309b7a93adb113485efd14882f8af321989ce900a9b SHA512 083baa8a5eb53247aff8d5b9b2144e0f63adb9400934297bbd80bfcec607dd90a34def4301045a60472ef10b0fb90ab84692fc08f786e7f806c28afdab1ef66a
-DIST transformers-0.4.3.0.tar.gz 28632 BLAKE2B 92cabcb654bb11854a3bffbb1262f5cd62eda1aff447157086a61ebc451ebf2fddec53b6a2cc058174f24f0f0e32df671d3717e30a542c8dc90cb87e327d990c SHA512 c3ec0893ebba4fbd6087c3202e919552c4a9bff3350b5c0589e7ebb18751a515d98b8cac15b0a3252906ea72b5a0eb09b7fe88c8da88b09d6ce4fbf0f50b2780
-EBUILD ghc-7.10.3.ebuild 21609 BLAKE2B 123d31edc5db034398e355ee246741337d9f33514c0ed1198145e4073070d0232f7322c8b2da990c8e5f343c2cdf71f6321d5b81ecdf64877e7377a3909636fe SHA512 d2a81bd7a206a6c55bbfb9e5903c806949dc5fe062770fa056f142b0c8d6856c0309625d8f8375501b759efad7dcb708c6b72584a3e88ab5db60371fcef1acd1
-EBUILD ghc-7.8.4.ebuild 19744 BLAKE2B 4e9ad53b5f84a5b09bc92f19f2169706aaba7921480afd9bb08e070de8d00e75a02d42a1729c8679c90048becc5831d52d9b153cc58e966bf13c56af0251e0bd SHA512 c9a0274e070072db12b4c9e4fe162a6c94cbb03648699c82bea749ed8fff58ee67e127bf73ea580804b3159e92985c4b3ddcbff31f00081725f8640e3e4b786b
-EBUILD ghc-8.0.2.ebuild 21544 BLAKE2B 31d10f66f55ba897d1072b4376022d0cc85272c2ed91607485fb2222f0a9cd6467ee4854496824cbdd3c11eb665bd41fc475c1b29853bf02a81abdec2f186aef SHA512 8492c0c3713264d1426ab2921a07c3671057404eec116a110b09aaf3acaa093759da6ff4c4c5d835b457a8dd49d6e333ff2d0c918af538a40d7fd2ad577a8b62
-EBUILD ghc-8.10.1.ebuild 25760 BLAKE2B 90c24a0cfbc89d3c6973ae085fa738008bc0a89491ee4d9345dc9cfb21bbd02e9715ed3e9f00e43cbd33dd355835b72198f7e6d51f9eaf68018e58fcb1a6c222 SHA512 7db0aac5cbc96888887c96458f6193732f537797642f202df3edfa5413e5132171873ed2f51f5b038f857665374904ab96130e2c7ff5712fa60a8224ff07e0b2
-EBUILD ghc-8.10.2.ebuild 25785 BLAKE2B 6077cc483722c1904f1a7efaca467624f8c3b5bf9268737070b02ac8f37be6fe3cd5920282eb018d460197defac3869c11f52d1b09fcd7531c60922844e65ca4 SHA512 1c03661b3c747a1500c66ddd5acc2795e69c40381ed9e7d46468851db372906b9987650f6b3d2deeca564993b7af4860bda68923b1167629fb257f0b2cee3cf3
-EBUILD ghc-8.10.3.ebuild 25710 BLAKE2B 5cf8fcacde2c7c57e7b96ca5a826d033a3ab0f4daea692cbcaabba1968ff488bdf655f8e8c68ac446eb43e9b0076f19c945172093cf14d66d7191c984e650c75 SHA512 deff8744a1ef184614ebf003d5e23e51848a973d8126f4cc2d07955fa1fe10e3180a6a0e9a4b55a90f2a17c7796a14a13b8e1610509616d7e50cc57733010f6d
-EBUILD ghc-8.10.4.ebuild 25849 BLAKE2B 444f0198f2355bc0824da86ca732c3019ea73b3c9781ff8deed3d3abf10d41d93b40e7fd46d5791ebe0f1244ca316091f41881cca65f3c1e318669199967fc05 SHA512 303e645c617dbc53b733b481bf47549e327caf90bc10cc865501e64dac0b623045fef6f960866707f215f8d6248e729398c85946fb7b8ee04185b0310f38f6e5
-EBUILD ghc-8.2.1.ebuild 24777 BLAKE2B 39d0fed2d446b5e9c24b9d7b5b4c5db5a19e2c2d1fd189cf273b830934995c52965bd1f4918c4ca0e40e084b88dea8c6308895d2605f030aac1d1412af892f56 SHA512 1eabfec6cdfabf65b7371e08eac6e8452e14dbcf8ccce358274d7b1b13b4c6b6fdd3a5077af025e0eae021f70718d1e62f5f8e0754edbc897e322fb121560c01
-EBUILD ghc-8.2.2.ebuild 24746 BLAKE2B 918b55ca88c702e4642bcf8719e5e3645bff604aedc4021553daf1bbfbe9200773460b48b0f2eb07c848642295dc744efc217f11a18a06585bcb13b21136d3a7 SHA512 ccb2ef01f88965c4274cb407dd3cd3b9817d658a926b190876676a1875042e810b3fdfbfa19fa4ba148bbb2d189bf8e5006f00c6a7d66c39ce434267e62b7b52
-EBUILD ghc-8.4.1.ebuild 24564 BLAKE2B c722911588225628f56c02abd8daab2800ff0a5c5d412b14a0b358cd37f0ccca9db1db517a36b9185e43c2890d1d0024422ead897e56489fc4fc0cd0626c2e62 SHA512 f10fc32b3bf628ee7903ac0a15cc6484475d601a9d9ac2f1163cb61415eb173e90bba1091d006b11205adbceb0df884a43a27a7533d52bb18a80511603c72c96
-EBUILD ghc-8.4.2.ebuild 24789 BLAKE2B 252de8df8ebd5a4ff377595f1880db44f7b3411c846e26d96501d48e62c3dc373d9ea61d1b6ec7be71adf2e40a5aab02e40fff35d35403403b61e82de4e86af4 SHA512 78123fe4944f2178d23850b423f3d9f457b48eb3b957546f751580a7998215938db22d0aa2228b26de9c94ec26d7640a5432b5e3a6d371b1ec3f2af7e400b871
-EBUILD ghc-8.4.3.ebuild 24734 BLAKE2B aa5f2b9bc89a5b78aa93df13c258b53e9b5694d02a2dd861f35a1785fdac4abd99cd10dbb585181c6a4a65b066afdf2672534ed7bdcabd1bf7e5d9e92c5ad9dd SHA512 5c49e104831fffbb3e98aef7fa49f845021e8aa6af5841862f7a6e6d4ddd0c7cae636c1eb09e19b31e08b5596236240128b47af1c3ca1716d9a90e3872a2edcf
-EBUILD ghc-8.6.4.ebuild 25234 BLAKE2B 04ced0f4ebaa55b2c145fc350edbb790bd7b10c86a2d3bcf5de7145577e6ec45d8d5aca2c2384a465d370c0b58a2e1dfb4696e4d8b27d5e35f27e660c9bfa1f4 SHA512 7aa3f386b0f39879c5fd3a1dc6c2147651c8e0c8a5559d7b889d5d6084a97a78934105ebfae30ff3cf667ea5ff858fb28f7522ab3f7c2b4c8d4c8b881a8cd5b8
-EBUILD ghc-8.6.5.ebuild 25552 BLAKE2B 8b9eac7651052d8bea16b73fd2d408fd741d3bc753d2680269b77abe36c0f0ebbc4002fd7b53f7d16c017ae1151235431088fdce4ae1be2162992806eb8564b4 SHA512 37fe53899f866b0049f02a788f6e3351a3f1aa6b65aca0e2b362483874e5f2e00d978b609f367723601f35fac3239dba4beb4821d6cfa98bda35b4e3751010dc
-EBUILD ghc-8.8.1.ebuild 26204 BLAKE2B d3f3bb41c29a61e1bed42160c5f3b06b247ae501fa28dbbc1976c0efb9fc86af687b9643a419fffc440f2430559fd879f950b523c5348e3dd6a102e0d5dc768b SHA512 56053b27e560e29d61157c2436e5bdab27e09d35fc56f18234764d4bbb201d558fa18fbad284e86ec72335e3b9d174a80b8671e6cf2f00c3b3df56a75b1b711c
-EBUILD ghc-8.8.2.ebuild 26160 BLAKE2B 6e7cf133d31eb37bd895a8eaf1bbdf70a073f834eece116ef1279aa4f7321278d94e1256233d3451b7356881cea56f493febee25a968bc849fcfbf969a68a2b6 SHA512 d1fc2b95b4df7eac166373830dcc947612d5cbd0a602e0a1ab778ad6cda49adca32368fe4947d88e0df2ff01103e30a07551e148b38a1594d0729faa9ec987cf
-EBUILD ghc-8.8.3.ebuild 26294 BLAKE2B d2aa4f2ab7604d078e93d214bb6f2fa2b66f038433a872f2f93bf94918b847c28fd54b1c454d03d78e47f8bfa031efabc03d8b4b924082ed90a154d5d4a8a333 SHA512 c613abca4ab47ab17c6f91ad24d787672be4d6b50d85003bad287163e57a91aeb339b7a675ca5bdf632cc966472b9add1ea0e9a491d6f399f8df4f31d619c8c0
+EBUILD ghc-8.10.4.ebuild 25830 BLAKE2B aa68b44948d22cfe476851427bf2bbd3b1257a6ad120ef8612e867ba81c2cff2b12974c82a36d52af5ed5c5fbe6ae3f74a12aa278af6b05ce3356f775c131016 SHA512 c6587aeec865a92f00fc5b967ef9bf87f8a0fafe86516b5d3b4a76d6017c409f521cf2af39e08aacb3b38230f069a72db38be0f923b83f60b221ed82ee133ca0
EBUILD ghc-8.8.4.ebuild 26410 BLAKE2B f49c37a85a76a0edcbb7a253ef2a1c49291919e89ac933a0da5ac29dba29d16944f0e310c2a7426b4ebe800f2f1c405fbbac69b32217330b5d295efc9bac97e3 SHA512 b6a8f90a0f2b1ada7878696c7e937253c9e7dfea551bdf44b328f0ddcc0416facad4168c0a528d4d3f8235c4cad14da8903062cf887193cc15ca152dd8b860c1
EBUILD ghc-9.0.1.ebuild 25788 BLAKE2B 8a90d51d7cad901e3477c592f0e4397f0b9d6e682557539ba3c3146e0509dfb387457bbe24ed8f80da1ac03c6abe314ed1fa42466339202b81de1cead3a6473c SHA512 dea79fa098fe288a07c7c29913dd32c80b246c91c6f83be5f4878e9cbb69aefdd1f8d75f34bfbed30fa1286892efdf70060b133cb0916c4d4cbca46ca9e4e0dd
MISC metadata.xml 877 BLAKE2B 763db2ffce8c241ef55110ca08aa9f7383f14bbe7f96a443b438f027214e04f56f8216b0cd0d871e516a13f07a8a5a52835b0f75ddd3eb9ebd7faccd3a6b03d9 SHA512 516ad3cdb3b26b242668ae2bbf48628c8fb95fdc84ab3dc00afc940c68c2b78a7aa85634c228e9b3427963f0b86263d24ba043d0fd9ae57752e5075392a0322c
diff --git a/dev-lang/ghc/files/ghc-7.10.1-rc3-ghc-7.10-bootstrap.patch b/dev-lang/ghc/files/ghc-7.10.1-rc3-ghc-7.10-bootstrap.patch
deleted file mode 100644
index 60db34b8b362..000000000000
--- a/dev-lang/ghc/files/ghc-7.10.1-rc3-ghc-7.10-bootstrap.patch
+++ /dev/null
@@ -1,78 +0,0 @@
---- ghc-7.10.0.20150316-orig/compiler/utils/Pair.hs 2015-03-10 05:43:13.000000000 +1100
-+++ ghc-7.10.0.20150316/compiler/utils/Pair.hs 2015-03-17 09:50:48.491115080 +1100
-@@ -15,6 +15,8 @@
- import Data.Foldable
- import Data.Monoid
- import Data.Traversable
-+#else
-+import Control.Applicative ((<$>))
- #endif
-
- data Pair a = Pair { pFst :: a, pSnd :: a }
---- ghc-7.10.0.20150316-orig/compiler/types/Coercion.hs 2015-03-10 05:43:13.000000000 +1100
-+++ ghc-7.10.0.20150316/compiler/types/Coercion.hs 2015-03-17 10:11:21.636047380 +1100
-@@ -104,6 +104,8 @@
- #if __GLASGOW_HASKELL__ < 709
- import Control.Applicative hiding ( empty )
- import Data.Traversable (traverse, sequenceA)
-+#else
-+import Control.Applicative ((<$>))
- #endif
- import FastString
- import ListSetOps
---- ghc-7.10.0.20150316-orig/compiler/typecheck/TcEvidence.hs 2015-03-14 08:48:57.000000000 +1100
-+++ ghc-7.10.0.20150316/compiler/typecheck/TcEvidence.hs 2015-03-17 10:26:03.251433371 +1100
-@@ -50,6 +50,8 @@
- #if __GLASGOW_HASKELL__ < 709
- import Control.Applicative
- import Data.Traversable (traverse, sequenceA)
-+#else
-+import Control.Applicative ((<$>))
- #endif
- import qualified Data.Data as Data
- import Outputable
---- ghc-7.10.0.20150316-orig/compiler/hsSyn/HsBinds.hs 2015-03-10 05:43:13.000000000 +1100
-+++ ghc-7.10.0.20150316/compiler/hsSyn/HsBinds.hs 2015-03-17 10:42:21.459519033 +1100
-@@ -47,6 +47,8 @@
- import Data.Traversable ( Traversable(..) )
- import Data.Monoid ( mappend )
- import Control.Applicative hiding (empty)
-+#else
-+import Control.Applicative ((<$>))
- #endif
-
- {-
---- ghc-7.10.0.20150316-orig/compiler/parser/RdrHsSyn.hs 2015-03-10 05:43:13.000000000 +1100
-+++ ghc-7.10.0.20150316/compiler/parser/RdrHsSyn.hs 2015-03-17 11:17:48.950929542 +1100
-@@ -91,9 +91,7 @@
- import Util
- import ApiAnnotation
-
--#if __GLASGOW_HASKELL__ < 709
- import Control.Applicative ((<$>))
--#endif
- import Control.Monad
-
- import Text.ParserCombinators.ReadP as ReadP
---- ghc-7.10.0.20150316-orig/compiler/typecheck/TcGenDeriv.hs 2015-03-14 08:48:57.000000000 +1100
-+++ ghc-7.10.0.20150316/compiler/typecheck/TcGenDeriv.hs 2015-03-17 11:30:39.106508173 +1100
-@@ -59,6 +59,8 @@
- import Var
- #if __GLASGOW_HASKELL__ < 709
- import MonadUtils
-+#else
-+import Control.Applicative ((<$>))
- #endif
- import Outputable
- import Lexeme
---- ghc-7.10.0.20150316-orig/compiler/vectorise/Vectorise/Exp.hs 2015-03-10 05:43:13.000000000 +1100
-+++ ghc-7.10.0.20150316/compiler/vectorise/Vectorise/Exp.hs 2015-03-17 11:46:41.829481669 +1100
-@@ -46,6 +46,8 @@
- import Util
- #if __GLASGOW_HASKELL__ < 709
- import MonadUtils
-+#else
-+import Control.Applicative ((<$>))
- #endif
-
- import Control.Monad
diff --git a/dev-lang/ghc/files/ghc-7.10.3-hardfloat.patch b/dev-lang/ghc/files/ghc-7.10.3-hardfloat.patch
deleted file mode 100644
index 106d07aa31c8..000000000000
--- a/dev-lang/ghc/files/ghc-7.10.3-hardfloat.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-commit 5cc08ebf2f346992a0abd4440252165c90b5ec05
-Author: Sergei Trofimovich <siarheit@google.com>
-Date: Sat Jun 20 12:23:00 2015 +0100
-
- Recognise 'hardhloat' as a valid vendor in a host tuple
-
- Observed on a tuple armv7a-hardfloat-linux-gnueabi:
- > Unknown vendor hardfloat
-
- Reported-by: Sergey Alirzaev
- Signed-off-by: Sergei Trofimovich <siarheit@google.com>
-
-diff --git a/aclocal.m4 b/aclocal.m4
-index 590edb0..958622c 100644
---- a/aclocal.m4
-+++ b/aclocal.m4
-@@ -1966,6 +1966,9 @@ AC_DEFUN([GHC_CONVERT_VENDOR],[
- softfloat) # like armv5tel-softfloat-linux-gnueabi
- $2="unknown"
- ;;
-+ hardfloat) # like armv7a-hardfloat-linux-gnueabi
-+ $2="unknown"
-+ ;;
- *)
- #pass thru by default
- $2="$1"
diff --git a/dev-lang/ghc/files/ghc-7.10.3-relnotes.patch b/dev-lang/ghc/files/ghc-7.10.3-relnotes.patch
deleted file mode 100644
index 675037946e75..000000000000
--- a/dev-lang/ghc/files/ghc-7.10.3-relnotes.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-diff --git a/ANNOUNCE b/ANNOUNCE
-index 7812eba..0018b37 100644
---- a/ANNOUNCE
-+++ b/ANNOUNCE
-@@ -1,6 +1,6 @@
-
- ==============================================================
-- The (Interactive) Glasgow Haskell Compiler -- version 7.10.2
-+ The (Interactive) Glasgow Haskell Compiler -- version 7.10.3
- ==============================================================
-
- The GHC Team is pleased to announce a new minor release of GHC. This is a
-@@ -29,7 +29,7 @@ bug-fix release and contains a number of important fixes,
- A more thorough list of the changes in the release can be found in the release
- notes,
-
-- http://haskell.org/ghc/docs/7.10.2/html/users_guide/release-7-10-2.html
-+ http://haskell.org/ghc/docs/7.10.3/html/users_guide/release-7-10-3.html
-
-
- How to get it
-diff --git a/docs/users_guide/intro.xml b/docs/users_guide/intro.xml
-index 3292334..fb7116e 100644
---- a/docs/users_guide/intro.xml
-+++ b/docs/users_guide/intro.xml
-@@ -309,6 +309,7 @@
-
- &relnotes1;
- &relnotes2;
-+&relnotes3;
-
- </chapter>
-
-diff --git a/docs/users_guide/ug-ent.xml.in b/docs/users_guide/ug-ent.xml.in
-index b696aad..3629e93 100644
---- a/docs/users_guide/ug-ent.xml.in
-+++ b/docs/users_guide/ug-ent.xml.in
-@@ -5,6 +5,7 @@
- <!ENTITY intro SYSTEM "intro.xml" >
- <!ENTITY relnotes1 SYSTEM "7.10.1-notes.xml" >
- <!ENTITY relnotes2 SYSTEM "7.10.2-notes.xml" >
-+<!ENTITY relnotes3 SYSTEM "7.10.3-notes.xml" >
- <!ENTITY using SYSTEM "using.xml" >
- <!ENTITY code-gens SYSTEM "codegens.xml" >
- <!ENTITY runtime SYSTEM "runtime_control.xml" >
diff --git a/dev-lang/ghc/files/ghc-7.6.3-preserve-inplace-xattr.patch b/dev-lang/ghc/files/ghc-7.6.3-preserve-inplace-xattr.patch
deleted file mode 100644
index 08410fa0cd9b..000000000000
--- a/dev-lang/ghc/files/ghc-7.6.3-preserve-inplace-xattr.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-On hardened 'cp' drops out XT-pax parking.
-perfinion suggested using 'install', where portage
-might have a chance to save our marking.
-
-Reported-by: Jay Yang
-Gentoo-bug: https://bugs.gentoo.org/518734
-diff --git a/rules/build-prog.mk b/rules/build-prog.mk
-index 399369e..2ee9cd5 100644
---- a/rules/build-prog.mk
-+++ b/rules/build-prog.mk
-@@ -288,3 +288,3 @@ endif
- $$($1_$2_INPLACE) : $1/$2/build/tmp/$$($1_$2_PROG_INPLACE) | $$$$(dir $$$$@)/.
-- "$$(CP)" -p $$< $$@
-+ $$(INSTALL) -m 755 $$< $$@
diff --git a/dev-lang/ghc/files/ghc-7.8.1_rc1-libbfd.patch b/dev-lang/ghc/files/ghc-7.8.1_rc1-libbfd.patch
deleted file mode 100644
index d01cb49affbd..000000000000
--- a/dev-lang/ghc/files/ghc-7.8.1_rc1-libbfd.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-commit bb5953484579968c984d074ca1af5d21e1c9e7a0
-Author: Sergei Trofimovich <slyfox@gentoo.org>
-Date: Mon Feb 10 12:45:58 2014 +0300
-
- rts: unrust 'libbfd' debug symbols parser
-
- Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-
-diff --git a/configure.ac b/configure.ac
-index e7fbc7f..e47979c 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -801,7 +801,8 @@ fi
- dnl ** check whether this machine has BFD and libiberty installed (used for debugging)
- dnl the order of these tests matters: bfd needs libiberty
- AC_CHECK_LIB(iberty, xmalloc)
--AC_CHECK_LIB(bfd, bfd_uncompress_section_contents)
-+dnl 'bfd_init' is a rare non-macro in libbfd
-+AC_CHECK_LIB(bfd, bfd_init)
-
- dnl ################################################################
- dnl Check for libraries
-diff --git a/rts/Printer.c b/rts/Printer.c
-index ca9ca49..ce02b02 100644
---- a/rts/Printer.c
-+++ b/rts/Printer.c
-@@ -48,6 +48,9 @@ void printPtr( StgPtr p )
- raw = lookupGHCName(p);
- if (raw != NULL) {
- printZcoded(raw);
-+ /* it can be just a C symbol, like 'stg_returnToStackTop' */
-+ debugBelch("<%s>", raw);
-+ debugBelch("[%p]", p);
- } else {
- debugBelch("%p", p);
- }
-@@ -794,7 +797,7 @@ static void printZcoded( const char *raw )
- disabling this for now.
- */
- #ifdef USING_LIBBFD
--
-+#include "../mk/config.h" /* silly BFD's requirement */
- #include <bfd.h>
-
- /* Fairly ad-hoc piece of code that seems to filter out a lot of
-@@ -863,7 +866,10 @@ extern void DEBUG_LoadSymbols( char *name )
- for( i = 0; i != number_of_symbols; ++i ) {
- symbol_info info;
- bfd_get_symbol_info(abfd,symbol_table[i],&info);
-- /*debugBelch("\t%c\t0x%x \t%s\n",info.type,(nat)info.value,info.name); */
-+ if (0)
-+ {
-+ debugBelch("\t%c\t0x%x \t%s\n",info.type,(nat)info.value,info.name);
-+ }
- if (isReal(info.type, info.name)) {
- num_real_syms += 1;
- }
-diff --git a/rts/RtsStartup.c b/rts/RtsStartup.c
-index aa7306f..5bdef94 100644
---- a/rts/RtsStartup.c
-+++ b/rts/RtsStartup.c
-@@ -19,6 +19,7 @@
- #include "RtsFlags.h"
- #include "RtsUtils.h"
- #include "Prelude.h"
-+#include "Printer.h" /* DEBUG_LoadSymbols */
- #include "Schedule.h" /* initScheduler */
- #include "Stats.h" /* initStats */
- #include "STM.h" /* initSTM */
-@@ -162,6 +163,11 @@ hs_init_ghc(int *argc, char **argv[], RtsConfig rts_config)
- rts_config.rts_opts_enabled, rts_config.rts_opts, rts_config.rts_hs_main);
- }
-
-+#ifdef DEBUG
-+ /* load debugging symbols */
-+ DEBUG_LoadSymbols((*argv)[0]);
-+#endif /* DEBUG */
-+
- /* Initialise the stats department, phase 1 */
- initStats1();
-
diff --git a/dev-lang/ghc/files/ghc-7.8.2-cgen-constify.patch b/dev-lang/ghc/files/ghc-7.8.2-cgen-constify.patch
deleted file mode 100644
index efdd54fbf3fb..000000000000
--- a/dev-lang/ghc/files/ghc-7.8.2-cgen-constify.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-commit b0cf3ab7a69b878a4335d21a347b56e4b0ca0b7b
-Author: Sergei Trofimovich <slyfox@gentoo.org>
-Date: Mon Apr 14 19:06:24 2014 +0300
-
- compiler/cmm/PprC.hs: constify local string literals
-
- Consider one-line module
- module B (v) where v = "hello"
- in -fvia-C mode it generates code like
- static char gibberish_str[] = "hello";
-
- It uselessly eats data section (precious resource on ia64!).
- The patch switches genrator to emit:
- static const char gibberish_str[] = "hello";
-
- Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-
-diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs
-index 2398981..fdb578d 100644
---- a/compiler/cmm/PprC.hs
-+++ b/compiler/cmm/PprC.hs
-@@ -112,6 +112,12 @@ pprTop (CmmProc infos clbl _ graph) =
-
- -- We only handle (a) arrays of word-sized things and (b) strings.
-
-+pprTop (CmmData ReadOnlyData (Statics lbl [CmmString str])) =
-+ hcat [
-+ pprLocalness lbl, ptext (sLit "const char "), ppr lbl,
-+ ptext (sLit "[] = "), pprStringInCStyle str, semi
-+ ]
-+
- pprTop (CmmData _section (Statics lbl [CmmString str])) =
- hcat [
- pprLocalness lbl, ptext (sLit "char "), ppr lbl,
diff --git a/dev-lang/ghc/files/ghc-7.8.3-linker-warn.patch b/dev-lang/ghc/files/ghc-7.8.3-linker-warn.patch
deleted file mode 100644
index c8570c06940b..000000000000
--- a/dev-lang/ghc/files/ghc-7.8.3-linker-warn.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-commit 326046739801a380c5457ef4c87bce8fb95497ba
-Author: Sergei Trofimovich <slyfox@gentoo.org>
-Date: Sun Aug 10 22:12:28 2014 +0300
-
- systools info: fix warning about C compiler (message said about linker)
-
- Summary: Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-
- Test Plan: build-tested
-
- Reviewers: austin
-
- Reviewed By: austin
-
- Subscribers: phaskell, simonmar, relrod, ezyang, carter
-
- Differential Revision: https://phabricator.haskell.org/D132
-
-diff --git a/compiler/main/SysTools.lhs b/compiler/main/SysTools.lhs
-index 1c1c52c..72fa19b 100644
---- a/compiler/main/SysTools.lhs
-+++ b/compiler/main/SysTools.lhs
-@@ -809,10 +809,10 @@ getCompilerInfo' dflags = do
- )
- (\err -> do
- debugTraceMsg dflags 2
-- (text "Error (figuring out compiler information):" <+>
-+ (text "Error (figuring out C compiler information):" <+>
- text (show err))
- errorMsg dflags $ hang (text "Warning:") 9 $
-- text "Couldn't figure out linker information!" $$
-+ text "Couldn't figure out C compiler information!" $$
- text "Make sure you're using GNU gcc, or clang"
- return UnknownCC)
- return info
diff --git a/dev-lang/ghc/files/ghc-7.8.3-pic-sparc.patch b/dev-lang/ghc/files/ghc-7.8.3-pic-sparc.patch
deleted file mode 100644
index 16a552fdd4be..000000000000
--- a/dev-lang/ghc/files/ghc-7.8.3-pic-sparc.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-commit 78863edbb0751f5c9694ea10c6132a87cfd0ee10
-Author: Sergei Trofimovich <slyfox@gentoo.org>
-Date: Wed Aug 27 22:20:33 2014 +0300
-
- Revert "disable shared libs on sparc (linux/solaris) (fixes #8857)"
-
- This reverts commit 623883f1ed0ee11cc925c4590fb09565403fd231.
-
- The commit a93ab43ab5f40cadbedea2f6342b93c245e91434
- driver: pass '-fPIC' option to assembler as well
- fixes shared libraries on sparc at least on linux.
-
- Properly fixes Issue #8857
-
- Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-
-diff --git a/mk/config.mk.in b/mk/config.mk.in
-index c210cd3..392237f 100644
---- a/mk/config.mk.in
-+++ b/mk/config.mk.in
-@@ -97,9 +97,7 @@ endif
- # Some platforms don't support shared libraries
- NoSharedLibsPlatformList = powerpc-unknown-linux \
- x86_64-unknown-mingw32 \
-- i386-unknown-mingw32 \
-- sparc-sun-solaris2 \
-- sparc-unknown-linux
-+ i386-unknown-mingw32
-
- ifeq "$(SOLARIS_BROKEN_SHLD)" "YES"
- NoSharedLibsPlatformList += i386-unknown-solaris2
diff --git a/dev-lang/ghc/files/ghc-7.8.3-ppc32-fPIC.patch b/dev-lang/ghc/files/ghc-7.8.3-ppc32-fPIC.patch
deleted file mode 100644
index 434be8b1bdad..000000000000
--- a/dev-lang/ghc/files/ghc-7.8.3-ppc32-fPIC.patch
+++ /dev/null
@@ -1,351 +0,0 @@
-commit fa31e8f4a0f853848d96549a429083941877bf8d
-Author: Sergei Trofimovich <siarheit@google.com>
-Date: Sun Dec 14 14:30:12 2014 +0000
-
- powerpc: fix and enable shared libraries by default on linux
-
- Summary:
- And fix things all the way down to it. Namely:
- - remove 'r30' from free registers, it's an .LCTOC1 register
- for gcc. generated .plt stubs expect it to be initialised.
- - fix PicBase computation, which originally forgot to use 'tmp'
- reg in 'initializePicBase_ppc.fetchPC'
- - mark 'ForeighTarget's as implicitly using 'PicBase' register
- (see comment for details)
- - add 64-bit MO_Sub and test on alloclimit3/4 regtests
- - fix dynamic label offsets to match with .LCTOC1 offset
-
- Signed-off-by: Sergei Trofimovich <siarheit@google.com>
-
- Test Plan: validate passes equal amount of vanilla/dyn tests
-
- Reviewers: simonmar, erikd, austin
-
- Reviewed By: erikd, austin
-
- Subscribers: carter, thomie
-
- Differential Revision: https://phabricator.haskell.org/D560
-
- GHC Trac Issues: #8024, #9831
-
-diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs
-index 0f2c0ae..37b8ada 100644
---- a/compiler/cmm/CLabel.hs
-+++ b/compiler/cmm/CLabel.hs
-@@ -1170,7 +1170,8 @@ pprDynamicLinkerAsmLabel platform dllInfo lbl
- else if osElfTarget (platformOS platform)
- then if platformArch platform == ArchPPC
- then case dllInfo of
-- CodeStub -> ppr lbl <> text "@plt"
-+ CodeStub -> -- See Note [.LCTOC1 in PPC PIC code]
-+ ppr lbl <> text "+32768@plt"
- SymbolPtr -> text ".LC_" <> ppr lbl
- _ -> panic "pprDynamicLinkerAsmLabel"
- else if platformArch platform == ArchX86_64
-diff --git a/compiler/nativeGen/PIC.hs b/compiler/nativeGen/PIC.hs
-index 9b5c080..6326a8b 100644
---- a/compiler/nativeGen/PIC.hs
-+++ b/compiler/nativeGen/PIC.hs
-@@ -54,7 +54,6 @@ import qualified X86.Instr as X86
-
- import Platform
- import Instruction
--import Size
- import Reg
- import NCGMonad
-
-@@ -468,11 +467,8 @@ pprGotDeclaration dflags ArchX86 OSDarwin
- pprGotDeclaration _ _ OSDarwin
- = empty
-
---- pprGotDeclaration
-+-- Emit GOT declaration
- -- Output whatever needs to be output once per .s file.
---- The .LCTOC1 label is defined to point 32768 bytes into the table,
---- to make the most of the PPC's 16-bit displacements.
---- Only needed for PIC.
- pprGotDeclaration dflags arch os
- | osElfTarget os
- , arch /= ArchPPC_64
-@@ -482,6 +478,7 @@ pprGotDeclaration dflags arch os
- | osElfTarget os
- , arch /= ArchPPC_64
- = vcat [
-+ -- See Note [.LCTOC1 in PPC PIC code]
- ptext (sLit ".section \".got2\",\"aw\""),
- ptext (sLit ".LCTOC1 = .+32768") ]
-
-@@ -688,12 +685,7 @@ pprImportedSymbol _ _ _
-
-
- -- Get a pointer to our own fake GOT, which is defined on a per-module basis.
---- This is exactly how GCC does it, and it's quite horrible:
---- We first fetch the address of a local label (mkPicBaseLabel).
---- Then we add a 16-bit offset to that to get the address of a .long that we
---- define in .text space right next to the proc. This .long literal contains
---- the (32-bit) offset from our local label to our global offset table
---- (.LCTOC1 aka gotOffLabel).
-+-- This is exactly how GCC does it in linux.
-
- initializePicBase_ppc
- :: Arch -> OS -> Reg
-@@ -704,18 +696,9 @@ initializePicBase_ppc ArchPPC os picReg
- (CmmProc info lab live (ListGraph blocks) : statics)
- | osElfTarget os
- = do
-- dflags <- getDynFlags
-- gotOffLabel <- getNewLabelNat
-- tmp <- getNewRegNat $ intSize (wordWidth dflags)
- let
-- gotOffset = CmmData Text $ Statics gotOffLabel [
-- CmmStaticLit (CmmLabelDiffOff gotLabel
-- mkPicBaseLabel
-- 0)
-- ]
-- offsetToOffset
-- = PPC.ImmConstantDiff
-- (PPC.ImmCLbl gotOffLabel)
-+ gotOffset = PPC.ImmConstantDiff
-+ (PPC.ImmCLbl gotLabel)
- (PPC.ImmCLbl mkPicBaseLabel)
-
- blocks' = case blocks of
-@@ -726,15 +709,23 @@ initializePicBase_ppc ArchPPC os picReg
- | bID `mapMember` info = fetchPC b
- | otherwise = b
-
-+ -- GCC does PIC prologs thusly:
-+ -- bcl 20,31,.L1
-+ -- .L1:
-+ -- mflr 30
-+ -- addis 30,30,.LCTOC1-.L1@ha
-+ -- addi 30,30,.LCTOC1-.L1@l
-+ -- TODO: below we use it over temporary register,
-+ -- it can and should be optimised by picking
-+ -- correct PIC reg.
- fetchPC (BasicBlock bID insns) =
- BasicBlock bID (PPC.FETCHPC picReg
-- : PPC.ADDIS tmp picReg (PPC.HI offsetToOffset)
-- : PPC.LD PPC.archWordSize tmp
-- (PPC.AddrRegImm tmp (PPC.LO offsetToOffset))
-- : PPC.ADD picReg picReg (PPC.RIReg picReg)
-+ : PPC.ADDIS picReg picReg (PPC.HA gotOffset)
-+ : PPC.ADDI picReg picReg (PPC.LO gotOffset)
-+ : PPC.MR PPC.r30 picReg
- : insns)
-
-- return (CmmProc info lab live (ListGraph blocks') : gotOffset : statics)
-+ return (CmmProc info lab live (ListGraph blocks') : statics)
-
-
- initializePicBase_ppc ArchPPC OSDarwin picReg
-diff --git a/compiler/nativeGen/PPC/CodeGen.hs b/compiler/nativeGen/PPC/CodeGen.hs
-index ddf483a..c1c4a74 100644
---- a/compiler/nativeGen/PPC/CodeGen.hs
-+++ b/compiler/nativeGen/PPC/CodeGen.hs
-@@ -54,7 +54,7 @@ import Outputable
- import Unique
- import DynFlags
-
--import Control.Monad ( mapAndUnzipM )
-+import Control.Monad ( mapAndUnzipM, when )
- import Data.Bits
- import Data.Word
-
-@@ -355,6 +355,19 @@ iselExpr64 (CmmMachOp (MO_Add _) [e1,e2]) = do
- ADDE rhi r1hi r2hi ]
- return (ChildCode64 code rlo)
-
-+iselExpr64 (CmmMachOp (MO_Sub _) [e1,e2]) = do
-+ ChildCode64 code1 r1lo <- iselExpr64 e1
-+ ChildCode64 code2 r2lo <- iselExpr64 e2
-+ (rlo,rhi) <- getNewRegPairNat II32
-+ let
-+ r1hi = getHiVRegFromLo r1lo
-+ r2hi = getHiVRegFromLo r2lo
-+ code = code1 `appOL`
-+ code2 `appOL`
-+ toOL [ SUBFC rlo r2lo r1lo,
-+ SUBFE rhi r2hi r1hi ]
-+ return (ChildCode64 code rlo)
-+
- iselExpr64 (CmmMachOp (MO_UU_Conv W32 W64) [expr]) = do
- (expr_reg,expr_code) <- getSomeReg expr
- (rlo, rhi) <- getNewRegPairNat II32
-@@ -918,8 +931,12 @@ genCCall' dflags gcp target dest_regs args0
- (toOL []) []
-
- (labelOrExpr, reduceToFF32) <- case target of
-- ForeignTarget (CmmLit (CmmLabel lbl)) _ -> return (Left lbl, False)
-- ForeignTarget expr _ -> return (Right expr, False)
-+ ForeignTarget (CmmLit (CmmLabel lbl)) _ -> do
-+ uses_pic_base_implicitly
-+ return (Left lbl, False)
-+ ForeignTarget expr _ -> do
-+ uses_pic_base_implicitly
-+ return (Right expr, False)
- PrimTarget mop -> outOfLineMachOp mop
-
- let codeBefore = move_sp_down finalStack `appOL` passArgumentsCode
-@@ -940,6 +957,13 @@ genCCall' dflags gcp target dest_regs args0
- where
- platform = targetPlatform dflags
-
-+ uses_pic_base_implicitly = do
-+ -- See Note [implicit register in PPC PIC code]
-+ -- on why we claim to use PIC register here
-+ when (gopt Opt_PIC dflags) $ do
-+ _ <- getPicBaseNat archWordSize
-+ return ()
-+
- initialStackOffset = case gcp of
- GCPDarwin -> 24
- GCPLinux -> 8
-@@ -1431,3 +1455,21 @@ coerceFP2Int _ toRep x = do
- -- read low word of value (high word is undefined)
- LD II32 dst (spRel dflags 3)]
- return (Any (intSize toRep) code')
-+
-+-- Note [.LCTOC1 in PPC PIC code]
-+-- The .LCTOC1 label is defined to point 32768 bytes into the GOT table
-+-- to make the most of the PPC's 16-bit displacements.
-+-- As 16-bit signed offset is used (usually via addi/lwz instructions)
-+-- first element will have '-32768' offset against .LCTOC1.
-+
-+-- Note [implicit register in PPC PIC code]
-+-- PPC generates calls by labels in assembly
-+-- in form of:
-+-- bl puts+32768@plt
-+-- in this form it's not seen directly (by GHC NCG)
-+-- that r30 (PicBaseReg) is used,
-+-- but r30 is a required part of PLT code setup:
-+-- puts+32768@plt:
-+-- lwz r11,-30484(r30) ; offset in .LCTOC1
-+-- mtctr r11
-+-- bctr
-diff --git a/compiler/nativeGen/PPC/Instr.hs b/compiler/nativeGen/PPC/Instr.hs
-index f5b9506..b7081f9 100644
---- a/compiler/nativeGen/PPC/Instr.hs
-+++ b/compiler/nativeGen/PPC/Instr.hs
-@@ -205,8 +205,11 @@ data Instr
- | ADD Reg Reg RI -- dst, src1, src2
- | ADDC Reg Reg Reg -- (carrying) dst, src1, src2
- | ADDE Reg Reg Reg -- (extend) dst, src1, src2
-+ | ADDI Reg Reg Imm -- Add Immediate dst, src1, src2
- | ADDIS Reg Reg Imm -- Add Immediate Shifted dst, src1, src2
- | SUBF Reg Reg Reg -- dst, src1, src2 ; dst = src2 - src1
-+ | SUBFC Reg Reg Reg -- (carrying) dst, src1, src2 ; dst = src2 - src1
-+ | SUBFE Reg Reg Reg -- (extend) dst, src1, src2 ; dst = src2 - src1
- | MULLW Reg Reg RI
- | DIVW Reg Reg Reg
- | DIVWU Reg Reg Reg
-@@ -284,8 +287,11 @@ ppc_regUsageOfInstr platform instr
- ADD reg1 reg2 ri -> usage (reg2 : regRI ri, [reg1])
- ADDC reg1 reg2 reg3 -> usage ([reg2,reg3], [reg1])
- ADDE reg1 reg2 reg3 -> usage ([reg2,reg3], [reg1])
-+ ADDI reg1 reg2 _ -> usage ([reg2], [reg1])
- ADDIS reg1 reg2 _ -> usage ([reg2], [reg1])
- SUBF reg1 reg2 reg3 -> usage ([reg2,reg3], [reg1])
-+ SUBFC reg1 reg2 reg3 -> usage ([reg2,reg3], [reg1])
-+ SUBFE reg1 reg2 reg3 -> usage ([reg2,reg3], [reg1])
- MULLW reg1 reg2 ri -> usage (reg2 : regRI ri, [reg1])
- DIVW reg1 reg2 reg3 -> usage ([reg2,reg3], [reg1])
- DIVWU reg1 reg2 reg3 -> usage ([reg2,reg3], [reg1])
-@@ -358,8 +364,11 @@ ppc_patchRegsOfInstr instr env
- ADD reg1 reg2 ri -> ADD (env reg1) (env reg2) (fixRI ri)
- ADDC reg1 reg2 reg3 -> ADDC (env reg1) (env reg2) (env reg3)
- ADDE reg1 reg2 reg3 -> ADDE (env reg1) (env reg2) (env reg3)
-+ ADDI reg1 reg2 imm -> ADDI (env reg1) (env reg2) imm
- ADDIS reg1 reg2 imm -> ADDIS (env reg1) (env reg2) imm
- SUBF reg1 reg2 reg3 -> SUBF (env reg1) (env reg2) (env reg3)
-+ SUBFC reg1 reg2 reg3 -> SUBFC (env reg1) (env reg2) (env reg3)
-+ SUBFE reg1 reg2 reg3 -> SUBFE (env reg1) (env reg2) (env reg3)
- MULLW reg1 reg2 ri -> MULLW (env reg1) (env reg2) (fixRI ri)
- DIVW reg1 reg2 reg3 -> DIVW (env reg1) (env reg2) (env reg3)
- DIVWU reg1 reg2 reg3 -> DIVWU (env reg1) (env reg2) (env reg3)
-diff --git a/compiler/nativeGen/PPC/Ppr.hs b/compiler/nativeGen/PPC/Ppr.hs
-index 6851769..f59d51f 100644
---- a/compiler/nativeGen/PPC/Ppr.hs
-+++ b/compiler/nativeGen/PPC/Ppr.hs
-@@ -525,6 +525,16 @@ pprInstr (BCTRL _) = hcat [
- ptext (sLit "bctrl")
- ]
- pprInstr (ADD reg1 reg2 ri) = pprLogic (sLit "add") reg1 reg2 ri
-+pprInstr (ADDI reg1 reg2 imm) = hcat [
-+ char '\t',
-+ ptext (sLit "addi"),
-+ char '\t',
-+ pprReg reg1,
-+ ptext (sLit ", "),
-+ pprReg reg2,
-+ ptext (sLit ", "),
-+ pprImm imm
-+ ]
- pprInstr (ADDIS reg1 reg2 imm) = hcat [
- char '\t',
- ptext (sLit "addis"),
-@@ -539,6 +549,8 @@ pprInstr (ADDIS reg1 reg2 imm) = hcat [
- pprInstr (ADDC reg1 reg2 reg3) = pprLogic (sLit "addc") reg1 reg2 (RIReg reg3)
- pprInstr (ADDE reg1 reg2 reg3) = pprLogic (sLit "adde") reg1 reg2 (RIReg reg3)
- pprInstr (SUBF reg1 reg2 reg3) = pprLogic (sLit "subf") reg1 reg2 (RIReg reg3)
-+pprInstr (SUBFC reg1 reg2 reg3) = pprLogic (sLit "subfc") reg1 reg2 (RIReg reg3)
-+pprInstr (SUBFE reg1 reg2 reg3) = pprLogic (sLit "subfe") reg1 reg2 (RIReg reg3)
- pprInstr (MULLW reg1 reg2 ri@(RIReg _)) = pprLogic (sLit "mullw") reg1 reg2 ri
- pprInstr (MULLW reg1 reg2 ri@(RIImm _)) = pprLogic (sLit "mull") reg1 reg2 ri
- pprInstr (DIVW reg1 reg2 reg3) = pprLogic (sLit "divw") reg1 reg2 (RIReg reg3)
-diff --git a/compiler/nativeGen/PPC/Regs.hs b/compiler/nativeGen/PPC/Regs.hs
-index 0f636bf..69e69c0 100644
---- a/compiler/nativeGen/PPC/Regs.hs
-+++ b/compiler/nativeGen/PPC/Regs.hs
-@@ -37,7 +37,8 @@ module PPC.Regs (
- fits16Bits,
- makeImmediate,
- fReg,
-- sp, r3, r4, r27, r28, f1, f20, f21,
-+ sp, r3, r4, r27, r28, r30,
-+ f1, f20, f21,
-
- allocatableRegs
-
-@@ -295,12 +296,13 @@ point registers.
- fReg :: Int -> RegNo
- fReg x = (32 + x)
-
--sp, r3, r4, r27, r28, f1, f20, f21 :: Reg
-+sp, r3, r4, r27, r28, r30, f1, f20, f21 :: Reg
- sp = regSingle 1
- r3 = regSingle 3
- r4 = regSingle 4
- r27 = regSingle 27
- r28 = regSingle 28
-+r30 = regSingle 30
- f1 = regSingle $ fReg 1
- f20 = regSingle $ fReg 20
- f21 = regSingle $ fReg 21
-diff --git a/includes/CodeGen.Platform.hs b/includes/CodeGen.Platform.hs
-index 9916e0e..1d46a01 100644
---- a/includes/CodeGen.Platform.hs
-+++ b/includes/CodeGen.Platform.hs
-@@ -881,6 +881,8 @@ freeReg 1 = fastBool False -- The Stack Pointer
- # if !MACHREGS_darwin
- -- most non-darwin powerpc OSes use r2 as a TOC pointer or something like that
- freeReg 2 = fastBool False
-+-- at least linux in -fPIC relies on r30 in PLT stubs
-+freeReg 30 = fastBool False
- # endif
- # ifdef REG_Base
- freeReg REG_Base = fastBool False
-diff --git a/mk/config.mk.in b/mk/config.mk.in
-index 0f5820f..8f134bc 100644
---- a/mk/config.mk.in
-+++ b/mk/config.mk.in
-@@ -95,7 +95,7 @@ TargetElf = YES
- endif
-
- # Some platforms don't support shared libraries
--NoSharedLibsPlatformList = powerpc-unknown-linux \
-+NoSharedLibsPlatformList = \
- x86_64-unknown-mingw32 \
- i386-unknown-mingw32
-
diff --git a/dev-lang/ghc/files/ghc-7.8.4-gold.patch b/dev-lang/ghc/files/ghc-7.8.4-gold.patch
deleted file mode 100644
index a8e9b1e6c857..000000000000
--- a/dev-lang/ghc/files/ghc-7.8.4-gold.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Gentoo-bug: https://bugs.gentoo.org/536426
-Reported-by: Eric Siegel
-commit 021b7978d14799bae779907faf7490cfd21b3f46
-Author: Austin Seipp <austin@well-typed.com>
-Date: Sun Jul 20 10:13:15 2014 -0500
-
- driver: use absolute paths in ld scripts (#7452)
-
- Patch contributed by slowmo.
-
- Signed-off-by: Austin Seipp <austin@well-typed.com>
-
-diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
-index 11427e2..49126fe 100644
---- a/compiler/main/DriverPipeline.hs
-+++ b/compiler/main/DriverPipeline.hs
-@@ -2166,7 +2166,9 @@ joinObjectFiles dflags o_files output_fn = do
- if ldIsGnuLd
- then do
- script <- newTempName dflags "ldscript"
-- writeFile script $ "INPUT(" ++ unwords o_files ++ ")"
-+ cwd <- getCurrentDirectory
-+ let o_files_abs = map (cwd </>) o_files
-+ writeFile script $ "INPUT(" ++ unwords o_files_abs ++ ")"
- ld_r [SysTools.FileOption "" script] ccInfo
- else if sLdSupportsFilelist mySettings
- then do
diff --git a/dev-lang/ghc/files/ghc-7.8.4-ia64-CLOSUREs.patch b/dev-lang/ghc/files/ghc-7.8.4-ia64-CLOSUREs.patch
deleted file mode 100644
index 9d50792bcf45..000000000000
--- a/dev-lang/ghc/files/ghc-7.8.4-ia64-CLOSUREs.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From b677ba51cf8131a6f6ddcdfee8dd2a8c4c2b4ac7 Mon Sep 17 00:00:00 2001
-From: Sergei Trofimovich <siarheit@google.com>
-Date: Sat, 17 Jan 2015 14:27:13 +0000
-Subject: [PATCH 1/3] CMM: add a mechanism to import C data labels
-
-Fixes threaded runtime on ia64.
-sm_mutex there was not referenced correctly.
-
-Signed-off-by: Sergei Trofimovich <siarheit@google.com>
----
- compiler/cmm/CmmParse.y | 4 ++++
- rts/Exception.cmm | 2 +-
- rts/PrimOps.cmm | 6 +++---
- 3 files changed, 8 insertions(+), 4 deletions(-)
-
-diff --git a/compiler/cmm/CmmParse.y.source b/compiler/cmm/CmmParse.y.source
-index 6b51e51..fd9489b 100644
---- a/compiler/cmm/CmmParse.y.source
-+++ b/compiler/cmm/CmmParse.y.source
-@@ -575,6 +575,10 @@ importName
- : NAME
- { ($1, mkForeignLabel $1 Nothing ForeignLabelInExternalPackage IsFunction) }
-
-+ -- as previous 'NAME', but 'IsData'
-+ | 'CLOSURE' NAME
-+ { ($2, mkForeignLabel $2 Nothing ForeignLabelInExternalPackage IsData) }
-+
- -- A label imported with an explicit packageId.
- | STRING NAME
- { ($2, mkCmmCodeLabel (fsToPackageKey (mkFastString $1)) $2) }
-diff --git a/rts/Exception.cmm b/rts/Exception.cmm
-index 5007ef3..8d19c14 100644
---- a/rts/Exception.cmm
-+++ b/rts/Exception.cmm
-@@ -13,7 +13,7 @@
- #include "Cmm.h"
- #include "RaiseAsync.h"
-
--import ghczmprim_GHCziTypes_True_closure;
-+import CLOSURE ghczmprim_GHCziTypes_True_closure;
-
- /* -----------------------------------------------------------------------------
- Exception Primitives
-diff --git a/rts/PrimOps.cmm b/rts/PrimOps.cmm
-index 3e8612c..2e6ca46 100644
---- a/rts/PrimOps.cmm
-+++ b/rts/PrimOps.cmm
-@@ -28,12 +28,12 @@
- import pthread_mutex_lock;
- import pthread_mutex_unlock;
- #endif
--import base_ControlziExceptionziBase_nestedAtomically_closure;
-+import CLOSURE base_ControlziExceptionziBase_nestedAtomically_closure;
- import EnterCriticalSection;
- import LeaveCriticalSection;
--import ghczmprim_GHCziTypes_False_closure;
-+import CLOSURE ghczmprim_GHCziTypes_False_closure;
- #if defined(USE_MINIINTERPRETER) || !defined(mingw32_HOST_OS)
--import sm_mutex;
-+import CLOSURE sm_mutex;
- #endif
-
- /*-----------------------------------------------------------------------------
---
-2.2.1
-
diff --git a/dev-lang/ghc/files/ghc-8.0.1-limit-jN.patch b/dev-lang/ghc/files/ghc-8.0.1-limit-jN.patch
deleted file mode 100644
index dc5410da3020..000000000000
--- a/dev-lang/ghc/files/ghc-8.0.1-limit-jN.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-commit 501e05bb1b8974fc8b6c9eee86c87c367e87a211
-Author: Sergei Trofimovich <slyfox@gentoo.org>
-Date: Tue Aug 30 12:10:47 2016 +0100
-
- GhcMake: limit Capability count to CPU count in parallel mode
-
- In Trac #9221 one of problems using high --jobs=<N>
- is amount of mutator (or GC) threads we crate.
-
- We use userspace spinning-and-yielding (see ACQUIRE_SPIN_LOCK)
- to acess work stealing queues. In case of
- N-worker-threads > N-CPUs fraction of time when
- thread holding spin lock gets descheduled by kernel
- increases. That causes other threads to waste CPU time
- before giving up CPU.
-
- Signed-off-by: Sergei Trofimovich <siarheit@google.com>
-
- Test Plan:
- ghc --make -j8 and -j80 have comparable sys time
- on a 8-core system.
-
- Reviewers: austin, gintas, bgamari, simonmar
-
- Reviewed By: bgamari, simonmar
-
- Subscribers: thomie
-
- Differential Revision: https://phabricator.haskell.org/D2482
-
- GHC Trac Issues: #9221
-
-diff --git a/compiler/main/GhcMake.hs b/compiler/main/GhcMake.hs
-index 9dc43cd..905df63 100644
---- a/compiler/main/GhcMake.hs
-+++ b/compiler/main/GhcMake.hs
-@@ -761,7 +761,12 @@ parUpsweep n_jobs old_hpt stable_mods cleanup sccs = do
-
- let updNumCapabilities = liftIO $ do
- n_capabilities <- getNumCapabilities
-- unless (n_capabilities /= 1) $ setNumCapabilities n_jobs
-+ n_cpus <- getNumProcessors
-+ -- Setting number of capabilities more than
-+ -- CPU count usually leads to high userspace
-+ -- lock contention. Trac #9221
-+ let n_caps = min n_jobs n_cpus
-+ unless (n_capabilities /= 1) $ setNumCapabilities n_caps
- return n_capabilities
- -- Reset the number of capabilities once the upsweep ends.
- let resetNumCapabilities orig_n = liftIO $ setNumCapabilities orig_n
diff --git a/dev-lang/ghc/files/ghc-8.0.1-par-g0-on-A32.patch b/dev-lang/ghc/files/ghc-8.0.1-par-g0-on-A32.patch
deleted file mode 100644
index b46e57301782..000000000000
--- a/dev-lang/ghc/files/ghc-8.0.1-par-g0-on-A32.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-commit bdfc5375f219d6def81effda4e57cb56d01fc917
-Author: Sergei Trofimovich <slyfox@gentoo.org>
-Date: Tue Aug 30 12:10:54 2016 +0100
-
- rts: enable parallel GC scan of large (32M+) allocation area
-
- Parallel GC does not scan large allocation area (-A)
- effectively as it does not do work stealing from nursery
- by default.
-
- That leads to large imbalance when only one of threads
- overflows allocation area: most of GC threads finish
- quickly (as there is not much to collect) and sit idle
- waiting while single GC thread finishes scan of single
- allocation area for that thread.
-
- The patch enables work stealing for (equivalent of -qb0)
- allocation area of -A32M or higher.
-
- Tested on a highlighting-kate package from Trac #9221
-
- On 8-core machine the difference is around 5% faster
- of wall-clock time. On 24-core VM the speedup is 20%.
-
- Signed-off-by: Sergei Trofimovich <siarheit@google.com>
-
- Test Plan: measured wall time and GC parallelism on highlighting-kate build
-
- Reviewers: austin, bgamari, erikd, simonmar
-
- Reviewed By: bgamari, simonmar
-
- Subscribers: thomie
-
- Differential Revision: https://phabricator.haskell.org/D2483
-
- GHC Trac Issues: #9221
-
-diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c
-index fda33f0..7a719b9 100644
---- a/rts/RtsFlags.c
-+++ b/rts/RtsFlags.c
-@@ -237,1 +237,1 @@ void initRtsFlagsDefaults(void)
-- RtsFlags.ParFlags.parGcLoadBalancingGen = 1;
-+ RtsFlags.ParFlags.parGcLoadBalancingGen = ~0u; /* auto, based on -A */
-@@ -1398,2 +1390,19 @@ static void normaliseRtsOpts (void)
- }
-
-+#ifdef THREADED_RTS
-+ if (RtsFlags.ParFlags.parGcLoadBalancingGen == ~0u) {
-+ StgWord alloc_area_bytes
-+ = RtsFlags.GcFlags.minAllocAreaSize * BLOCK_SIZE;
-+
-+ // If allocation area is larger that CPU cache
-+ // we can finish scanning quicker doing work-stealing
-+ // scan. Trac #9221
-+ // 32M looks big enough not to fit into L2 cache
-+ // of popular modern CPUs.
-+ if (alloc_area_bytes >= 32 * 1024 * 1024) {
-+ RtsFlags.ParFlags.parGcLoadBalancingGen = 0;
-+ } else {
-+ RtsFlags.ParFlags.parGcLoadBalancingGen = 1;
-+ }
-+ }
-+#endif
diff --git a/dev-lang/ghc/files/ghc-8.0.1-ww-args-limit.patch b/dev-lang/ghc/files/ghc-8.0.1-ww-args-limit.patch
deleted file mode 100644
index 4752f4482678..000000000000
--- a/dev-lang/ghc/files/ghc-8.0.1-ww-args-limit.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-commit 5efbf0d243984444cf352ad6f0d147e226c64498
-Author: Sergei Trofimovich <slyfox@gentoo.org>
-Date: Thu Sep 1 17:34:58 2016 +0100
-
- restore -fmax-worker-args handling (Trac #11565)
-
- maxWorkerArgs handling was accidentally lost 3 years ago
- in a major update of demand analysis
- commit 0831a12ea2fc73c33652eeec1adc79fa19700578
-
- Old regression is noticeable as:
- - code bloat (requires stack reshuffling)
- - compilation slowdown (more code to optimise/generate)
- - and increased heap usage (DynFlags unboxing/reboxing?)
-
- On a simple compile benchmark this change causes heap
- allocation drop from 70G don to 67G (ghc perf build).
-
- Signed-off-by: Sergei Trofimovich <siarheit@google.com>
-
- Reviewers: simonpj, ezyang, goldfire, austin, bgamari
-
- Reviewed By: simonpj, ezyang
-
- Subscribers: thomie
-
- Differential Revision: https://phabricator.haskell.org/D2503
-
- GHC Trac Issues: #11565
-
-diff --git a/compiler/specialise/SpecConstr.hs b/compiler/specialise/SpecConstr.hs
-index 10d5614..7166f57 100644
---- a/compiler/specialise/SpecConstr.hs
-+++ b/compiler/specialise/SpecConstr.hs
-@@ -29,7 +29,7 @@ import CoreFVs ( exprsFreeVarsList )
- import CoreMonad
- import Literal ( litIsLifted )
- import HscTypes ( ModGuts(..) )
--import WwLib ( mkWorkerArgs )
-+import WwLib ( isWorkerSmallEnough, mkWorkerArgs )
- import DataCon
- import Coercion hiding( substCo )
- import Rules
-@@ -1533,10 +1533,14 @@ specialise env bind_calls (RI { ri_fn = fn, ri_lam_bndrs = arg_bndrs
-
- | Just all_calls <- lookupVarEnv bind_calls fn
- = -- pprTrace "specialise entry {" (ppr fn <+> ppr (length all_calls)) $
-- do { (boring_call, pats) <- callsToPats env specs arg_occs all_calls
--
-+ do { (boring_call, all_pats) <- callsToPats env specs arg_occs all_calls
- -- Bale out if too many specialisations
-- ; let n_pats = length pats
-+ ; let pats = filter (is_small_enough . fst) all_pats
-+ is_small_enough vars = isWorkerSmallEnough (sc_dflags env) vars
-+ -- We are about to construct w/w pair in 'spec_one'.
-+ -- Omit specialisation leading to high arity workers.
-+ -- See Note [Limit w/w arity]
-+ n_pats = length pats
- spec_count' = n_pats + spec_count
- ; case sc_count env of
- Just max | not (sc_force env) && spec_count' > max
-diff --git a/compiler/stranal/WwLib.hs b/compiler/stranal/WwLib.hs
-index 09bc204..d9460d9 100644
---- a/compiler/stranal/WwLib.hs
-+++ b/compiler/stranal/WwLib.hs
-@@ -8,6 +8,7 @@
-
- module WwLib ( mkWwBodies, mkWWstr, mkWorkerArgs
- , deepSplitProductType_maybe, findTypeShape
-+ , isWorkerSmallEnough
- ) where
-
- #include "HsVersions.h"
-@@ -144,7 +145,8 @@ mkWwBodies dflags fam_envs fun_ty demands res_info one_shots
- wrapper_body = wrap_fn_args . wrap_fn_cpr . wrap_fn_str . applyToVars work_call_args . Var
- worker_body = mkLams work_lam_args. work_fn_str . work_fn_cpr . work_fn_args
-
-- ; if useful1 && not (only_one_void_argument) || useful2
-+ ; if isWorkerSmallEnough dflags work_args
-+ && (useful1 && not only_one_void_argument || useful2)
- then return (Just (worker_args_dmds, wrapper_body, worker_body))
- else return Nothing
- }
-@@ -165,6 +167,12 @@ mkWwBodies dflags fam_envs fun_ty demands res_info one_shots
- | otherwise
- = False
-
-+-- See Note [Limit w/w arity]
-+isWorkerSmallEnough :: DynFlags -> [Var] -> Bool
-+isWorkerSmallEnough dflags vars = count isId vars <= maxWorkerArgs dflags
-+ -- We count only Free variables (isId) to skip Type, Kind
-+ -- variables which have no runtime representation.
-+
- {-
- Note [Always do CPR w/w]
- ~~~~~~~~~~~~~~~~~~~~~~~~
-@@ -178,6 +186,30 @@ a disaster, because then the enclosing function might say it has the CPR
- property, but now doesn't and there a cascade of disaster. A good example
- is Trac #5920.
-
-+Note [Limit w/w arity]
-+~~~~~~~~~~~~~~~~~~~~~~~~
-+Guard against high worker arity as it generates a lot of stack traffic.
-+A simplified example is Trac #11565#comment:6
-+
-+Current strategy is very simple: don't perform w/w transformation at all
-+if the result produces a wrapper with arity higher than -fmax-worker-args=.
-+
-+It is a bit all or nothing, consider
-+
-+ f (x,y) (a,b,c,d,e ... , z) = rhs
-+
-+Currently we will remove all w/w ness entirely. But actually we could
-+w/w on the (x,y) pair... it's the huge product that is the problem.
-+
-+Could we instead refrain from w/w on an arg-by-arg basis? Yes, that'd
-+solve f. But we can get a lot of args from deeply-nested products:
-+
-+ g (a, (b, (c, (d, ...)))) = rhs
-+
-+This is harder to spot on an arg-by-arg basis. Previously mkWwStr was
-+given some "fuel" saying how many arguments it could add; when we ran
-+out of fuel it would stop w/wing.
-+Still not very clever because it had a left-right bias.
-
- ************************************************************************
- * *
diff --git a/dev-lang/ghc/files/ghc-8.0.1_rc1-cgen-constify.patch b/dev-lang/ghc/files/ghc-8.0.1_rc1-cgen-constify.patch
deleted file mode 100644
index 877a5827e4ea..000000000000
--- a/dev-lang/ghc/files/ghc-8.0.1_rc1-cgen-constify.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-commit b0cf3ab7a69b878a4335d21a347b56e4b0ca0b7b
-Author: Sergei Trofimovich <slyfox@gentoo.org>
-Date: Mon Apr 14 19:06:24 2014 +0300
-
- compiler/cmm/PprC.hs: constify local string literals
-
- Consider one-line module
- module B (v) where v = "hello"
- in -fvia-C mode it generates code like
- static char gibberish_str[] = "hello";
-
- It uselessly eats data section (precious resource on ia64!).
- The patch switches genrator to emit:
- static const char gibberish_str[] = "hello";
-
- Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-
-diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs
-index 2398981..fdb578d 100644
---- a/compiler/cmm/PprC.hs
-+++ b/compiler/cmm/PprC.hs
-@@ -112,6 +112,12 @@ pprTop (CmmProc infos clbl _ graph) =
-
- -- We only handle (a) arrays of word-sized things and (b) strings.
-
-+pprTop (CmmData (Section ReadOnlyData _) (Statics lbl [CmmString str])) =
-+ hcat [
-+ pprLocalness lbl, ptext (sLit "const char "), ppr lbl,
-+ ptext (sLit "[] = "), pprStringInCStyle str, semi
-+ ]
-+
- pprTop (CmmData _section (Statics lbl [CmmString str])) =
- hcat [
- pprLocalness lbl, ptext (sLit "char "), ppr lbl,
diff --git a/dev-lang/ghc/files/ghc-8.0.2-O2-unreg.patch b/dev-lang/ghc/files/ghc-8.0.2-O2-unreg.patch
deleted file mode 100644
index b64d65b80a05..000000000000
--- a/dev-lang/ghc/files/ghc-8.0.2-O2-unreg.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-ghc -O2 generates too large C files for unregisterised compiler.
-On ia64 it causes DynFlags to compile for 60 minutes (then assembler
-crashes).
-
-To decrease C code inflation we don't use -O2 in UNREG mode.
-diff --git a/mk/config.mk.in b/mk/config.mk.in
-index bfaaa66..d8f93b3 100644
---- a/mk/config.mk.in
-+++ b/mk/config.mk.in
-@@ -72,11 +72,2 @@ GhcStage3HcOpts=-O2
-
--# Disable -O2 optimization. Otherwise amount of generated C code
--# makes things very slow to compile (~5 minutes on core-i7 for 'compiler/hsSyn/HsExpr.lhs')
--# and sometimes not compile at all (powerpc64 overflows something
--# on 'compiler/hsSyn/HsExpr.lhs').
--ifeq "$(GhcUnregisterised)" "YES"
--GhcStage1HcOpts=
--GhcStage2HcOpts=
--GhcStage3HcOpts=
--endif
-
-@@ -894 +885,13 @@ CURSES_INCLUDE_DIRS = @CURSES_INCLUDE_DIRS@
- CURSES_LIB_DIRS = @CURSES_LIB_DIRS@
-+
-+# Disable -O2 optimization. Otherwise amount of generated C code
-+# makes things very slow to compile (~5 minutes on core-i7 for 'compiler/hsSyn/HsExpr.lhs')
-+# and sometimes not compile at all (powerpc64 overflows something
-+# on 'compiler/hsSyn/HsExpr.lhs').
-+ifeq "$(GhcUnregisterised)" "YES"
-+GhcStage1HcOpts=
-+GhcStage2HcOpts=
-+GhcStage3HcOpts=
-+
-+GhcLibHcOpts=
-+endif
diff --git a/dev-lang/ghc/files/ghc-8.0.2-binutils-2.30.patch b/dev-lang/ghc/files/ghc-8.0.2-binutils-2.30.patch
deleted file mode 100644
index f02cb238c6b9..000000000000
--- a/dev-lang/ghc/files/ghc-8.0.2-binutils-2.30.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 358b508051333882d4099acca8f269e6fb2b7d65 Mon Sep 17 00:00:00 2001
-From: Bertram Felgenhauer <int-e@gmx.de>
-Date: Thu, 3 May 2018 18:03:53 +0300
-Subject: [PATCH] Compute DW_FORM_block length correctly; also fixes #15068
-
-Before this patch, the pprUnwindwExpr function computed the length of
-by the following assembly fragment:
-
- .uleb128 1f-.-1
- <expression data>
-1:
-
-That is, to compute the length, it takes the difference of the label 1
-and the address of the .uleb128 directive, and subtracts 1.
-
-In #15068 it was reported that `as` from binutils 4.30 has trouble with
-evaluating the `.` part of the expression. However, there is actually a
-problem with the expression, if the length of the data ever becomes
-larger than 128: In that case, the .uleb128 directive will emit more
-than 1 byte, and the computed length will be wrong.
-
-The present patch changes the assembly fragment to use two labels,
-which fixes both these problems.
-
- .uleb128 2f-1f
-1:
- <expression data>
-2:
-
-Test Plan: validate
-
-Reviewers: bgamari, osa1
-
-Reviewed By: bgamari
-
-Subscribers: thomie, carter
-
-GHC Trac Issues: #15068
-
-Differential Revision: https://phabricator.haskell.org/D4654
----
- compiler/nativeGen/Dwarf/Types.hs | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/compiler/nativeGen/Dwarf/Types.hs b/compiler/nativeGen/Dwarf/Types.hs
-index 23a2c920e7..579ed0d256 100644
---- a/compiler/nativeGen/Dwarf/Types.hs
-+++ b/compiler/nativeGen/Dwarf/Types.hs
-@@ -492,9 +492,11 @@ pprUnwindExpr spIsCFA expr
- pprE (UwPlus u1 u2) = pprE u1 $$ pprE u2 $$ pprByte dW_OP_plus
- pprE (UwMinus u1 u2) = pprE u1 $$ pprE u2 $$ pprByte dW_OP_minus
- pprE (UwTimes u1 u2) = pprE u1 $$ pprE u2 $$ pprByte dW_OP_mul
-- in text "\t.uleb128 1f-.-1" $$ -- DW_FORM_block length
-+ in text "\t.uleb128 2f-1f" $$ -- DW_FORM_block length
-+ -- computed as the difference of the following local labels 2: and 1:
-+ text "1:" $$
- pprE expr $$
-- text "1:"
-+ text "2:"
-
- -- | Generate code for re-setting the unwind information for a
- -- register to @undefined@
---
-2.17.0
-
diff --git a/dev-lang/ghc/files/ghc-8.0.2-libffi-alpha.patch b/dev-lang/ghc/files/ghc-8.0.2-libffi-alpha.patch
deleted file mode 100644
index 166f7fe42991..000000000000
--- a/dev-lang/ghc/files/ghc-8.0.2-libffi-alpha.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-commit 2c220c4b053c8efb2098ee20910084a42a0b2dcd
-Author: Sergei Trofimovich <siarheit@google.com>
-Date: Sun Jan 29 11:59:36 2017 +0000
-
- libffi: fix build COMPLEX build failure on alpha
-
- libtool: compile: alpha-unknown-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude \
- -I../src -I. -I../include -Iinclude -I../src -Wall -w -mieee -D_REENTRANT -fno-stack-protector \
- -w -MT src/alpha/osf.lo -MMD -MP -MF src/alpha/.deps/osf.Tpo \
- -c ../src/alpha/osf.S -fPIC -DPIC -o src/alpha/.libs/osf.o
-
- ../src/alpha/osf.S:298:2: error: #error "osf.S out of sync with ffi.h"
- #error "osf.S out of sync with ffi.h"
- ^
-
- Signed-off-by: Sergei Trofimovich <siarheit@google.com>
-
-diff --git a/libffi/ghc.mk b/libffi/ghc.mk
-index 7c5bc9e1b3..4297ed449e 100644
---- a/libffi/ghc.mk
-+++ b/libffi/ghc.mk
-@@ -63,6 +63,9 @@ $(libffi_STAMP_CONFIGURE): $(TOUCH_DEP)
- # will use cygwin symbolic links which cannot be read by mingw gcc.
- chmod +x libffi/ln
-
-+ # fix libffi build failure on alpha
-+ ( cd libffi/build && "$(PATCH_CMD)" -p0 < ../libffi.3.2.1-complex_alpha.diff; )
-+
- # We need to use -MMD rather than -MD, as otherwise we get paths
- # like c:/... in the dependency files on Windows, and the extra
- # colons break make
-diff --git a/libffi/libffi.3.2.1-complex_alpha.diff b/libffi/libffi.3.2.1-complex_alpha.diff
-new file mode 100644
-index 0000000000..0d6e0bc290
---- /dev/null
-+++ b/libffi/libffi.3.2.1-complex_alpha.diff
-@@ -0,0 +1,20 @@
-+--- src/alpha/osf.S.orig 2015-01-16 10:46:15.000000000 +0100
-++++ src/alpha/osf.S 2015-01-16 10:46:24.000000000 +0100
-+@@ -279,6 +279,7 @@
-+ .gprel32 $load_64 # FFI_TYPE_SINT64
-+ .gprel32 $load_none # FFI_TYPE_STRUCT
-+ .gprel32 $load_64 # FFI_TYPE_POINTER
-++ .gprel32 $load_none # FFI_TYPE_COMPLEX
-+
-+ /* Assert that the table above is in sync with ffi.h. */
-+
-+@@ -294,7 +295,8 @@
-+ || FFI_TYPE_SINT64 != 12 \
-+ || FFI_TYPE_STRUCT != 13 \
-+ || FFI_TYPE_POINTER != 14 \
-+- || FFI_TYPE_LAST != 14
-++ || FFI_TYPE_COMPLEX != 15 \
-++ || FFI_TYPE_LAST != 15
-+ #error "osf.S out of sync with ffi.h"
-+ #endif
-+
diff --git a/dev-lang/ghc/files/ghc-8.0.2_rc2-old-sphinx.patch b/dev-lang/ghc/files/ghc-8.0.2_rc2-old-sphinx.patch
deleted file mode 100644
index a4d49d3ef808..000000000000
--- a/dev-lang/ghc/files/ghc-8.0.2_rc2-old-sphinx.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/docs/users_guide/profiling.rst b/docs/users_guide/profiling.rst
-index 4d0bb3a..f980f72 100644
---- a/docs/users_guide/profiling.rst
-+++ b/docs/users_guide/profiling.rst
-@@ -435,7 +435,2 @@ To generate a heap profile from your program:
-
--For example, here is a heap profile produced for the ``sphere`` program
--from GHC's ``nofib`` benchmark suite,
--
--.. image:: images/prof_scc.*
--
- You might also want to take a look at
diff --git a/dev-lang/ghc/files/ghc-8.10.1-no-relax-everywhere.patch b/dev-lang/ghc/files/ghc-8.10.1-no-relax-everywhere.patch
deleted file mode 100644
index 19c8b4bccc48..000000000000
--- a/dev-lang/ghc/files/ghc-8.10.1-no-relax-everywhere.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-https://github.com/gentoo-haskell/gentoo-haskell/issues/704
-
-Allow users to specify -W,--relax externally and pass
--Wl,-no-relax unconditonally on all arches.
-
-Reported-by: wmyrda
---- a/compiler/main/DriverPipeline.hs
-+++ b/compiler/main/DriverPipeline.hs
-@@ -2144,9 +2144,7 @@ joinObjectFiles dflags o_files output_fn = do
- -- gcc on sparc sets -Wl,--relax implicitly, but
- -- -r and --relax are incompatible for ld, so
- -- disable --relax explicitly.
-- ++ (if platformArch (targetPlatform dflags)
-- `elem` [ArchSPARC, ArchSPARC64]
-- && ldIsGnuLd
-+ ++ (if ldIsGnuLd
- then [SysTools.Option "-Wl,-no-relax"]
- else [])
- -- See Note [Produce big objects on Windows]
diff --git a/dev-lang/ghc/files/ghc-8.10.2-revert-linker-rtsSymbols_more_linker_symbols.patch b/dev-lang/ghc/files/ghc-8.10.2-revert-linker-rtsSymbols_more_linker_symbols.patch
deleted file mode 100644
index eb30d9d9dd4c..000000000000
--- a/dev-lang/ghc/files/ghc-8.10.2-revert-linker-rtsSymbols_more_linker_symbols.patch
+++ /dev/null
@@ -1,296 +0,0 @@
-From fac083e7ac8a37b61a4082bbbca2848e52fd1bb2 Mon Sep 17 00:00:00 2001
-From: Ben Gamari <ben@smart-cactus.org>
-Date: Sun, 9 Aug 2020 09:15:16 -0400
-Subject: [PATCH] Revert "[linker/rtsSymbols] More linker symbols"
-
-This reverts commit aa2e5863699306920513b216f337de09e29b5bb8.
----
- rts/RtsSymbols.c | 224 ++++-------------------------------------------
- 1 file changed, 17 insertions(+), 207 deletions(-)
-
-diff --git a/rts/RtsSymbols.c b/rts/RtsSymbols.c
-index d10a6900db..b2f90a892d 100644
---- a/rts/RtsSymbols.c
-+++ b/rts/RtsSymbols.c
-@@ -58,6 +58,7 @@
- SymI_HasProto(signal_handlers) \
- SymI_HasProto(stg_sig_install) \
- SymI_HasProto(rtsTimerSignal) \
-+ SymI_HasProto(atexit) \
- SymI_NeedsDataProto(nocldstop)
- #endif
-
-@@ -976,213 +977,29 @@
- RTS_USER_SIGNALS_SYMBOLS \
- RTS_INTCHAR_SYMBOLS
-
-+
- // 64-bit support functions in libgcc.a
--// See https://gcc.gnu.org/onlinedocs/gccint/Libgcc.html#Libgcc
--#define RTS_LIBGCC_SYMBOLS_32 \
-- SymI_NeedsProto(__fixunsdfdi) \
-- /* 4 The GCC low-level runtime library */\
-- /* 4.1.1 Arithmetic functions */\
-- /* SymI_NeedsProto(__ashlsi3) */\
-- SymI_NeedsProto(__ashldi3) \
-- /* SymI_NeedsProto(__ashlti3) */\
-- /* These functions return the result of shifting a left by b bits. */\
-- /* SymI_NeedsProto(__ashrsi3) */\
-- SymI_NeedsProto(__ashrdi3) \
-- /* SymI_NeedsProto(__ashrti3) */\
-- /* These functions return the result of arithmetically shifting a right by b bits. */\
-- /* SymI_NeedsProto(__divsi3) */\
-- SymI_NeedsProto(__divdi3) \
-- /* SymI_NeedsProto(__divti3) */\
-- /* These functions return the quotient of the signed division of a and b. */\
-- /* SymI_NeedsProto(__lshrsi3) */ \
-- SymI_NeedsProto(__lshrdi3) \
-- /* SymI_NeedsProto(__lshrti3) */ \
-- /* These functions return the result of logically shifting a right by b bits. */\
-- /* SymI_NeedsProto(__modsi3) */ \
-- SymI_NeedsProto(__moddi3) \
-- /* SymI_NeedsProto(__modti3) */ \
-- /* These functions return the remainder of the signed division of a and b. */\
-- /* SymI_NeedsProto(__mulsi3) */ \
-- SymI_NeedsProto(__muldi3) \
-- /* SymI_NeedsProto(__multi3) */ \
-- /* These functions return the product of a and b. */\
-- SymI_NeedsProto(__negdi2) \
-- /* SymI_NeedsProto(__negti2) */ \
-- /* These functions return the negation of a. */\
-- /* SymI_NeedsProto(__udivsi3) */ \
-- SymI_NeedsProto(__udivdi3) \
-- /* SymI_NeedsProto(__udivti3) */ \
-- /* These functions return the quotient of the unsigned division of a and b. */\
-- SymI_NeedsProto(__udivmoddi4) \
-- /* SymI_NeedsProto(__udivmodti4) */ \
-- /* These functions calculate both the quotient and remainder of the unsigned division of a and b. The return value is the quotient, and the remainder is placed in variable pointed to by c. */\
-- /* SymI_NeedsProto(__umodsi3) */ \
-- SymI_NeedsProto(__umoddi3) \
-- /* SymI_NeedsProto(__umodti3) */ \
-- /* These functions return the remainder of the unsigned division of a and b. */\
-- /* 4.1.2 Comparison functions */\
-- /* The following functions implement integral comparisons. These functions implement a low-level compare, upon which the higher level comparison operators (such as less than and greater than or equal to) can be constructed. The returned values lie in the range zero to two, to allow the high-level operators to be implemented by testing the returned result using either signed or unsigned comparison. */\
-- SymI_NeedsProto(__cmpdi2) \
-- /* SymI_NeedsProto(__cmpti2) */ \
-- /* These functions perform a signed comparison of a and b. If a is less than b, they return 0; if a is greater than b, they return 2; and if a and b are equal they return 1. */\
-- SymI_NeedsProto(__ucmpdi2) \
-- /* SymI_NeedsProto(__ucmpti2) */ \
-- /* These functions perform an unsigned comparison of a and b. If a is less than b, they return 0; if a is greater than b, they return 2; and if a and b are equal they return 1. */\
-- /* 4.1.3 Trapping arithmetic functions */\
-- /* The following functions implement trapping arithmetic. These functions call the libc function abort upon signed arithmetic overflow. */\
-- SymI_NeedsProto(__absvsi2) \
-- SymI_NeedsProto(__absvdi2) \
-- /* These functions return the absolute value of a. */\
-- /* SymI_NeedsProto(__addvsi3) */ \
-- SymI_NeedsProto(__addvdi3) \
-- /* These functions return the sum of a and b; that is a + b. */\
-- /* SymI_NeedsProto(__mulvsi3) */ \
-- SymI_NeedsProto(__mulvdi3) \
-- /* The functions return the product of a and b; that is a * b. */\
-- SymI_NeedsProto(__negvsi2) \
-- SymI_NeedsProto(__negvdi2) \
-- /* These functions return the negation of a; that is -a. */\
-- /* SymI_NeedsProto(__subvsi3) */ \
-- SymI_NeedsProto(__subvdi3) \
-- /* These functions return the difference between b and a; that is a - b. */\
-- /* 4.1.4 Bit operations */\
-- SymI_NeedsProto(__clzsi2) \
-- SymI_NeedsProto(__clzdi2) \
-- /* SymI_NeedsProto(__clzti2) */ \
-- /* These functions return the number of leading 0-bits in a, starting at the most significant bit position. If a is zero, the result is undefined. */\
-- SymI_NeedsProto(__ctzsi2) \
-- SymI_NeedsProto(__ctzdi2) \
-- /* SymI_NeedsProto(__ctzti2) */ \
-- /* These functions return the number of trailing 0-bits in a, starting at the least significant bit position. If a is zero, the result is undefined. */\
-- SymI_NeedsProto(__ffsdi2) \
-- /* SymI_NeedsProto(__ffsti2) */ \
-- /* These functions return the index of the least significant 1-bit in a, or the value zero if a is zero. The least significant bit is index one. */\
-- SymI_NeedsProto(__paritysi2) \
-- SymI_NeedsProto(__paritydi2) \
-- /* SymI_NeedsProto(__parityti2) */\
-- /* These functions return the value zero if the number of bits set in a is even, and the value one otherwise. */\
-- SymI_NeedsProto(__popcountsi2) \
-- SymI_NeedsProto(__popcountdi2) \
-- /* SymI_NeedsProto(__popcountti2) */ \
-- /* These functions return the number of bits set in a. */\
-- SymI_NeedsProto(__bswapsi2) \
-- SymI_NeedsProto(__bswapdi2)
--#define RTS_LIBGCC_SYMBOLS_aarch32 \
-- /* armv6l */\
-- /* TODO: should check for __ARM_EABI__ */\
-- SymI_NeedsProto(__aeabi_d2f) \
-- SymI_NeedsProto(__aeabi_d2iz) \
-- SymI_NeedsProto(__aeabi_d2lz) \
-- SymI_NeedsProto(__aeabi_d2uiz) \
-- SymI_NeedsProto(__aeabi_d2ulz) \
-- SymI_NeedsProto(__aeabi_dadd) \
-- SymI_NeedsProto(__aeabi_dcmpeq) \
-- SymI_NeedsProto(__aeabi_dcmpge) \
-- SymI_NeedsProto(__aeabi_dcmpgt) \
-- SymI_NeedsProto(__aeabi_dcmple) \
-- SymI_NeedsProto(__aeabi_dcmplt) \
-- SymI_NeedsProto(__aeabi_dcmpun) \
-- SymI_NeedsProto(__aeabi_ddiv) \
-- SymI_NeedsProto(__aeabi_dmul) \
-- SymI_NeedsProto(__aeabi_dneg) \
-- SymI_NeedsProto(__aeabi_dsub) \
-- SymI_NeedsProto(__aeabi_f2d) \
-- SymI_NeedsProto(__aeabi_f2iz) \
-- SymI_NeedsProto(__aeabi_f2lz) \
-- SymI_NeedsProto(__aeabi_f2uiz) \
-- SymI_NeedsProto(__aeabi_f2ulz) \
-- SymI_NeedsProto(__aeabi_fadd) \
-- SymI_NeedsProto(__aeabi_fcmpeq) \
-- SymI_NeedsProto(__aeabi_fcmpge) \
-- SymI_NeedsProto(__aeabi_fcmpgt) \
-- SymI_NeedsProto(__aeabi_fcmple) \
-- SymI_NeedsProto(__aeabi_fcmplt) \
-- SymI_NeedsProto(__aeabi_fcmpun) \
-- SymI_NeedsProto(__aeabi_fdiv) \
-- SymI_NeedsProto(__aeabi_fmul) \
-- SymI_NeedsProto(__aeabi_fneg) \
-- SymI_NeedsProto(__aeabi_fsub) \
-- SymI_NeedsProto(__aeabi_i2d) \
-- SymI_NeedsProto(__aeabi_i2f) \
-- SymI_NeedsProto(__aeabi_idiv) \
-- SymI_NeedsProto(__aeabi_idivmod) \
-- SymI_NeedsProto(__aeabi_l2d) \
-- SymI_NeedsProto(__aeabi_l2f) \
-- SymI_NeedsProto(__aeabi_lasr) \
-- SymI_NeedsProto(__aeabi_lcmp) \
-- SymI_NeedsProto(__aeabi_ldivmod) \
-- SymI_NeedsProto(__aeabi_llsl) \
-- SymI_NeedsProto(__aeabi_llsr) \
-- SymI_NeedsProto(__aeabi_lmul) \
-- SymI_NeedsProto(__aeabi_ui2d) \
-- SymI_NeedsProto(__aeabi_ui2f) \
-- SymI_NeedsProto(__aeabi_uidiv) \
-- SymI_NeedsProto(__aeabi_uidivmod) \
-- SymI_NeedsProto(__aeabi_ul2d) \
-- SymI_NeedsProto(__aeabi_ul2f) \
-- SymI_NeedsProto(__aeabi_ulcmp) \
-- SymI_NeedsProto(__aeabi_uldivmod)
--#define RTS_LIBGCC_SYMBOLS_64 \
-+#if defined(__GNUC__) && SIZEOF_VOID_P <= 4 && !defined(_ABIN32)
-+#define RTS_LIBGCC_SYMBOLS \
-+ SymI_NeedsProto(__divdi3) \
-+ SymI_NeedsProto(__udivdi3) \
-+ SymI_NeedsProto(__moddi3) \
-+ SymI_NeedsProto(__umoddi3) \
-+ SymI_NeedsProto(__muldi3) \
-+ SymI_NeedsProto(__ashldi3) \
-+ SymI_NeedsProto(__ashrdi3) \
-+ SymI_NeedsProto(__lshrdi3) \
-+ SymI_NeedsProto(__fixunsdfdi)
-+#elif defined(__GNUC__) && SIZEOF_VOID_P == 8
-+#define RTS_LIBGCC_SYMBOLS \
- SymI_NeedsProto(__udivti3) \
- SymI_NeedsProto(__umodti3)
--
--/* for aarch64 */
--#define RTS_LIBGCC_SYMBOLS_aarch64 \
-- SymI_NeedsProto(__netf2) \
-- SymI_NeedsProto(__addtf3) \
-- SymI_NeedsProto(__subtf3) \
-- SymI_NeedsProto(__multf3) \
-- SymI_NeedsProto(__extenddftf2) \
-- SymI_NeedsProto(__fixtfsi) \
-- SymI_NeedsProto(__fixunstfsi) \
-- SymI_NeedsProto(__floatsitf) \
-- SymI_NeedsProto(__floatunsitf)
--
--#if defined(__GNUC__) && SIZEOF_VOID_P <= 4 && defined(arm_HOST_OS)
--#define RTS_LIBGCC_SYMBOLS RTS_LIBGCC_SYMBOLS_32 RTS_LIBGCC_SYMBOLS_aarch32
--#elif defined(__GNUC__) && SIZEOF_VOID_P <= 4 && !defined(_ABIN32)
--#define RTS_LIBGCC_SYMBOLS RTS_LIBGCC_SYMBOLS_32
--#elif defined(__GNUC__) && SIZEOF_VOID_P == 8 && defined(aarch64_HOST_OS)
--#define RTS_LIBGCC_SYMBOLS RTS_LIBGCC_SYMBOLS_64 RTS_LIBGCC_SYMBOLS_aarch64
--#elif defined(__GNUC__) && SIZEOF_VOID_P == 8
--#define RTS_LIBGCC_SYMBOLS RTS_LIBGCC_SYMBOLS_64
- #else
- #define RTS_LIBGCC_SYMBOLS
- #endif
-
--#if !defined(mingw32_HOST_OS) && !defined(DYNAMIC) && (defined(_FORTIFY_SOURCE) || defined(__SSP__))
--#define RTS_SSP_SYMBOLS \
-- SymI_NeedsProto(__stack_chk_guard) \
-- SymI_NeedsProto(__stack_chk_fail)
--#else
--#define RTS_SSP_SYMBOLS
--#endif
--#if !defined(DYNAMIC) && defined(linux_HOST_OS)
--// we need these for static musl builds. However when
--// linking shared objects (DLLs) this will fail, hence
--// we do not include them when building with -DDYNAMIC
--#define RTS_LINKER_SYMBOLS \
-- SymI_NeedsProto(__fini_array_start) \
-- SymI_NeedsProto(__fini_array_end)
--#else
--#define RTS_LINKER_SYMBOLS
--#endif
--
--#if defined(darwin_HOST_OS) && defined(powerpc_HOST_ARCH)
-- // Symbols that don't have a leading underscore
-- // on Mac OS X. They have to receive special treatment,
-- // see machoInitSymbolsWithoutUnderscore()
--#define RTS_MACHO_NOUNDERLINE_SYMBOLS \
-- SymI_NeedsProto(saveFP) \
-- SymI_NeedsProto(restFP)
--#endif
--
- /* entirely bogus claims about types of these symbols */
--/* to prevent a bit of define expansion, SymI_NeedsProto is a variadic
-- * macro. And we'll concat vvv with the __VA_ARGS__. This prevents
-- * vvv from getting macro expanded.
-- */
--#define SymI_NeedsProto(vvv,...) extern void vvv ## __VA_ARGS__ (void);
-+#define SymI_NeedsProto(vvv) extern void vvv(void);
- #define SymI_NeedsDataProto(vvv) extern StgWord vvv[];
- #if defined(COMPILING_WINDOWS_DLL)
- #define SymE_HasProto(vvv) SymE_HasProto(vvv);
-@@ -1209,8 +1026,6 @@ RTS_DARWIN_ONLY_SYMBOLS
- RTS_OPENBSD_ONLY_SYMBOLS
- RTS_LIBGCC_SYMBOLS
- RTS_LIBFFI_SYMBOLS
--RTS_SSP_SYMBOLS
--RTS_LINKER_SYMBOLS
- #undef SymI_NeedsProto
- #undef SymI_NeedsDataProto
- #undef SymI_HasProto
-@@ -1230,7 +1045,7 @@ RTS_LINKER_SYMBOLS
- #define SymE_HasDataProto(vvv) \
- SymE_HasProto(vvv)
-
--#define SymI_NeedsProto(vvv,...) SymI_HasProto(vvv ## __VA_ARGS__)
-+#define SymI_NeedsProto(vvv) SymI_HasProto(vvv)
- #define SymI_NeedsDataProto(vvv) SymI_HasDataProto(vvv)
- #define SymE_NeedsProto(vvv) SymE_HasProto(vvv)
- #define SymE_NeedsDataProto(vvv) SymE_HasDataProto(vvv)
-@@ -1251,8 +1066,6 @@ RTS_LINKER_SYMBOLS
- #define SymI_HasProto_deprecated(vvv) \
- { #vvv, (void*)0xBAADF00D, true },
-
--void *RTS_DYNAMIC = NULL;
--
- RtsSymbolVal rtsSyms[] = {
- RTS_SYMBOLS
- RTS_RET_SYMBOLS
-@@ -1264,14 +1077,11 @@ RtsSymbolVal rtsSyms[] = {
- RTS_LIBGCC_SYMBOLS
- RTS_LIBFFI_SYMBOLS
- SymI_HasDataProto(nonmoving_write_barrier_enabled)
-- RTS_SSP_SYMBOLS
-- RTS_LINKER_SYMBOLS
- #if defined(darwin_HOST_OS) && defined(i386_HOST_ARCH)
- // dyld stub code contains references to this,
- // but it should never be called because we treat
- // lazy pointers as nonlazy.
- { "dyld_stub_binding_helper", (void*)0xDEADBEEF, false },
- #endif
-- { "_DYNAMIC", (void*)(&RTS_DYNAMIC), false },
- { 0, 0, false } /* sentinel */
- };
---
-2.25.4
-
diff --git a/dev-lang/ghc/files/ghc-8.2.1_rc1-cgen-constify.patch b/dev-lang/ghc/files/ghc-8.2.1_rc1-cgen-constify.patch
deleted file mode 100644
index 2e1ef932b454..000000000000
--- a/dev-lang/ghc/files/ghc-8.2.1_rc1-cgen-constify.patch
+++ /dev/null
@@ -1,378 +0,0 @@
-From 7e00046772e053c63ac93630a60b0f396e32a2d7 Mon Sep 17 00:00:00 2001
-From: Sergei Trofimovich <slyfox@gentoo.org>
-Date: Sun, 16 Apr 2017 10:43:38 +0100
-Subject: [PATCH] compiler/cmm/PprC.hs: constify labels in .rodata
-
-Summary:
-Consider one-line module
- module B (v) where v = "hello"
-in -fvia-C mode it generates code like
- static char gibberish_str[] = "hello";
-
-It resides in data section (precious resource on ia64!).
-The patch switches genrator to emit:
- static const char gibberish_str[] = "hello";
-
-Other types if symbols that gained 'const' qualifier are:
-
-- info tables (from haskell and CMM)
-- static reference tables (from haskell and CMM)
-
-Cleanups along the way:
-
-- fixed info tables defined in .cmm to reside in .rodata
-- split out closure declaration into 'IC_' / 'EC_'
-- added label declaration (based on label type) right before
- each label definition (based on section type) so that C
- compiler could check if declaration and definition matches
- at definition site.
-
-Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-
-Test Plan: ran testsuite on unregisterised x86_64 compiler
-
-Reviewers: simonmar, ezyang, austin, bgamari, erikd
-
-Subscribers: rwbarton, thomie
-
-GHC Trac Issues: #8996
-
-Differential Revision: https://phabricator.haskell.org/D3481
----
- compiler/cmm/CLabel.hs | 24 ++++++++++++++
- compiler/cmm/Cmm.hs | 13 ++++++++
- compiler/cmm/CmmInfo.hs | 2 +-
- compiler/cmm/PprC.hs | 62 +++++++++++++++++++++++-------------
- compiler/llvmGen/LlvmCodeGen/Data.hs | 12 -------
- includes/Stg.h | 22 +++++++++----
- includes/rts/storage/InfoTables.h | 2 +-
- includes/stg/MiscClosures.h | 14 ++++----
- 8 files changed, 102 insertions(+), 49 deletions(-)
-
-diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs
-index 3ba4f7647a..62c8037e9c 100644
---- a/compiler/cmm/CLabel.hs
-+++ b/compiler/cmm/CLabel.hs
-@@ -89,6 +89,8 @@ module CLabel (
- foreignLabelStdcallInfo,
- isBytesLabel,
- isForeignLabel,
-+ isSomeRODataLabel,
-+ isStaticClosureLabel,
- mkCCLabel, mkCCSLabel,
-
- DynamicLinkerLabelInfo(..),
-@@ -575,6 +577,28 @@ isForeignLabel :: CLabel -> Bool
- isForeignLabel (ForeignLabel _ _ _ _) = True
- isForeignLabel _lbl = False
-
-+-- | Whether label is a static closure label (can come from haskell or cmm)
-+isStaticClosureLabel :: CLabel -> Bool
-+-- Closure defined in haskell (.hs)
-+isStaticClosureLabel (IdLabel _ _ Closure) = True
-+-- Closure defined in cmm
-+isStaticClosureLabel (CmmLabel _ _ CmmClosure) = True
-+isStaticClosureLabel _lbl = False
-+
-+-- | Whether label is a .rodata label
-+isSomeRODataLabel :: CLabel -> Bool
-+-- info table defined in haskell (.hs)
-+isSomeRODataLabel (IdLabel _ _ ClosureTable) = True
-+isSomeRODataLabel (IdLabel _ _ ConInfoTable) = True
-+isSomeRODataLabel (IdLabel _ _ InfoTable) = True
-+isSomeRODataLabel (IdLabel _ _ LocalInfoTable) = True
-+-- static reference tables defined in haskell (.hs)
-+isSomeRODataLabel (IdLabel _ _ SRT) = True
-+isSomeRODataLabel (SRTLabel _) = True
-+-- info table defined in cmm (.cmm)
-+isSomeRODataLabel (CmmLabel _ _ CmmInfo) = True
-+isSomeRODataLabel _lbl = False
-+
- -- | Get the label size field from a ForeignLabel
- foreignLabelStdcallInfo :: CLabel -> Maybe Int
- foreignLabelStdcallInfo (ForeignLabel _ info _ _) = info
-diff --git a/compiler/cmm/Cmm.hs b/compiler/cmm/Cmm.hs
-index d2ee531686..bab20f3fdd 100644
---- a/compiler/cmm/Cmm.hs
-+++ b/compiler/cmm/Cmm.hs
-@@ -9,6 +9,7 @@ module Cmm (
- CmmBlock,
- RawCmmDecl, RawCmmGroup,
- Section(..), SectionType(..), CmmStatics(..), CmmStatic(..),
-+ isSecConstant,
-
- -- ** Blocks containing lists
- GenBasicBlock(..), blockId,
-@@ -167,6 +168,18 @@ data SectionType
- | OtherSection String
- deriving (Show)
-
-+-- | Should a data in this section be considered constant
-+isSecConstant :: Section -> Bool
-+isSecConstant (Section t _) = case t of
-+ Text -> True
-+ ReadOnlyData -> True
-+ RelocatableReadOnlyData -> True
-+ ReadOnlyData16 -> True
-+ CString -> True
-+ Data -> False
-+ UninitialisedData -> False
-+ (OtherSection _) -> False
-+
- data Section = Section SectionType CLabel
-
- data CmmStatic
-diff --git a/compiler/cmm/CmmInfo.hs b/compiler/cmm/CmmInfo.hs
-index b5e800a977..35e3a1888d 100644
---- a/compiler/cmm/CmmInfo.hs
-+++ b/compiler/cmm/CmmInfo.hs
-@@ -133,7 +133,7 @@ mkInfoTable dflags proc@(CmmProc infos entry_lbl live blocks)
- --
- return (top_decls ++
- [CmmProc mapEmpty entry_lbl live blocks,
-- mkDataLits (Section Data info_lbl) info_lbl
-+ mkRODataLits info_lbl
- (CmmLabel entry_lbl : rel_std_info ++ rel_extra_bits)])
-
- --
-diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs
-index 56de94079f..21ed6f6516 100644
---- a/compiler/cmm/PprC.hs
-+++ b/compiler/cmm/PprC.hs
-@@ -83,12 +83,13 @@ pprC tops = vcat $ intersperse blankLine $ map pprTop tops
- -- top level procs
- --
- pprTop :: RawCmmDecl -> SDoc
--pprTop (CmmProc infos clbl _ graph) =
-+pprTop (CmmProc infos clbl _in_live_regs graph) =
-
- (case mapLookup (g_entry graph) infos of
- Nothing -> empty
-- Just (Statics info_clbl info_dat) -> pprDataExterns info_dat $$
-- pprWordArray info_clbl info_dat) $$
-+ Just (Statics info_clbl info_dat) ->
-+ pprDataExterns info_dat $$
-+ pprWordArray info_is_in_rodata info_clbl info_dat) $$
- (vcat [
- blankLine,
- extern_decls,
-@@ -99,6 +100,8 @@ pprTop (CmmProc infos clbl _ graph) =
- rbrace ]
- )
- where
-+ -- info tables are always in .rodata
-+ info_is_in_rodata = True
- blocks = toBlockListEntryFirst graph
- (temp_decls, extern_decls) = pprTempAndExternDecls blocks
-
-@@ -107,21 +110,23 @@ pprTop (CmmProc infos clbl _ graph) =
-
- -- We only handle (a) arrays of word-sized things and (b) strings.
-
--pprTop (CmmData _section (Statics lbl [CmmString str])) =
-+pprTop (CmmData section (Statics lbl [CmmString str])) =
-+ pprExternDecl lbl $$
- hcat [
-- pprLocalness lbl, text "char ", ppr lbl,
-+ pprLocalness lbl, pprConstness (isSecConstant section), text "char ", ppr lbl,
- text "[] = ", pprStringInCStyle str, semi
- ]
-
--pprTop (CmmData _section (Statics lbl [CmmUninitialised size])) =
-+pprTop (CmmData section (Statics lbl [CmmUninitialised size])) =
-+ pprExternDecl lbl $$
- hcat [
-- pprLocalness lbl, text "char ", ppr lbl,
-+ pprLocalness lbl, pprConstness (isSecConstant section), text "char ", ppr lbl,
- brackets (int size), semi
- ]
-
--pprTop (CmmData _section (Statics lbl lits)) =
-+pprTop (CmmData section (Statics lbl lits)) =
- pprDataExterns lits $$
-- pprWordArray lbl lits
-+ pprWordArray (isSecConstant section) lbl lits
-
- -- --------------------------------------------------------------------------
- -- BasicBlocks are self-contained entities: they always end in a jump.
-@@ -141,10 +146,12 @@ pprBBlock block =
- -- Info tables. Just arrays of words.
- -- See codeGen/ClosureInfo, and nativeGen/PprMach
-
--pprWordArray :: CLabel -> [CmmStatic] -> SDoc
--pprWordArray lbl ds
-+pprWordArray :: Bool -> CLabel -> [CmmStatic] -> SDoc
-+pprWordArray is_ro lbl ds
- = sdocWithDynFlags $ \dflags ->
-- hcat [ pprLocalness lbl, text "StgWord"
-+ -- TODO: align closures only
-+ pprExternDecl lbl $$
-+ hcat [ pprLocalness lbl, pprConstness is_ro, text "StgWord"
- , space, ppr lbl, text "[]"
- -- See Note [StgWord alignment]
- , pprAlignment (wordWidth dflags)
-@@ -180,6 +187,10 @@ pprLocalness :: CLabel -> SDoc
- pprLocalness lbl | not $ externallyVisibleCLabel lbl = text "static "
- | otherwise = empty
-
-+pprConstness :: Bool -> SDoc
-+pprConstness is_ro | is_ro = text "const "
-+ | otherwise = empty
-+
- -- --------------------------------------------------------------------------
- -- Statements.
- --
-@@ -984,31 +995,38 @@ is_cishCC JavaScriptCallConv = False
- pprTempAndExternDecls :: [CmmBlock] -> (SDoc{-temps-}, SDoc{-externs-})
- pprTempAndExternDecls stmts
- = (pprUFM (getUniqSet temps) (vcat . map pprTempDecl),
-- vcat (map (pprExternDecl False{-ToDo-}) (Map.keys lbls)))
-+ vcat (map pprExternDecl (Map.keys lbls)))
- where (temps, lbls) = runTE (mapM_ te_BB stmts)
-
- pprDataExterns :: [CmmStatic] -> SDoc
- pprDataExterns statics
-- = vcat (map (pprExternDecl False{-ToDo-}) (Map.keys lbls))
-+ = vcat (map pprExternDecl (Map.keys lbls))
- where (_, lbls) = runTE (mapM_ te_Static statics)
-
- pprTempDecl :: LocalReg -> SDoc
- pprTempDecl l@(LocalReg _ rep)
- = hcat [ machRepCType rep, space, pprLocalReg l, semi ]
-
--pprExternDecl :: Bool -> CLabel -> SDoc
--pprExternDecl _in_srt lbl
-+pprExternDecl :: CLabel -> SDoc
-+pprExternDecl lbl
- -- do not print anything for "known external" things
- | not (needsCDecl lbl) = empty
- | Just sz <- foreignLabelStdcallInfo lbl = stdcall_decl sz
- | otherwise =
-- hcat [ visibility, label_type lbl,
-- lparen, ppr lbl, text ");" ]
-+ hcat [ visibility, label_type lbl , lparen, ppr lbl, text ");"
-+ -- occasionally useful to see label type
-+ -- , text "/* ", pprDebugCLabel lbl, text " */"
-+ ]
- where
-- label_type lbl | isBytesLabel lbl = text "B_"
-- | isForeignLabel lbl && isCFunctionLabel lbl = text "FF_"
-- | isCFunctionLabel lbl = text "F_"
-- | otherwise = text "I_"
-+ label_type lbl | isBytesLabel lbl = text "B_"
-+ | isForeignLabel lbl && isCFunctionLabel lbl
-+ = text "FF_"
-+ | isCFunctionLabel lbl = text "F_"
-+ | isStaticClosureLabel lbl = text "C_"
-+ -- generic .rodata labels
-+ | isSomeRODataLabel lbl = text "RO_"
-+ -- generic .data labels (common case)
-+ | otherwise = text "RW_"
-
- visibility
- | externallyVisibleCLabel lbl = char 'E'
-diff --git a/compiler/llvmGen/LlvmCodeGen/Data.hs b/compiler/llvmGen/LlvmCodeGen/Data.hs
-index 9bb5a75bda..adb86d312d 100644
---- a/compiler/llvmGen/LlvmCodeGen/Data.hs
-+++ b/compiler/llvmGen/LlvmCodeGen/Data.hs
-@@ -56,18 +56,6 @@ genLlvmData (sec, Statics lbl xs) = do
-
- return ([globDef], [tyAlias])
-
---- | Should a data in this section be considered constant
--isSecConstant :: Section -> Bool
--isSecConstant (Section t _) = case t of
-- Text -> True
-- ReadOnlyData -> True
-- RelocatableReadOnlyData -> True
-- ReadOnlyData16 -> True
-- CString -> True
-- Data -> False
-- UninitialisedData -> False
-- (OtherSection _) -> False
--
- -- | Format the section type part of a Cmm Section
- llvmSectionType :: Platform -> SectionType -> FastString
- llvmSectionType p t = case t of
-diff --git a/includes/Stg.h b/includes/Stg.h
-index 619984d8e5..b1b3190307 100644
---- a/includes/Stg.h
-+++ b/includes/Stg.h
-@@ -223,13 +223,23 @@ typedef StgInt I_;
- typedef StgWord StgWordArray[];
- typedef StgFunPtr F_;
-
--#define EB_(X) extern char X[]
--#define IB_(X) static char X[]
--#define EI_(X) extern StgWordArray (X) GNU_ATTRIBUTE(aligned (8))
--#define II_(X) static StgWordArray (X) GNU_ATTRIBUTE(aligned (8))
-+/* byte arrays (and strings): */
-+#define EB_(X) extern const char X[]
-+#define IB_(X) static const char X[]
-+/* static (non-heap) closures (requires alignment for pointer tagging): */
-+#define EC_(X) extern StgWordArray (X) GNU_ATTRIBUTE(aligned (8))
-+#define IC_(X) static StgWordArray (X) GNU_ATTRIBUTE(aligned (8))
-+/* writable data (does not require alignment): */
-+#define ERW_(X) extern StgWordArray (X)
-+#define IRW_(X) static StgWordArray (X)
-+/* read-only data (does not require alignment): */
-+#define ERO_(X) extern const StgWordArray (X)
-+#define IRO_(X) static const StgWordArray (X)
-+/* stg-native functions: */
- #define IF_(f) static StgFunPtr GNUC3_ATTRIBUTE(used) f(void)
--#define FN_(f) StgFunPtr f(void)
--#define EF_(f) StgFunPtr f(void) /* External Cmm functions */
-+#define FN_(f) StgFunPtr f(void)
-+#define EF_(f) StgFunPtr f(void) /* External Cmm functions */
-+/* foreign functions: */
- #define EFF_(f) void f() /* See Note [External function prototypes] */
-
- /* Note [External function prototypes] See Trac #8965, #11395
-diff --git a/includes/rts/storage/InfoTables.h b/includes/rts/storage/InfoTables.h
-index 307aac371c..163f1d1c87 100644
---- a/includes/rts/storage/InfoTables.h
-+++ b/includes/rts/storage/InfoTables.h
-@@ -266,7 +266,7 @@ typedef struct {
- } StgFunInfoTable;
-
- // canned bitmap for each arg type, indexed by constants in FunTypes.h
--extern StgWord stg_arg_bitmaps[];
-+extern const StgWord stg_arg_bitmaps[];
-
- /* -----------------------------------------------------------------------------
- Return info tables
-diff --git a/includes/stg/MiscClosures.h b/includes/stg/MiscClosures.h
-index 9d907ab3ba..b604f1c42b 100644
---- a/includes/stg/MiscClosures.h
-+++ b/includes/stg/MiscClosures.h
-@@ -21,10 +21,10 @@
- #define STGMISCCLOSURES_H
-
- #if IN_STG_CODE
--# define RTS_RET_INFO(i) extern W_(i)[]
--# define RTS_FUN_INFO(i) extern W_(i)[]
--# define RTS_THUNK_INFO(i) extern W_(i)[]
--# define RTS_INFO(i) extern W_(i)[]
-+# define RTS_RET_INFO(i) extern const W_(i)[]
-+# define RTS_FUN_INFO(i) extern const W_(i)[]
-+# define RTS_THUNK_INFO(i) extern const W_(i)[]
-+# define RTS_INFO(i) extern const W_(i)[]
- # define RTS_CLOSURE(i) extern W_(i)[]
- # define RTS_FUN_DECL(f) extern DLL_IMPORT_RTS StgFunPtr f(void)
- #else
-@@ -489,9 +489,9 @@ extern StgWord RTS_VAR(sched_mutex);
-
- // Apply.cmm
- // canned bitmap for each arg type
--extern StgWord stg_arg_bitmaps[];
--extern StgWord stg_ap_stack_entries[];
--extern StgWord stg_stack_save_entries[];
-+extern const StgWord stg_arg_bitmaps[];
-+extern const StgWord stg_ap_stack_entries[];
-+extern const StgWord stg_stack_save_entries[];
-
- // Storage.c
- extern unsigned int RTS_VAR(g0);
---
-2.12.2
-
diff --git a/dev-lang/ghc/files/ghc-8.2.1_rc1-ghci-cross.patch b/dev-lang/ghc/files/ghc-8.2.1_rc1-ghci-cross.patch
deleted file mode 100644
index dbba18e85c7f..000000000000
--- a/dev-lang/ghc/files/ghc-8.2.1_rc1-ghci-cross.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-commit 732b3dbbff194eb8650c75afd79d892801afa0dc
-Author: Sergei Trofimovich <slyfox@gentoo.org>
-Date: Thu Apr 6 22:48:13 2017 +0100
-
- add $(CrossCompilePrefix) to 'runghc' and 'ghci'
-
- When Stage1Only=YES install mode is used one of rare tools
- that lack $(CrossCompilePrefix) prefix are 'runghc' and 'ghci'.
-
- This causes file collisions when multiple GHC crosscompilers
- are installed in system.
-
- Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-
-diff --git a/driver/ghci/ghc.mk b/driver/ghci/ghc.mk
-index 41d1f15c17..0f31884080 100644
---- a/driver/ghci/ghc.mk
-+++ b/driver/ghci/ghc.mk
-@@ -16,16 +16,16 @@ ifneq "$(Windows_Host)" "YES"
- install: install_driver_ghci
-
- .PHONY: install_driver_ghci
--install_driver_ghci: WRAPPER=$(DESTDIR)$(bindir)/ghci-$(ProjectVersion)
-+install_driver_ghci: WRAPPER=$(DESTDIR)$(bindir)/$(CrossCompilePrefix)ghci-$(ProjectVersion)
- install_driver_ghci:
- $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
- $(call removeFiles, "$(WRAPPER)")
- $(CREATE_SCRIPT) "$(WRAPPER)"
- echo '#!$(SHELL)' >> "$(WRAPPER)"
-- echo 'exec "$(bindir)/ghc-$(ProjectVersion)" --interactive "$$@"' >> "$(WRAPPER)"
-+ echo 'exec "$(bindir)/$(CrossCompilePrefix)ghc-$(ProjectVersion)" --interactive "$$@"' >> "$(WRAPPER)"
- $(EXECUTABLE_FILE) "$(WRAPPER)"
-- $(call removeFiles,"$(DESTDIR)$(bindir)/ghci")
-- $(LN_S) ghci-$(ProjectVersion) "$(DESTDIR)$(bindir)/ghci"
-+ $(call removeFiles,"$(DESTDIR)$(bindir)/$(CrossCompilePrefix)ghci")
-+ $(LN_S) $(CrossCompilePrefix)ghci-$(ProjectVersion) "$(DESTDIR)$(bindir)/$(CrossCompilePrefix)ghci"
-
- else # Windows_Host...
-
-diff --git a/utils/runghc/ghc.mk b/utils/runghc/ghc.mk
-index 9169ca21bd..50b11a612e 100644
---- a/utils/runghc/ghc.mk
-+++ b/utils/runghc/ghc.mk
-@@ -34,11 +34,11 @@ install: install_runhaskell
- .PHONY: install_runhaskell
- ifeq "$(Windows_Host)" "YES"
- install_runhaskell: install_bins
-- "$(CP)" $(DESTDIR)$(bindir)/runghc$(exeext1) $(DESTDIR)$(bindir)/runhaskell$(exeext1)
-+ "$(CP)" $(DESTDIR)$(bindir)/$(CrossCompilePrefix)runghc$(exeext1) $(DESTDIR)$(bindir)/$(CrossCompilePrefix)runhaskell$(exeext1)
- else
- install_runhaskell:
-- $(call removeFiles,"$(DESTDIR)$(bindir)/runhaskell")
-- $(LN_S) runghc "$(DESTDIR)$(bindir)/runhaskell"
-- $(call removeFiles,"$(DESTDIR)$(bindir)/runghc")
-- $(LN_S) runghc-$(ProjectVersion) "$(DESTDIR)$(bindir)/runghc"
-+ $(call removeFiles,"$(DESTDIR)$(bindir)/$(CrossCompilePrefix)runhaskell")
-+ $(LN_S) $(CrossCompilePrefix)runghc "$(DESTDIR)$(bindir)/$(CrossCompilePrefix)runhaskell"
-+ $(call removeFiles,"$(DESTDIR)$(bindir)/$(CrossCompilePrefix)runghc")
-+ $(LN_S) $(CrossCompilePrefix)runghc-$(ProjectVersion) "$(DESTDIR)$(bindir)/$(CrossCompilePrefix)runghc"
- endif
diff --git a/dev-lang/ghc/files/ghc-8.2.1_rc1-stage2-cross.patch b/dev-lang/ghc/files/ghc-8.2.1_rc1-stage2-cross.patch
deleted file mode 100644
index 1439d722fef4..000000000000
--- a/dev-lang/ghc/files/ghc-8.2.1_rc1-stage2-cross.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-commit 54895c90440cb81f18657537b91f2aa35bd54173
-Author: Sergei Trofimovich <slyfox@gentoo.org>
-Date: Fri Apr 7 10:08:58 2017 +0100
-
- fix 'make install' for cross-stage2
-
- When cross-built GHC is being installed one of
- latest steps is to register installed libraries
- with 'ghc-pkg'.
-
- GHC uses freshly installed 'ghc-pkg' and 'ghc-stage2'
- for that.
-
- Tested as:
- ./configure --target=aarch64-unknown-linux-gnu
- make install DESTDIR=$(pwd)/__s2 STRIP_CMD=:
-
- Before the change install failed on ghc-pkg execution phase:
-
- ".../ghc-cross/__s2/usr/local/lib/ghc-8.3.20170406/bin/ghc-pkg" \
- --force \
- --global-package-db \
- ".../ghc-cross/__s2/usr/local/lib/ghc-8.3.20170406/package.conf.d" \
- update rts/dist/package.conf.install
- /bin/sh: .../ghc-cross/__s2/usr/local/lib/ghc-8.3.20170406/bin/ghc-pkg: \
- No such file or directory
-
- To avoid breakage we use 'ghc' and 'ghc-pkg' built by stage0.
-
- Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-
- Test Plan: run 'make install' on stage2 crosscompiler
-
- Reviewers: rwbarton, austin, bgamari
-
- Subscribers: thomie, snowleopard
-
- Differential Revision: https://phabricator.haskell.org/D3432
-
-diff --git a/ghc.mk b/ghc.mk
-index caa6c38fbb..8971f25981 100644
---- a/ghc.mk
-+++ b/ghc.mk
-@@ -962,6 +962,12 @@ endif
-
- INSTALLED_PACKAGE_CONF=$(DESTDIR)$(topdir)/package.conf.d
-
-+ifeq "$(CrossCompiling)" "YES"
-+# when installing ghc-stage2 we can't run target's
-+# 'ghc-pkg' and 'ghc-stage2' but those are needed for registration.
-+INSTALLED_GHC_REAL=$(TOP)/inplace/bin/ghc-stage1
-+INSTALLED_GHC_PKG_REAL=$(TOP)/$(ghc-pkg_DIST_BINARY)
-+else # CrossCompiling
- # Install packages in the right order, so that ghc-pkg doesn't complain.
- # Also, install ghc-pkg first.
- ifeq "$(Windows_Host)" "NO"
-@@ -971,6 +977,7 @@ else
- INSTALLED_GHC_REAL=$(DESTDIR)$(bindir)/ghc.exe
- INSTALLED_GHC_PKG_REAL=$(DESTDIR)$(bindir)/ghc-pkg.exe
- endif
-+endif # CrossCompiling
-
- # Set the INSTALL_DISTDIR_p for each package; compiler is special
- $(foreach p,$(filter-out compiler,$(INSTALL_PACKAGES)),\
-diff --git a/utils/ghc-pkg/ghc.mk b/utils/ghc-pkg/ghc.mk
-index 002c8122f2..4d5ef4e108 100644
---- a/utils/ghc-pkg/ghc.mk
-+++ b/utils/ghc-pkg/ghc.mk
-@@ -49,6 +49,12 @@ utils/ghc-pkg_dist_PROGNAME = ghc-pkg
- utils/ghc-pkg_dist_SHELL_WRAPPER = YES
- utils/ghc-pkg_dist_INSTALL_INPLACE = YES
-
-+# When cross-built ghc-stage2 is installed 'make install' needs to call
-+# native ghc-pkg (not the cross-built one) to register installed packages
-+# 'ghc-pkg_DIST_BINARY' variable only refer to native binary.
-+ghc-pkg_DIST_BINARY_NAME = ghc-pkg$(exeext0)
-+ghc-pkg_DIST_BINARY = utils/ghc-pkg/dist/build/tmp/$(ghc-pkg_DIST_BINARY_NAME)
-+
- # See Note [Stage1Only vs stage=1] in mk/config.mk.in.
- ifeq "$(Stage1Only)" "YES"
- # Install the copy of ghc-pkg from the dist directory when running 'make
diff --git a/dev-lang/ghc/files/ghc-8.2.1_rc1-staged-cross.patch b/dev-lang/ghc/files/ghc-8.2.1_rc1-staged-cross.patch
deleted file mode 100644
index 7e4ea7a9f610..000000000000
--- a/dev-lang/ghc/files/ghc-8.2.1_rc1-staged-cross.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-commit f2685df3b10e13f142736f28835e9064334bc143
-Author: Sergei Trofimovich <slyfox@gentoo.org>
-Date: Wed Apr 5 22:31:37 2017 +0100
-
- avoid $(CrossCompilerPrefix) for stage2 install
-
- Suppose we are crossbuilding ghc (when ghc-stage2
- is a normal compiler for $target):
-
- For this case 'make install' should install unprefixed
- stage2 'ghc' and not '$(CorssCompilePrefix)-ghc'.
-
- That way cross-built ghc is installable and
- usable on target as if it would be built natively
- on a target.
-
- Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-
-diff --git a/mk/config.mk.in b/mk/config.mk.in
-index 4d5d82aa80..5e274bb71f 100644
---- a/mk/config.mk.in
-+++ b/mk/config.mk.in
-@@ -530,7 +530,7 @@ SUPPORTS_THIS_UNIT_ID = @SUPPORTS_THIS_UNIT_ID@
- # needs to know which gcc you're using in order to perform its tests.
-
- GccVersion = @GccVersion@
--CrossCompilePrefix = @CrossCompilePrefix@
-+
- # TargetPlatformFull retains the string passed to configure so we have it in
- # the necessary format to pass to libffi's configure.
- TargetPlatformFull = @TargetPlatformFull@
-@@ -567,6 +567,11 @@ CrossCompiling = @CrossCompiling@
- # See Note [Stage1Only vs stage=1]
- Stage1Only = NO
-
-+# Installed tools prefix:
-+# we add prefix to crosscompiler GHC only (ghc-stage1),
-+# not cross-built GHC (not ghc-stage2).
-+CrossCompilePrefix = $(if $(filter YES,$(Stage1Only)),@CrossCompilePrefix@,)
-+
- # Install stage 2 by default, or stage 1 in the cross compiler
- # case. Can be changed to 3
- INSTALL_GHC_STAGE= $(if $(filter YES,$(Stage1Only)),1,2)
diff --git a/dev-lang/ghc/files/ghc-8.2.1_rc1-unphased-cross.patch b/dev-lang/ghc/files/ghc-8.2.1_rc1-unphased-cross.patch
deleted file mode 100644
index a5528956de14..000000000000
--- a/dev-lang/ghc/files/ghc-8.2.1_rc1-unphased-cross.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-commit 6ff98b962db15d18eb1d082fe344cef692ecef8e
-Author: Sergei Trofimovich <slyfox@gentoo.org>
-Date: Thu Apr 6 08:55:56 2017 +0100
-
- config.mk.in: remove phase=0 hack for CrossCompilePrefix
-
- $(CrossCompilePrefix) is used only in 'make install'
- target filenames in $(DESTDIR). None of inplace (or boot)
- files contain $(CrossCompilePrefix).
-
- Thus we don't need to worry about phases.
-
- Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-
-diff --git a/mk/config.mk.in b/mk/config.mk.in
-index 4e61eea821..4d5d82aa80 100644
---- a/mk/config.mk.in
-+++ b/mk/config.mk.in
-@@ -530,11 +530,7 @@ SUPPORTS_THIS_UNIT_ID = @SUPPORTS_THIS_UNIT_ID@
- # needs to know which gcc you're using in order to perform its tests.
-
- GccVersion = @GccVersion@
--ifeq "$(phase)" "0"
--CrossCompilePrefix =
--else
- CrossCompilePrefix = @CrossCompilePrefix@
--endif
- # TargetPlatformFull retains the string passed to configure so we have it in
- # the necessary format to pass to libffi's configure.
- TargetPlatformFull = @TargetPlatformFull@
diff --git a/dev-lang/ghc/files/ghc-8.2.1_rc1-win32-cross-1.patch b/dev-lang/ghc/files/ghc-8.2.1_rc1-win32-cross-1.patch
deleted file mode 100644
index 79751e1ecbda..000000000000
--- a/dev-lang/ghc/files/ghc-8.2.1_rc1-win32-cross-1.patch
+++ /dev/null
@@ -1,124 +0,0 @@
-commit a691f6a7a191a268380805481d8e63134764a4a1
-Author: Sergei Trofimovich <slyfox@inbox.ru>
-Date: Sat Apr 29 22:02:24 2017 +0100
-
- add basic cross-compilation support (#87)
-
- * fix include case: s/#include <Lmcons.h>/#include <lmcons.h>
-
- Noticed when cross-compiling win32 on linux to i686-w64-mingw32-gcc.
- i686-w64-mingw32 provides all headers in lowercase.
-
- Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-
- * Pen.hsc: don't use c99-style comments in enum declarations
-
- Ths change workarounds hsc2hs bug in cross-compile mode:
- https://ghc.haskell.org/trac/ghc/ticket/13619
-
- To reproduce the build failure it's enough to run
- $ cabal configure --hsc2hs-options='--cross-safe --cross-compile'
- $ cabal build --hsc2hs-options='--cross-safe --cross-compile'
-
- Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-
- * SimpleMAPI.hsc: don't use #ifdef in enum declarations
-
- This change workarounds hsc2hs bug in cross-compile mode:
- https://ghc.haskell.org/trac/ghc/ticket/13620
-
- To reproduce the build failure it's enough to run
- $ cabal configure --hsc2hs-options='--cross-safe --cross-compile'
- $ cabal build --hsc2hs-options='--cross-safe --cross-compile'
-
- Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-
-diff --git a/Graphics/Win32/GDI/Pen.hsc b/Graphics/Win32/GDI/Pen.hsc
-index c880170..8d8df5d 100644
---- a/Graphics/Win32/GDI/Pen.hsc
-+++ b/Graphics/Win32/GDI/Pen.hsc
-@@ -56,7 +56,7 @@ foreign import WINDOWS_CCONV unsafe "windows.h DeleteObject"
-
- type PenStyle = INT
-
--#{enum PenStyle, // Pick one of these
-+#{enum PenStyle,
- , pS_SOLID = PS_SOLID // default
- , pS_DASH = PS_DASH // -------
- , pS_DOT = PS_DOT // .......
-@@ -69,14 +69,14 @@ type PenStyle = INT
- , pS_STYLE_MASK = PS_STYLE_MASK // all the above
- }
-
--#{enum PenStyle , // "or" with one of these
-+#{enum PenStyle,
- , pS_ENDCAP_ROUND = PS_ENDCAP_ROUND // default
- , pS_ENDCAP_SQUARE = PS_ENDCAP_SQUARE
- , pS_ENDCAP_FLAT = PS_ENDCAP_FLAT
- , pS_ENDCAP_MASK = PS_ENDCAP_MASK // all the above
- }
-
--#{enum PenStyle, // "or" with one of these
-+#{enum PenStyle,
- , pS_JOIN_ROUND = PS_JOIN_ROUND // default
- , pS_JOIN_BEVEL = PS_JOIN_BEVEL
- , pS_JOIN_MITER = PS_JOIN_MITER
-@@ -87,7 +87,7 @@ If PS_JOIN_MASK is not defined with your GNU Windows32 header files,
- you'll have to define it.
- -}
-
--#{enum PenStyle, // "or" with one of these
-+#{enum PenStyle,
- , pS_COSMETIC = PS_COSMETIC // default
- , pS_GEOMETRIC = PS_GEOMETRIC
- , pS_TYPE_MASK = PS_TYPE_MASK // all the above
-diff --git a/System/Win32/Info/Computer.hsc b/System/Win32/Info/Computer.hsc
-index bb2eb72..65ae8dc 100644
---- a/System/Win32/Info/Computer.hsc
-+++ b/System/Win32/Info/Computer.hsc
-@@ -65,7 +65,7 @@ import System.Win32.Utils ( tryWithoutNull )
- import System.Win32.Word ( DWORD, LPDWORD )
-
- #include <windows.h>
--#include <Lmcons.h>
-+#include <lmcons.h>
- #include "alignment.h"
- ##include "windows_cconv.h"
-
-diff --git a/System/Win32/SimpleMAPI.hsc b/System/Win32/SimpleMAPI.hsc
-index 9727cfc..5ebf06b 100644
---- a/System/Win32/SimpleMAPI.hsc
-+++ b/System/Win32/SimpleMAPI.hsc
-@@ -53,12 +53,6 @@ type MapiFlag = ULONG
- , mAPI_LOGON_UI = MAPI_LOGON_UI
- , mAPI_NEW_SESSION = MAPI_NEW_SESSION
- , mAPI_FORCE_DOWNLOAD = MAPI_FORCE_DOWNLOAD
--#ifdef MAPI_LOGOFF_SHARED
-- , mAPI_LOGOFF_SHARED = MAPI_LOGOFF_SHARED
--#endif
--#ifdef MAPI_LOGOFF_UI
-- , mAPI_LOGOFF_UI = MAPI_LOGOFF_UI
--#endif
- , mAPI_DIALOG = MAPI_DIALOG
- , mAPI_UNREAD_ONLY = MAPI_UNREAD_ONLY
- , mAPI_LONG_MSGID = MAPI_LONG_MSGID
-@@ -74,6 +68,19 @@ type MapiFlag = ULONG
- , mAPI_RECEIPT_REQUESTED = MAPI_RECEIPT_REQUESTED
- , mAPI_SENT = MAPI_SENT
- }
-+-- Have to define enum values outside previous declaration due to
-+-- hsc2hs bug in --cross-compile mode:
-+-- https://ghc.haskell.org/trac/ghc/ticket/13620
-+#ifdef MAPI_LOGOFF_SHARED
-+#{enum MapiFlag,
-+ , mAPI_LOGOFF_SHARED = MAPI_LOGOFF_SHARED
-+}
-+#endif
-+#ifdef MAPI_LOGOFF_UI
-+#{enum MapiFlag,
-+ , mAPI_LOGOFF_UI = MAPI_LOGOFF_UI
-+}
-+#endif
-
- mapiErrors :: [(ULONG,String)]
- mapiErrors =
diff --git a/dev-lang/ghc/files/ghc-8.2.1_rc2-O2-unreg.patch b/dev-lang/ghc/files/ghc-8.2.1_rc2-O2-unreg.patch
deleted file mode 100644
index 00f9ca4fdff9..000000000000
--- a/dev-lang/ghc/files/ghc-8.2.1_rc2-O2-unreg.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-ghc -O2 generates too large C files for unregisterised compiler.
-On ia64 it causes DynFlags to compile for 60 minutes (then assembler
-crashes).
-
-To decrease C code inflation we don't use -O2 in UNREG mode.
-diff --git a/mk/config.mk.in b/mk/config.mk.in
-index 4e61eea..15a56e9 100644
---- a/mk/config.mk.in
-+++ b/mk/config.mk.in
-@@ -72,11 +72,2 @@ GhcStage3HcOpts=-O2
-
--# Disable -O2 optimization. Otherwise amount of generated C code
--# makes things very slow to compile (~5 minutes on core-i7 for 'compiler/hsSyn/HsExpr.hs')
--# and sometimes not compile at all (powerpc64 overflows something
--# on 'compiler/hsSyn/HsExpr.hs').
--ifeq "$(GhcUnregisterised)" "YES"
--GhcStage1HcOpts=
--GhcStage2HcOpts=
--GhcStage3HcOpts=
--endif
-
-@@ -904 +895,13 @@ CURSES_INCLUDE_DIRS = @CURSES_INCLUDE_DIRS@
- CURSES_LIB_DIRS = @CURSES_LIB_DIRS@
-+
-+# Disable -O2 optimization. Otherwise amount of generated C code
-+# makes things very slow to compile (~5 minutes on core-i7 for 'compiler/hsSyn/HsExpr.hs')
-+# and sometimes not compile at all (powerpc64 overflows something
-+# on 'compiler/hsSyn/HsExpr.hs').
-+ifeq "$(GhcUnregisterised)" "YES"
-+GhcStage1HcOpts=
-+GhcStage2HcOpts=
-+GhcStage3HcOpts=
-+
-+GhcLibHcOpts=
-+endif
diff --git a/dev-lang/ghc/files/ghc-8.2.1_rc3-any-vendor.patch b/dev-lang/ghc/files/ghc-8.2.1_rc3-any-vendor.patch
deleted file mode 100644
index b55e37a8bf94..000000000000
--- a/dev-lang/ghc/files/ghc-8.2.1_rc3-any-vendor.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From c2303dff95aa174021a1950656fdf9a1cf983959 Mon Sep 17 00:00:00 2001
-From: Sergei Trofimovich <slyfox@gentoo.org>
-Date: Sat, 8 Jul 2017 09:47:12 +0100
-Subject: [PATCH] aclocal.m4: allow arbitrary <vendor> string in toolchain
- triplets
-
-Canonical triplets have a form of
- <arch>-<vendor>-<os>[-<abi>]
-
-Checking for vendor is almost never correct as it's an
-arbitrary string.
-
-It's useful to have multiple "vendors" to denote
-otherwise the same (WRT <arch>, <os>, <abi>) target:
- --target=x86_64-pc-linux-gnu
- --target=x86_64-unknown-linux-gnu
- --target=x86_64-ghc80-linux-gnu
- --target=x86_64-ghchead-linux-gnu
-
-Do not fail unknown vendors. Only emit a warning.
-Ideally configure checks should never use "vendor".
-
-Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
----
- aclocal.m4 | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/aclocal.m4 b/aclocal.m4
-index 001f813dfc..1d9c09b0cd 100644
---- a/aclocal.m4
-+++ b/aclocal.m4
-@@ -230,8 +230,7 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_VARS],
- dec|none|unknown|hp|apple|next|sun|sgi|ibm|montavista|portbld)
- ;;
- *)
-- echo "Unknown vendor [$]1"
-- exit 1
-+ AC_MSG_WARN([Unknown vendor [$]1])
- ;;
- esac
- }
---
-2.13.3
-
diff --git a/dev-lang/ghc/files/ghc-8.2.1_rc3-stginit-data.patch b/dev-lang/ghc/files/ghc-8.2.1_rc3-stginit-data.patch
deleted file mode 100644
index 81e751d778c8..000000000000
--- a/dev-lang/ghc/files/ghc-8.2.1_rc3-stginit-data.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Fix label type for __stginit_* labels: those are .data labels, not .text
-
-Noticed when was building --enable-unregisterised build for x86_64:
-
-/tmp/ghc22931_0/ghc_3.hc:5:9: error:
- error: '__stginit_ghczmprim_GHCziTypes' redeclared as different kind of symbol
- StgWord __stginit_ghczmprim_GHCziTypes[]__attribute__((aligned(8)))= {
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- |
-5 | StgWord __stginit_ghczmprim_GHCziTypes[]__attribute__((aligned(8)))= {
- | ^
-
-In file included from /tmp/ghc22931_0/ghc_3.hc:3:0: error:
-
-/tmp/ghc22931_0/ghc_3.hc:4:5: error:
- note: previous declaration of '__stginit_ghczmprim_GHCziTypes' was here
- EF_(__stginit_ghczmprim_GHCziTypes);
- ^
-diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs
-index 77a889a..05d71ab 100644
---- a/compiler/cmm/CLabel.hs
-+++ b/compiler/cmm/CLabel.hs
-@@ -956,3 +956,3 @@ labelType (CaseLabel _ CaseReturnInfo) = DataLabel
- labelType (CaseLabel _ _) = CodeLabel
--labelType (PlainModuleInitLabel _) = CodeLabel
-+labelType (PlainModuleInitLabel _) = DataLabel
- labelType (SRTLabel _) = DataLabel
diff --git a/dev-lang/ghc/files/ghc-8.8.1-no-alex.patch b/dev-lang/ghc/files/ghc-8.8.1-no-alex.patch
deleted file mode 100644
index 39b6eeedd566..000000000000
--- a/dev-lang/ghc/files/ghc-8.8.1-no-alex.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-https://github.com/gentoo-haskell/gentoo-haskell/issues/959
-
-From 144abba394c6a23eb877fbde727111a5e75b9d47 Mon Sep 17 00:00:00 2001
-From: Ben Gamari <ben@smart-cactus.org>
-Date: Wed, 18 Sep 2019 23:50:20 -0400
-Subject: [PATCH] configure: Don't depend upon alex in source dist build
-
-This fixes #16860 by verifying that the generated sources don't already
-exist before asserting that the `alex` executable was found. This
-replicates the logic already used for `happy` in the case of `alex`.
----
- aclocal.m4 | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
---- a/aclocal.m4
-+++ b/aclocal.m4
-@@ -984,8 +984,11 @@ else
- fi;
- changequote([, ])dnl
- ])
--FP_COMPARE_VERSIONS([$fptools_cv_alex_version],[-lt],[3.1.7],
-- [AC_MSG_ERROR([Alex version 3.1.7 or later is required to compile GHC.])])[]
-+if test ! -f compiler/parser/Lexer.hs
-+then
-+ FP_COMPARE_VERSIONS([$fptools_cv_alex_version],[-lt],[3.1.7],
-+ [AC_MSG_ERROR([Alex version 3.1.7 or later is required to compile GHC.])])[]
-+fi
- AlexVersion=$fptools_cv_alex_version;
- AC_SUBST(AlexVersion)
- ])
---
-2.23.0
-
diff --git a/dev-lang/ghc/ghc-7.10.3.ebuild b/dev-lang/ghc/ghc-7.10.3.ebuild
deleted file mode 100644
index 590b6e0a913d..000000000000
--- a/dev-lang/ghc/ghc-7.10.3.ebuild
+++ /dev/null
@@ -1,674 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-#
-# 'CTARGET' definition and 'is_crosscompile' are taken from 'toolchain.eclass'
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
- if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- export CTARGET=${CATEGORY/cross-}
- fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib pax-utils toolchain-funcs versionator prefix
-
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-# 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}-arm.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PVR}-amd64.tbz2 )"
-arch_binaries="$arch_binaries ia64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64.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 sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PVR}-x86.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
- case "${ARCH}" in
- alpha) return 0 ;;
- #arm)
- # ewarn "ARM binary is built on armv5tel-eabi toolchain. Use with caution."
- # return 0
- #;;
- amd64) return 0 ;;
- ia64) return 0 ;;
- ppc) return 0 ;;
- ppc64) return 0 ;;
- sparc) return 0 ;;
- x86) return 0 ;;
- *) return 1 ;;
- esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=7.10.2.20151030 # uncomment only for -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? ( https://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.bz2 )"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
- # "hackage-name hackage-version"
- "binary 0.7.6.1"
- "hoopl 3.10.2.0"
- "transformers 0.4.3.0"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="doc ghcbootstrap ghcmakebinary +gmp"
-IUSE+=" binary"
-IUSE+=" elibc_glibc" # system stuff
-
-RDEPEND="
- >=dev-lang/perl-5.6.1
- >=dev-libs/gmp-5:=
- sys-libs/ncurses:0=[unicode]
- !ghcmakebinary? ( dev-libs/libffi:= )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-# utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
- !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
- sys-libs/ncurses-compat:5
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}
- doc? ( app-text/docbook-xml-dtd:4.2
- app-text/docbook-xml-dtd:4.5
- app-text/docbook-xsl-stylesheets
- >=dev-libs/libxslt-1.1.2 )
- !ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
-
-REQUIRED_USE="?? ( ghcbootstrap binary )"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-# returns tool prefix for crosscompiler.
-# Example:
-# CTARGET=armv7a-unknown-linux-gnueabi
-# CHOST=x86_64-pc-linux-gnu
-# "armv7a-unknown-linux-gnueabi-"
-# CTARGET=${CHOST}
-# ""
-# Used in tools and library prefix:
-# "${ED}"/usr/bin/$(cross)haddock
-# "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
- if is_crosscompile; then
- echo "${CTARGET}-"
- else
- echo ""
- fi
-}
-
-append-ghc-cflags() {
- local persistent compile assemble link
- local flag ghcflag
-
- for flag in $*; do
- case ${flag} in
- persistent) persistent="yes";;
- compile) compile="yes";;
- assemble) assemble="yes";;
- link) link="yes";;
- *)
- [[ ${compile} ]] && ghcflag="-optc${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${assemble} ]] && ghcflag="-opta${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${link} ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- ;;
- esac
- done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
- local pn=$1 pv=$2
- local p=${pn}-${pv}
- local f
-
- einfo "Bumping ${pn} up to ${pv}"
-
- for f in ghc.mk GNUmakefile; do
- mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
- done
- mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
- mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
- local p pn pv
- for p in "${BUMP_LIBRARIES[@]}"; do
- set -- $p
- pn=$1 pv=$2
-
- SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
- done
-}
-
-update_SRC_URI
-
-bump_libs() {
- local p pn pv
- for p in "${BUMP_LIBRARIES[@]}"; do
- set -- $p
- pn=$1 pv=$2
-
- bump_lib "${pn}" "${pv}"
- done
-}
-
-ghc_setup_cflags() {
- if is_crosscompile; then
- export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
- export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
- einfo "Crosscompiling mode:"
- einfo " CHOST: ${CHOST}"
- einfo " CTARGET: ${CTARGET}"
- einfo " CFLAGS: ${CFLAGS}"
- einfo " LDFLAGS: ${LDFLAGS}"
- einfo " prefix: $(cross)"
- return
- fi
- # We need to be very careful with the CFLAGS we ask ghc to pass through to
- # gcc. There are plenty of flags which will make gcc produce output that
- # breaks ghc in various ways. The main ones we want to pass through are
- # -mcpu / -march flags. These are important for arches like alpha & sparc.
- # We also use these CFLAGS for building the C parts of ghc, ie the rts.
- strip-flags
- strip-unsupported-flags
-
- # Cmm can't parse line numbers #482086
- replace-flags -ggdb[3-9] -ggdb2
-
- GHC_FLAGS=""
- GHC_PERSISTENT_FLAGS=""
- for flag in ${CFLAGS}; do
- case ${flag} in
-
- # Ignore extra optimisation (ghc passes -O to gcc anyway)
- # -O2 and above break on too many systems
- -O*) ;;
-
- # Arch and ABI flags are what we're really after
- -m*) append-ghc-cflags compile assemble ${flag};;
-
- # Sometimes it's handy to see backtrace of RTS
- # to get an idea what happens there
- -g*) append-ghc-cflags compile ${flag};;
-
- # Ignore all other flags, including all -f* flags
- esac
- done
-
- for flag in ${LDFLAGS}; do
- append-ghc-cflags link ${flag}
- done
-
- # hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
- # are not built with fPIC, bug #606666
- gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
- tc-is-gcc && version_is_at_least 6.3 $(gcc-version) && if ! use ghcbootstrap; then
- # gcc-6.3 has support for -no-pie upstream, but spelling differs from
- # gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
- # hardened users try '-pie' in USE=ghcbootstrap mode.
- append-ghc-cflags compile link -no-pie
- fi
- gcc-specs-ssp && append-ghc-cflags persistent compile -fno-stack-protector
-
- # prevent from failind building unregisterised ghc:
- # https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
- use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
- # fix the similar issue as ppc64 TOC on ia64. ia64 has limited size of small data
- # currently ghc fails to build haddock
- # https://osdir.com/ml/gnu.binutils.bugs/2004-10/msg00050.html
- use ia64 && append-ghc-cflags persistent compile -G0
-}
-
-# substitutes string $1 to $2 in files $3 $4 ...
-relocate_path() {
- local from=$1
- local to=$2
- shift 2
- local file=
- for file in "$@"
- do
- sed -i -e "s|$from|$to|g" \
- "$file" || die "path relocation failed for '$file'"
- done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
- local to=$1
-
- # libdir for prebuilt binary and for current system may mismatch
- # It does for prefix installation for example: bug #476998
- local bin_ghc_prefix=${WORKDIR}/usr
- local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
- local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
- # backup original script to use it later after relocation
- local gp_back="${T}/ghc-pkg-${GHC_PV}-orig"
- cp "${WORKDIR}/usr/bin/$(cross)ghc-pkg-${GHC_PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
- if [[ ${bin_libdir} != $(get_libdir) ]]; then
- einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
- # moving the dir itself is not strictly needed
- # but then USE=binary would result in installing
- # in '${bin_libdir}'
- mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
- relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
- "${WORKDIR}/usr/bin/$(cross)ghc-${GHC_PV}" \
- "${WORKDIR}/usr/bin/$(cross)ghci-${GHC_PV}" \
- "${WORKDIR}/usr/bin/$(cross)ghc-pkg-${GHC_PV}" \
- "${WORKDIR}/usr/bin/$(cross)hsc2hs" \
- "${WORKDIR}/usr/bin/$(cross)runghc-${GHC_PV}" \
- "$gp_back" \
- "${WORKDIR}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/"*
- fi
-
- # Relocate from /usr to ${EPREFIX}/usr
- relocate_path "/usr" "${to}/usr" \
- "${WORKDIR}/usr/bin/$(cross)ghc-${GHC_PV}" \
- "${WORKDIR}/usr/bin/$(cross)ghci-${GHC_PV}" \
- "${WORKDIR}/usr/bin/$(cross)ghc-pkg-${GHC_PV}" \
- "${WORKDIR}/usr/bin/$(cross)hsc2hs" \
- "${WORKDIR}/usr/bin/$(cross)runghc-${GHC_PV}" \
- "${WORKDIR}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/"*
-
- # this one we will use to regenerate cache
- # so it should point to current tree location
- relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
- if use prefix; then
- hprefixify "${bin_libpath}"/${PN}*/settings
- fi
-
- # regenerate the binary package cache
- "$gp_back" recache || die "failed to update cache after relocation"
- rm "$gp_back"
-}
-
-pkg_setup() {
- # quiet portage about prebuilt binaries
- use binary && QA_PREBUILT="*"
-
- [[ ${MERGE_TYPE} == binary ]] && return
-
- if use ghcbootstrap; then
- ewarn "You requested ghc bootstrapping, this is usually only used"
- ewarn "by Gentoo developers to make binary .tbz2 packages."
-
- [[ -z $(type -P ghc) ]] && \
- die "Could not find a ghc to bootstrap with."
- else
- if ! yet_binary; then
- eerror "Please try emerging with USE=ghcbootstrap and report build"
- eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
- die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
- fi
- fi
-}
-
-src_unpack() {
- # Create the ${S} dir if we're using the binary version
- use binary && mkdir "${S}"
-
- # the Solaris and Darwin binaries from ghc (maeder) need to be
- # unpacked separately, so prevent them from being unpacked
- local ONLYA=${A}
- case ${CHOST} in
- *-darwin* | *-solaris*) ONLYA=${GHC_P}-src.tar.bz2 ;;
- esac
- unpack ${ONLYA}
-
- if [[ -d "${S}"/libraries/dph ]]; then
- # Sometimes dph libs get accidentally shipped with ghc
- # but they are not installed unless user requests it.
- # We never install them.
- elog "Removing 'libraries/dph'"
- rm -rf "${S}"/libraries/dph
- fi
-}
-
-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/$(cross)ghc-${GHC_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)/$(cross)${GHC_P}/bin/ghc"
- fi
-
- if use binary; then
- if use prefix; then
- relocate_ghc "${EPREFIX}"
- fi
-
- # Move unpacked files to the expected place
- mv "${WORKDIR}/usr" "${S}"
- else
- if ! use ghcbootstrap; then
- case ${CHOST} in
- *-darwin* | *-solaris*)
- # UPDATE ME for ghc-7
- mkdir "${WORKDIR}"/ghc-bin-installer || die
- pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
- use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
- use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
- use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
- popd > /dev/null
-
- pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
- # fix the binaries so they run, on Solaris we need an
- # LD_LIBRARY_PATH which has our prefix libdirs, on
- # Darwin we need to replace the frameworks with our libs
- # from the prefix fix before installation, because some
- # of the tools are actually used during configure/make
- if [[ ${CHOST} == *-solaris* ]] ; then
- export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
- elif [[ ${CHOST} == *-darwin* ]] ; then
- local readline_framework=GNUreadline.framework/GNUreadline
- local gmp_framework=/opt/local/lib/libgmp.10.dylib
- local ncurses_file=/opt/local/lib/libncurses.5.dylib
- for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
- install_name_tool -change \
- ${readline_framework} \
- "${EPREFIX}"/lib/libreadline.dylib \
- ${binary} || die
- install_name_tool -change \
- ${gmp_framework} \
- "${EPREFIX}"/usr/lib/libgmp.dylib \
- ${binary} || die
- install_name_tool -change \
- ${ncurses_file} \
- "${EPREFIX}"/usr/lib/libncurses.dylib \
- ${binary} || die
- done
- # we don't do frameworks!
- sed -i \
- -e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
- -e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
- rts/package.conf.in || die
- fi
-
- # it is autoconf, but we really don't want to give it too
- # much arguments, in fact we do the make in-place anyway
- ./configure --prefix="${WORKDIR}"/usr || die
- make install || die
- popd > /dev/null
- ;;
- *)
- relocate_ghc "${WORKDIR}"
- ;;
- esac
- fi
-
- sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
- "${S}/ghc/ghc.wrapper"
-
- cd "${S}" # otherwise epatch will break
-
- epatch "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
-
- epatch "${FILESDIR}"/${PN}-7.8.2-cgen-constify.patch
- epatch "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
- epatch "${FILESDIR}"/${PN}-7.10.1-rc3-ghc-7.10-bootstrap.patch
- epatch "${FILESDIR}"/${PN}-7.10.3-relnotes.patch
- epatch "${FILESDIR}"/${PN}-7.10.3-hardfloat.patch
-
- # Since ${S}/packages does not include base, etc. add them to gen_contents_index
- sed -e 's@\(for REPO in .*\)@\1 base integer-gmp integer-gmp2 integer-simple template-haskell@' \
- -i libraries/gen_contents_index || die
-
- if use prefix; then
- # Make configure find docbook-xsl-stylesheets from Prefix
- sed -e '/^FP_DIR_DOCBOOK_XSL/s:\[.*\]:['"${EPREFIX}"'/usr/share/sgml/docbook/xsl-stylesheets/]:' \
- -i utils/haddock/doc/configure.ac || die
- fi
-
- bump_libs
-
- # as we have changed the build system
- eautoreconf
- fi
-}
-
-src_configure() {
- if ! use binary; then
- # initialize build.mk
- echo '# Gentoo changes' > mk/build.mk
-
- # Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
- echo "docdir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
- echo "htmldir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
-
- # We also need to use the GHC_FLAGS flags when building ghc itself
- echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
- echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
- echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
-
- # We can't depend on haddock except when bootstrapping when we
- # must build docs and include them into the binary .tbz2 package
- # app-text/dblatex is not in portage, can not build PDF or PS
- echo "BUILD_DOCBOOK_PDF = NO" >> mk/build.mk
- echo "BUILD_DOCBOOK_PS = NO" >> mk/build.mk
- if use doc; then
- echo "BUILD_DOCBOOK_HTML = YES" >> mk/build.mk
- else
- echo "BUILD_DOCBOOK_HTML = NO" >> mk/build.mk
- fi
-
- # this controls presence on 'xhtml' and 'haddock' in final install
- echo "HADDOCK_DOCS = YES" >> mk/build.mk
-
- # allows overriding build flavours for libraries:
- # v - vanilla (static libs)
- # p - profiled
- # dyn - shared libraries
- # example: GHC_LIBRARY_WAYS="v dyn"
- if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
- echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
- fi
-
- # Get ghc from the unpacked binary .tbz2
- # except when bootstrapping we just pick ghc up off the path
- if ! use ghcbootstrap; then
- export PATH="${WORKDIR}/usr/bin:${PATH}"
- fi
-
- if use gmp; then
- echo "INTEGER_LIBRARY=integer-gmp2" >> mk/build.mk
- else
- echo "INTEGER_LIBRARY=integer-simple" >> mk/build.mk
- fi
-
- # don't strip anything. Very useful when stage2 SIGSEGVs on you
- echo "STRIP_CMD = :" >> mk/build.mk
-
- local econf_args=()
-
- # GHC embeds 'gcc' it was built by and uses it later.
- # Don't allow things like ccache or versioned binary slip.
- # We use stable thing across gcc upgrades.
- is_crosscompile || econf_args+=(--with-gcc=${CHOST}-gcc)
-
- if use ghcmakebinary; then
- # When building booting libary we are trying to
- # bundle or restrict most of external depends
- # with unstable ABI:
- # - embed libffi (default GHC behaviour)
- # - disable ncurses support for ghci (via haskeline)
- # https://bugs.gentoo.org/557478
- # - disable ncurses support for ghc-pkg
- echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
- echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
- else
- econf_args+=(--with-system-libffi)
- econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
- fi
-
- elog "Final mk/build.mk:"
- cat mk/build.mk || die
-
- econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
-
- if [[ ${PV} == *9999* ]]; then
- GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
- GHC_P=${PN}-${GHC_PV}
- fi
- fi # ! use binary
-}
-
-src_compile() {
- if ! use binary; then
- # 1. build compiler binary first
- emake ghc/stage2/build/tmp/ghc-stage2
- # 2. pax-mark (bug #516430)
- pax-mark -m ghc/stage2/build/tmp/ghc-stage2
- # 3. and then all the rest
- emake all
- fi # ! use binary
-}
-
-src_install() {
- if use binary; then
- use prefix && mkdir -p "${ED}"
- mv "${S}/usr" "${ED}"
- else
-
- emake -j1 install DESTDIR="${D}"
- dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
-
- # rename ghc-shipped files to avoid collision
- # of external packages. Motivating example:
- # user had installed:
- # dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
- # dev-haskell/transformers-0.4.2.0
- # then user tried to update to
- # dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
- # this will lead to single .conf file collision.
- local shipped_conf renamed_conf
- local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
- for shipped_conf in "${package_confdir}"/*.conf; do
- # rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
- renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
- mv "${shipped_conf}" "${renamed_conf}" || die
- done
-
- # remove link, but leave 'haddock-${GHC_P}'
- rm -f "${ED}"/usr/bin/$(cross)haddock
-
- if [[ ! -f "${S}/VERSION" ]]; then
- echo "${GHC_PV}" > "${S}/VERSION" \
- || die "Could not create file ${S}/VERSION"
- fi
- if ! is_crosscompile; then
- newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
- newbashcomp utils/completion/ghc.bash ghc
- fi
- fi
-
- # path to the package.cache
- local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
- PKGCACHE="${package_confdir}"/package.cache
- # copy the package.conf.d, including timestamp, save it so we can help
- # users that have a broken package.conf.d
- cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
- # copy the package.conf, including timestamp, save it so we later can put it
- # back before uninstalling, or when upgrading.
- cp -p "${PKGCACHE}"{,.shipped} \
- || die "failed to copy package.conf.d/package.cache"
-}
-
-pkg_preinst() {
- # have we got an earlier version of ghc installed?
- if has_version "<${CATEGORY}/${PF}"; then
- haskell_updater_warn="1"
- fi
-}
-
-pkg_postinst() {
- ghc-reregister
-
- # path to the package.cache
- PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
- # give the cache a new timestamp, it must be as recent as
- # the package.conf.d directory.
- touch "${PKGCACHE}"
-
- if [[ "${haskell_updater_warn}" == "1" ]]; then
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- ewarn "You have just upgraded from an older version of GHC."
- ewarn "You may have to run"
- ewarn " 'haskell-updater'"
- ewarn "to rebuild all ghc-based Haskell libraries."
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- fi
-}
-
-pkg_prerm() {
- PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
- rm -rf "${PKGCACHE}"
-
- cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
- ghc-package_pkg_postrm
-}
diff --git a/dev-lang/ghc/ghc-7.8.4.ebuild b/dev-lang/ghc/ghc-7.8.4.ebuild
deleted file mode 100644
index 89b41d258710..000000000000
--- a/dev-lang/ghc/ghc-7.8.4.ebuild
+++ /dev/null
@@ -1,600 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-#
-# 'CTARGET' definition and 'is_crosscompile' are taken from 'toolchain.eclass'
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
- if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- export CTARGET=${CATEGORY/cross-}
- fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib pax-utils toolchain-funcs versionator
-
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-# 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}-arm.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-amd64.tbz2 )"
-arch_binaries="$arch_binaries ia64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64.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 sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
- case "${ARCH}" in
- alpha) return 0 ;;
- #arm)
- # ewarn "ARM binary is built on armv5tel-eabi toolchain. Use with caution."
- # return 0
- #;;
- amd64) return 0 ;;
- ia64) return 0 ;;
- ppc) return 0 ;;
- ppc64) return 0 ;;
- sparc) return 0 ;;
- x86) return 0 ;;
- *) return 1 ;;
- esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=7.8.3.20141119 # uncomment only for -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? ( https://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.bz2 )"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-SRC_URI+=" https://dev.gentoo.org/~slyfox/distfiles/${P}-ia64-CLOSUREs-regenerated.patch.gz"
-LICENSE="BSD"
-SLOT="0/${PV}"
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="doc ghcbootstrap ghcmakebinary +gmp"
-IUSE+=" binary"
-IUSE+=" elibc_glibc" # system stuff
-
-RDEPEND="
- >=dev-lang/perl-5.6.1
- >=dev-libs/gmp-5:=
- sys-libs/ncurses:0=[unicode]
- !ghcmakebinary? ( dev-libs/libffi:= )
-"
-
-PREBUILT_BINARY_DEPENDS="
- !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
- sys-libs/ncurses-compat:5
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-DEPEND="${RDEPEND}
- ghcbootstrap? (
- doc? ( app-text/docbook-xml-dtd:4.2
- app-text/docbook-xml-dtd:4.5
- app-text/docbook-xsl-stylesheets
- >=dev-libs/libxslt-1.1.2 ) )
- !ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
-
-REQUIRED_USE="?? ( ghcbootstrap binary )"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-append-ghc-cflags() {
- local persistent compile assemble link
- local flag ghcflag
-
- for flag in $*; do
- case ${flag} in
- persistent) persistent="yes";;
- compile) compile="yes";;
- assemble) assemble="yes";;
- link) link="yes";;
- *)
- [[ ${compile} ]] && ghcflag="-optc${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${assemble} ]] && ghcflag="-opta${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${link} ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- ;;
- esac
- done
-}
-
-ghc_setup_cflags() {
- if is_crosscompile; then
- export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
- export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
- einfo "Crosscompiling mode:"
- einfo " CHOST: ${CHOST}"
- einfo " CTARGET: ${CTARGET}"
- einfo " CFLAGS: ${CFLAGS}"
- einfo " LDFLAGS: ${LDFLAGS}"
- return
- fi
- # We need to be very careful with the CFLAGS we ask ghc to pass through to
- # gcc. There are plenty of flags which will make gcc produce output that
- # breaks ghc in various ways. The main ones we want to pass through are
- # -mcpu / -march flags. These are important for arches like alpha & sparc.
- # We also use these CFLAGS for building the C parts of ghc, ie the rts.
- strip-flags
- strip-unsupported-flags
-
- # Cmm can't parse line numbers #482086
- replace-flags -ggdb[3-9] -ggdb2
-
- GHC_FLAGS=""
- GHC_PERSISTENT_FLAGS=""
- for flag in ${CFLAGS}; do
- case ${flag} in
-
- # Ignore extra optimisation (ghc passes -O to gcc anyway)
- # -O2 and above break on too many systems
- -O*) ;;
-
- # Arch and ABI flags are what we're really after
- -m*) append-ghc-cflags compile assemble ${flag};;
-
- # Sometimes it's handy to see backtrace of RTS
- # to get an idea what happens there
- -g*) append-ghc-cflags compile ${flag};;
-
- # Ignore all other flags, including all -f* flags
- esac
- done
-
- for flag in ${LDFLAGS}; do
- append-ghc-cflags link ${flag}
- done
-
- # hardened-gcc needs to be disabled, because the mangler doesn't accept
- # its output.
- gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
- gcc-specs-ssp && append-ghc-cflags persistent compile -fno-stack-protector
-
- # prevent from failind building unregisterised ghc:
- # https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
- use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
- # fix the similar issue as ppc64 TOC on ia64. ia64 has limited size of small data
- # currently ghc fails to build haddock
- # https://osdir.com/ml/gnu.binutils.bugs/2004-10/msg00050.html
- use ia64 && append-ghc-cflags persistent compile -G0
-}
-
-# substitutes string $1 to $2 in files $3 $4 ...
-relocate_path() {
- local from=$1
- local to=$2
- shift 2
- local file=
- for file in "$@"
- do
- sed -i -e "s|$from|$to|g" \
- "$file" || die "path relocation failed for '$file'"
- done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
- local to=$1
-
- # libdir for prebuilt binary and for current system may mismatch
- # It does for prefix installation for example: bug #476998
- local bin_ghc_prefix=${WORKDIR}/usr
- local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
- local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
- # backup original script to use it later after relocation
- local gp_back="${T}/ghc-pkg-${GHC_PV}-orig"
- cp "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
- if [[ ${bin_libdir} != $(get_libdir) ]]; then
- einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
- # moving the dir itself is not strictly needed
- # but then USE=binary would result in installing
- # in '${bin_libdir}'
- mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
- relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
- "${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
- "${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
- "$gp_back" \
- "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
- fi
-
- # Relocate from /usr to ${EPREFIX}/usr
- relocate_path "/usr" "${to}/usr" \
- "${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
- "${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
- "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
-
- # this one we will use to regenerate cache
- # so it should point to current tree location
- relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
- # regenerate the binary package cache
- "$gp_back" recache || die "failed to update cache after relocation"
- rm "$gp_back"
-}
-
-pkg_setup() {
- # quiet portage about prebuilt binaries
- use binary && QA_PREBUILT="*"
-
- [[ ${MERGE_TYPE} == binary ]] && return
-
- if use ghcbootstrap; then
- ewarn "You requested ghc bootstrapping, this is usually only used"
- ewarn "by Gentoo developers to make binary .tbz2 packages."
-
- [[ -z $(type -P ghc) ]] && \
- die "Could not find a ghc to bootstrap with."
- else
- if ! yet_binary; then
- eerror "Please try emerging with USE=ghcbootstrap and report build"
- eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
- die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
- fi
- fi
-}
-
-src_unpack() {
- # Create the ${S} dir if we're using the binary version
- use binary && mkdir "${S}"
-
- # the Solaris and Darwin binaries from ghc (maeder) need to be
- # unpacked separately, so prevent them from being unpacked
- local ONLYA=${A}
- case ${CHOST} in
- *-darwin* | *-solaris*) ONLYA=${GHC_P}-src.tar.bz2 ;;
- esac
- unpack ${ONLYA}
-
- if [[ -d "${S}"/libraries/dph ]]; then
- # Sometimes dph libs get accidentally shipped with ghc
- # but they are not installed unless user requests it.
- # We never install them.
- elog "Removing 'libraries/dph'"
- rm -rf "${S}"/libraries/dph
- fi
-}
-
-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-${GHC_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)/${GHC_P}/bin/ghc"
- fi
-
- if use binary; then
- if use prefix; then
- relocate_ghc "${EPREFIX}"
- fi
-
- # Move unpacked files to the expected place
- mv "${WORKDIR}/usr" "${S}"
- else
- if ! use ghcbootstrap; then
- case ${CHOST} in
- *-darwin* | *-solaris*)
- # UPDATE ME for ghc-7
- mkdir "${WORKDIR}"/ghc-bin-installer || die
- pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
- use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
- use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
- use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
- popd > /dev/null
-
- pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
- # fix the binaries so they run, on Solaris we need an
- # LD_LIBRARY_PATH which has our prefix libdirs, on
- # Darwin we need to replace the frameworks with our libs
- # from the prefix fix before installation, because some
- # of the tools are actually used during configure/make
- if [[ ${CHOST} == *-solaris* ]] ; then
- export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
- elif [[ ${CHOST} == *-darwin* ]] ; then
- local readline_framework=GNUreadline.framework/GNUreadline
- local gmp_framework=/opt/local/lib/libgmp.10.dylib
- local ncurses_file=/opt/local/lib/libncurses.5.dylib
- for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
- install_name_tool -change \
- ${readline_framework} \
- "${EPREFIX}"/lib/libreadline.dylib \
- ${binary} || die
- install_name_tool -change \
- ${gmp_framework} \
- "${EPREFIX}"/usr/lib/libgmp.dylib \
- ${binary} || die
- install_name_tool -change \
- ${ncurses_file} \
- "${EPREFIX}"/usr/lib/libncurses.dylib \
- ${binary} || die
- done
- # we don't do frameworks!
- sed -i \
- -e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
- -e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
- rts/package.conf.in || die
- fi
-
- # it is autoconf, but we really don't want to give it too
- # much arguments, in fact we do the make in-place anyway
- ./configure --prefix="${WORKDIR}"/usr || die
- make install || die
- popd > /dev/null
- ;;
- *)
- relocate_ghc "${WORKDIR}"
- ;;
- esac
- fi
-
- sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
- "${S}/ghc/ghc.wrapper"
-
- cd "${S}" # otherwise epatch will break
-
- epatch "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
-
- epatch "${FILESDIR}"/${PN}-7.8.1_rc1-libbfd.patch
-
- epatch "${FILESDIR}"/${PN}-7.8.2-cgen-constify.patch
- epatch "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
- # bug 518734
- epatch "${FILESDIR}"/${PN}-7.6.3-preserve-inplace-xattr.patch
- # fix threaded runtime on ia64
- epatch "${FILESDIR}"/${PN}-7.8.4-ia64-CLOSUREs.patch
- epatch "${WORKDIR}"/${PN}-7.8.4-ia64-CLOSUREs-regenerated.patch
-
- # upstream backports
- epatch "${FILESDIR}"/${PN}-7.8.3-linker-warn.patch
- epatch "${FILESDIR}"/${PN}-7.8.3-pic-sparc.patch
- epatch "${FILESDIR}"/${PN}-7.8.3-ppc32-fPIC.patch
- epatch "${FILESDIR}"/${PN}-7.8.4-gold.patch
-
- if use prefix; then
- # Make configure find docbook-xsl-stylesheets from Prefix
- sed -e '/^FP_DIR_DOCBOOK_XSL/s:\[.*\]:['"${EPREFIX}"'/usr/share/sgml/docbook/xsl-stylesheets/]:' \
- -i utils/haddock/doc/configure.ac || die
- fi
-
- # as we have changed the build system
- eautoreconf
- fi
-}
-
-src_configure() {
- if ! use binary; then
- # initialize build.mk
- echo '# Gentoo changes' > mk/build.mk
-
- # Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
- echo "docdir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
- echo "htmldir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
-
- # We also need to use the GHC_FLAGS flags when building ghc itself
- echo "SRC_HC_OPTS+=${GHC_FLAGS}" >> mk/build.mk
- echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
- echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
-
- # We can't depend on haddock except when bootstrapping when we
- # must build docs and include them into the binary .tbz2 package
- # app-text/dblatex is not in portage, can not build PDF or PS
- if use ghcbootstrap && use doc; then
- echo "BUILD_DOCBOOK_PDF = NO" >> mk/build.mk
- echo "BUILD_DOCBOOK_PS = NO" >> mk/build.mk
- echo "BUILD_DOCBOOK_HTML = YES" >> mk/build.mk
- echo "HADDOCK_DOCS = YES" >> mk/build.mk
- else
- echo "BUILD_DOCBOOK_PDF = NO" >> mk/build.mk
- echo "BUILD_DOCBOOK_PS = NO" >> mk/build.mk
- echo "BUILD_DOCBOOK_HTML = NO" >> mk/build.mk
- echo "HADDOCK_DOCS = NO" >> mk/build.mk
- fi
-
- # allows overriding build flavours for libraries:
- # v - vanilla (static libs)
- # p - profiled
- # dyn - shared libraries
- # example: GHC_LIBRARY_WAYS="v dyn"
- if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
- echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
- fi
-
- # Get ghc from the unpacked binary .tbz2
- # except when bootstrapping we just pick ghc up off the path
- if ! use ghcbootstrap; then
- export PATH="${WORKDIR}/usr/bin:${PATH}"
- fi
-
- if use gmp; then
- echo "INTEGER_LIBRARY=integer-gmp" >> mk/build.mk
- else
- echo "INTEGER_LIBRARY=integer-simple" >> mk/build.mk
- fi
-
- # don't strip anything. Very useful when stage2 SIGSEGVs on you
- echo "STRIP_CMD = :" >> mk/build.mk
-
- local econf_args=()
-
- # GHC embeds 'gcc' it was built by and uses it later.
- # Don't allow things like ccache or versioned binary slip.
- # We use stable thing across gcc upgrades.
- is_crosscompile || econf_args+=(--with-gcc=${CHOST}-gcc)
-
- if ! use ghcmakebinary; then
- econf_args+=(--with-system-libffi)
- econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
- fi
-
- econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
-
- if [[ ${PV} == *9999* ]]; then
- GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
- GHC_P=${PN}-${GHC_PV}
- fi
- GHC_TPF="$(grep 'S\[\"TargetPlatformFull\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
- fi # ! use binary
-}
-
-src_compile() {
- if ! use binary; then
- # 1. build compiler binary first
- emake ghc/stage2/build/tmp/ghc-stage2
- # 2. pax-mark (bug #516430)
- pax-mark -m ghc/stage2/build/tmp/ghc-stage2
- # 3. and then all the rest
- emake all
- fi # ! use binary
-}
-
-src_install() {
- if use binary; then
- use prefix && mkdir -p "${ED}"
- mv "${S}/usr" "${ED}"
-
- # Remove the docs if not requested
- if ! use doc; then
- rm -rf "${ED}/usr/share/doc/${P}/*/" \
- "${ED}/usr/share/doc/${P}/*.html" \
- || die "could not remove docs (P vs PF revision mismatch?)"
- fi
- else
- # We only build docs if we were bootstrapping, otherwise
- # we copy them out of the unpacked binary .tbz2
- if use doc && ! use ghcbootstrap; then
- mkdir -p "${ED}/usr/share/doc"
- mv "${WORKDIR}/usr/share/doc/${P}" "${ED}/usr/share/doc" \
- || die "failed to copy docs"
- else
- dodoc "${S}/distrib/README" "${S}/ANNOUNCE" "${S}/LICENSE" "${S}/VERSION"
- fi
-
- emake -j1 install DESTDIR="${D}"
-
- # remove link, but leave 'haddock-${GHC_P}'
- rm -f "${ED}"/usr/bin/haddock
-
- if [[ ! -f "${S}/VERSION" ]]; then
- echo "${GHC_PV}" > "${S}/VERSION" \
- || die "Could not create file ${S}/VERSION"
- fi
- newbashcomp "${FILESDIR}/ghc-bash-completion" ghc-pkg
-
- fi
-
- # path to the package.cache
- local package_confdir="${ED}/usr/$(get_libdir)/${GHC_P}/package.conf.d"
- PKGCACHE="${package_confdir}"/package.cache
- # copy the package.conf.d, including timestamp, save it so we can help
- # users that have a broken package.conf.d
- cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
- # copy the package.conf, including timestamp, save it so we later can put it
- # back before uninstalling, or when upgrading.
- cp -p "${PKGCACHE}"{,.shipped} \
- || die "failed to copy package.conf.d/package.cache"
-}
-
-pkg_preinst() {
- # have we got an earlier version of ghc installed?
- if has_version "<${CATEGORY}/${PF}"; then
- haskell_updater_warn="1"
- fi
-}
-
-pkg_postinst() {
- ghc-reregister
-
- # path to the package.cache
- PKGCACHE="${EROOT}/usr/$(get_libdir)/${GHC_P}/package.conf.d/package.cache"
-
- # give the cache a new timestamp, it must be as recent as
- # the package.conf.d directory.
- touch "${PKGCACHE}"
-
- if [[ "${haskell_updater_warn}" == "1" ]]; then
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- ewarn "You have just upgraded from an older version of GHC."
- ewarn "You may have to run"
- ewarn " 'haskell-updater --upgrade'"
- ewarn "to rebuild all ghc-based Haskell libraries."
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- fi
-}
-
-pkg_prerm() {
- # Be very careful here... Call order when upgrading is (according to PMS):
- # * src_install for new package
- # * pkg_preinst for new package
- # * pkg_postinst for new package
- # * pkg_prerm for the package being replaced
- # * pkg_postrm for the package being replaced
- # so you'll actually be touching the new packages files, not the one you
- # uninstall, due to that or installation directory ${GHC_P} will be the same for
- # both packages.
-
- # Call order for reinstalling is (according to PMS):
- # * src_install
- # * pkg_preinst
- # * pkg_prerm for the package being replaced
- # * pkg_postrm for the package being replaced
- # * pkg_postinst
-
- # Overwrite the modified package.cache with a copy of the
- # original one, so that it will be removed during uninstall.
-
- PKGCACHE="${EROOT}/usr/$(get_libdir)/${GHC_P}/package.conf.d/package.cache"
- rm -rf "${PKGCACHE}"
-
- cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
- ghc-package_pkg_postrm
-}
diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild
deleted file mode 100644
index ede481d98eaf..000000000000
--- a/dev-lang/ghc/ghc-8.0.2.ebuild
+++ /dev/null
@@ -1,672 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-#
-# 'CTARGET' definition and 'is_crosscompile' are taken from 'toolchain.eclass'
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
- if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- export CTARGET=${CATEGORY/cross-}
- fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib pax-utils toolchain-funcs versionator prefix
-inherit check-reqs
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-# 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}-arm.tbz2 )"
-arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-arm64.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
-arch_binaries="$arch_binaries ia64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-unknown-linux-gnu.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 sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
- case "${ARCH}" in
- alpha) return 0 ;;
- arm64) return 0 ;;
- #arm)
- # ewarn "ARM binary is built on armv5tel-eabi toolchain. Use with caution."
- # return 0
- #;;
- amd64) return 0 ;;
- ia64) return 0 ;;
- ppc) return 0 ;;
- ppc64) return 0 ;;
- #sparc) return 0 ;;
- x86) return 0 ;;
- *) return 1 ;;
- esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.0.1.20161213 # uncomment only for -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? ( https://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.xz )"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
- # "hackage-name hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="doc ghcbootstrap ghcmakebinary +gmp +profile"
-IUSE+=" binary"
-
-RDEPEND="
- >=dev-lang/perl-5.6.1
- dev-libs/gmp:0=
- sys-libs/ncurses:0=[unicode]
- !ghcmakebinary? ( dev-libs/libffi:= )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-# utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
- !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
- sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}
- doc? ( app-text/docbook-xml-dtd:4.2
- app-text/docbook-xml-dtd:4.5
- app-text/docbook-xsl-stylesheets
- dev-python/sphinx
- >=dev-libs/libxslt-1.1.2 )
- !ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
-
-REQUIRED_USE="?? ( ghcbootstrap binary )"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-# returns tool prefix for crosscompiler.
-# Example:
-# CTARGET=armv7a-unknown-linux-gnueabi
-# CHOST=x86_64-pc-linux-gnu
-# "armv7a-unknown-linux-gnueabi-"
-# CTARGET=${CHOST}
-# ""
-# Used in tools and library prefix:
-# "${ED}"/usr/bin/$(cross)haddock
-# "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
- if is_crosscompile; then
- echo "${CTARGET}-"
- else
- echo ""
- fi
-}
-
-append-ghc-cflags() {
- local persistent compile assemble link
- local flag ghcflag
-
- for flag in $*; do
- case ${flag} in
- persistent) persistent="yes";;
- compile) compile="yes";;
- assemble) assemble="yes";;
- link) link="yes";;
- *)
- [[ ${compile} ]] && ghcflag="-optc${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${assemble} ]] && ghcflag="-opta${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${link} ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- ;;
- esac
- done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
- local pn=$1 pv=$2
- local p=${pn}-${pv}
- local f
-
- einfo "Bumping ${pn} up to ${pv}"
-
- for f in ghc.mk GNUmakefile; do
- mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
- done
- mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
- mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
- local p pn pv
- for p in "${BUMP_LIBRARIES[@]}"; do
- set -- $p
- pn=$1 pv=$2
-
- SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
- done
-}
-
-update_SRC_URI
-
-bump_libs() {
- local p pn pv
- for p in "${BUMP_LIBRARIES[@]}"; do
- set -- $p
- pn=$1 pv=$2
-
- bump_lib "${pn}" "${pv}"
- done
-}
-
-ghc_setup_cflags() {
- if is_crosscompile; then
- export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
- export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
- einfo "Crosscompiling mode:"
- einfo " CHOST: ${CHOST}"
- einfo " CTARGET: ${CTARGET}"
- einfo " CFLAGS: ${CFLAGS}"
- einfo " LDFLAGS: ${LDFLAGS}"
- einfo " prefix: $(cross)"
- return
- fi
- # We need to be very careful with the CFLAGS we ask ghc to pass through to
- # gcc. There are plenty of flags which will make gcc produce output that
- # breaks ghc in various ways. The main ones we want to pass through are
- # -mcpu / -march flags. These are important for arches like alpha & sparc.
- # We also use these CFLAGS for building the C parts of ghc, ie the rts.
- strip-flags
- strip-unsupported-flags
-
- # Cmm can't parse line numbers #482086
- replace-flags -ggdb[3-9] -ggdb2
-
- GHC_FLAGS=""
- GHC_PERSISTENT_FLAGS=""
- for flag in ${CFLAGS}; do
- case ${flag} in
-
- # Ignore extra optimisation (ghc passes -O to gcc anyway)
- # -O2 and above break on too many systems
- -O*) ;;
-
- # Arch and ABI flags are what we're really after
- -m*) append-ghc-cflags compile assemble ${flag};;
-
- # Sometimes it's handy to see backtrace of RTS
- # to get an idea what happens there
- -g*) append-ghc-cflags compile ${flag};;
-
- # Ignore all other flags, including all -f* flags
- esac
- done
-
- for flag in ${LDFLAGS}; do
- append-ghc-cflags link ${flag}
- done
-
- # hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
- # are not built with fPIC, bug #606666
- gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
- tc-is-gcc && version_is_at_least 6.3 $(gcc-version) && if ! use ghcbootstrap; then
- # gcc-6.3 has support for -no-pie upstream, but spelling differs from
- # gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
- # hardened users try '-pie' in USE=ghcbootstrap mode.
- append-ghc-cflags compile link -no-pie
- fi
-
- # prevent from failind building unregisterised ghc:
- # https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
- use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
-}
-
-# substitutes string $1 to $2 in files $3 $4 ...
-relocate_path() {
- local from=$1
- local to=$2
- shift 2
- local file=
- for file in "$@"
- do
- sed -i -e "s|$from|$to|g" \
- "$file" || die "path relocation failed for '$file'"
- done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
- local to=$1
-
- # libdir for prebuilt binary and for current system may mismatch
- # It does for prefix installation for example: bug #476998
- local bin_ghc_prefix=${WORKDIR}/usr
- local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
- local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
- # backup original script to use it later after relocation
- local gp_back="${T}/ghc-pkg-${GHC_PV}-orig"
- cp "${WORKDIR}/usr/bin/$(cross)ghc-pkg-${GHC_PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
- if [[ ${bin_libdir} != $(get_libdir) ]]; then
- einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
- # moving the dir itself is not strictly needed
- # but then USE=binary would result in installing
- # in '${bin_libdir}'
- mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
- bin_libpath=${bin_ghc_prefix}/$(get_libdir)
-
- relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
- "${WORKDIR}/usr/bin/$(cross)ghc-${GHC_PV}" \
- "${WORKDIR}/usr/bin/$(cross)ghci-${GHC_PV}" \
- "${WORKDIR}/usr/bin/$(cross)ghc-pkg-${GHC_PV}" \
- "${WORKDIR}/usr/bin/$(cross)hsc2hs" \
- "${WORKDIR}/usr/bin/$(cross)runghc-${GHC_PV}" \
- "$gp_back" \
- "${WORKDIR}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/"*
- fi
-
- # Relocate from /usr to ${EPREFIX}/usr
- relocate_path "/usr" "${to}/usr" \
- "${WORKDIR}/usr/bin/$(cross)ghc-${GHC_PV}" \
- "${WORKDIR}/usr/bin/$(cross)ghci-${GHC_PV}" \
- "${WORKDIR}/usr/bin/$(cross)ghc-pkg-${GHC_PV}" \
- "${WORKDIR}/usr/bin/$(cross)hsc2hs" \
- "${WORKDIR}/usr/bin/$(cross)runghc-${GHC_PV}" \
- "${WORKDIR}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/"*
-
- # this one we will use to regenerate cache
- # so it should point to current tree location
- relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
- if use prefix; then
- hprefixify "${bin_libpath}"/${PN}*/settings
- fi
-
- # regenerate the binary package cache
- "$gp_back" recache || die "failed to update cache after relocation"
- rm "$gp_back"
-}
-
-ghc-check-reqs() {
- # These are pessimistic values (slightly bigger than worst-case)
- # Worst case is UNREG USE=profile ia64. See bug #611866 for some
- # numbers on various arches.
- CHECKREQS_DISK_BUILD=8G
- CHECKREQS_DISK_USR=2G
- # USE=binary roughly takes
- use binary && CHECKREQS_DISK_BUILD=4G
-
- "$@"
-}
-
-pkg_pretend() {
- ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- ghc-check-reqs check-reqs_pkg_setup
-
- # quiet portage about prebuilt binaries
- use binary && QA_PREBUILT="*"
-
- [[ ${MERGE_TYPE} == binary ]] && return
-
- if use ghcbootstrap; then
- ewarn "You requested ghc bootstrapping, this is usually only used"
- ewarn "by Gentoo developers to make binary .tbz2 packages."
-
- [[ -z $(type -P ghc) ]] && \
- die "Could not find a ghc to bootstrap with."
- else
- if ! yet_binary; then
- eerror "Please try emerging with USE=ghcbootstrap and report build"
- eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
- die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
- fi
- fi
-}
-
-src_unpack() {
- # Create the ${S} dir if we're using the binary version
- use binary && mkdir "${S}"
-
- # the Solaris and Darwin binaries from ghc (maeder) need to be
- # unpacked separately, so prevent them from being unpacked
- local ONLYA=${A}
- case ${CHOST} in
- *-darwin* | *-solaris*) ONLYA=${GHC_P}-src.tar.xz ;;
- esac
- unpack ${ONLYA}
-}
-
-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/$(cross)ghc-${GHC_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)/$(cross)${GHC_P}/bin/ghc"
- fi
-
- if use binary; then
- if use prefix; then
- relocate_ghc "${EPREFIX}"
- fi
-
- # Move unpacked files to the expected place
- mv "${WORKDIR}/usr" "${S}"
- else
- if ! use ghcbootstrap; then
- case ${CHOST} in
- *-darwin* | *-solaris*)
- # UPDATE ME for ghc-7
- mkdir "${WORKDIR}"/ghc-bin-installer || die
- pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
- use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
- use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
- use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
- popd > /dev/null
-
- pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
- # fix the binaries so they run, on Solaris we need an
- # LD_LIBRARY_PATH which has our prefix libdirs, on
- # Darwin we need to replace the frameworks with our libs
- # from the prefix fix before installation, because some
- # of the tools are actually used during configure/make
- if [[ ${CHOST} == *-solaris* ]] ; then
- export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
- elif [[ ${CHOST} == *-darwin* ]] ; then
- local readline_framework=GNUreadline.framework/GNUreadline
- local gmp_framework=/opt/local/lib/libgmp.10.dylib
- local ncurses_file=/opt/local/lib/libncurses.5.dylib
- for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
- install_name_tool -change \
- ${readline_framework} \
- "${EPREFIX}"/lib/libreadline.dylib \
- ${binary} || die
- install_name_tool -change \
- ${gmp_framework} \
- "${EPREFIX}"/usr/lib/libgmp.dylib \
- ${binary} || die
- install_name_tool -change \
- ${ncurses_file} \
- "${EPREFIX}"/usr/lib/libncurses.dylib \
- ${binary} || die
- done
- # we don't do frameworks!
- sed -i \
- -e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
- -e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
- rts/package.conf.in || die
- fi
-
- # it is autoconf, but we really don't want to give it too
- # much arguments, in fact we do the make in-place anyway
- ./configure --prefix="${WORKDIR}"/usr || die
- make install || die
- popd > /dev/null
- ;;
- *)
- relocate_ghc "${WORKDIR}"
- ;;
- esac
- fi
-
- sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
- "${S}/ghc/ghc.wrapper"
-
- cd "${S}" # otherwise epatch will break
-
- epatch "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
-
- epatch "${FILESDIR}"/${PN}-8.0.1_rc1-cgen-constify.patch
- epatch "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
- epatch "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
-
- epatch "${FILESDIR}"/${PN}-8.0.1-limit-jN.patch
- epatch "${FILESDIR}"/${PN}-8.0.1-ww-args-limit.patch
- epatch "${FILESDIR}"/${PN}-8.0.1-par-g0-on-A32.patch
- epatch "${FILESDIR}"/${PN}-8.0.2_rc2-old-sphinx.patch
- epatch "${FILESDIR}"/${PN}-8.0.2-libffi-alpha.patch
- epatch "${FILESDIR}"/${PN}-8.0.2-O2-unreg.patch
- epatch "${FILESDIR}"/${PN}-8.0.2-binutils-2.30.patch
-
- bump_libs
-
- # as we have changed the build system
- eautoreconf
- fi
-}
-
-src_configure() {
- if ! use binary; then
- # initialize build.mk
- echo '# Gentoo changes' > mk/build.mk
-
- # Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
- echo "docdir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
- echo "htmldir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
-
- # We also need to use the GHC_FLAGS flags when building ghc itself
- echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
- echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
- echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
- # Speed up initial Cabal bootstrap
- echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
- # We can't depend on haddock except when bootstrapping when we
- # must build docs and include them into the binary .tbz2 package
- # app-text/dblatex is not in portage, can not build PDF or PS
- echo "BUILD_SPHINX_PDF = NO" >> mk/build.mk
- echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
- echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
- # this controls presence on 'xhtml' and 'haddock' in final install
- echo "HADDOCK_DOCS = YES" >> mk/build.mk
-
- # allows overriding build flavours for libraries:
- # v - vanilla (static libs)
- # p - profiled
- # dyn - shared libraries
- # example: GHC_LIBRARY_WAYS="v dyn"
- if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
- echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
- fi
- echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
- # Get ghc from the unpacked binary .tbz2
- # except when bootstrapping we just pick ghc up off the path
- if ! use ghcbootstrap; then
- export PATH="${WORKDIR}/usr/bin:${PATH}"
- fi
-
- echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
-
- # don't strip anything. Very useful when stage2 SIGSEGVs on you
- echo "STRIP_CMD = :" >> mk/build.mk
-
- local econf_args=()
-
- # GHC embeds 'gcc' it was built by and uses it later.
- # Don't allow things like ccache or versioned binary slip.
- # We use stable thing across gcc upgrades.
- is_crosscompile || econf_args+=(--with-gcc=${CHOST}-gcc)
-
- if use ghcmakebinary; then
- # When building booting libary we are trying to
- # bundle or restrict most of external depends
- # with unstable ABI:
- # - embed libffi (default GHC behaviour)
- # - disable ncurses support for ghci (via haskeline)
- # https://bugs.gentoo.org/557478
- # - disable ncurses support for ghc-pkg
- echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
- echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
- else
- econf_args+=(--with-system-libffi)
- econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
- fi
-
- elog "Final mk/build.mk:"
- cat mk/build.mk || die
-
- econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
-
- if [[ ${PV} == *9999* ]]; then
- GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
- GHC_P=${PN}-${GHC_PV}
- fi
- fi # ! use binary
-}
-
-src_compile() {
- if ! use binary; then
- # 1. build/pax-mark compiler binary first
- emake ghc/stage2/build/tmp/ghc-stage2
- pax-mark -m ghc/stage2/build/tmp/ghc-stage2
- # 2. build/pax-mark haddock using ghc-stage2
- emake utils/haddock/dist/build/tmp/haddock
- pax-mark -m utils/haddock/dist/build/tmp/haddock
- # 3. and then all the rest
- emake all
- fi # ! use binary
-}
-
-src_install() {
- if use binary; then
- use prefix && mkdir -p "${ED}"
- mv "${S}/usr" "${ED}"
- else
-
- emake -j1 install DESTDIR="${D}"
- dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
-
- # rename ghc-shipped files to avoid collision
- # of external packages. Motivating example:
- # user had installed:
- # dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
- # dev-haskell/transformers-0.4.2.0
- # then user tried to update to
- # dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
- # this will lead to single .conf file collision.
- local shipped_conf renamed_conf
- local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
- for shipped_conf in "${package_confdir}"/*.conf; do
- # rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
- renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
- mv "${shipped_conf}" "${renamed_conf}" || die
- done
-
- # remove link, but leave 'haddock-${GHC_P}'
- rm -f "${ED}"/usr/bin/$(cross)haddock
-
- if [[ ! -f "${S}/VERSION" ]]; then
- echo "${GHC_PV}" > "${S}/VERSION" \
- || die "Could not create file ${S}/VERSION"
- fi
- if ! is_crosscompile; then
- newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
- newbashcomp utils/completion/ghc.bash ghc
- fi
- fi
-
- # path to the package.cache
- local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
- PKGCACHE="${package_confdir}"/package.cache
- # copy the package.conf.d, including timestamp, save it so we can help
- # users that have a broken package.conf.d
- cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
- # copy the package.conf, including timestamp, save it so we later can put it
- # back before uninstalling, or when upgrading.
- cp -p "${PKGCACHE}"{,.shipped} \
- || die "failed to copy package.conf.d/package.cache"
-}
-
-pkg_preinst() {
- # have we got an earlier version of ghc installed?
- if has_version "<${CATEGORY}/${PF}"; then
- haskell_updater_warn="1"
- fi
-}
-
-pkg_postinst() {
- ghc-reregister
-
- # path to the package.cache
- PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
- # give the cache a new timestamp, it must be as recent as
- # the package.conf.d directory.
- touch "${PKGCACHE}"
-
- if [[ "${haskell_updater_warn}" == "1" ]]; then
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- ewarn "You have just upgraded from an older version of GHC."
- ewarn "You may have to run"
- ewarn " 'haskell-updater'"
- ewarn "to rebuild all ghc-based Haskell libraries."
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- fi
-}
-
-pkg_prerm() {
- PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
- rm -rf "${PKGCACHE}"
-
- cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
- ghc-package_pkg_postrm
-}
diff --git a/dev-lang/ghc/ghc-8.10.1.ebuild b/dev-lang/ghc/ghc-8.10.1.ebuild
deleted file mode 100644
index 1db40de34286..000000000000
--- a/dev-lang/ghc/ghc-8.10.1.ebuild
+++ /dev/null
@@ -1,797 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
- if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- export CTARGET=${CATEGORY/cross-}
- fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib multiprocessing pax-utils toolchain-funcs prefix
-inherit check-reqs
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-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 amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/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 )"
-#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 sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
- case "${ARCH}" in
- #alpha) return 0 ;;
- #arm64) return 0 ;;
- #arm) return 0 ;;
- amd64) return 0 ;;
- #ia64) return 0 ;;
- #ppc) return 0 ;;
- #ppc64)
- # use big-endian && return 0
- # return 0
- # ;;
- #sparc) return 0 ;;
- x86) return 0 ;;
- *) return 1 ;;
- esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.10.0.20200123 # uncomment only for -alpha, -beta, -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? (
- https://downloads.haskell.org/ghc/${PV/_/-}/${GHC_P}-src.tar.xz
- test? ( https://downloads.haskell.org/ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
-)"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
- # "hackage-name hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-KEYWORDS=""
-IUSE="big-endian doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
-IUSE+=" binary"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- >=dev-lang/perl-5.6.1
- dev-libs/gmp:0=
- sys-libs/ncurses:0=[unicode]
- elfutils? ( dev-libs/elfutils )
- !ghcmakebinary? ( dev-libs/libffi:= )
- numa? ( sys-process/numactl )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-# utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
- !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
- sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}
- doc? ( app-text/docbook-xml-dtd:4.2
- app-text/docbook-xml-dtd:4.5
- app-text/docbook-xsl-stylesheets
- dev-python/sphinx
- >=dev-libs/libxslt-1.1.2 )
- !ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-# we build binaries without profiling support
-REQUIRED_USE="
- ?? ( ghcbootstrap binary )
- ?? ( profile binary )
-"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-is_native() {
- [[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
-}
-
-if ! is_crosscompile; then
- PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
-fi
-
-# returns tool prefix for crosscompiler.
-# Example:
-# CTARGET=armv7a-unknown-linux-gnueabi
-# CHOST=x86_64-pc-linux-gnu
-# "armv7a-unknown-linux-gnueabi-"
-# CTARGET=${CHOST}
-# ""
-# Used in tools and library prefix:
-# "${ED}"/usr/bin/$(cross)haddock
-# "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
- if is_crosscompile; then
- echo "${CTARGET}-"
- else
- echo ""
- fi
-}
-
-append-ghc-cflags() {
- local persistent compile assemble link
- local flag ghcflag
-
- for flag in $*; do
- case ${flag} in
- persistent) persistent="yes";;
- compile) compile="yes";;
- assemble) assemble="yes";;
- link) link="yes";;
- *)
- [[ ${compile} ]] && ghcflag="-optc${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${assemble} ]] && ghcflag="-opta${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${link} ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- ;;
- esac
- done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
- local pn=$1 pv=$2
- local p=${pn}-${pv}
- local f
-
- einfo "Bumping ${pn} up to ${pv}"
-
- for f in ghc.mk GNUmakefile; do
- mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
- done
- mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
- mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
- local p pn pv
- for p in "${BUMP_LIBRARIES[@]}"; do
- set -- $p
- pn=$1 pv=$2
-
- SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
- done
-}
-
-update_SRC_URI
-
-bump_libs() {
- local p pn pv
- for p in "${BUMP_LIBRARIES[@]}"; do
- set -- $p
- pn=$1 pv=$2
-
- bump_lib "${pn}" "${pv}"
- done
-}
-
-ghc_setup_cflags() {
- # TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
- if ! is_native; then
- export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
- export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
- einfo "Crosscompiling mode:"
- einfo " CHOST: ${CHOST}"
- einfo " CTARGET: ${CTARGET}"
- einfo " CFLAGS: ${CFLAGS}"
- einfo " LDFLAGS: ${LDFLAGS}"
- einfo " prefix: $(cross)"
- return
- fi
- # We need to be very careful with the CFLAGS we ask ghc to pass through to
- # gcc. There are plenty of flags which will make gcc produce output that
- # breaks ghc in various ways. The main ones we want to pass through are
- # -mcpu / -march flags. These are important for arches like alpha & sparc.
- # We also use these CFLAGS for building the C parts of ghc, ie the rts.
- strip-flags
- strip-unsupported-flags
-
- # Cmm can't parse line numbers #482086
- replace-flags -ggdb[3-9] -ggdb2
-
- GHC_FLAGS=""
- GHC_PERSISTENT_FLAGS=""
- for flag in ${CFLAGS}; do
- case ${flag} in
-
- # Ignore extra optimisation (ghc passes -O to gcc anyway)
- # -O2 and above break on too many systems
- -O*) ;;
-
- # Arch and ABI flags are what we're really after
- -m*) append-ghc-cflags compile assemble ${flag};;
-
- # Sometimes it's handy to see backtrace of RTS
- # to get an idea what happens there
- -g*) append-ghc-cflags compile ${flag};;
-
- # Ignore all other flags, including all -f* flags
- esac
- done
-
- 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 ...
-relocate_path() {
- local from=$1
- local to=$2
- shift 2
- local file=
- for file in "$@"
- do
- sed -i -e "s|$from|$to|g" \
- "$file" || die "path relocation failed for '$file'"
- done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
- local to=$1 ghc_v=${BIN_PV}
-
- # libdir for prebuilt binary and for current system may mismatch
- # It does for prefix installation for example: bug #476998
- local bin_ghc_prefix=${WORKDIR}/usr
- local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
- local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
- # backup original script to use it later after relocation
- local gp_back="${T}/ghc-pkg-${ghc_v}-orig"
- cp "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
- if [[ ${bin_libdir} != $(get_libdir) ]]; then
- einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
- # moving the dir itself is not strictly needed
- # but then USE=binary would result in installing
- # in '${bin_libdir}'
- mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
- relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
- "${WORKDIR}/usr/bin/ghc-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghci-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/bin/runghc-${ghc_v}" \
- "$gp_back" \
- "${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
- fi
-
- # Relocate from /usr to ${EPREFIX}/usr
- relocate_path "/usr" "${to}/usr" \
- "${WORKDIR}/usr/bin/ghc-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghci-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
- "${WORKDIR}/usr/bin/haddock-ghc-${ghc_v}" \
- "${WORKDIR}/usr/bin/hp2ps" \
- "${WORKDIR}/usr/bin/hpc" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/bin/runghc-${ghc_v}" \
- "${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-
- # this one we will use to regenerate cache
- # so it should point to current tree location
- relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
- if use prefix; then
- hprefixify "${bin_libpath}"/${PN}*/settings
- fi
-
- # regenerate the binary package cache
- "$gp_back" recache || die "failed to update cache after relocation"
- rm "$gp_back"
-}
-
-ghc-check-reqs() {
- # These are pessimistic values (slightly bigger than worst-case)
- # Worst case is UNREG USE=profile ia64. See bug #611866 for some
- # numbers on various arches.
- CHECKREQS_DISK_BUILD=8G
- CHECKREQS_DISK_USR=2G
- # USE=binary roughly takes
- use binary && CHECKREQS_DISK_BUILD=4G
-
- "$@"
-}
-
-pkg_pretend() {
- ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- ghc-check-reqs check-reqs_pkg_setup
-
- # quiet portage about prebuilt binaries
- use binary && QA_PREBUILT="*"
-
- [[ ${MERGE_TYPE} == binary ]] && return
-
- if use ghcbootstrap; then
- ewarn "You requested ghc bootstrapping, this is usually only used"
- ewarn "by Gentoo developers to make binary .tbz2 packages."
-
- [[ -z $(type -P ghc) ]] && \
- die "Could not find a ghc to bootstrap with."
- else
- if ! yet_binary; then
- eerror "Please try emerging with USE=ghcbootstrap and report build"
- eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
- die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
- fi
- fi
-}
-
-src_unpack() {
- # Create the ${S} dir if we're using the binary version
- use binary && mkdir "${S}"
-
- # the Solaris and Darwin binaries from ghc (maeder) need to be
- # unpacked separately, so prevent them from being unpacked
- local ONLYA=${A}
- case ${CHOST} in
- *-darwin* | *-solaris*) ONLYA=${GHC_P}-src.tar.xz ;;
- esac
- unpack ${ONLYA}
-}
-
-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"
- fi
-
- if use binary; then
- if use prefix; then
- relocate_ghc "${EPREFIX}"
- fi
-
- # Move unpacked files to the expected place
- mv "${WORKDIR}/usr" "${S}"
- eapply_user
- else
- if ! use ghcbootstrap; then
- case ${CHOST} in
- *-darwin* | *-solaris*)
- # UPDATE ME for ghc-7
- mkdir "${WORKDIR}"/ghc-bin-installer || die
- pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
- use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
- use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
- use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
- popd > /dev/null
-
- pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
- # fix the binaries so they run, on Solaris we need an
- # LD_LIBRARY_PATH which has our prefix libdirs, on
- # Darwin we need to replace the frameworks with our libs
- # from the prefix fix before installation, because some
- # of the tools are actually used during configure/make
- if [[ ${CHOST} == *-solaris* ]] ; then
- export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
- elif [[ ${CHOST} == *-darwin* ]] ; then
- local readline_framework=GNUreadline.framework/GNUreadline
- local gmp_framework=/opt/local/lib/libgmp.10.dylib
- local ncurses_file=/opt/local/lib/libncurses.5.dylib
- for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
- install_name_tool -change \
- ${readline_framework} \
- "${EPREFIX}"/lib/libreadline.dylib \
- ${binary} || die
- install_name_tool -change \
- ${gmp_framework} \
- "${EPREFIX}"/usr/lib/libgmp.dylib \
- ${binary} || die
- install_name_tool -change \
- ${ncurses_file} \
- "${EPREFIX}"/usr/lib/libncurses.dylib \
- ${binary} || die
- done
- # we don't do frameworks!
- sed -i \
- -e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
- -e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
- rts/package.conf.in || die
- fi
-
- # it is autoconf, but we really don't want to give it too
- # many arguments, in fact we do the make in-place anyway
- ./configure --prefix="${WORKDIR}"/usr || die
- make install || die
- popd > /dev/null
- ;;
- *)
- relocate_ghc "${WORKDIR}"
- ;;
- esac
- fi
-
- sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
- "${S}/ghc/ghc.wrapper"
-
- cd "${S}" # otherwise eapply will break
-
- eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
- eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
- eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
- eapply "${FILESDIR}"/${PN}-8.8.1-revert-CPP.patch
- eapply "${FILESDIR}"/${PN}-8.10.1-no-relax-everywhere.patch
- eapply "${FILESDIR}"/${PN}-8.10.1-allow-cross-bootstrap.patch
-
- # a bunch of crosscompiler patches
- # needs newer version:
- #eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
-
- # mingw32 target
- pushd "${S}/libraries/Win32"
- eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
- popd
-
- bump_libs
-
- eapply_user
- # as we have changed the build system
- eautoreconf
- fi
-}
-
-src_configure() {
- if ! use binary; then
- # initialize build.mk
- echo '# Gentoo changes' > mk/build.mk
-
- # Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
- echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
- echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-
- # We also need to use the GHC_FLAGS flags when building ghc itself
- echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
- echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
- echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
- # Speed up initial Cabal bootstrap
- echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
- # We can't depend on haddock except when bootstrapping when we
- # must build docs and include them into the binary .tbz2 package
- # app-text/dblatex is not in portage, can not build PDF or PS
- echo "BUILD_SPHINX_PDF = NO" >> mk/build.mk
- echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
- echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
- # this controls presence on 'xhtml' and 'haddock' in final install
- echo "HADDOCK_DOCS = YES" >> mk/build.mk
-
- # not used outside of ghc's test
- if [[ -n ${GHC_BUILD_DPH} ]]; then
- echo "BUILD_DPH = YES" >> mk/build.mk
- else
- echo "BUILD_DPH = NO" >> mk/build.mk
- fi
-
- # Any non-native build has to skip as it needs
- # target haddock binary to be runnabine.
- if ! is_native; then
- # disable docs generation as it requires running stage2
- echo "HADDOCK_DOCS=NO" >> mk/build.mk
- echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
- echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
- fi
-
- if is_crosscompile; then
- # Install ghc-stage1 crosscompiler instead of
- # ghc-stage2 cross-built compiler.
- echo "Stage1Only=YES" >> mk/build.mk
- fi
-
- # allows overriding build flavours for libraries:
- # v - vanilla (static libs)
- # p - profiled
- # dyn - shared libraries
- # example: GHC_LIBRARY_WAYS="v dyn"
- if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
- echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
- fi
- echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
- # Get ghc from the unpacked binary .tbz2
- # except when bootstrapping we just pick ghc up off the path
- if ! use ghcbootstrap; then
- export PATH="${WORKDIR}/usr/bin:${PATH}"
- fi
-
- echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
-
- # don't strip anything. Very useful when stage2 SIGSEGVs on you
- echo "STRIP_CMD = :" >> mk/build.mk
-
- local econf_args=()
-
- # GHC embeds toolchain it was built by and uses it later.
- # Don't allow things like ccache or versioned binary slip.
- # We use stable thing across gcc upgrades.
- # User can use EXTRA_ECONF=CC=... to override this default.
- econf_args+=(
- AR=${CTARGET}-ar
- CC=${CTARGET}-gcc
- # these should be inferred by GHC but ghc defaults
- # to using bundled tools on windows.
- Windres=${CTARGET}-windres
- DllWrap=${CTARGET}-dllwrap
- # we set the linker explicitly below
- --disable-ld-override
- )
- case ${CTARGET} in
- arm*)
- # ld.bfd-2.28 does not work for ghc. Force ld.gold
- # instead. This should be removed once gentoo gets
- # a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
- econf_args+=(LD=${CTARGET}-ld.gold)
- ;;
- sparc*)
- # ld.gold-2.28 does not work for ghc. Force ld.bfd
- # instead. This should be removed once gentoo gets
- # a fix for missing --no-relax support bug:
- # https://sourceware.org/ml/binutils/2017-07/msg00183.html
- econf_args+=(LD=${CTARGET}-ld.bfd)
- ;;
- *)
- econf_args+=(LD=${CTARGET}-ld)
- esac
-
- if [[ ${CBUILD} != ${CHOST} ]]; then
- # GHC bug: ghc claims not to support cross-building.
- # It does, but does not distinct --host= value
- # for stage1 and stage2 compiler.
- econf_args+=(--host=${CBUILD})
- fi
-
- if use ghcmakebinary; then
- # When building booting libary we are trying to
- # bundle or restrict most of external depends
- # with unstable ABI:
- # - embed libffi (default GHC behaviour)
- # - disable ncurses support for ghci (via haskeline)
- # https://bugs.gentoo.org/557478
- # - disable ncurses support for ghc-pkg
- echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
- echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
- elif is_native; then
- # using ${GTARGET}'s libffi is not supported yet:
- # GHC embeds full path for ffi includes without /usr/${CTARGET} account.
- econf_args+=(--with-system-libffi)
- econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
- fi
-
- einfo "Final mk/build.mk:"
- cat mk/build.mk || die
-
- econf ${econf_args[@]} \
- --enable-bootstrap-with-devel-snapshot \
- $(use_enable elfutils dwarf-unwind) \
- $(use_enable numa)
-
- if [[ ${PV} == *9999* ]]; then
- GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
- GHC_P=${PN}-${GHC_PV}
- fi
- fi # ! use binary
-}
-
-src_compile() {
- if ! use binary; then
- # Stage1Only crosscompiler does not build stage2
- if ! is_crosscompile; then
- # 1. build/pax-mark compiler binary first
- emake ghc/stage2/build/tmp/ghc-stage2
- # 2. pax-mark (bug #516430)
- pax-mark -m ghc/stage2/build/tmp/ghc-stage2
- # 2. build/pax-mark haddock using ghc-stage2
- if is_native; then
- # non-native build does not build haddock
- # due to HADDOCK_DOCS=NO, but it could.
- emake utils/haddock/dist/build/tmp/haddock
- pax-mark -m utils/haddock/dist/build/tmp/haddock
- fi
- fi
- # 3. and then all the rest
- emake all
- fi # ! use binary
-}
-
-src_test() {
- # TODO: deal with:
- # - sandbox (pollutes environment)
- # - extra packages (to extend testsuite coverage)
- # bits are taken from 'validate'
- local make_test_target='test' # can be fulltest
- # not 'emake' as testsuite uses '$MAKE' without jobserver available
- make $make_test_target stage=2 THREADS=$(makeopts_jobs)
-}
-
-src_install() {
- if use binary; then
- use prefix && mkdir -p "${ED}"
- mv "${S}/usr" "${ED}"
- else
- [[ -f VERSION ]] || emake VERSION
-
- # -j1 due to a rare race in install script:
- # make --no-print-directory -f ghc.mk phase=final install
- # /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
- # -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
- # /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644 utils/hsc2hs/template-hsc.h \
- # "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
- # /usr/bin/install: cannot create regular file \
- # '/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}"
-
- # Skip for cross-targets as they all share target location:
- # /usr/share/doc/ghc-9999/
- if ! is_crosscompile; then
- dodoc "distrib/README" "LICENSE" "VERSION"
- fi
-
- # rename ghc-shipped files to avoid collision
- # of external packages. Motivating example:
- # user had installed:
- # dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
- # dev-haskell/transformers-0.4.2.0
- # then user tried to update to
- # dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
- # this will lead to single .conf file collision.
- local shipped_conf renamed_conf
- local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
- for shipped_conf in "${package_confdir}"/*.conf; do
- # rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
- renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
- mv "${shipped_conf}" "${renamed_conf}" || die
- done
-
- # remove link, but leave 'haddock-${GHC_P}'
- rm -f "${ED}"/usr/bin/$(cross)haddock
-
- if ! is_crosscompile; then
- newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
- newbashcomp utils/completion/ghc.bash ghc
- fi
- fi
-
- # path to the package.cache
- local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
- PKGCACHE="${package_confdir}"/package.cache
- # copy the package.conf.d, including timestamp, save it so we can help
- # users that have a broken package.conf.d
- cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
- # copy the package.conf, including timestamp, save it so we later can put it
- # back before uninstalling, or when upgrading.
- cp -p "${PKGCACHE}"{,.shipped} \
- || die "failed to copy package.conf.d/package.cache"
-
- if is_crosscompile; then
- # When we build a cross-compiler the layout is the following:
- # usr/lib/${CTARGET}-ghc-${VER}/ contains target libraries
- # but
- # usr/lib/${CTARGET}-ghc-${VER}/bin/ directory
- # containst host binaries (modulo bugs).
-
- # Portage's stripping mechanism does not skip stripping
- # foreign binaries. This frequently causes binaries to be
- # broken.
- #
- # Thus below we disable stripping of target libraries and allow
- # stripping hosts executables.
- dostrip -x "/usr/$(get_libdir)/$(cross)${GHC_P}"
- dostrip "/usr/$(get_libdir)/$(cross)${GHC_P}/bin"
- fi
-}
-
-pkg_preinst() {
- # have we got an earlier version of ghc installed?
- if has_version "<${CATEGORY}/${PF}"; then
- haskell_updater_warn="1"
- fi
-}
-
-pkg_postinst() {
- ghc-reregister
-
- # path to the package.cache
- PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
- # give the cache a new timestamp, it must be as recent as
- # the package.conf.d directory.
- touch "${PKGCACHE}"
-
- if [[ "${haskell_updater_warn}" == "1" ]]; then
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- ewarn "You have just upgraded from an older version of GHC."
- ewarn "You may have to run"
- ewarn " 'haskell-updater'"
- ewarn "to rebuild all ghc-based Haskell libraries."
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- fi
-}
-
-pkg_prerm() {
- PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
- rm -rf "${PKGCACHE}"
-
- cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
- ghc-package_pkg_postrm
-}
diff --git a/dev-lang/ghc/ghc-8.10.2.ebuild b/dev-lang/ghc/ghc-8.10.2.ebuild
deleted file mode 100644
index fc819806ed06..000000000000
--- a/dev-lang/ghc/ghc-8.10.2.ebuild
+++ /dev/null
@@ -1,797 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
- if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- export CTARGET=${CATEGORY/cross-}
- fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib multiprocessing pax-utils toolchain-funcs prefix
-inherit check-reqs
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-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 amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/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 )"
-#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 sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
- case "${ARCH}" in
- #alpha) return 0 ;;
- #arm64) return 0 ;;
- #arm) return 0 ;;
- amd64) return 0 ;;
- #ia64) return 0 ;;
- #ppc) return 0 ;;
- #ppc64)
- # use big-endian && return 0
- # return 0
- # ;;
- #sparc) return 0 ;;
- x86) return 0 ;;
- *) return 1 ;;
- esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.10.0.20200123 # uncomment only for -alpha, -beta, -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? (
- https://downloads.haskell.org/ghc/${PV/_/-}/${GHC_P}-src.tar.xz
- test? ( https://downloads.haskell.org/ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
-)"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
- # "hackage-name hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-KEYWORDS=""
-IUSE="big-endian doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
-IUSE+=" binary"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- >=dev-lang/perl-5.6.1
- dev-libs/gmp:0=
- sys-libs/ncurses:0=[unicode]
- elfutils? ( dev-libs/elfutils )
- !ghcmakebinary? ( dev-libs/libffi:= )
- numa? ( sys-process/numactl )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-# utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
- !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
- sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}
- doc? ( app-text/docbook-xml-dtd:4.2
- app-text/docbook-xml-dtd:4.5
- app-text/docbook-xsl-stylesheets
- dev-python/sphinx
- >=dev-libs/libxslt-1.1.2 )
- !ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-# we build binaries without profiling support
-REQUIRED_USE="
- ?? ( ghcbootstrap binary )
- ?? ( profile binary )
-"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-is_native() {
- [[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
-}
-
-if ! is_crosscompile; then
- PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
-fi
-
-# returns tool prefix for crosscompiler.
-# Example:
-# CTARGET=armv7a-unknown-linux-gnueabi
-# CHOST=x86_64-pc-linux-gnu
-# "armv7a-unknown-linux-gnueabi-"
-# CTARGET=${CHOST}
-# ""
-# Used in tools and library prefix:
-# "${ED}"/usr/bin/$(cross)haddock
-# "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
- if is_crosscompile; then
- echo "${CTARGET}-"
- else
- echo ""
- fi
-}
-
-append-ghc-cflags() {
- local persistent compile assemble link
- local flag ghcflag
-
- for flag in $*; do
- case ${flag} in
- persistent) persistent="yes";;
- compile) compile="yes";;
- assemble) assemble="yes";;
- link) link="yes";;
- *)
- [[ ${compile} ]] && ghcflag="-optc${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${assemble} ]] && ghcflag="-opta${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${link} ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- ;;
- esac
- done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
- local pn=$1 pv=$2
- local p=${pn}-${pv}
- local f
-
- einfo "Bumping ${pn} up to ${pv}"
-
- for f in ghc.mk GNUmakefile; do
- mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
- done
- mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
- mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
- local p pn pv
- for p in "${BUMP_LIBRARIES[@]}"; do
- set -- $p
- pn=$1 pv=$2
-
- SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
- done
-}
-
-update_SRC_URI
-
-bump_libs() {
- local p pn pv
- for p in "${BUMP_LIBRARIES[@]}"; do
- set -- $p
- pn=$1 pv=$2
-
- bump_lib "${pn}" "${pv}"
- done
-}
-
-ghc_setup_cflags() {
- # TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
- if ! is_native; then
- export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
- export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
- einfo "Crosscompiling mode:"
- einfo " CHOST: ${CHOST}"
- einfo " CTARGET: ${CTARGET}"
- einfo " CFLAGS: ${CFLAGS}"
- einfo " LDFLAGS: ${LDFLAGS}"
- einfo " prefix: $(cross)"
- return
- fi
- # We need to be very careful with the CFLAGS we ask ghc to pass through to
- # gcc. There are plenty of flags which will make gcc produce output that
- # breaks ghc in various ways. The main ones we want to pass through are
- # -mcpu / -march flags. These are important for arches like alpha & sparc.
- # We also use these CFLAGS for building the C parts of ghc, ie the rts.
- strip-flags
- strip-unsupported-flags
-
- # Cmm can't parse line numbers #482086
- replace-flags -ggdb[3-9] -ggdb2
-
- GHC_FLAGS=""
- GHC_PERSISTENT_FLAGS=""
- for flag in ${CFLAGS}; do
- case ${flag} in
-
- # Ignore extra optimisation (ghc passes -O to gcc anyway)
- # -O2 and above break on too many systems
- -O*) ;;
-
- # Arch and ABI flags are what we're really after
- -m*) append-ghc-cflags compile assemble ${flag};;
-
- # Sometimes it's handy to see backtrace of RTS
- # to get an idea what happens there
- -g*) append-ghc-cflags compile ${flag};;
-
- # Ignore all other flags, including all -f* flags
- esac
- done
-
- 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 ...
-relocate_path() {
- local from=$1
- local to=$2
- shift 2
- local file=
- for file in "$@"
- do
- sed -i -e "s|$from|$to|g" \
- "$file" || die "path relocation failed for '$file'"
- done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
- local to=$1 ghc_v=${BIN_PV}
-
- # libdir for prebuilt binary and for current system may mismatch
- # It does for prefix installation for example: bug #476998
- local bin_ghc_prefix=${WORKDIR}/usr
- local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
- local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
- # backup original script to use it later after relocation
- local gp_back="${T}/ghc-pkg-${ghc_v}-orig"
- cp "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
- if [[ ${bin_libdir} != $(get_libdir) ]]; then
- einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
- # moving the dir itself is not strictly needed
- # but then USE=binary would result in installing
- # in '${bin_libdir}'
- mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
- relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
- "${WORKDIR}/usr/bin/ghc-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghci-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/bin/runghc-${ghc_v}" \
- "$gp_back" \
- "${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
- fi
-
- # Relocate from /usr to ${EPREFIX}/usr
- relocate_path "/usr" "${to}/usr" \
- "${WORKDIR}/usr/bin/ghc-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghci-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
- "${WORKDIR}/usr/bin/haddock-ghc-${ghc_v}" \
- "${WORKDIR}/usr/bin/hp2ps" \
- "${WORKDIR}/usr/bin/hpc" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/bin/runghc-${ghc_v}" \
- "${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-
- # this one we will use to regenerate cache
- # so it should point to current tree location
- relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
- if use prefix; then
- hprefixify "${bin_libpath}"/${PN}*/settings
- fi
-
- # regenerate the binary package cache
- "$gp_back" recache || die "failed to update cache after relocation"
- rm "$gp_back"
-}
-
-ghc-check-reqs() {
- # These are pessimistic values (slightly bigger than worst-case)
- # Worst case is UNREG USE=profile ia64. See bug #611866 for some
- # numbers on various arches.
- CHECKREQS_DISK_BUILD=8G
- CHECKREQS_DISK_USR=2G
- # USE=binary roughly takes
- use binary && CHECKREQS_DISK_BUILD=4G
-
- "$@"
-}
-
-pkg_pretend() {
- ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- ghc-check-reqs check-reqs_pkg_setup
-
- # quiet portage about prebuilt binaries
- use binary && QA_PREBUILT="*"
-
- [[ ${MERGE_TYPE} == binary ]] && return
-
- if use ghcbootstrap; then
- ewarn "You requested ghc bootstrapping, this is usually only used"
- ewarn "by Gentoo developers to make binary .tbz2 packages."
-
- [[ -z $(type -P ghc) ]] && \
- die "Could not find a ghc to bootstrap with."
- else
- if ! yet_binary; then
- eerror "Please try emerging with USE=ghcbootstrap and report build"
- eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
- die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
- fi
- fi
-}
-
-src_unpack() {
- # Create the ${S} dir if we're using the binary version
- use binary && mkdir "${S}"
-
- # the Solaris and Darwin binaries from ghc (maeder) need to be
- # unpacked separately, so prevent them from being unpacked
- local ONLYA=${A}
- case ${CHOST} in
- *-darwin* | *-solaris*) ONLYA=${GHC_P}-src.tar.xz ;;
- esac
- unpack ${ONLYA}
-}
-
-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"
- fi
-
- if use binary; then
- if use prefix; then
- relocate_ghc "${EPREFIX}"
- fi
-
- # Move unpacked files to the expected place
- mv "${WORKDIR}/usr" "${S}"
- eapply_user
- else
- if ! use ghcbootstrap; then
- case ${CHOST} in
- *-darwin* | *-solaris*)
- # UPDATE ME for ghc-7
- mkdir "${WORKDIR}"/ghc-bin-installer || die
- pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
- use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
- use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
- use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
- popd > /dev/null
-
- pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
- # fix the binaries so they run, on Solaris we need an
- # LD_LIBRARY_PATH which has our prefix libdirs, on
- # Darwin we need to replace the frameworks with our libs
- # from the prefix fix before installation, because some
- # of the tools are actually used during configure/make
- if [[ ${CHOST} == *-solaris* ]] ; then
- export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
- elif [[ ${CHOST} == *-darwin* ]] ; then
- local readline_framework=GNUreadline.framework/GNUreadline
- local gmp_framework=/opt/local/lib/libgmp.10.dylib
- local ncurses_file=/opt/local/lib/libncurses.5.dylib
- for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
- install_name_tool -change \
- ${readline_framework} \
- "${EPREFIX}"/lib/libreadline.dylib \
- ${binary} || die
- install_name_tool -change \
- ${gmp_framework} \
- "${EPREFIX}"/usr/lib/libgmp.dylib \
- ${binary} || die
- install_name_tool -change \
- ${ncurses_file} \
- "${EPREFIX}"/usr/lib/libncurses.dylib \
- ${binary} || die
- done
- # we don't do frameworks!
- sed -i \
- -e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
- -e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
- rts/package.conf.in || die
- fi
-
- # it is autoconf, but we really don't want to give it too
- # many arguments, in fact we do the make in-place anyway
- ./configure --prefix="${WORKDIR}"/usr || die
- make install || die
- popd > /dev/null
- ;;
- *)
- relocate_ghc "${WORKDIR}"
- ;;
- esac
- fi
-
- sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
- "${S}/ghc/ghc.wrapper"
-
- cd "${S}" # otherwise eapply will break
-
- eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
- eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
- eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
- eapply "${FILESDIR}"/${PN}-8.8.1-revert-CPP.patch
- eapply "${FILESDIR}"/${PN}-8.10.1-allow-cross-bootstrap.patch
- eapply "${FILESDIR}"/${PN}-8.10.2-revert-linker-rtsSymbols_more_linker_symbols.patch
-
- # a bunch of crosscompiler patches
- # needs newer version:
- #eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
-
- # mingw32 target
- pushd "${S}/libraries/Win32"
- eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
- popd
-
- bump_libs
-
- eapply_user
- # as we have changed the build system
- eautoreconf
- fi
-}
-
-src_configure() {
- if ! use binary; then
- # initialize build.mk
- echo '# Gentoo changes' > mk/build.mk
-
- # Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
- echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
- echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-
- # We also need to use the GHC_FLAGS flags when building ghc itself
- echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
- echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
- echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
- # Speed up initial Cabal bootstrap
- echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
- # We can't depend on haddock except when bootstrapping when we
- # must build docs and include them into the binary .tbz2 package
- # app-text/dblatex is not in portage, can not build PDF or PS
- echo "BUILD_SPHINX_PDF = NO" >> mk/build.mk
- echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
- echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
- # this controls presence on 'xhtml' and 'haddock' in final install
- echo "HADDOCK_DOCS = YES" >> mk/build.mk
-
- # not used outside of ghc's test
- if [[ -n ${GHC_BUILD_DPH} ]]; then
- echo "BUILD_DPH = YES" >> mk/build.mk
- else
- echo "BUILD_DPH = NO" >> mk/build.mk
- fi
-
- # Any non-native build has to skip as it needs
- # target haddock binary to be runnabine.
- if ! is_native; then
- # disable docs generation as it requires running stage2
- echo "HADDOCK_DOCS=NO" >> mk/build.mk
- echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
- echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
- fi
-
- if is_crosscompile; then
- # Install ghc-stage1 crosscompiler instead of
- # ghc-stage2 cross-built compiler.
- echo "Stage1Only=YES" >> mk/build.mk
- fi
-
- # allows overriding build flavours for libraries:
- # v - vanilla (static libs)
- # p - profiled
- # dyn - shared libraries
- # example: GHC_LIBRARY_WAYS="v dyn"
- if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
- echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
- fi
- echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
- # Get ghc from the unpacked binary .tbz2
- # except when bootstrapping we just pick ghc up off the path
- if ! use ghcbootstrap; then
- export PATH="${WORKDIR}/usr/bin:${PATH}"
- fi
-
- echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
-
- # don't strip anything. Very useful when stage2 SIGSEGVs on you
- echo "STRIP_CMD = :" >> mk/build.mk
-
- local econf_args=()
-
- # GHC embeds toolchain it was built by and uses it later.
- # Don't allow things like ccache or versioned binary slip.
- # We use stable thing across gcc upgrades.
- # User can use EXTRA_ECONF=CC=... to override this default.
- econf_args+=(
- AR=${CTARGET}-ar
- CC=${CTARGET}-gcc
- # these should be inferred by GHC but ghc defaults
- # to using bundled tools on windows.
- Windres=${CTARGET}-windres
- DllWrap=${CTARGET}-dllwrap
- # we set the linker explicitly below
- --disable-ld-override
- )
- case ${CTARGET} in
- arm*)
- # ld.bfd-2.28 does not work for ghc. Force ld.gold
- # instead. This should be removed once gentoo gets
- # a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
- econf_args+=(LD=${CTARGET}-ld.gold)
- ;;
- sparc*)
- # ld.gold-2.28 does not work for ghc. Force ld.bfd
- # instead. This should be removed once gentoo gets
- # a fix for missing --no-relax support bug:
- # https://sourceware.org/ml/binutils/2017-07/msg00183.html
- econf_args+=(LD=${CTARGET}-ld.bfd)
- ;;
- *)
- econf_args+=(LD=${CTARGET}-ld)
- esac
-
- if [[ ${CBUILD} != ${CHOST} ]]; then
- # GHC bug: ghc claims not to support cross-building.
- # It does, but does not distinct --host= value
- # for stage1 and stage2 compiler.
- econf_args+=(--host=${CBUILD})
- fi
-
- if use ghcmakebinary; then
- # When building booting libary we are trying to
- # bundle or restrict most of external depends
- # with unstable ABI:
- # - embed libffi (default GHC behaviour)
- # - disable ncurses support for ghci (via haskeline)
- # https://bugs.gentoo.org/557478
- # - disable ncurses support for ghc-pkg
- echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
- echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
- elif is_native; then
- # using ${GTARGET}'s libffi is not supported yet:
- # GHC embeds full path for ffi includes without /usr/${CTARGET} account.
- econf_args+=(--with-system-libffi)
- econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
- fi
-
- einfo "Final mk/build.mk:"
- cat mk/build.mk || die
-
- econf ${econf_args[@]} \
- --enable-bootstrap-with-devel-snapshot \
- $(use_enable elfutils dwarf-unwind) \
- $(use_enable numa)
-
- if [[ ${PV} == *9999* ]]; then
- GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
- GHC_P=${PN}-${GHC_PV}
- fi
- fi # ! use binary
-}
-
-src_compile() {
- if ! use binary; then
- # Stage1Only crosscompiler does not build stage2
- if ! is_crosscompile; then
- # 1. build/pax-mark compiler binary first
- emake ghc/stage2/build/tmp/ghc-stage2
- # 2. pax-mark (bug #516430)
- pax-mark -m ghc/stage2/build/tmp/ghc-stage2
- # 2. build/pax-mark haddock using ghc-stage2
- if is_native; then
- # non-native build does not build haddock
- # due to HADDOCK_DOCS=NO, but it could.
- emake utils/haddock/dist/build/tmp/haddock
- pax-mark -m utils/haddock/dist/build/tmp/haddock
- fi
- fi
- # 3. and then all the rest
- emake all
- fi # ! use binary
-}
-
-src_test() {
- # TODO: deal with:
- # - sandbox (pollutes environment)
- # - extra packages (to extend testsuite coverage)
- # bits are taken from 'validate'
- local make_test_target='test' # can be fulltest
- # not 'emake' as testsuite uses '$MAKE' without jobserver available
- make $make_test_target stage=2 THREADS=$(makeopts_jobs)
-}
-
-src_install() {
- if use binary; then
- use prefix && mkdir -p "${ED}"
- mv "${S}/usr" "${ED}"
- else
- [[ -f VERSION ]] || emake VERSION
-
- # -j1 due to a rare race in install script:
- # make --no-print-directory -f ghc.mk phase=final install
- # /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
- # -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
- # /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644 utils/hsc2hs/template-hsc.h \
- # "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
- # /usr/bin/install: cannot create regular file \
- # '/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}"
-
- # Skip for cross-targets as they all share target location:
- # /usr/share/doc/ghc-9999/
- if ! is_crosscompile; then
- dodoc "distrib/README" "LICENSE" "VERSION"
- fi
-
- # rename ghc-shipped files to avoid collision
- # of external packages. Motivating example:
- # user had installed:
- # dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
- # dev-haskell/transformers-0.4.2.0
- # then user tried to update to
- # dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
- # this will lead to single .conf file collision.
- local shipped_conf renamed_conf
- local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
- for shipped_conf in "${package_confdir}"/*.conf; do
- # rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
- renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
- mv "${shipped_conf}" "${renamed_conf}" || die
- done
-
- # remove link, but leave 'haddock-${GHC_P}'
- rm -f "${ED}"/usr/bin/$(cross)haddock
-
- if ! is_crosscompile; then
- newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
- newbashcomp utils/completion/ghc.bash ghc
- fi
- fi
-
- # path to the package.cache
- local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
- PKGCACHE="${package_confdir}"/package.cache
- # copy the package.conf.d, including timestamp, save it so we can help
- # users that have a broken package.conf.d
- cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
- # copy the package.conf, including timestamp, save it so we later can put it
- # back before uninstalling, or when upgrading.
- cp -p "${PKGCACHE}"{,.shipped} \
- || die "failed to copy package.conf.d/package.cache"
-
- if is_crosscompile; then
- # When we build a cross-compiler the layout is the following:
- # usr/lib/${CTARGET}-ghc-${VER}/ contains target libraries
- # but
- # usr/lib/${CTARGET}-ghc-${VER}/bin/ directory
- # containst host binaries (modulo bugs).
-
- # Portage's stripping mechanism does not skip stripping
- # foreign binaries. This frequently causes binaries to be
- # broken.
- #
- # Thus below we disable stripping of target libraries and allow
- # stripping hosts executables.
- dostrip -x "/usr/$(get_libdir)/$(cross)${GHC_P}"
- dostrip "/usr/$(get_libdir)/$(cross)${GHC_P}/bin"
- fi
-}
-
-pkg_preinst() {
- # have we got an earlier version of ghc installed?
- if has_version "<${CATEGORY}/${PF}"; then
- haskell_updater_warn="1"
- fi
-}
-
-pkg_postinst() {
- ghc-reregister
-
- # path to the package.cache
- PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
- # give the cache a new timestamp, it must be as recent as
- # the package.conf.d directory.
- touch "${PKGCACHE}"
-
- if [[ "${haskell_updater_warn}" == "1" ]]; then
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- ewarn "You have just upgraded from an older version of GHC."
- ewarn "You may have to run"
- ewarn " 'haskell-updater'"
- ewarn "to rebuild all ghc-based Haskell libraries."
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- fi
-}
-
-pkg_prerm() {
- PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
- rm -rf "${PKGCACHE}"
-
- cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
- ghc-package_pkg_postrm
-}
diff --git a/dev-lang/ghc/ghc-8.10.3.ebuild b/dev-lang/ghc/ghc-8.10.3.ebuild
deleted file mode 100644
index 4b91c85afe92..000000000000
--- a/dev-lang/ghc/ghc-8.10.3.ebuild
+++ /dev/null
@@ -1,796 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
- if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- export CTARGET=${CATEGORY/cross-}
- fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib multiprocessing pax-utils toolchain-funcs prefix
-inherit check-reqs
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-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 amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/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 )"
-#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 sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
- case "${ARCH}" in
- #alpha) return 0 ;;
- #arm64) return 0 ;;
- #arm) return 0 ;;
- amd64) return 0 ;;
- #ia64) return 0 ;;
- #ppc) return 0 ;;
- #ppc64)
- # use big-endian && return 0
- # return 0
- # ;;
- #sparc) return 0 ;;
- x86) return 0 ;;
- *) return 1 ;;
- esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.10.0.20200123 # uncomment only for -alpha, -beta, -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? (
- https://downloads.haskell.org/ghc/${PV/_/-}/${GHC_P}-src.tar.xz
- test? ( https://downloads.haskell.org/ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
-)"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
- # "hackage-name hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-#KEYWORDS="~amd64 ~x86"
-IUSE="big-endian doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
-IUSE+=" binary"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- >=dev-lang/perl-5.6.1
- dev-libs/gmp:0=
- sys-libs/ncurses:0=[unicode]
- elfutils? ( dev-libs/elfutils )
- !ghcmakebinary? ( dev-libs/libffi:= )
- numa? ( sys-process/numactl )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-# utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
- !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
- sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}
- doc? ( app-text/docbook-xml-dtd:4.2
- app-text/docbook-xml-dtd:4.5
- app-text/docbook-xsl-stylesheets
- dev-python/sphinx
- >=dev-libs/libxslt-1.1.2 )
- !ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-# we build binaries without profiling support
-REQUIRED_USE="
- ?? ( ghcbootstrap binary )
- ?? ( profile binary )
-"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-is_native() {
- [[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
-}
-
-if ! is_crosscompile; then
- PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
-fi
-
-# returns tool prefix for crosscompiler.
-# Example:
-# CTARGET=armv7a-unknown-linux-gnueabi
-# CHOST=x86_64-pc-linux-gnu
-# "armv7a-unknown-linux-gnueabi-"
-# CTARGET=${CHOST}
-# ""
-# Used in tools and library prefix:
-# "${ED}"/usr/bin/$(cross)haddock
-# "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
- if is_crosscompile; then
- echo "${CTARGET}-"
- else
- echo ""
- fi
-}
-
-append-ghc-cflags() {
- local persistent compile assemble link
- local flag ghcflag
-
- for flag in $*; do
- case ${flag} in
- persistent) persistent="yes";;
- compile) compile="yes";;
- assemble) assemble="yes";;
- link) link="yes";;
- *)
- [[ ${compile} ]] && ghcflag="-optc${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${assemble} ]] && ghcflag="-opta${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${link} ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- ;;
- esac
- done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
- local pn=$1 pv=$2
- local p=${pn}-${pv}
- local f
-
- einfo "Bumping ${pn} up to ${pv}"
-
- for f in ghc.mk GNUmakefile; do
- mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
- done
- mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
- mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
- local p pn pv
- for p in "${BUMP_LIBRARIES[@]}"; do
- set -- $p
- pn=$1 pv=$2
-
- SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
- done
-}
-
-update_SRC_URI
-
-bump_libs() {
- local p pn pv
- for p in "${BUMP_LIBRARIES[@]}"; do
- set -- $p
- pn=$1 pv=$2
-
- bump_lib "${pn}" "${pv}"
- done
-}
-
-ghc_setup_cflags() {
- # TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
- if ! is_native; then
- export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
- export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
- einfo "Crosscompiling mode:"
- einfo " CHOST: ${CHOST}"
- einfo " CTARGET: ${CTARGET}"
- einfo " CFLAGS: ${CFLAGS}"
- einfo " LDFLAGS: ${LDFLAGS}"
- einfo " prefix: $(cross)"
- return
- fi
- # We need to be very careful with the CFLAGS we ask ghc to pass through to
- # gcc. There are plenty of flags which will make gcc produce output that
- # breaks ghc in various ways. The main ones we want to pass through are
- # -mcpu / -march flags. These are important for arches like alpha & sparc.
- # We also use these CFLAGS for building the C parts of ghc, ie the rts.
- strip-flags
- strip-unsupported-flags
-
- # Cmm can't parse line numbers #482086
- replace-flags -ggdb[3-9] -ggdb2
-
- GHC_FLAGS=""
- GHC_PERSISTENT_FLAGS=""
- for flag in ${CFLAGS}; do
- case ${flag} in
-
- # Ignore extra optimisation (ghc passes -O to gcc anyway)
- # -O2 and above break on too many systems
- -O*) ;;
-
- # Arch and ABI flags are what we're really after
- -m*) append-ghc-cflags compile assemble ${flag};;
-
- # Sometimes it's handy to see backtrace of RTS
- # to get an idea what happens there
- -g*) append-ghc-cflags compile ${flag};;
-
- # Ignore all other flags, including all -f* flags
- esac
- done
-
- 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 ...
-relocate_path() {
- local from=$1
- local to=$2
- shift 2
- local file=
- for file in "$@"
- do
- sed -i -e "s|$from|$to|g" \
- "$file" || die "path relocation failed for '$file'"
- done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
- local to=$1 ghc_v=${BIN_PV}
-
- # libdir for prebuilt binary and for current system may mismatch
- # It does for prefix installation for example: bug #476998
- local bin_ghc_prefix=${WORKDIR}/usr
- local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
- local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
- # backup original script to use it later after relocation
- local gp_back="${T}/ghc-pkg-${ghc_v}-orig"
- cp "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
- if [[ ${bin_libdir} != $(get_libdir) ]]; then
- einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
- # moving the dir itself is not strictly needed
- # but then USE=binary would result in installing
- # in '${bin_libdir}'
- mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
- relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
- "${WORKDIR}/usr/bin/ghc-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghci-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/bin/runghc-${ghc_v}" \
- "$gp_back" \
- "${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
- fi
-
- # Relocate from /usr to ${EPREFIX}/usr
- relocate_path "/usr" "${to}/usr" \
- "${WORKDIR}/usr/bin/ghc-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghci-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
- "${WORKDIR}/usr/bin/haddock-ghc-${ghc_v}" \
- "${WORKDIR}/usr/bin/hp2ps" \
- "${WORKDIR}/usr/bin/hpc" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/bin/runghc-${ghc_v}" \
- "${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-
- # this one we will use to regenerate cache
- # so it should point to current tree location
- relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
- if use prefix; then
- hprefixify "${bin_libpath}"/${PN}*/settings
- fi
-
- # regenerate the binary package cache
- "$gp_back" recache || die "failed to update cache after relocation"
- rm "$gp_back"
-}
-
-ghc-check-reqs() {
- # These are pessimistic values (slightly bigger than worst-case)
- # Worst case is UNREG USE=profile ia64. See bug #611866 for some
- # numbers on various arches.
- CHECKREQS_DISK_BUILD=8G
- CHECKREQS_DISK_USR=2G
- # USE=binary roughly takes
- use binary && CHECKREQS_DISK_BUILD=4G
-
- "$@"
-}
-
-pkg_pretend() {
- ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- ghc-check-reqs check-reqs_pkg_setup
-
- # quiet portage about prebuilt binaries
- use binary && QA_PREBUILT="*"
-
- [[ ${MERGE_TYPE} == binary ]] && return
-
- if use ghcbootstrap; then
- ewarn "You requested ghc bootstrapping, this is usually only used"
- ewarn "by Gentoo developers to make binary .tbz2 packages."
-
- [[ -z $(type -P ghc) ]] && \
- die "Could not find a ghc to bootstrap with."
- else
- if ! yet_binary; then
- eerror "Please try emerging with USE=ghcbootstrap and report build"
- eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
- die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
- fi
- fi
-}
-
-src_unpack() {
- # Create the ${S} dir if we're using the binary version
- use binary && mkdir "${S}"
-
- # the Solaris and Darwin binaries from ghc (maeder) need to be
- # unpacked separately, so prevent them from being unpacked
- local ONLYA=${A}
- case ${CHOST} in
- *-darwin* | *-solaris*) ONLYA=${GHC_P}-src.tar.xz ;;
- esac
- unpack ${ONLYA}
-}
-
-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"
- fi
-
- if use binary; then
- if use prefix; then
- relocate_ghc "${EPREFIX}"
- fi
-
- # Move unpacked files to the expected place
- mv "${WORKDIR}/usr" "${S}"
- eapply_user
- else
- if ! use ghcbootstrap; then
- case ${CHOST} in
- *-darwin* | *-solaris*)
- # UPDATE ME for ghc-7
- mkdir "${WORKDIR}"/ghc-bin-installer || die
- pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
- use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
- use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
- use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
- popd > /dev/null
-
- pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
- # fix the binaries so they run, on Solaris we need an
- # LD_LIBRARY_PATH which has our prefix libdirs, on
- # Darwin we need to replace the frameworks with our libs
- # from the prefix fix before installation, because some
- # of the tools are actually used during configure/make
- if [[ ${CHOST} == *-solaris* ]] ; then
- export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
- elif [[ ${CHOST} == *-darwin* ]] ; then
- local readline_framework=GNUreadline.framework/GNUreadline
- local gmp_framework=/opt/local/lib/libgmp.10.dylib
- local ncurses_file=/opt/local/lib/libncurses.5.dylib
- for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
- install_name_tool -change \
- ${readline_framework} \
- "${EPREFIX}"/lib/libreadline.dylib \
- ${binary} || die
- install_name_tool -change \
- ${gmp_framework} \
- "${EPREFIX}"/usr/lib/libgmp.dylib \
- ${binary} || die
- install_name_tool -change \
- ${ncurses_file} \
- "${EPREFIX}"/usr/lib/libncurses.dylib \
- ${binary} || die
- done
- # we don't do frameworks!
- sed -i \
- -e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
- -e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
- rts/package.conf.in || die
- fi
-
- # it is autoconf, but we really don't want to give it too
- # many arguments, in fact we do the make in-place anyway
- ./configure --prefix="${WORKDIR}"/usr || die
- make install || die
- popd > /dev/null
- ;;
- *)
- relocate_ghc "${WORKDIR}"
- ;;
- esac
- fi
-
- sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
- "${S}/ghc/ghc.wrapper"
-
- cd "${S}" # otherwise eapply will break
-
- eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
- eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
- eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
- eapply "${FILESDIR}"/${PN}-8.8.1-revert-CPP.patch
- eapply "${FILESDIR}"/${PN}-8.10.1-allow-cross-bootstrap.patch
-
- # a bunch of crosscompiler patches
- # needs newer version:
- #eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
-
- # mingw32 target
- pushd "${S}/libraries/Win32"
- eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
- popd
-
- bump_libs
-
- eapply_user
- # as we have changed the build system
- eautoreconf
- fi
-}
-
-src_configure() {
- if ! use binary; then
- # initialize build.mk
- echo '# Gentoo changes' > mk/build.mk
-
- # Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
- echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
- echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-
- # We also need to use the GHC_FLAGS flags when building ghc itself
- echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
- echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
- echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
- # Speed up initial Cabal bootstrap
- echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
- # We can't depend on haddock except when bootstrapping when we
- # must build docs and include them into the binary .tbz2 package
- # app-text/dblatex is not in portage, can not build PDF or PS
- echo "BUILD_SPHINX_PDF = NO" >> mk/build.mk
- echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
- echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
- # this controls presence on 'xhtml' and 'haddock' in final install
- echo "HADDOCK_DOCS = YES" >> mk/build.mk
-
- # not used outside of ghc's test
- if [[ -n ${GHC_BUILD_DPH} ]]; then
- echo "BUILD_DPH = YES" >> mk/build.mk
- else
- echo "BUILD_DPH = NO" >> mk/build.mk
- fi
-
- # Any non-native build has to skip as it needs
- # target haddock binary to be runnabine.
- if ! is_native; then
- # disable docs generation as it requires running stage2
- echo "HADDOCK_DOCS=NO" >> mk/build.mk
- echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
- echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
- fi
-
- if is_crosscompile; then
- # Install ghc-stage1 crosscompiler instead of
- # ghc-stage2 cross-built compiler.
- echo "Stage1Only=YES" >> mk/build.mk
- fi
-
- # allows overriding build flavours for libraries:
- # v - vanilla (static libs)
- # p - profiled
- # dyn - shared libraries
- # example: GHC_LIBRARY_WAYS="v dyn"
- if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
- echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
- fi
- echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
- # Get ghc from the unpacked binary .tbz2
- # except when bootstrapping we just pick ghc up off the path
- if ! use ghcbootstrap; then
- export PATH="${WORKDIR}/usr/bin:${PATH}"
- fi
-
- echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
-
- # don't strip anything. Very useful when stage2 SIGSEGVs on you
- echo "STRIP_CMD = :" >> mk/build.mk
-
- local econf_args=()
-
- # GHC embeds toolchain it was built by and uses it later.
- # Don't allow things like ccache or versioned binary slip.
- # We use stable thing across gcc upgrades.
- # User can use EXTRA_ECONF=CC=... to override this default.
- econf_args+=(
- AR=${CTARGET}-ar
- CC=${CTARGET}-gcc
- # these should be inferred by GHC but ghc defaults
- # to using bundled tools on windows.
- Windres=${CTARGET}-windres
- DllWrap=${CTARGET}-dllwrap
- # we set the linker explicitly below
- --disable-ld-override
- )
- case ${CTARGET} in
- arm*)
- # ld.bfd-2.28 does not work for ghc. Force ld.gold
- # instead. This should be removed once gentoo gets
- # a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
- econf_args+=(LD=${CTARGET}-ld.gold)
- ;;
- sparc*)
- # ld.gold-2.28 does not work for ghc. Force ld.bfd
- # instead. This should be removed once gentoo gets
- # a fix for missing --no-relax support bug:
- # https://sourceware.org/ml/binutils/2017-07/msg00183.html
- econf_args+=(LD=${CTARGET}-ld.bfd)
- ;;
- *)
- econf_args+=(LD=${CTARGET}-ld)
- esac
-
- if [[ ${CBUILD} != ${CHOST} ]]; then
- # GHC bug: ghc claims not to support cross-building.
- # It does, but does not distinct --host= value
- # for stage1 and stage2 compiler.
- econf_args+=(--host=${CBUILD})
- fi
-
- if use ghcmakebinary; then
- # When building booting libary we are trying to
- # bundle or restrict most of external depends
- # with unstable ABI:
- # - embed libffi (default GHC behaviour)
- # - disable ncurses support for ghci (via haskeline)
- # https://bugs.gentoo.org/557478
- # - disable ncurses support for ghc-pkg
- echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
- echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
- elif is_native; then
- # using ${GTARGET}'s libffi is not supported yet:
- # GHC embeds full path for ffi includes without /usr/${CTARGET} account.
- econf_args+=(--with-system-libffi)
- econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
- fi
-
- einfo "Final mk/build.mk:"
- cat mk/build.mk || die
-
- econf ${econf_args[@]} \
- --enable-bootstrap-with-devel-snapshot \
- $(use_enable elfutils dwarf-unwind) \
- $(use_enable numa)
-
- if [[ ${PV} == *9999* ]]; then
- GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
- GHC_P=${PN}-${GHC_PV}
- fi
- fi # ! use binary
-}
-
-src_compile() {
- if ! use binary; then
- # Stage1Only crosscompiler does not build stage2
- if ! is_crosscompile; then
- # 1. build/pax-mark compiler binary first
- emake ghc/stage2/build/tmp/ghc-stage2
- # 2. pax-mark (bug #516430)
- pax-mark -m ghc/stage2/build/tmp/ghc-stage2
- # 2. build/pax-mark haddock using ghc-stage2
- if is_native; then
- # non-native build does not build haddock
- # due to HADDOCK_DOCS=NO, but it could.
- emake utils/haddock/dist/build/tmp/haddock
- pax-mark -m utils/haddock/dist/build/tmp/haddock
- fi
- fi
- # 3. and then all the rest
- emake all
- fi # ! use binary
-}
-
-src_test() {
- # TODO: deal with:
- # - sandbox (pollutes environment)
- # - extra packages (to extend testsuite coverage)
- # bits are taken from 'validate'
- local make_test_target='test' # can be fulltest
- # not 'emake' as testsuite uses '$MAKE' without jobserver available
- make $make_test_target stage=2 THREADS=$(makeopts_jobs)
-}
-
-src_install() {
- if use binary; then
- use prefix && mkdir -p "${ED}"
- mv "${S}/usr" "${ED}"
- else
- [[ -f VERSION ]] || emake VERSION
-
- # -j1 due to a rare race in install script:
- # make --no-print-directory -f ghc.mk phase=final install
- # /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
- # -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
- # /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644 utils/hsc2hs/template-hsc.h \
- # "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
- # /usr/bin/install: cannot create regular file \
- # '/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}"
-
- # Skip for cross-targets as they all share target location:
- # /usr/share/doc/ghc-9999/
- if ! is_crosscompile; then
- dodoc "distrib/README" "LICENSE" "VERSION"
- fi
-
- # rename ghc-shipped files to avoid collision
- # of external packages. Motivating example:
- # user had installed:
- # dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
- # dev-haskell/transformers-0.4.2.0
- # then user tried to update to
- # dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
- # this will lead to single .conf file collision.
- local shipped_conf renamed_conf
- local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
- for shipped_conf in "${package_confdir}"/*.conf; do
- # rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
- renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
- mv "${shipped_conf}" "${renamed_conf}" || die
- done
-
- # remove link, but leave 'haddock-${GHC_P}'
- rm -f "${ED}"/usr/bin/$(cross)haddock
-
- if ! is_crosscompile; then
- newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
- newbashcomp utils/completion/ghc.bash ghc
- fi
- fi
-
- # path to the package.cache
- local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
- PKGCACHE="${package_confdir}"/package.cache
- # copy the package.conf.d, including timestamp, save it so we can help
- # users that have a broken package.conf.d
- cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
- # copy the package.conf, including timestamp, save it so we later can put it
- # back before uninstalling, or when upgrading.
- cp -p "${PKGCACHE}"{,.shipped} \
- || die "failed to copy package.conf.d/package.cache"
-
- if is_crosscompile; then
- # When we build a cross-compiler the layout is the following:
- # usr/lib/${CTARGET}-ghc-${VER}/ contains target libraries
- # but
- # usr/lib/${CTARGET}-ghc-${VER}/bin/ directory
- # containst host binaries (modulo bugs).
-
- # Portage's stripping mechanism does not skip stripping
- # foreign binaries. This frequently causes binaries to be
- # broken.
- #
- # Thus below we disable stripping of target libraries and allow
- # stripping hosts executables.
- dostrip -x "/usr/$(get_libdir)/$(cross)${GHC_P}"
- dostrip "/usr/$(get_libdir)/$(cross)${GHC_P}/bin"
- fi
-}
-
-pkg_preinst() {
- # have we got an earlier version of ghc installed?
- if has_version "<${CATEGORY}/${PF}"; then
- haskell_updater_warn="1"
- fi
-}
-
-pkg_postinst() {
- ghc-reregister
-
- # path to the package.cache
- PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
- # give the cache a new timestamp, it must be as recent as
- # the package.conf.d directory.
- touch "${PKGCACHE}"
-
- if [[ "${haskell_updater_warn}" == "1" ]]; then
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- ewarn "You have just upgraded from an older version of GHC."
- ewarn "You may have to run"
- ewarn " 'haskell-updater'"
- ewarn "to rebuild all ghc-based Haskell libraries."
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- fi
-}
-
-pkg_prerm() {
- PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
- rm -rf "${PKGCACHE}"
-
- cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
- ghc-package_pkg_postrm
-}
diff --git a/dev-lang/ghc/ghc-8.10.4.ebuild b/dev-lang/ghc/ghc-8.10.4.ebuild
index a0a3d692f588..7257681ccbe7 100644
--- a/dev-lang/ghc/ghc-8.10.4.ebuild
+++ b/dev-lang/ghc/ghc-8.10.4.ebuild
@@ -75,8 +75,7 @@ BUMP_LIBRARIES=(
LICENSE="BSD"
SLOT="0/${PV}"
-# no binaries yet
-#KEYWORDS="~amd64 ~x86"
+KEYWORDS="~amd64 ~x86"
IUSE="big-endian doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
IUSE+=" binary"
RESTRICT="!test? ( test )"
diff --git a/dev-lang/ghc/ghc-8.2.1.ebuild b/dev-lang/ghc/ghc-8.2.1.ebuild
deleted file mode 100644
index aa2a45cf9624..000000000000
--- a/dev-lang/ghc/ghc-8.2.1.ebuild
+++ /dev/null
@@ -1,754 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
- if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- export CTARGET=${CATEGORY/cross-}
- fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib pax-utils toolchain-funcs versionator prefix
-inherit check-reqs
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-# 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 amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/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 )"
-#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
-#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
- case "${ARCH}" in
- #alpha) return 0 ;;
- #arm64) return 0 ;;
- #arm) return 0 ;;
- amd64) return 0 ;;
- #ia64) return 0 ;;
- #ppc) return 0 ;;
- #ppc64) return 0 ;;
- #sparc) return 0 ;;
- x86) return 0 ;;
- *) return 1 ;;
- esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.2.0.20170704 # uncomment only for -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? ( https://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.xz )"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
- # "hackage-name hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-#KEYWORDS="~alpha ~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="doc ghcbootstrap ghcmakebinary +gmp profile"
-IUSE+=" binary"
-
-RDEPEND="
- >=dev-lang/perl-5.6.1
- dev-libs/gmp:0=
- sys-libs/ncurses:0=[unicode]
- !ghcmakebinary? ( dev-libs/libffi:= )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-# utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
- !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
- sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}
- doc? ( app-text/docbook-xml-dtd:4.2
- app-text/docbook-xml-dtd:4.5
- app-text/docbook-xsl-stylesheets
- dev-python/sphinx
- >=dev-libs/libxslt-1.1.2 )
- !ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
-
-REQUIRED_USE="?? ( ghcbootstrap binary )"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-is_native() {
- [[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
-}
-
-# returns tool prefix for crosscompiler.
-# Example:
-# CTARGET=armv7a-unknown-linux-gnueabi
-# CHOST=x86_64-pc-linux-gnu
-# "armv7a-unknown-linux-gnueabi-"
-# CTARGET=${CHOST}
-# ""
-# Used in tools and library prefix:
-# "${ED}"/usr/bin/$(cross)haddock
-# "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
- if is_crosscompile; then
- echo "${CTARGET}-"
- else
- echo ""
- fi
-}
-
-append-ghc-cflags() {
- local persistent compile assemble link
- local flag ghcflag
-
- for flag in $*; do
- case ${flag} in
- persistent) persistent="yes";;
- compile) compile="yes";;
- assemble) assemble="yes";;
- link) link="yes";;
- *)
- [[ ${compile} ]] && ghcflag="-optc${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${assemble} ]] && ghcflag="-opta${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${link} ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- ;;
- esac
- done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
- local pn=$1 pv=$2
- local p=${pn}-${pv}
- local f
-
- einfo "Bumping ${pn} up to ${pv}"
-
- for f in ghc.mk GNUmakefile; do
- mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
- done
- mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
- mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
- local p pn pv
- for p in "${BUMP_LIBRARIES[@]}"; do
- set -- $p
- pn=$1 pv=$2
-
- SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
- done
-}
-
-update_SRC_URI
-
-bump_libs() {
- local p pn pv
- for p in "${BUMP_LIBRARIES[@]}"; do
- set -- $p
- pn=$1 pv=$2
-
- bump_lib "${pn}" "${pv}"
- done
-}
-
-ghc_setup_cflags() {
- # TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
- if ! is_native; then
- export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
- export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
- einfo "Crosscompiling mode:"
- einfo " CHOST: ${CHOST}"
- einfo " CTARGET: ${CTARGET}"
- einfo " CFLAGS: ${CFLAGS}"
- einfo " LDFLAGS: ${LDFLAGS}"
- einfo " prefix: $(cross)"
- return
- fi
- # We need to be very careful with the CFLAGS we ask ghc to pass through to
- # gcc. There are plenty of flags which will make gcc produce output that
- # breaks ghc in various ways. The main ones we want to pass through are
- # -mcpu / -march flags. These are important for arches like alpha & sparc.
- # We also use these CFLAGS for building the C parts of ghc, ie the rts.
- strip-flags
- strip-unsupported-flags
-
- # Cmm can't parse line numbers #482086
- replace-flags -ggdb[3-9] -ggdb2
-
- GHC_FLAGS=""
- GHC_PERSISTENT_FLAGS=""
- for flag in ${CFLAGS}; do
- case ${flag} in
-
- # Ignore extra optimisation (ghc passes -O to gcc anyway)
- # -O2 and above break on too many systems
- -O*) ;;
-
- # Arch and ABI flags are what we're really after
- -m*) append-ghc-cflags compile assemble ${flag};;
-
- # Sometimes it's handy to see backtrace of RTS
- # to get an idea what happens there
- -g*) append-ghc-cflags compile ${flag};;
-
- # Ignore all other flags, including all -f* flags
- esac
- done
-
- 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
- # hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
- # are not built with fPIC, bug #606666
- gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
- tc-is-gcc && version_is_at_least 6.3 $(gcc-version) && if ! use ghcbootstrap; then
- # gcc-6.3 has support for -no-pie upstream, but spelling differs from
- # gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
- # hardened users try '-pie' in USE=ghcbootstrap mode.
- append-ghc-cflags compile link -no-pie
- fi
-
- # 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 ...
-relocate_path() {
- local from=$1
- local to=$2
- shift 2
- local file=
- for file in "$@"
- do
- sed -i -e "s|$from|$to|g" \
- "$file" || die "path relocation failed for '$file'"
- done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
- local to=$1
-
- # libdir for prebuilt binary and for current system may mismatch
- # It does for prefix installation for example: bug #476998
- local bin_ghc_prefix=${WORKDIR}/usr
- local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
- local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
- # backup original script to use it later after relocation
- local gp_back="${T}/ghc-pkg-${GHC_PV}-orig"
- cp "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
- if [[ ${bin_libdir} != $(get_libdir) ]]; then
- einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
- # moving the dir itself is not strictly needed
- # but then USE=binary would result in installing
- # in '${bin_libdir}'
- mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
- relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
- "${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
- "${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
- "$gp_back" \
- "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
- fi
-
- # Relocate from /usr to ${EPREFIX}/usr
- relocate_path "/usr" "${to}/usr" \
- "${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
- "${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
- "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
-
- # this one we will use to regenerate cache
- # so it should point to current tree location
- relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
- if use prefix; then
- hprefixify "${bin_libpath}"/${PN}*/settings
- fi
-
- # regenerate the binary package cache
- "$gp_back" recache || die "failed to update cache after relocation"
- rm "$gp_back"
-}
-
-ghc-check-reqs() {
- # These are pessimistic values (slightly bigger than worst-case)
- # Worst case is UNREG USE=profile ia64. See bug #611866 for some
- # numbers on various arches.
- CHECKREQS_DISK_BUILD=8G
- CHECKREQS_DISK_USR=2G
- # USE=binary roughly takes
- use binary && CHECKREQS_DISK_BUILD=4G
-
- "$@"
-}
-
-pkg_pretend() {
- ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- ghc-check-reqs check-reqs_pkg_setup
-
- # quiet portage about prebuilt binaries
- use binary && QA_PREBUILT="*"
-
- [[ ${MERGE_TYPE} == binary ]] && return
-
- if use ghcbootstrap; then
- ewarn "You requested ghc bootstrapping, this is usually only used"
- ewarn "by Gentoo developers to make binary .tbz2 packages."
-
- [[ -z $(type -P ghc) ]] && \
- die "Could not find a ghc to bootstrap with."
- else
- if ! yet_binary; then
- eerror "Please try emerging with USE=ghcbootstrap and report build"
- eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
- die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
- fi
- fi
-}
-
-src_unpack() {
- # Create the ${S} dir if we're using the binary version
- use binary && mkdir "${S}"
-
- # the Solaris and Darwin binaries from ghc (maeder) need to be
- # unpacked separately, so prevent them from being unpacked
- local ONLYA=${A}
- case ${CHOST} in
- *-darwin* | *-solaris*) ONLYA=${GHC_P}-src.tar.xz ;;
- esac
- unpack ${ONLYA}
-}
-
-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-${GHC_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)/${GHC_P}/bin/ghc"
- fi
-
- if use binary; then
- if use prefix; then
- relocate_ghc "${EPREFIX}"
- fi
-
- # Move unpacked files to the expected place
- mv "${WORKDIR}/usr" "${S}"
- else
- if ! use ghcbootstrap; then
- case ${CHOST} in
- *-darwin* | *-solaris*)
- # UPDATE ME for ghc-7
- mkdir "${WORKDIR}"/ghc-bin-installer || die
- pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
- use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
- use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
- use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
- popd > /dev/null
-
- pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
- # fix the binaries so they run, on Solaris we need an
- # LD_LIBRARY_PATH which has our prefix libdirs, on
- # Darwin we need to replace the frameworks with our libs
- # from the prefix fix before installation, because some
- # of the tools are actually used during configure/make
- if [[ ${CHOST} == *-solaris* ]] ; then
- export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
- elif [[ ${CHOST} == *-darwin* ]] ; then
- local readline_framework=GNUreadline.framework/GNUreadline
- local gmp_framework=/opt/local/lib/libgmp.10.dylib
- local ncurses_file=/opt/local/lib/libncurses.5.dylib
- for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
- install_name_tool -change \
- ${readline_framework} \
- "${EPREFIX}"/lib/libreadline.dylib \
- ${binary} || die
- install_name_tool -change \
- ${gmp_framework} \
- "${EPREFIX}"/usr/lib/libgmp.dylib \
- ${binary} || die
- install_name_tool -change \
- ${ncurses_file} \
- "${EPREFIX}"/usr/lib/libncurses.dylib \
- ${binary} || die
- done
- # we don't do frameworks!
- sed -i \
- -e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
- -e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
- rts/package.conf.in || die
- fi
-
- # it is autoconf, but we really don't want to give it too
- # much arguments, in fact we do the make in-place anyway
- ./configure --prefix="${WORKDIR}"/usr || die
- make install || die
- popd > /dev/null
- ;;
- *)
- relocate_ghc "${WORKDIR}"
- ;;
- esac
- fi
-
- sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
- "${S}/ghc/ghc.wrapper"
-
- cd "${S}" # otherwise epatch will break
-
- epatch "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
- epatch "${FILESDIR}"/${PN}-8.2.1-darwin.patch
-
- epatch "${FILESDIR}"/${PN}-8.2.1_rc1-cgen-constify.patch
- epatch "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
- epatch "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
-
- epatch "${FILESDIR}"/${PN}-8.2.1_rc2-O2-unreg.patch
-
- # a bunch of crosscompiler patches
- epatch "${FILESDIR}"/${PN}-8.2.1_rc1-unphased-cross.patch
- epatch "${FILESDIR}"/${PN}-8.2.1_rc1-staged-cross.patch
- epatch "${FILESDIR}"/${PN}-8.2.1_rc1-ghci-cross.patch
- epatch "${FILESDIR}"/${PN}-8.2.1_rc1-stage2-cross.patch
- epatch "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
- epatch "${FILESDIR}"/${PN}-8.2.1_rc3-any-vendor.patch
- epatch "${FILESDIR}"/${PN}-8.2.1_rc3-stginit-data.patch
-
- # needs a new libffi release
- epatch "${FILESDIR}"/${PN}-8.0.2-libffi-alpha.patch
-
- # mingw32 target
- pushd "${S}/libraries/Win32"
- epatch "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-1.patch # upstreamed, waits for merge to -HEAD
- epatch "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
- popd
-
- bump_libs
-
- # as we have changed the build system
- eautoreconf
- fi
-}
-
-src_configure() {
- if ! use binary; then
- # initialize build.mk
- echo '# Gentoo changes' > mk/build.mk
-
- # Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
- echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
- echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-
- # We also need to use the GHC_FLAGS flags when building ghc itself
- echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
- echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
- echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
- # Speed up initial Cabal bootstrap
- echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
- # We can't depend on haddock except when bootstrapping when we
- # must build docs and include them into the binary .tbz2 package
- # app-text/dblatex is not in portage, can not build PDF or PS
- echo "BUILD_SPHINX_PDF = NO" >> mk/build.mk
- echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
- echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
- # this controls presence on 'xhtml' and 'haddock' in final install
- echo "HADDOCK_DOCS = YES" >> mk/build.mk
-
- # not used outside of ghc's test
- if [[ -n ${GHC_BUILD_DPH} ]]; then
- echo "BUILD_DPH = YES" >> mk/build.mk
- else
- echo "BUILD_DPH = NO" >> mk/build.mk
- fi
-
- # Any non-native build has to skip as it needs
- # target haddock binary to be runnabine.
- if ! is_native; then
- # disable docs generation as it requires running stage2
- echo "HADDOCK_DOCS=NO" >> mk/build.mk
- echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
- echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
- fi
-
- if is_crosscompile; then
- # Install ghc-stage1 crosscompiler instead of
- # ghc-stage2 cross-built compiler.
- echo "Stage1Only=YES" >> mk/build.mk
- fi
-
- # allows overriding build flavours for libraries:
- # v - vanilla (static libs)
- # p - profiled
- # dyn - shared libraries
- # example: GHC_LIBRARY_WAYS="v dyn"
- if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
- echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
- fi
- echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
- # Get ghc from the unpacked binary .tbz2
- # except when bootstrapping we just pick ghc up off the path
- if ! use ghcbootstrap; then
- export PATH="${WORKDIR}/usr/bin:${PATH}"
- fi
-
- echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
-
- # don't strip anything. Very useful when stage2 SIGSEGVs on you
- echo "STRIP_CMD = :" >> mk/build.mk
-
- local econf_args=()
-
- # GHC embeds toolchain it was built by and uses it later.
- # Don't allow things like ccache or versioned binary slip.
- # We use stable thing across gcc upgrades.
- # User can use EXTRA_ECONF=CC=... to override this default.
- econf_args+=(
- AR=${CTARGET}-ar
- CC=${CTARGET}-gcc
- LD=${CTARGET}-ld
- # these should be inferred by GHC but ghc defaults
- # to using bundled tools on windows.
- Windres=${CTARGET}-windres
- DllWrap=${CTARGET}-dllwrap
- )
- if [[ ${CTARGET} == arm* ]] ; then
- # ld.bfd-2.28 does not work for ghc. Force ld.gold
- # instead. This should be removed once gentoo gets
- # a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
- econf_args+=(LD=${CTARGET}-ld.gold)
- fi
-
- if [[ ${CBUILD} != ${CHOST} ]]; then
- # GHC bug: ghc claims not to support cross-building.
- # It does, but does not distinct --host= value
- # for stage1 and stage2 compiler.
- econf_args+=(--host=${CBUILD})
- fi
-
- if use ghcmakebinary; then
- # When building booting libary we are trying to
- # bundle or restrict most of external depends
- # with unstable ABI:
- # - embed libffi (default GHC behaviour)
- # - disable ncurses support for ghci (via haskeline)
- # https://bugs.gentoo.org/557478
- # - disable ncurses support for ghc-pkg
- echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
- echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
- elif is_native; then
- # using ${GTARGET}'s libffi is not supported yet:
- # GHC embeds full path for ffi includes without /usr/${CTARGET} account.
- econf_args+=(--with-system-libffi)
- econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
- fi
-
- einfo "Final mk/build.mk:"
- cat mk/build.mk || die
-
- econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
-
- if [[ ${PV} == *9999* ]]; then
- GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
- GHC_P=${PN}-${GHC_PV}
- fi
- fi # ! use binary
-}
-
-src_compile() {
- if ! use binary; then
- # Stage1Only crosscompiler does not build stage2
- if ! is_crosscompile; then
- # 1. build/pax-mark compiler binary first
- emake ghc/stage2/build/tmp/ghc-stage2
- # 2. pax-mark (bug #516430)
- pax-mark -m ghc/stage2/build/tmp/ghc-stage2
- # 2. build/pax-mark haddock using ghc-stage2
- if is_native; then
- # non-native build does not build haddock
- # due to HADDOCK_DOCS=NO, but it could.
- emake utils/haddock/dist/build/tmp/haddock
- pax-mark -m utils/haddock/dist/build/tmp/haddock
- fi
- fi
- # 3. and then all the rest
- emake all
- fi # ! use binary
-}
-
-src_install() {
- if use binary; then
- use prefix && mkdir -p "${ED}"
- mv "${S}/usr" "${ED}"
- else
- [[ -f VERSION ]] || emake VERSION
-
- # -j1 due to a rare race in install script:
- # make --no-print-directory -f ghc.mk phase=final install
- # /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
- # -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
- # /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644 utils/hsc2hs/template-hsc.h \
- # "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
- # /usr/bin/install: cannot create regular file \
- # '/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}"
-
- # Skip for cross-targets as they all share target location:
- # /usr/share/doc/ghc-9999/
- if ! is_crosscompile; then
- dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
- fi
-
- # rename ghc-shipped files to avoid collision
- # of external packages. Motivating example:
- # user had installed:
- # dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
- # dev-haskell/transformers-0.4.2.0
- # then user tried to update to
- # dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
- # this will lead to single .conf file collision.
- local shipped_conf renamed_conf
- local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
- for shipped_conf in "${package_confdir}"/*.conf; do
- # rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
- renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
- mv "${shipped_conf}" "${renamed_conf}" || die
- done
-
- # remove link, but leave 'haddock-${GHC_P}'
- rm -f "${ED}"/usr/bin/$(cross)haddock
-
- if ! is_crosscompile; then
- newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
- newbashcomp utils/completion/ghc.bash ghc
- fi
- fi
-
- # path to the package.cache
- local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
- PKGCACHE="${package_confdir}"/package.cache
- # copy the package.conf.d, including timestamp, save it so we can help
- # users that have a broken package.conf.d
- cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
- # copy the package.conf, including timestamp, save it so we later can put it
- # back before uninstalling, or when upgrading.
- cp -p "${PKGCACHE}"{,.shipped} \
- || die "failed to copy package.conf.d/package.cache"
-}
-
-pkg_preinst() {
- # have we got an earlier version of ghc installed?
- if has_version "<${CATEGORY}/${PF}"; then
- haskell_updater_warn="1"
- fi
-}
-
-pkg_postinst() {
- ghc-reregister
-
- # path to the package.cache
- PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
- # give the cache a new timestamp, it must be as recent as
- # the package.conf.d directory.
- touch "${PKGCACHE}"
-
- if [[ "${haskell_updater_warn}" == "1" ]]; then
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- ewarn "You have just upgraded from an older version of GHC."
- ewarn "You may have to run"
- ewarn " 'haskell-updater'"
- ewarn "to rebuild all ghc-based Haskell libraries."
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- fi
-}
-
-pkg_prerm() {
- PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
- rm -rf "${PKGCACHE}"
-
- cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
- ghc-package_pkg_postrm
-}
diff --git a/dev-lang/ghc/ghc-8.2.2.ebuild b/dev-lang/ghc/ghc-8.2.2.ebuild
deleted file mode 100644
index 1338261d87dc..000000000000
--- a/dev-lang/ghc/ghc-8.2.2.ebuild
+++ /dev/null
@@ -1,755 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
- if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- export CTARGET=${CATEGORY/cross-}
- fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib pax-utils toolchain-funcs versionator prefix
-inherit check-reqs
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-# 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 amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/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 )"
-#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
-#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
- case "${ARCH}" in
- #alpha) return 0 ;;
- #arm64) return 0 ;;
- #arm) return 0 ;;
- amd64) return 0 ;;
- #ia64) return 0 ;;
- #ppc) return 0 ;;
- #ppc64) return 0 ;;
- #sparc) return 0 ;;
- x86) return 0 ;;
- *) return 1 ;;
- esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.2.1.20171108 # uncomment only for -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? ( https://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.xz )"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
- # "hackage-name hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-#KEYWORDS="~alpha ~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="doc ghcbootstrap ghcmakebinary +gmp profile"
-IUSE+=" binary"
-
-RDEPEND="
- >=dev-lang/perl-5.6.1
- dev-libs/gmp:0=
- sys-libs/ncurses:0=[unicode]
- !ghcmakebinary? ( dev-libs/libffi:= )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-# utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
- !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
- sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}
- doc? ( app-text/docbook-xml-dtd:4.2
- app-text/docbook-xml-dtd:4.5
- app-text/docbook-xsl-stylesheets
- dev-python/sphinx
- >=dev-libs/libxslt-1.1.2 )
- !ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
-
-REQUIRED_USE="?? ( ghcbootstrap binary )"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-is_native() {
- [[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
-}
-
-# returns tool prefix for crosscompiler.
-# Example:
-# CTARGET=armv7a-unknown-linux-gnueabi
-# CHOST=x86_64-pc-linux-gnu
-# "armv7a-unknown-linux-gnueabi-"
-# CTARGET=${CHOST}
-# ""
-# Used in tools and library prefix:
-# "${ED}"/usr/bin/$(cross)haddock
-# "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
- if is_crosscompile; then
- echo "${CTARGET}-"
- else
- echo ""
- fi
-}
-
-append-ghc-cflags() {
- local persistent compile assemble link
- local flag ghcflag
-
- for flag in $*; do
- case ${flag} in
- persistent) persistent="yes";;
- compile) compile="yes";;
- assemble) assemble="yes";;
- link) link="yes";;
- *)
- [[ ${compile} ]] && ghcflag="-optc${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${assemble} ]] && ghcflag="-opta${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${link} ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- ;;
- esac
- done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
- local pn=$1 pv=$2
- local p=${pn}-${pv}
- local f
-
- einfo "Bumping ${pn} up to ${pv}"
-
- for f in ghc.mk GNUmakefile; do
- mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
- done
- mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
- mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
- local p pn pv
- for p in "${BUMP_LIBRARIES[@]}"; do
- set -- $p
- pn=$1 pv=$2
-
- SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
- done
-}
-
-update_SRC_URI
-
-bump_libs() {
- local p pn pv
- for p in "${BUMP_LIBRARIES[@]}"; do
- set -- $p
- pn=$1 pv=$2
-
- bump_lib "${pn}" "${pv}"
- done
-}
-
-ghc_setup_cflags() {
- # TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
- if ! is_native; then
- export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
- export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
- einfo "Crosscompiling mode:"
- einfo " CHOST: ${CHOST}"
- einfo " CTARGET: ${CTARGET}"
- einfo " CFLAGS: ${CFLAGS}"
- einfo " LDFLAGS: ${LDFLAGS}"
- einfo " prefix: $(cross)"
- return
- fi
- # We need to be very careful with the CFLAGS we ask ghc to pass through to
- # gcc. There are plenty of flags which will make gcc produce output that
- # breaks ghc in various ways. The main ones we want to pass through are
- # -mcpu / -march flags. These are important for arches like alpha & sparc.
- # We also use these CFLAGS for building the C parts of ghc, ie the rts.
- strip-flags
- strip-unsupported-flags
-
- # Cmm can't parse line numbers #482086
- replace-flags -ggdb[3-9] -ggdb2
-
- GHC_FLAGS=""
- GHC_PERSISTENT_FLAGS=""
- for flag in ${CFLAGS}; do
- case ${flag} in
-
- # Ignore extra optimisation (ghc passes -O to gcc anyway)
- # -O2 and above break on too many systems
- -O*) ;;
-
- # Arch and ABI flags are what we're really after
- -m*) append-ghc-cflags compile assemble ${flag};;
-
- # Sometimes it's handy to see backtrace of RTS
- # to get an idea what happens there
- -g*) append-ghc-cflags compile ${flag};;
-
- # Ignore all other flags, including all -f* flags
- esac
- done
-
- 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
- # hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
- # are not built with fPIC, bug #606666
- gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
- tc-is-gcc && version_is_at_least 6.3 $(gcc-version) && if ! use ghcbootstrap; then
- # gcc-6.3 has support for -no-pie upstream, but spelling differs from
- # gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
- # hardened users try '-pie' in USE=ghcbootstrap mode.
- append-ghc-cflags compile link -no-pie
- fi
-
- # 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 ...
-relocate_path() {
- local from=$1
- local to=$2
- shift 2
- local file=
- for file in "$@"
- do
- sed -i -e "s|$from|$to|g" \
- "$file" || die "path relocation failed for '$file'"
- done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
- local to=$1
-
- # libdir for prebuilt binary and for current system may mismatch
- # It does for prefix installation for example: bug #476998
- local bin_ghc_prefix=${WORKDIR}/usr
- local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
- local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
- # backup original script to use it later after relocation
- local gp_back="${T}/ghc-pkg-${GHC_PV}-orig"
- cp "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
- if [[ ${bin_libdir} != $(get_libdir) ]]; then
- einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
- # moving the dir itself is not strictly needed
- # but then USE=binary would result in installing
- # in '${bin_libdir}'
- mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
- relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
- "${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
- "${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
- "$gp_back" \
- "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
- fi
-
- # Relocate from /usr to ${EPREFIX}/usr
- relocate_path "/usr" "${to}/usr" \
- "${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
- "${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
- "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
-
- # this one we will use to regenerate cache
- # so it should point to current tree location
- relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
- if use prefix; then
- hprefixify "${bin_libpath}"/${PN}*/settings
- fi
-
- # regenerate the binary package cache
- "$gp_back" recache || die "failed to update cache after relocation"
- rm "$gp_back"
-}
-
-ghc-check-reqs() {
- # These are pessimistic values (slightly bigger than worst-case)
- # Worst case is UNREG USE=profile ia64. See bug #611866 for some
- # numbers on various arches.
- CHECKREQS_DISK_BUILD=8G
- CHECKREQS_DISK_USR=2G
- # USE=binary roughly takes
- use binary && CHECKREQS_DISK_BUILD=4G
-
- "$@"
-}
-
-pkg_pretend() {
- ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- ghc-check-reqs check-reqs_pkg_setup
-
- # quiet portage about prebuilt binaries
- use binary && QA_PREBUILT="*"
-
- [[ ${MERGE_TYPE} == binary ]] && return
-
- if use ghcbootstrap; then
- ewarn "You requested ghc bootstrapping, this is usually only used"
- ewarn "by Gentoo developers to make binary .tbz2 packages."
-
- [[ -z $(type -P ghc) ]] && \
- die "Could not find a ghc to bootstrap with."
- else
- if ! yet_binary; then
- eerror "Please try emerging with USE=ghcbootstrap and report build"
- eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
- die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
- fi
- fi
-}
-
-src_unpack() {
- # Create the ${S} dir if we're using the binary version
- use binary && mkdir "${S}"
-
- # the Solaris and Darwin binaries from ghc (maeder) need to be
- # unpacked separately, so prevent them from being unpacked
- local ONLYA=${A}
- case ${CHOST} in
- *-darwin* | *-solaris*) ONLYA=${GHC_P}-src.tar.xz ;;
- esac
- unpack ${ONLYA}
-}
-
-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-${GHC_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)/${GHC_P}/bin/ghc"
- fi
-
- if use binary; then
- if use prefix; then
- relocate_ghc "${EPREFIX}"
- fi
-
- # Move unpacked files to the expected place
- mv "${WORKDIR}/usr" "${S}"
- eapply_user
- else
- if ! use ghcbootstrap; then
- case ${CHOST} in
- *-darwin* | *-solaris*)
- # UPDATE ME for ghc-7
- mkdir "${WORKDIR}"/ghc-bin-installer || die
- pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
- use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
- use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
- use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
- popd > /dev/null
-
- pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
- # fix the binaries so they run, on Solaris we need an
- # LD_LIBRARY_PATH which has our prefix libdirs, on
- # Darwin we need to replace the frameworks with our libs
- # from the prefix fix before installation, because some
- # of the tools are actually used during configure/make
- if [[ ${CHOST} == *-solaris* ]] ; then
- export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
- elif [[ ${CHOST} == *-darwin* ]] ; then
- local readline_framework=GNUreadline.framework/GNUreadline
- local gmp_framework=/opt/local/lib/libgmp.10.dylib
- local ncurses_file=/opt/local/lib/libncurses.5.dylib
- for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
- install_name_tool -change \
- ${readline_framework} \
- "${EPREFIX}"/lib/libreadline.dylib \
- ${binary} || die
- install_name_tool -change \
- ${gmp_framework} \
- "${EPREFIX}"/usr/lib/libgmp.dylib \
- ${binary} || die
- install_name_tool -change \
- ${ncurses_file} \
- "${EPREFIX}"/usr/lib/libncurses.dylib \
- ${binary} || die
- done
- # we don't do frameworks!
- sed -i \
- -e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
- -e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
- rts/package.conf.in || die
- fi
-
- # it is autoconf, but we really don't want to give it too
- # much arguments, in fact we do the make in-place anyway
- ./configure --prefix="${WORKDIR}"/usr || die
- make install || die
- popd > /dev/null
- ;;
- *)
- relocate_ghc "${WORKDIR}"
- ;;
- esac
- fi
-
- sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
- "${S}/ghc/ghc.wrapper"
-
- cd "${S}" # otherwise eapply will break
-
- eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
- eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
-
- eapply "${FILESDIR}"/${PN}-8.2.1_rc1-cgen-constify.patch
- eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
- eapply "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
-
- eapply "${FILESDIR}"/${PN}-8.2.1_rc2-O2-unreg.patch
- eapply "${FILESDIR}"/${PN}-8.0.2-binutils-2.30.patch
-
- # a bunch of crosscompiler patches
- eapply "${FILESDIR}"/${PN}-8.2.1_rc1-unphased-cross.patch
- eapply "${FILESDIR}"/${PN}-8.2.1_rc1-staged-cross.patch
- eapply "${FILESDIR}"/${PN}-8.2.1_rc1-ghci-cross.patch
- eapply "${FILESDIR}"/${PN}-8.2.1_rc1-stage2-cross.patch
- eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
-
- # needs a new libffi release
- eapply "${FILESDIR}"/${PN}-8.0.2-libffi-alpha.patch
-
- # mingw32 target
- pushd "${S}/libraries/Win32"
- eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-1.patch # upstreamed, waits for merge to -HEAD
- eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
- popd
-
- bump_libs
-
- eapply_user
- # as we have changed the build system
- eautoreconf
- fi
-}
-
-src_configure() {
- if ! use binary; then
- # initialize build.mk
- echo '# Gentoo changes' > mk/build.mk
-
- # Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
- echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
- echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-
- # We also need to use the GHC_FLAGS flags when building ghc itself
- echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
- echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
- echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
- # Speed up initial Cabal bootstrap
- echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
- # We can't depend on haddock except when bootstrapping when we
- # must build docs and include them into the binary .tbz2 package
- # app-text/dblatex is not in portage, can not build PDF or PS
- echo "BUILD_SPHINX_PDF = NO" >> mk/build.mk
- echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
- echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
- # this controls presence on 'xhtml' and 'haddock' in final install
- echo "HADDOCK_DOCS = YES" >> mk/build.mk
-
- # not used outside of ghc's test
- if [[ -n ${GHC_BUILD_DPH} ]]; then
- echo "BUILD_DPH = YES" >> mk/build.mk
- else
- echo "BUILD_DPH = NO" >> mk/build.mk
- fi
-
- # Any non-native build has to skip as it needs
- # target haddock binary to be runnabine.
- if ! is_native; then
- # disable docs generation as it requires running stage2
- echo "HADDOCK_DOCS=NO" >> mk/build.mk
- echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
- echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
- fi
-
- if is_crosscompile; then
- # Install ghc-stage1 crosscompiler instead of
- # ghc-stage2 cross-built compiler.
- echo "Stage1Only=YES" >> mk/build.mk
- fi
-
- # allows overriding build flavours for libraries:
- # v - vanilla (static libs)
- # p - profiled
- # dyn - shared libraries
- # example: GHC_LIBRARY_WAYS="v dyn"
- if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
- echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
- fi
- echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
- # Get ghc from the unpacked binary .tbz2
- # except when bootstrapping we just pick ghc up off the path
- if ! use ghcbootstrap; then
- export PATH="${WORKDIR}/usr/bin:${PATH}"
- fi
-
- echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
-
- # don't strip anything. Very useful when stage2 SIGSEGVs on you
- echo "STRIP_CMD = :" >> mk/build.mk
-
- local econf_args=()
-
- # GHC embeds toolchain it was built by and uses it later.
- # Don't allow things like ccache or versioned binary slip.
- # We use stable thing across gcc upgrades.
- # User can use EXTRA_ECONF=CC=... to override this default.
- econf_args+=(
- AR=${CTARGET}-ar
- CC=${CTARGET}-gcc
- LD=${CTARGET}-ld
- # these should be inferred by GHC but ghc defaults
- # to using bundled tools on windows.
- Windres=${CTARGET}-windres
- DllWrap=${CTARGET}-dllwrap
- )
- if [[ ${CTARGET} == arm* ]] ; then
- # ld.bfd-2.28 does not work for ghc. Force ld.gold
- # instead. This should be removed once gentoo gets
- # a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
- econf_args+=(LD=${CTARGET}-ld.gold)
- fi
-
- if [[ ${CBUILD} != ${CHOST} ]]; then
- # GHC bug: ghc claims not to support cross-building.
- # It does, but does not distinct --host= value
- # for stage1 and stage2 compiler.
- econf_args+=(--host=${CBUILD})
- fi
-
- if use ghcmakebinary; then
- # When building booting libary we are trying to
- # bundle or restrict most of external depends
- # with unstable ABI:
- # - embed libffi (default GHC behaviour)
- # - disable ncurses support for ghci (via haskeline)
- # https://bugs.gentoo.org/557478
- # - disable ncurses support for ghc-pkg
- echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
- echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
- elif is_native; then
- # using ${GTARGET}'s libffi is not supported yet:
- # GHC embeds full path for ffi includes without /usr/${CTARGET} account.
- econf_args+=(--with-system-libffi)
- econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
- fi
-
- einfo "Final mk/build.mk:"
- cat mk/build.mk || die
-
- econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
-
- if [[ ${PV} == *9999* ]]; then
- GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
- GHC_P=${PN}-${GHC_PV}
- fi
- fi # ! use binary
-}
-
-src_compile() {
- if ! use binary; then
- # Stage1Only crosscompiler does not build stage2
- if ! is_crosscompile; then
- # 1. build/pax-mark compiler binary first
- emake ghc/stage2/build/tmp/ghc-stage2
- # 2. pax-mark (bug #516430)
- pax-mark -m ghc/stage2/build/tmp/ghc-stage2
- # 2. build/pax-mark haddock using ghc-stage2
- if is_native; then
- # non-native build does not build haddock
- # due to HADDOCK_DOCS=NO, but it could.
- emake utils/haddock/dist/build/tmp/haddock
- pax-mark -m utils/haddock/dist/build/tmp/haddock
- fi
- fi
- # 3. and then all the rest
- emake all
- fi # ! use binary
-}
-
-src_install() {
- if use binary; then
- use prefix && mkdir -p "${ED}"
- mv "${S}/usr" "${ED}"
- else
- [[ -f VERSION ]] || emake VERSION
-
- # -j1 due to a rare race in install script:
- # make --no-print-directory -f ghc.mk phase=final install
- # /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
- # -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
- # /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644 utils/hsc2hs/template-hsc.h \
- # "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
- # /usr/bin/install: cannot create regular file \
- # '/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}"
-
- # Skip for cross-targets as they all share target location:
- # /usr/share/doc/ghc-9999/
- if ! is_crosscompile; then
- dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
- fi
-
- # rename ghc-shipped files to avoid collision
- # of external packages. Motivating example:
- # user had installed:
- # dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
- # dev-haskell/transformers-0.4.2.0
- # then user tried to update to
- # dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
- # this will lead to single .conf file collision.
- local shipped_conf renamed_conf
- local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
- for shipped_conf in "${package_confdir}"/*.conf; do
- # rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
- renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
- mv "${shipped_conf}" "${renamed_conf}" || die
- done
-
- # remove link, but leave 'haddock-${GHC_P}'
- rm -f "${ED}"/usr/bin/$(cross)haddock
-
- if ! is_crosscompile; then
- newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
- newbashcomp utils/completion/ghc.bash ghc
- fi
- fi
-
- # path to the package.cache
- local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
- PKGCACHE="${package_confdir}"/package.cache
- # copy the package.conf.d, including timestamp, save it so we can help
- # users that have a broken package.conf.d
- cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
- # copy the package.conf, including timestamp, save it so we later can put it
- # back before uninstalling, or when upgrading.
- cp -p "${PKGCACHE}"{,.shipped} \
- || die "failed to copy package.conf.d/package.cache"
-}
-
-pkg_preinst() {
- # have we got an earlier version of ghc installed?
- if has_version "<${CATEGORY}/${PF}"; then
- haskell_updater_warn="1"
- fi
-}
-
-pkg_postinst() {
- ghc-reregister
-
- # path to the package.cache
- PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
- # give the cache a new timestamp, it must be as recent as
- # the package.conf.d directory.
- touch "${PKGCACHE}"
-
- if [[ "${haskell_updater_warn}" == "1" ]]; then
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- ewarn "You have just upgraded from an older version of GHC."
- ewarn "You may have to run"
- ewarn " 'haskell-updater'"
- ewarn "to rebuild all ghc-based Haskell libraries."
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- fi
-}
-
-pkg_prerm() {
- PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
- rm -rf "${PKGCACHE}"
-
- cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
- ghc-package_pkg_postrm
-}
diff --git a/dev-lang/ghc/ghc-8.4.1.ebuild b/dev-lang/ghc/ghc-8.4.1.ebuild
deleted file mode 100644
index 0e86ec36e7d4..000000000000
--- a/dev-lang/ghc/ghc-8.4.1.ebuild
+++ /dev/null
@@ -1,755 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
- if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- export CTARGET=${CATEGORY/cross-}
- fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib pax-utils toolchain-funcs versionator prefix
-inherit check-reqs
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-# 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 amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/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 )"
-#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
-#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
- case "${ARCH}" in
- #alpha) return 0 ;;
- #arm64) return 0 ;;
- #arm) return 0 ;;
- amd64) return 0 ;;
- #ia64) return 0 ;;
- #ppc) return 0 ;;
- #ppc64) return 0 ;;
- #sparc) return 0 ;;
- x86) return 0 ;;
- *) return 1 ;;
- esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.4.0.20180224 # uncomment only for -alpha, -beta, -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? ( https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz )"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
- # "hackage-name hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-#KEYWORDS="~alpha ~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="doc ghcbootstrap ghcmakebinary +gmp profile"
-IUSE+=" binary"
-
-RDEPEND="
- >=dev-lang/perl-5.6.1
- dev-libs/gmp:0=
- sys-libs/ncurses:0=[unicode]
- !ghcmakebinary? ( dev-libs/libffi:= )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-# utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
- !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
- sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}
- doc? ( app-text/docbook-xml-dtd:4.2
- app-text/docbook-xml-dtd:4.5
- app-text/docbook-xsl-stylesheets
- dev-python/sphinx
- >=dev-libs/libxslt-1.1.2 )
- !ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
-
-REQUIRED_USE="?? ( ghcbootstrap binary )"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-is_native() {
- [[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
-}
-
-# returns tool prefix for crosscompiler.
-# Example:
-# CTARGET=armv7a-unknown-linux-gnueabi
-# CHOST=x86_64-pc-linux-gnu
-# "armv7a-unknown-linux-gnueabi-"
-# CTARGET=${CHOST}
-# ""
-# Used in tools and library prefix:
-# "${ED}"/usr/bin/$(cross)haddock
-# "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
- if is_crosscompile; then
- echo "${CTARGET}-"
- else
- echo ""
- fi
-}
-
-append-ghc-cflags() {
- local persistent compile assemble link
- local flag ghcflag
-
- for flag in $*; do
- case ${flag} in
- persistent) persistent="yes";;
- compile) compile="yes";;
- assemble) assemble="yes";;
- link) link="yes";;
- *)
- [[ ${compile} ]] && ghcflag="-optc${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${assemble} ]] && ghcflag="-opta${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${link} ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- ;;
- esac
- done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
- local pn=$1 pv=$2
- local p=${pn}-${pv}
- local f
-
- einfo "Bumping ${pn} up to ${pv}"
-
- for f in ghc.mk GNUmakefile; do
- mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
- done
- mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
- mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
- local p pn pv
- for p in "${BUMP_LIBRARIES[@]}"; do
- set -- $p
- pn=$1 pv=$2
-
- SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
- done
-}
-
-update_SRC_URI
-
-bump_libs() {
- local p pn pv
- for p in "${BUMP_LIBRARIES[@]}"; do
- set -- $p
- pn=$1 pv=$2
-
- bump_lib "${pn}" "${pv}"
- done
-}
-
-ghc_setup_cflags() {
- # TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
- if ! is_native; then
- export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
- export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
- einfo "Crosscompiling mode:"
- einfo " CHOST: ${CHOST}"
- einfo " CTARGET: ${CTARGET}"
- einfo " CFLAGS: ${CFLAGS}"
- einfo " LDFLAGS: ${LDFLAGS}"
- einfo " prefix: $(cross)"
- return
- fi
- # We need to be very careful with the CFLAGS we ask ghc to pass through to
- # gcc. There are plenty of flags which will make gcc produce output that
- # breaks ghc in various ways. The main ones we want to pass through are
- # -mcpu / -march flags. These are important for arches like alpha & sparc.
- # We also use these CFLAGS for building the C parts of ghc, ie the rts.
- strip-flags
- strip-unsupported-flags
-
- # Cmm can't parse line numbers #482086
- replace-flags -ggdb[3-9] -ggdb2
-
- GHC_FLAGS=""
- GHC_PERSISTENT_FLAGS=""
- for flag in ${CFLAGS}; do
- case ${flag} in
-
- # Ignore extra optimisation (ghc passes -O to gcc anyway)
- # -O2 and above break on too many systems
- -O*) ;;
-
- # Arch and ABI flags are what we're really after
- -m*) append-ghc-cflags compile assemble ${flag};;
-
- # Sometimes it's handy to see backtrace of RTS
- # to get an idea what happens there
- -g*) append-ghc-cflags compile ${flag};;
-
- # Ignore all other flags, including all -f* flags
- esac
- done
-
- 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
- # hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
- # are not built with fPIC, bug #606666
- gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
- tc-is-gcc && version_is_at_least 6.3 $(gcc-version) && if ! use ghcbootstrap; then
- # gcc-6.3 has support for -no-pie upstream, but spelling differs from
- # gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
- # hardened users try '-pie' in USE=ghcbootstrap mode.
- append-ghc-cflags compile link -no-pie
- fi
-
- # 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 ...
-relocate_path() {
- local from=$1
- local to=$2
- shift 2
- local file=
- for file in "$@"
- do
- sed -i -e "s|$from|$to|g" \
- "$file" || die "path relocation failed for '$file'"
- done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
- local to=$1
-
- # libdir for prebuilt binary and for current system may mismatch
- # It does for prefix installation for example: bug #476998
- local bin_ghc_prefix=${WORKDIR}/usr
- local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
- local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
- # backup original script to use it later after relocation
- local gp_back="${T}/ghc-pkg-${GHC_PV}-orig"
- cp "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
- if [[ ${bin_libdir} != $(get_libdir) ]]; then
- einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
- # moving the dir itself is not strictly needed
- # but then USE=binary would result in installing
- # in '${bin_libdir}'
- mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
- relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
- "${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
- "${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
- "$gp_back" \
- "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
- fi
-
- # Relocate from /usr to ${EPREFIX}/usr
- relocate_path "/usr" "${to}/usr" \
- "${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
- "${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
- "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
-
- # this one we will use to regenerate cache
- # so it should point to current tree location
- relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
- if use prefix; then
- hprefixify "${bin_libpath}"/${PN}*/settings
- fi
-
- # regenerate the binary package cache
- "$gp_back" recache || die "failed to update cache after relocation"
- rm "$gp_back"
-}
-
-ghc-check-reqs() {
- # These are pessimistic values (slightly bigger than worst-case)
- # Worst case is UNREG USE=profile ia64. See bug #611866 for some
- # numbers on various arches.
- CHECKREQS_DISK_BUILD=8G
- CHECKREQS_DISK_USR=2G
- # USE=binary roughly takes
- use binary && CHECKREQS_DISK_BUILD=4G
-
- "$@"
-}
-
-pkg_pretend() {
- ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- ghc-check-reqs check-reqs_pkg_setup
-
- # quiet portage about prebuilt binaries
- use binary && QA_PREBUILT="*"
-
- [[ ${MERGE_TYPE} == binary ]] && return
-
- if use ghcbootstrap; then
- ewarn "You requested ghc bootstrapping, this is usually only used"
- ewarn "by Gentoo developers to make binary .tbz2 packages."
-
- [[ -z $(type -P ghc) ]] && \
- die "Could not find a ghc to bootstrap with."
- else
- if ! yet_binary; then
- eerror "Please try emerging with USE=ghcbootstrap and report build"
- eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
- die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
- fi
- fi
-}
-
-src_unpack() {
- # Create the ${S} dir if we're using the binary version
- use binary && mkdir "${S}"
-
- # the Solaris and Darwin binaries from ghc (maeder) need to be
- # unpacked separately, so prevent them from being unpacked
- local ONLYA=${A}
- case ${CHOST} in
- *-darwin* | *-solaris*) ONLYA=${GHC_P}-src.tar.xz ;;
- esac
- unpack ${ONLYA}
-}
-
-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-${GHC_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)/${GHC_P}/bin/ghc"
- fi
-
- if use binary; then
- if use prefix; then
- relocate_ghc "${EPREFIX}"
- fi
-
- # Move unpacked files to the expected place
- mv "${WORKDIR}/usr" "${S}"
- eapply_user
- else
- if ! use ghcbootstrap; then
- case ${CHOST} in
- *-darwin* | *-solaris*)
- # UPDATE ME for ghc-7
- mkdir "${WORKDIR}"/ghc-bin-installer || die
- pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
- use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
- use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
- use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
- popd > /dev/null
-
- pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
- # fix the binaries so they run, on Solaris we need an
- # LD_LIBRARY_PATH which has our prefix libdirs, on
- # Darwin we need to replace the frameworks with our libs
- # from the prefix fix before installation, because some
- # of the tools are actually used during configure/make
- if [[ ${CHOST} == *-solaris* ]] ; then
- export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
- elif [[ ${CHOST} == *-darwin* ]] ; then
- local readline_framework=GNUreadline.framework/GNUreadline
- local gmp_framework=/opt/local/lib/libgmp.10.dylib
- local ncurses_file=/opt/local/lib/libncurses.5.dylib
- for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
- install_name_tool -change \
- ${readline_framework} \
- "${EPREFIX}"/lib/libreadline.dylib \
- ${binary} || die
- install_name_tool -change \
- ${gmp_framework} \
- "${EPREFIX}"/usr/lib/libgmp.dylib \
- ${binary} || die
- install_name_tool -change \
- ${ncurses_file} \
- "${EPREFIX}"/usr/lib/libncurses.dylib \
- ${binary} || die
- done
- # we don't do frameworks!
- sed -i \
- -e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
- -e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
- rts/package.conf.in || die
- fi
-
- # it is autoconf, but we really don't want to give it too
- # much arguments, in fact we do the make in-place anyway
- ./configure --prefix="${WORKDIR}"/usr || die
- make install || die
- popd > /dev/null
- ;;
- *)
- relocate_ghc "${WORKDIR}"
- ;;
- esac
- fi
-
- sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
- "${S}/ghc/ghc.wrapper"
-
- cd "${S}" # otherwise eapply will break
-
- eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
- eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
- eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
- eapply "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
-
- # a bunch of crosscompiler patches
- # needs newer version:
- #eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
-
- # mingw32 target
- pushd "${S}/libraries/Win32"
- eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
- popd
-
- bump_libs
-
- eapply_user
- # as we have changed the build system
- eautoreconf
- fi
-}
-
-src_configure() {
- if ! use binary; then
- # initialize build.mk
- echo '# Gentoo changes' > mk/build.mk
-
- # Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
- echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
- echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-
- # We also need to use the GHC_FLAGS flags when building ghc itself
- echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
- echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
- echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
- # Speed up initial Cabal bootstrap
- echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
- # We can't depend on haddock except when bootstrapping when we
- # must build docs and include them into the binary .tbz2 package
- # app-text/dblatex is not in portage, can not build PDF or PS
- echo "BUILD_SPHINX_PDF = NO" >> mk/build.mk
- echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
- echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
- # this controls presence on 'xhtml' and 'haddock' in final install
- echo "HADDOCK_DOCS = YES" >> mk/build.mk
-
- # not used outside of ghc's test
- if [[ -n ${GHC_BUILD_DPH} ]]; then
- echo "BUILD_DPH = YES" >> mk/build.mk
- else
- echo "BUILD_DPH = NO" >> mk/build.mk
- fi
-
- # Any non-native build has to skip as it needs
- # target haddock binary to be runnabine.
- if ! is_native; then
- # disable docs generation as it requires running stage2
- echo "HADDOCK_DOCS=NO" >> mk/build.mk
- echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
- echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
- fi
-
- if is_crosscompile; then
- # Install ghc-stage1 crosscompiler instead of
- # ghc-stage2 cross-built compiler.
- echo "Stage1Only=YES" >> mk/build.mk
- fi
-
- # allows overriding build flavours for libraries:
- # v - vanilla (static libs)
- # p - profiled
- # dyn - shared libraries
- # example: GHC_LIBRARY_WAYS="v dyn"
- if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
- echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
- fi
- echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
- # Get ghc from the unpacked binary .tbz2
- # except when bootstrapping we just pick ghc up off the path
- if ! use ghcbootstrap; then
- export PATH="${WORKDIR}/usr/bin:${PATH}"
- fi
-
- echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
-
- # don't strip anything. Very useful when stage2 SIGSEGVs on you
- echo "STRIP_CMD = :" >> mk/build.mk
-
- local econf_args=()
-
- # GHC embeds toolchain it was built by and uses it later.
- # Don't allow things like ccache or versioned binary slip.
- # We use stable thing across gcc upgrades.
- # User can use EXTRA_ECONF=CC=... to override this default.
- econf_args+=(
- AR=${CTARGET}-ar
- CC=${CTARGET}-gcc
- # these should be inferred by GHC but ghc defaults
- # to using bundled tools on windows.
- Windres=${CTARGET}-windres
- DllWrap=${CTARGET}-dllwrap
- # we set the linker explicitly below
- --disable-ld-override
- )
- case ${CTARGET} in
- arm*)
- # ld.bfd-2.28 does not work for ghc. Force ld.gold
- # instead. This should be removed once gentoo gets
- # a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
- econf_args+=(LD=${CTARGET}-ld.gold)
- ;;
- sparc*)
- # ld.gold-2.28 does not work for ghc. Force ld.bfd
- # instead. This should be removed once gentoo gets
- # a fix for missing --no-relax support bug:
- # https://sourceware.org/ml/binutils/2017-07/msg00183.html
- econf_args+=(LD=${CTARGET}-ld.bfd)
- ;;
- *)
- econf_args+=(LD=${CTARGET}-ld)
- esac
-
- if [[ ${CBUILD} != ${CHOST} ]]; then
- # GHC bug: ghc claims not to support cross-building.
- # It does, but does not distinct --host= value
- # for stage1 and stage2 compiler.
- econf_args+=(--host=${CBUILD})
- fi
-
- if use ghcmakebinary; then
- # When building booting libary we are trying to
- # bundle or restrict most of external depends
- # with unstable ABI:
- # - embed libffi (default GHC behaviour)
- # - disable ncurses support for ghci (via haskeline)
- # https://bugs.gentoo.org/557478
- # - disable ncurses support for ghc-pkg
- echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
- echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
- elif is_native; then
- # using ${GTARGET}'s libffi is not supported yet:
- # GHC embeds full path for ffi includes without /usr/${CTARGET} account.
- econf_args+=(--with-system-libffi)
- econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
- fi
-
- einfo "Final mk/build.mk:"
- cat mk/build.mk || die
-
- econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
-
- if [[ ${PV} == *9999* ]]; then
- GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
- GHC_P=${PN}-${GHC_PV}
- fi
- fi # ! use binary
-}
-
-src_compile() {
- if ! use binary; then
- # Stage1Only crosscompiler does not build stage2
- if ! is_crosscompile; then
- # 1. build/pax-mark compiler binary first
- emake ghc/stage2/build/tmp/ghc-stage2
- # 2. pax-mark (bug #516430)
- pax-mark -m ghc/stage2/build/tmp/ghc-stage2
- # 2. build/pax-mark haddock using ghc-stage2
- if is_native; then
- # non-native build does not build haddock
- # due to HADDOCK_DOCS=NO, but it could.
- emake utils/haddock/dist/build/tmp/haddock
- pax-mark -m utils/haddock/dist/build/tmp/haddock
- fi
- fi
- # 3. and then all the rest
- emake all
- fi # ! use binary
-}
-
-src_install() {
- if use binary; then
- use prefix && mkdir -p "${ED}"
- mv "${S}/usr" "${ED}"
- else
- [[ -f VERSION ]] || emake VERSION
-
- # -j1 due to a rare race in install script:
- # make --no-print-directory -f ghc.mk phase=final install
- # /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
- # -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
- # /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644 utils/hsc2hs/template-hsc.h \
- # "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
- # /usr/bin/install: cannot create regular file \
- # '/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}"
-
- # Skip for cross-targets as they all share target location:
- # /usr/share/doc/ghc-9999/
- if ! is_crosscompile; then
- dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
- fi
-
- # rename ghc-shipped files to avoid collision
- # of external packages. Motivating example:
- # user had installed:
- # dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
- # dev-haskell/transformers-0.4.2.0
- # then user tried to update to
- # dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
- # this will lead to single .conf file collision.
- local shipped_conf renamed_conf
- local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
- for shipped_conf in "${package_confdir}"/*.conf; do
- # rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
- renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
- mv "${shipped_conf}" "${renamed_conf}" || die
- done
-
- # remove link, but leave 'haddock-${GHC_P}'
- rm -f "${ED}"/usr/bin/$(cross)haddock
-
- if ! is_crosscompile; then
- newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
- newbashcomp utils/completion/ghc.bash ghc
- fi
- fi
-
- # path to the package.cache
- local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
- PKGCACHE="${package_confdir}"/package.cache
- # copy the package.conf.d, including timestamp, save it so we can help
- # users that have a broken package.conf.d
- cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
- # copy the package.conf, including timestamp, save it so we later can put it
- # back before uninstalling, or when upgrading.
- cp -p "${PKGCACHE}"{,.shipped} \
- || die "failed to copy package.conf.d/package.cache"
-}
-
-pkg_preinst() {
- # have we got an earlier version of ghc installed?
- if has_version "<${CATEGORY}/${PF}"; then
- haskell_updater_warn="1"
- fi
-}
-
-pkg_postinst() {
- ghc-reregister
-
- # path to the package.cache
- PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
- # give the cache a new timestamp, it must be as recent as
- # the package.conf.d directory.
- touch "${PKGCACHE}"
-
- if [[ "${haskell_updater_warn}" == "1" ]]; then
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- ewarn "You have just upgraded from an older version of GHC."
- ewarn "You may have to run"
- ewarn " 'haskell-updater'"
- ewarn "to rebuild all ghc-based Haskell libraries."
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- fi
-}
-
-pkg_prerm() {
- PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
- rm -rf "${PKGCACHE}"
-
- cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
- ghc-package_pkg_postrm
-}
diff --git a/dev-lang/ghc/ghc-8.4.2.ebuild b/dev-lang/ghc/ghc-8.4.2.ebuild
deleted file mode 100644
index f6d8c953ac95..000000000000
--- a/dev-lang/ghc/ghc-8.4.2.ebuild
+++ /dev/null
@@ -1,760 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
- if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- export CTARGET=${CATEGORY/cross-}
- fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib pax-utils toolchain-funcs versionator prefix
-inherit check-reqs
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-# 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 amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/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 )"
-#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
-#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
- case "${ARCH}" in
- #alpha) return 0 ;;
- #arm64) return 0 ;;
- #arm) return 0 ;;
- amd64) return 0 ;;
- #ia64) return 0 ;;
- #ppc) return 0 ;;
- #ppc64) return 0 ;;
- #sparc) return 0 ;;
- x86) return 0 ;;
- *) return 1 ;;
- esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.4.1.20180329 # uncomment only for -alpha, -beta, -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? ( https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz )"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
- # "hackage-name hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-#KEYWORDS="~alpha ~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="doc ghcbootstrap ghcmakebinary +gmp profile"
-IUSE+=" binary"
-
-RDEPEND="
- >=dev-lang/perl-5.6.1
- dev-libs/gmp:0=
- sys-libs/ncurses:0=[unicode]
- !ghcmakebinary? ( dev-libs/libffi:= )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-# utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
- !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
- sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}
- doc? ( app-text/docbook-xml-dtd:4.2
- app-text/docbook-xml-dtd:4.5
- app-text/docbook-xsl-stylesheets
- dev-python/sphinx
- >=dev-libs/libxslt-1.1.2 )
- !ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
-
-REQUIRED_USE="?? ( ghcbootstrap binary )"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-is_native() {
- [[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
-}
-
-# returns tool prefix for crosscompiler.
-# Example:
-# CTARGET=armv7a-unknown-linux-gnueabi
-# CHOST=x86_64-pc-linux-gnu
-# "armv7a-unknown-linux-gnueabi-"
-# CTARGET=${CHOST}
-# ""
-# Used in tools and library prefix:
-# "${ED}"/usr/bin/$(cross)haddock
-# "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
- if is_crosscompile; then
- echo "${CTARGET}-"
- else
- echo ""
- fi
-}
-
-append-ghc-cflags() {
- local persistent compile assemble link
- local flag ghcflag
-
- for flag in $*; do
- case ${flag} in
- persistent) persistent="yes";;
- compile) compile="yes";;
- assemble) assemble="yes";;
- link) link="yes";;
- *)
- [[ ${compile} ]] && ghcflag="-optc${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${assemble} ]] && ghcflag="-opta${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${link} ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- ;;
- esac
- done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
- local pn=$1 pv=$2
- local p=${pn}-${pv}
- local f
-
- einfo "Bumping ${pn} up to ${pv}"
-
- for f in ghc.mk GNUmakefile; do
- mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
- done
- mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
- mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
- local p pn pv
- for p in "${BUMP_LIBRARIES[@]}"; do
- set -- $p
- pn=$1 pv=$2
-
- SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
- done
-}
-
-update_SRC_URI
-
-bump_libs() {
- local p pn pv
- for p in "${BUMP_LIBRARIES[@]}"; do
- set -- $p
- pn=$1 pv=$2
-
- bump_lib "${pn}" "${pv}"
- done
-}
-
-ghc_setup_cflags() {
- # TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
- if ! is_native; then
- export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
- export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
- einfo "Crosscompiling mode:"
- einfo " CHOST: ${CHOST}"
- einfo " CTARGET: ${CTARGET}"
- einfo " CFLAGS: ${CFLAGS}"
- einfo " LDFLAGS: ${LDFLAGS}"
- einfo " prefix: $(cross)"
- return
- fi
- # We need to be very careful with the CFLAGS we ask ghc to pass through to
- # gcc. There are plenty of flags which will make gcc produce output that
- # breaks ghc in various ways. The main ones we want to pass through are
- # -mcpu / -march flags. These are important for arches like alpha & sparc.
- # We also use these CFLAGS for building the C parts of ghc, ie the rts.
- strip-flags
- strip-unsupported-flags
-
- # Cmm can't parse line numbers #482086
- replace-flags -ggdb[3-9] -ggdb2
-
- GHC_FLAGS=""
- GHC_PERSISTENT_FLAGS=""
- for flag in ${CFLAGS}; do
- case ${flag} in
-
- # Ignore extra optimisation (ghc passes -O to gcc anyway)
- # -O2 and above break on too many systems
- -O*) ;;
-
- # Arch and ABI flags are what we're really after
- -m*) append-ghc-cflags compile assemble ${flag};;
-
- # Sometimes it's handy to see backtrace of RTS
- # to get an idea what happens there
- -g*) append-ghc-cflags compile ${flag};;
-
- # Ignore all other flags, including all -f* flags
- esac
- done
-
- 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
- # hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
- # are not built with fPIC, bug #606666
- gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
- tc-is-gcc && version_is_at_least 6.3 $(gcc-version) && if ! use ghcbootstrap; then
- # gcc-6.3 has support for -no-pie upstream, but spelling differs from
- # gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
- # hardened users try '-pie' in USE=ghcbootstrap mode.
- append-ghc-cflags compile link -no-pie
- fi
-
- # 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 ...
-relocate_path() {
- local from=$1
- local to=$2
- shift 2
- local file=
- for file in "$@"
- do
- sed -i -e "s|$from|$to|g" \
- "$file" || die "path relocation failed for '$file'"
- done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
- local to=$1
-
- # libdir for prebuilt binary and for current system may mismatch
- # It does for prefix installation for example: bug #476998
- local bin_ghc_prefix=${WORKDIR}/usr
- local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
- local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
- # backup original script to use it later after relocation
- local gp_back="${T}/ghc-pkg-${GHC_PV}-orig"
- cp "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
- if [[ ${bin_libdir} != $(get_libdir) ]]; then
- einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
- # moving the dir itself is not strictly needed
- # but then USE=binary would result in installing
- # in '${bin_libdir}'
- mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
- relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
- "${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
- "${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
- "$gp_back" \
- "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
- fi
-
- # Relocate from /usr to ${EPREFIX}/usr
- relocate_path "/usr" "${to}/usr" \
- "${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
- "${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
- "${WORKDIR}/usr/bin/haddock-ghc-${GHC_PV}" \
- "${WORKDIR}/usr/bin/hp2ps" \
- "${WORKDIR}/usr/bin/hpc" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
- "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
-
- # this one we will use to regenerate cache
- # so it should point to current tree location
- relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
- if use prefix; then
- hprefixify "${bin_libpath}"/${PN}*/settings
- fi
-
- # regenerate the binary package cache
- "$gp_back" recache || die "failed to update cache after relocation"
- rm "$gp_back"
-}
-
-ghc-check-reqs() {
- # These are pessimistic values (slightly bigger than worst-case)
- # Worst case is UNREG USE=profile ia64. See bug #611866 for some
- # numbers on various arches.
- CHECKREQS_DISK_BUILD=8G
- CHECKREQS_DISK_USR=2G
- # USE=binary roughly takes
- use binary && CHECKREQS_DISK_BUILD=4G
-
- "$@"
-}
-
-pkg_pretend() {
- ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- ghc-check-reqs check-reqs_pkg_setup
-
- # quiet portage about prebuilt binaries
- use binary && QA_PREBUILT="*"
-
- [[ ${MERGE_TYPE} == binary ]] && return
-
- if use ghcbootstrap; then
- ewarn "You requested ghc bootstrapping, this is usually only used"
- ewarn "by Gentoo developers to make binary .tbz2 packages."
-
- [[ -z $(type -P ghc) ]] && \
- die "Could not find a ghc to bootstrap with."
- else
- if ! yet_binary; then
- eerror "Please try emerging with USE=ghcbootstrap and report build"
- eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
- die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
- fi
- fi
-}
-
-src_unpack() {
- # Create the ${S} dir if we're using the binary version
- use binary && mkdir "${S}"
-
- # the Solaris and Darwin binaries from ghc (maeder) need to be
- # unpacked separately, so prevent them from being unpacked
- local ONLYA=${A}
- case ${CHOST} in
- *-darwin* | *-solaris*) ONLYA=${GHC_P}-src.tar.xz ;;
- esac
- unpack ${ONLYA}
-}
-
-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-${GHC_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)/${GHC_P}/bin/ghc"
- fi
-
- if use binary; then
- if use prefix; then
- relocate_ghc "${EPREFIX}"
- fi
-
- # Move unpacked files to the expected place
- mv "${WORKDIR}/usr" "${S}"
- eapply_user
- else
- if ! use ghcbootstrap; then
- case ${CHOST} in
- *-darwin* | *-solaris*)
- # UPDATE ME for ghc-7
- mkdir "${WORKDIR}"/ghc-bin-installer || die
- pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
- use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
- use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
- use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
- popd > /dev/null
-
- pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
- # fix the binaries so they run, on Solaris we need an
- # LD_LIBRARY_PATH which has our prefix libdirs, on
- # Darwin we need to replace the frameworks with our libs
- # from the prefix fix before installation, because some
- # of the tools are actually used during configure/make
- if [[ ${CHOST} == *-solaris* ]] ; then
- export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
- elif [[ ${CHOST} == *-darwin* ]] ; then
- local readline_framework=GNUreadline.framework/GNUreadline
- local gmp_framework=/opt/local/lib/libgmp.10.dylib
- local ncurses_file=/opt/local/lib/libncurses.5.dylib
- for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
- install_name_tool -change \
- ${readline_framework} \
- "${EPREFIX}"/lib/libreadline.dylib \
- ${binary} || die
- install_name_tool -change \
- ${gmp_framework} \
- "${EPREFIX}"/usr/lib/libgmp.dylib \
- ${binary} || die
- install_name_tool -change \
- ${ncurses_file} \
- "${EPREFIX}"/usr/lib/libncurses.dylib \
- ${binary} || die
- done
- # we don't do frameworks!
- sed -i \
- -e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
- -e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
- rts/package.conf.in || die
- fi
-
- # it is autoconf, but we really don't want to give it too
- # much arguments, in fact we do the make in-place anyway
- ./configure --prefix="${WORKDIR}"/usr || die
- make install || die
- popd > /dev/null
- ;;
- *)
- relocate_ghc "${WORKDIR}"
- ;;
- esac
- fi
-
- sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
- "${S}/ghc/ghc.wrapper"
-
- cd "${S}" # otherwise eapply will break
-
- eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
- eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
- eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
- eapply "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
- eapply "${FILESDIR}"/${PN}-8.0.2-binutils-2.30.patch
- eapply "${FILESDIR}"/${PN}-8.4.2-allow-cross-bootstrap.patch
-
- # a bunch of crosscompiler patches
- # needs newer version:
- #eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
-
- # mingw32 target
- pushd "${S}/libraries/Win32"
- eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
- popd
-
- bump_libs
-
- eapply_user
- # as we have changed the build system
- eautoreconf
- fi
-}
-
-src_configure() {
- if ! use binary; then
- # initialize build.mk
- echo '# Gentoo changes' > mk/build.mk
-
- # Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
- echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
- echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-
- # We also need to use the GHC_FLAGS flags when building ghc itself
- echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
- echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
- echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
- # Speed up initial Cabal bootstrap
- echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
- # We can't depend on haddock except when bootstrapping when we
- # must build docs and include them into the binary .tbz2 package
- # app-text/dblatex is not in portage, can not build PDF or PS
- echo "BUILD_SPHINX_PDF = NO" >> mk/build.mk
- echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
- echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
- # this controls presence on 'xhtml' and 'haddock' in final install
- echo "HADDOCK_DOCS = YES" >> mk/build.mk
-
- # not used outside of ghc's test
- if [[ -n ${GHC_BUILD_DPH} ]]; then
- echo "BUILD_DPH = YES" >> mk/build.mk
- else
- echo "BUILD_DPH = NO" >> mk/build.mk
- fi
-
- # Any non-native build has to skip as it needs
- # target haddock binary to be runnabine.
- if ! is_native; then
- # disable docs generation as it requires running stage2
- echo "HADDOCK_DOCS=NO" >> mk/build.mk
- echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
- echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
- fi
-
- if is_crosscompile; then
- # Install ghc-stage1 crosscompiler instead of
- # ghc-stage2 cross-built compiler.
- echo "Stage1Only=YES" >> mk/build.mk
- fi
-
- # allows overriding build flavours for libraries:
- # v - vanilla (static libs)
- # p - profiled
- # dyn - shared libraries
- # example: GHC_LIBRARY_WAYS="v dyn"
- if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
- echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
- fi
- echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
- # Get ghc from the unpacked binary .tbz2
- # except when bootstrapping we just pick ghc up off the path
- if ! use ghcbootstrap; then
- export PATH="${WORKDIR}/usr/bin:${PATH}"
- fi
-
- echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
-
- # don't strip anything. Very useful when stage2 SIGSEGVs on you
- echo "STRIP_CMD = :" >> mk/build.mk
-
- local econf_args=()
-
- # GHC embeds toolchain it was built by and uses it later.
- # Don't allow things like ccache or versioned binary slip.
- # We use stable thing across gcc upgrades.
- # User can use EXTRA_ECONF=CC=... to override this default.
- econf_args+=(
- AR=${CTARGET}-ar
- CC=${CTARGET}-gcc
- # these should be inferred by GHC but ghc defaults
- # to using bundled tools on windows.
- Windres=${CTARGET}-windres
- DllWrap=${CTARGET}-dllwrap
- # we set the linker explicitly below
- --disable-ld-override
- )
- case ${CTARGET} in
- arm*)
- # ld.bfd-2.28 does not work for ghc. Force ld.gold
- # instead. This should be removed once gentoo gets
- # a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
- econf_args+=(LD=${CTARGET}-ld.gold)
- ;;
- sparc*)
- # ld.gold-2.28 does not work for ghc. Force ld.bfd
- # instead. This should be removed once gentoo gets
- # a fix for missing --no-relax support bug:
- # https://sourceware.org/ml/binutils/2017-07/msg00183.html
- econf_args+=(LD=${CTARGET}-ld.bfd)
- ;;
- *)
- econf_args+=(LD=${CTARGET}-ld)
- esac
-
- if [[ ${CBUILD} != ${CHOST} ]]; then
- # GHC bug: ghc claims not to support cross-building.
- # It does, but does not distinct --host= value
- # for stage1 and stage2 compiler.
- econf_args+=(--host=${CBUILD})
- fi
-
- if use ghcmakebinary; then
- # When building booting libary we are trying to
- # bundle or restrict most of external depends
- # with unstable ABI:
- # - embed libffi (default GHC behaviour)
- # - disable ncurses support for ghci (via haskeline)
- # https://bugs.gentoo.org/557478
- # - disable ncurses support for ghc-pkg
- echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
- echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
- elif is_native; then
- # using ${GTARGET}'s libffi is not supported yet:
- # GHC embeds full path for ffi includes without /usr/${CTARGET} account.
- econf_args+=(--with-system-libffi)
- econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
- fi
-
- einfo "Final mk/build.mk:"
- cat mk/build.mk || die
-
- econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
-
- if [[ ${PV} == *9999* ]]; then
- GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
- GHC_P=${PN}-${GHC_PV}
- fi
- fi # ! use binary
-}
-
-src_compile() {
- if ! use binary; then
- # Stage1Only crosscompiler does not build stage2
- if ! is_crosscompile; then
- # 1. build/pax-mark compiler binary first
- emake ghc/stage2/build/tmp/ghc-stage2
- # 2. pax-mark (bug #516430)
- pax-mark -m ghc/stage2/build/tmp/ghc-stage2
- # 2. build/pax-mark haddock using ghc-stage2
- if is_native; then
- # non-native build does not build haddock
- # due to HADDOCK_DOCS=NO, but it could.
- emake utils/haddock/dist/build/tmp/haddock
- pax-mark -m utils/haddock/dist/build/tmp/haddock
- fi
- fi
- # 3. and then all the rest
- emake all
- fi # ! use binary
-}
-
-src_install() {
- if use binary; then
- use prefix && mkdir -p "${ED}"
- mv "${S}/usr" "${ED}"
- else
- [[ -f VERSION ]] || emake VERSION
-
- # -j1 due to a rare race in install script:
- # make --no-print-directory -f ghc.mk phase=final install
- # /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
- # -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
- # /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644 utils/hsc2hs/template-hsc.h \
- # "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
- # /usr/bin/install: cannot create regular file \
- # '/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}"
-
- # Skip for cross-targets as they all share target location:
- # /usr/share/doc/ghc-9999/
- if ! is_crosscompile; then
- dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
- fi
-
- # rename ghc-shipped files to avoid collision
- # of external packages. Motivating example:
- # user had installed:
- # dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
- # dev-haskell/transformers-0.4.2.0
- # then user tried to update to
- # dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
- # this will lead to single .conf file collision.
- local shipped_conf renamed_conf
- local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
- for shipped_conf in "${package_confdir}"/*.conf; do
- # rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
- renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
- mv "${shipped_conf}" "${renamed_conf}" || die
- done
-
- # remove link, but leave 'haddock-${GHC_P}'
- rm -f "${ED}"/usr/bin/$(cross)haddock
-
- if ! is_crosscompile; then
- newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
- newbashcomp utils/completion/ghc.bash ghc
- fi
- fi
-
- # path to the package.cache
- local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
- PKGCACHE="${package_confdir}"/package.cache
- # copy the package.conf.d, including timestamp, save it so we can help
- # users that have a broken package.conf.d
- cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
- # copy the package.conf, including timestamp, save it so we later can put it
- # back before uninstalling, or when upgrading.
- cp -p "${PKGCACHE}"{,.shipped} \
- || die "failed to copy package.conf.d/package.cache"
-}
-
-pkg_preinst() {
- # have we got an earlier version of ghc installed?
- if has_version "<${CATEGORY}/${PF}"; then
- haskell_updater_warn="1"
- fi
-}
-
-pkg_postinst() {
- ghc-reregister
-
- # path to the package.cache
- PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
- # give the cache a new timestamp, it must be as recent as
- # the package.conf.d directory.
- touch "${PKGCACHE}"
-
- if [[ "${haskell_updater_warn}" == "1" ]]; then
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- ewarn "You have just upgraded from an older version of GHC."
- ewarn "You may have to run"
- ewarn " 'haskell-updater'"
- ewarn "to rebuild all ghc-based Haskell libraries."
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- fi
-}
-
-pkg_prerm() {
- PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
- rm -rf "${PKGCACHE}"
-
- cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
- ghc-package_pkg_postrm
-}
diff --git a/dev-lang/ghc/ghc-8.4.3.ebuild b/dev-lang/ghc/ghc-8.4.3.ebuild
deleted file mode 100644
index 58e642364d02..000000000000
--- a/dev-lang/ghc/ghc-8.4.3.ebuild
+++ /dev/null
@@ -1,759 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
- if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- export CTARGET=${CATEGORY/cross-}
- fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib pax-utils toolchain-funcs versionator prefix
-inherit check-reqs
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-# 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 amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/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 )"
-#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
-#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
- case "${ARCH}" in
- #alpha) return 0 ;;
- #arm64) return 0 ;;
- #arm) return 0 ;;
- amd64) return 0 ;;
- #ia64) return 0 ;;
- #ppc) return 0 ;;
- #ppc64) return 0 ;;
- #sparc) return 0 ;;
- x86) return 0 ;;
- *) return 1 ;;
- esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.4.1.20180329 # uncomment only for -alpha, -beta, -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? ( https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz )"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
- # "hackage-name hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-#KEYWORDS="~alpha ~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="doc ghcbootstrap ghcmakebinary +gmp profile"
-IUSE+=" binary"
-
-RDEPEND="
- >=dev-lang/perl-5.6.1
- dev-libs/gmp:0=
- sys-libs/ncurses:0=[unicode]
- !ghcmakebinary? ( dev-libs/libffi:= )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-# utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
- !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
- sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}
- doc? ( app-text/docbook-xml-dtd:4.2
- app-text/docbook-xml-dtd:4.5
- app-text/docbook-xsl-stylesheets
- dev-python/sphinx
- >=dev-libs/libxslt-1.1.2 )
- !ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
-
-REQUIRED_USE="?? ( ghcbootstrap binary )"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-is_native() {
- [[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
-}
-
-# returns tool prefix for crosscompiler.
-# Example:
-# CTARGET=armv7a-unknown-linux-gnueabi
-# CHOST=x86_64-pc-linux-gnu
-# "armv7a-unknown-linux-gnueabi-"
-# CTARGET=${CHOST}
-# ""
-# Used in tools and library prefix:
-# "${ED}"/usr/bin/$(cross)haddock
-# "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
- if is_crosscompile; then
- echo "${CTARGET}-"
- else
- echo ""
- fi
-}
-
-append-ghc-cflags() {
- local persistent compile assemble link
- local flag ghcflag
-
- for flag in $*; do
- case ${flag} in
- persistent) persistent="yes";;
- compile) compile="yes";;
- assemble) assemble="yes";;
- link) link="yes";;
- *)
- [[ ${compile} ]] && ghcflag="-optc${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${assemble} ]] && ghcflag="-opta${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${link} ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- ;;
- esac
- done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
- local pn=$1 pv=$2
- local p=${pn}-${pv}
- local f
-
- einfo "Bumping ${pn} up to ${pv}"
-
- for f in ghc.mk GNUmakefile; do
- mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
- done
- mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
- mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
- local p pn pv
- for p in "${BUMP_LIBRARIES[@]}"; do
- set -- $p
- pn=$1 pv=$2
-
- SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
- done
-}
-
-update_SRC_URI
-
-bump_libs() {
- local p pn pv
- for p in "${BUMP_LIBRARIES[@]}"; do
- set -- $p
- pn=$1 pv=$2
-
- bump_lib "${pn}" "${pv}"
- done
-}
-
-ghc_setup_cflags() {
- # TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
- if ! is_native; then
- export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
- export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
- einfo "Crosscompiling mode:"
- einfo " CHOST: ${CHOST}"
- einfo " CTARGET: ${CTARGET}"
- einfo " CFLAGS: ${CFLAGS}"
- einfo " LDFLAGS: ${LDFLAGS}"
- einfo " prefix: $(cross)"
- return
- fi
- # We need to be very careful with the CFLAGS we ask ghc to pass through to
- # gcc. There are plenty of flags which will make gcc produce output that
- # breaks ghc in various ways. The main ones we want to pass through are
- # -mcpu / -march flags. These are important for arches like alpha & sparc.
- # We also use these CFLAGS for building the C parts of ghc, ie the rts.
- strip-flags
- strip-unsupported-flags
-
- # Cmm can't parse line numbers #482086
- replace-flags -ggdb[3-9] -ggdb2
-
- GHC_FLAGS=""
- GHC_PERSISTENT_FLAGS=""
- for flag in ${CFLAGS}; do
- case ${flag} in
-
- # Ignore extra optimisation (ghc passes -O to gcc anyway)
- # -O2 and above break on too many systems
- -O*) ;;
-
- # Arch and ABI flags are what we're really after
- -m*) append-ghc-cflags compile assemble ${flag};;
-
- # Sometimes it's handy to see backtrace of RTS
- # to get an idea what happens there
- -g*) append-ghc-cflags compile ${flag};;
-
- # Ignore all other flags, including all -f* flags
- esac
- done
-
- 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
- # hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
- # are not built with fPIC, bug #606666
- gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
- tc-is-gcc && version_is_at_least 6.3 $(gcc-version) && if ! use ghcbootstrap; then
- # gcc-6.3 has support for -no-pie upstream, but spelling differs from
- # gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
- # hardened users try '-pie' in USE=ghcbootstrap mode.
- append-ghc-cflags compile link -no-pie
- fi
-
- # 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 ...
-relocate_path() {
- local from=$1
- local to=$2
- shift 2
- local file=
- for file in "$@"
- do
- sed -i -e "s|$from|$to|g" \
- "$file" || die "path relocation failed for '$file'"
- done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
- local to=$1
-
- # libdir for prebuilt binary and for current system may mismatch
- # It does for prefix installation for example: bug #476998
- local bin_ghc_prefix=${WORKDIR}/usr
- local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
- local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
- # backup original script to use it later after relocation
- local gp_back="${T}/ghc-pkg-${GHC_PV}-orig"
- cp "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
- if [[ ${bin_libdir} != $(get_libdir) ]]; then
- einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
- # moving the dir itself is not strictly needed
- # but then USE=binary would result in installing
- # in '${bin_libdir}'
- mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
- relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
- "${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
- "${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
- "$gp_back" \
- "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
- fi
-
- # Relocate from /usr to ${EPREFIX}/usr
- relocate_path "/usr" "${to}/usr" \
- "${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
- "${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
- "${WORKDIR}/usr/bin/haddock-ghc-${GHC_PV}" \
- "${WORKDIR}/usr/bin/hp2ps" \
- "${WORKDIR}/usr/bin/hpc" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
- "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
-
- # this one we will use to regenerate cache
- # so it should point to current tree location
- relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
- if use prefix; then
- hprefixify "${bin_libpath}"/${PN}*/settings
- fi
-
- # regenerate the binary package cache
- "$gp_back" recache || die "failed to update cache after relocation"
- rm "$gp_back"
-}
-
-ghc-check-reqs() {
- # These are pessimistic values (slightly bigger than worst-case)
- # Worst case is UNREG USE=profile ia64. See bug #611866 for some
- # numbers on various arches.
- CHECKREQS_DISK_BUILD=8G
- CHECKREQS_DISK_USR=2G
- # USE=binary roughly takes
- use binary && CHECKREQS_DISK_BUILD=4G
-
- "$@"
-}
-
-pkg_pretend() {
- ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- ghc-check-reqs check-reqs_pkg_setup
-
- # quiet portage about prebuilt binaries
- use binary && QA_PREBUILT="*"
-
- [[ ${MERGE_TYPE} == binary ]] && return
-
- if use ghcbootstrap; then
- ewarn "You requested ghc bootstrapping, this is usually only used"
- ewarn "by Gentoo developers to make binary .tbz2 packages."
-
- [[ -z $(type -P ghc) ]] && \
- die "Could not find a ghc to bootstrap with."
- else
- if ! yet_binary; then
- eerror "Please try emerging with USE=ghcbootstrap and report build"
- eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
- die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
- fi
- fi
-}
-
-src_unpack() {
- # Create the ${S} dir if we're using the binary version
- use binary && mkdir "${S}"
-
- # the Solaris and Darwin binaries from ghc (maeder) need to be
- # unpacked separately, so prevent them from being unpacked
- local ONLYA=${A}
- case ${CHOST} in
- *-darwin* | *-solaris*) ONLYA=${GHC_P}-src.tar.xz ;;
- esac
- unpack ${ONLYA}
-}
-
-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-${GHC_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)/${GHC_P}/bin/ghc"
- fi
-
- if use binary; then
- if use prefix; then
- relocate_ghc "${EPREFIX}"
- fi
-
- # Move unpacked files to the expected place
- mv "${WORKDIR}/usr" "${S}"
- eapply_user
- else
- if ! use ghcbootstrap; then
- case ${CHOST} in
- *-darwin* | *-solaris*)
- # UPDATE ME for ghc-7
- mkdir "${WORKDIR}"/ghc-bin-installer || die
- pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
- use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
- use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
- use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
- popd > /dev/null
-
- pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
- # fix the binaries so they run, on Solaris we need an
- # LD_LIBRARY_PATH which has our prefix libdirs, on
- # Darwin we need to replace the frameworks with our libs
- # from the prefix fix before installation, because some
- # of the tools are actually used during configure/make
- if [[ ${CHOST} == *-solaris* ]] ; then
- export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
- elif [[ ${CHOST} == *-darwin* ]] ; then
- local readline_framework=GNUreadline.framework/GNUreadline
- local gmp_framework=/opt/local/lib/libgmp.10.dylib
- local ncurses_file=/opt/local/lib/libncurses.5.dylib
- for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
- install_name_tool -change \
- ${readline_framework} \
- "${EPREFIX}"/lib/libreadline.dylib \
- ${binary} || die
- install_name_tool -change \
- ${gmp_framework} \
- "${EPREFIX}"/usr/lib/libgmp.dylib \
- ${binary} || die
- install_name_tool -change \
- ${ncurses_file} \
- "${EPREFIX}"/usr/lib/libncurses.dylib \
- ${binary} || die
- done
- # we don't do frameworks!
- sed -i \
- -e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
- -e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
- rts/package.conf.in || die
- fi
-
- # it is autoconf, but we really don't want to give it too
- # much arguments, in fact we do the make in-place anyway
- ./configure --prefix="${WORKDIR}"/usr || die
- make install || die
- popd > /dev/null
- ;;
- *)
- relocate_ghc "${WORKDIR}"
- ;;
- esac
- fi
-
- sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
- "${S}/ghc/ghc.wrapper"
-
- cd "${S}" # otherwise eapply will break
-
- eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
- eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
- eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
- eapply "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
- eapply "${FILESDIR}"/${PN}-8.4.2-allow-cross-bootstrap.patch
-
- # a bunch of crosscompiler patches
- # needs newer version:
- #eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
-
- # mingw32 target
- pushd "${S}/libraries/Win32"
- eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
- popd
-
- bump_libs
-
- eapply_user
- # as we have changed the build system
- eautoreconf
- fi
-}
-
-src_configure() {
- if ! use binary; then
- # initialize build.mk
- echo '# Gentoo changes' > mk/build.mk
-
- # Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
- echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
- echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-
- # We also need to use the GHC_FLAGS flags when building ghc itself
- echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
- echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
- echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
- # Speed up initial Cabal bootstrap
- echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
- # We can't depend on haddock except when bootstrapping when we
- # must build docs and include them into the binary .tbz2 package
- # app-text/dblatex is not in portage, can not build PDF or PS
- echo "BUILD_SPHINX_PDF = NO" >> mk/build.mk
- echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
- echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
- # this controls presence on 'xhtml' and 'haddock' in final install
- echo "HADDOCK_DOCS = YES" >> mk/build.mk
-
- # not used outside of ghc's test
- if [[ -n ${GHC_BUILD_DPH} ]]; then
- echo "BUILD_DPH = YES" >> mk/build.mk
- else
- echo "BUILD_DPH = NO" >> mk/build.mk
- fi
-
- # Any non-native build has to skip as it needs
- # target haddock binary to be runnabine.
- if ! is_native; then
- # disable docs generation as it requires running stage2
- echo "HADDOCK_DOCS=NO" >> mk/build.mk
- echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
- echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
- fi
-
- if is_crosscompile; then
- # Install ghc-stage1 crosscompiler instead of
- # ghc-stage2 cross-built compiler.
- echo "Stage1Only=YES" >> mk/build.mk
- fi
-
- # allows overriding build flavours for libraries:
- # v - vanilla (static libs)
- # p - profiled
- # dyn - shared libraries
- # example: GHC_LIBRARY_WAYS="v dyn"
- if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
- echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
- fi
- echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
- # Get ghc from the unpacked binary .tbz2
- # except when bootstrapping we just pick ghc up off the path
- if ! use ghcbootstrap; then
- export PATH="${WORKDIR}/usr/bin:${PATH}"
- fi
-
- echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
-
- # don't strip anything. Very useful when stage2 SIGSEGVs on you
- echo "STRIP_CMD = :" >> mk/build.mk
-
- local econf_args=()
-
- # GHC embeds toolchain it was built by and uses it later.
- # Don't allow things like ccache or versioned binary slip.
- # We use stable thing across gcc upgrades.
- # User can use EXTRA_ECONF=CC=... to override this default.
- econf_args+=(
- AR=${CTARGET}-ar
- CC=${CTARGET}-gcc
- # these should be inferred by GHC but ghc defaults
- # to using bundled tools on windows.
- Windres=${CTARGET}-windres
- DllWrap=${CTARGET}-dllwrap
- # we set the linker explicitly below
- --disable-ld-override
- )
- case ${CTARGET} in
- arm*)
- # ld.bfd-2.28 does not work for ghc. Force ld.gold
- # instead. This should be removed once gentoo gets
- # a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
- econf_args+=(LD=${CTARGET}-ld.gold)
- ;;
- sparc*)
- # ld.gold-2.28 does not work for ghc. Force ld.bfd
- # instead. This should be removed once gentoo gets
- # a fix for missing --no-relax support bug:
- # https://sourceware.org/ml/binutils/2017-07/msg00183.html
- econf_args+=(LD=${CTARGET}-ld.bfd)
- ;;
- *)
- econf_args+=(LD=${CTARGET}-ld)
- esac
-
- if [[ ${CBUILD} != ${CHOST} ]]; then
- # GHC bug: ghc claims not to support cross-building.
- # It does, but does not distinct --host= value
- # for stage1 and stage2 compiler.
- econf_args+=(--host=${CBUILD})
- fi
-
- if use ghcmakebinary; then
- # When building booting libary we are trying to
- # bundle or restrict most of external depends
- # with unstable ABI:
- # - embed libffi (default GHC behaviour)
- # - disable ncurses support for ghci (via haskeline)
- # https://bugs.gentoo.org/557478
- # - disable ncurses support for ghc-pkg
- echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
- echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
- elif is_native; then
- # using ${GTARGET}'s libffi is not supported yet:
- # GHC embeds full path for ffi includes without /usr/${CTARGET} account.
- econf_args+=(--with-system-libffi)
- econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
- fi
-
- einfo "Final mk/build.mk:"
- cat mk/build.mk || die
-
- econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
-
- if [[ ${PV} == *9999* ]]; then
- GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
- GHC_P=${PN}-${GHC_PV}
- fi
- fi # ! use binary
-}
-
-src_compile() {
- if ! use binary; then
- # Stage1Only crosscompiler does not build stage2
- if ! is_crosscompile; then
- # 1. build/pax-mark compiler binary first
- emake ghc/stage2/build/tmp/ghc-stage2
- # 2. pax-mark (bug #516430)
- pax-mark -m ghc/stage2/build/tmp/ghc-stage2
- # 2. build/pax-mark haddock using ghc-stage2
- if is_native; then
- # non-native build does not build haddock
- # due to HADDOCK_DOCS=NO, but it could.
- emake utils/haddock/dist/build/tmp/haddock
- pax-mark -m utils/haddock/dist/build/tmp/haddock
- fi
- fi
- # 3. and then all the rest
- emake all
- fi # ! use binary
-}
-
-src_install() {
- if use binary; then
- use prefix && mkdir -p "${ED}"
- mv "${S}/usr" "${ED}"
- else
- [[ -f VERSION ]] || emake VERSION
-
- # -j1 due to a rare race in install script:
- # make --no-print-directory -f ghc.mk phase=final install
- # /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
- # -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
- # /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644 utils/hsc2hs/template-hsc.h \
- # "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
- # /usr/bin/install: cannot create regular file \
- # '/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}"
-
- # Skip for cross-targets as they all share target location:
- # /usr/share/doc/ghc-9999/
- if ! is_crosscompile; then
- dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
- fi
-
- # rename ghc-shipped files to avoid collision
- # of external packages. Motivating example:
- # user had installed:
- # dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
- # dev-haskell/transformers-0.4.2.0
- # then user tried to update to
- # dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
- # this will lead to single .conf file collision.
- local shipped_conf renamed_conf
- local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
- for shipped_conf in "${package_confdir}"/*.conf; do
- # rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
- renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
- mv "${shipped_conf}" "${renamed_conf}" || die
- done
-
- # remove link, but leave 'haddock-${GHC_P}'
- rm -f "${ED}"/usr/bin/$(cross)haddock
-
- if ! is_crosscompile; then
- newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
- newbashcomp utils/completion/ghc.bash ghc
- fi
- fi
-
- # path to the package.cache
- local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
- PKGCACHE="${package_confdir}"/package.cache
- # copy the package.conf.d, including timestamp, save it so we can help
- # users that have a broken package.conf.d
- cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
- # copy the package.conf, including timestamp, save it so we later can put it
- # back before uninstalling, or when upgrading.
- cp -p "${PKGCACHE}"{,.shipped} \
- || die "failed to copy package.conf.d/package.cache"
-}
-
-pkg_preinst() {
- # have we got an earlier version of ghc installed?
- if has_version "<${CATEGORY}/${PF}"; then
- haskell_updater_warn="1"
- fi
-}
-
-pkg_postinst() {
- ghc-reregister
-
- # path to the package.cache
- PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
- # give the cache a new timestamp, it must be as recent as
- # the package.conf.d directory.
- touch "${PKGCACHE}"
-
- if [[ "${haskell_updater_warn}" == "1" ]]; then
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- ewarn "You have just upgraded from an older version of GHC."
- ewarn "You may have to run"
- ewarn " 'haskell-updater'"
- ewarn "to rebuild all ghc-based Haskell libraries."
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- fi
-}
-
-pkg_prerm() {
- PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
- rm -rf "${PKGCACHE}"
-
- cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
- ghc-package_pkg_postrm
-}
diff --git a/dev-lang/ghc/ghc-8.6.4.ebuild b/dev-lang/ghc/ghc-8.6.4.ebuild
deleted file mode 100644
index 52d995e60819..000000000000
--- a/dev-lang/ghc/ghc-8.6.4.ebuild
+++ /dev/null
@@ -1,775 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
- if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- export CTARGET=${CATEGORY/cross-}
- fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib multiprocessing pax-utils toolchain-funcs versionator prefix
-inherit check-reqs
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-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 amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/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 )"
-#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
-#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
- case "${ARCH}" in
- #alpha) return 0 ;;
- #arm64) return 0 ;;
- #arm) return 0 ;;
- amd64) return 0 ;;
- #ia64) return 0 ;;
- #ppc) return 0 ;;
- #ppc64) return 0 ;;
- #sparc) return 0 ;;
- x86) return 0 ;;
- *) return 1 ;;
- esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.6.0.20180810 # uncomment only for -alpha, -beta, -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? (
- https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz
- test? ( https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
-)"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
- # "hackage-name hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-#will need big tree sync
-#KEYWORDS="~amd64 ~x86"
-IUSE="doc ghcbootstrap ghcmakebinary +gmp profile test"
-RESTRICT="!test? ( test )"
-IUSE+=" binary"
-
-RDEPEND="
- >=dev-lang/perl-5.6.1
- dev-libs/gmp:0=
- sys-libs/ncurses:0=[unicode]
- !ghcmakebinary? ( dev-libs/libffi:= )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-# utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
- !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
- sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}
- doc? ( app-text/docbook-xml-dtd:4.2
- app-text/docbook-xml-dtd:4.5
- app-text/docbook-xsl-stylesheets
- dev-python/sphinx
- >=dev-libs/libxslt-1.1.2 )
- !ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
-
-REQUIRED_USE="?? ( ghcbootstrap binary )"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-is_native() {
- [[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
-}
-
-# returns tool prefix for crosscompiler.
-# Example:
-# CTARGET=armv7a-unknown-linux-gnueabi
-# CHOST=x86_64-pc-linux-gnu
-# "armv7a-unknown-linux-gnueabi-"
-# CTARGET=${CHOST}
-# ""
-# Used in tools and library prefix:
-# "${ED}"/usr/bin/$(cross)haddock
-# "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
- if is_crosscompile; then
- echo "${CTARGET}-"
- else
- echo ""
- fi
-}
-
-append-ghc-cflags() {
- local persistent compile assemble link
- local flag ghcflag
-
- for flag in $*; do
- case ${flag} in
- persistent) persistent="yes";;
- compile) compile="yes";;
- assemble) assemble="yes";;
- link) link="yes";;
- *)
- [[ ${compile} ]] && ghcflag="-optc${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${assemble} ]] && ghcflag="-opta${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${link} ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- ;;
- esac
- done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
- local pn=$1 pv=$2
- local p=${pn}-${pv}
- local f
-
- einfo "Bumping ${pn} up to ${pv}"
-
- for f in ghc.mk GNUmakefile; do
- mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
- done
- mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
- mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
- local p pn pv
- for p in "${BUMP_LIBRARIES[@]}"; do
- set -- $p
- pn=$1 pv=$2
-
- SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
- done
-}
-
-update_SRC_URI
-
-bump_libs() {
- local p pn pv
- for p in "${BUMP_LIBRARIES[@]}"; do
- set -- $p
- pn=$1 pv=$2
-
- bump_lib "${pn}" "${pv}"
- done
-}
-
-ghc_setup_cflags() {
- # TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
- if ! is_native; then
- export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
- export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
- einfo "Crosscompiling mode:"
- einfo " CHOST: ${CHOST}"
- einfo " CTARGET: ${CTARGET}"
- einfo " CFLAGS: ${CFLAGS}"
- einfo " LDFLAGS: ${LDFLAGS}"
- einfo " prefix: $(cross)"
- return
- fi
- # We need to be very careful with the CFLAGS we ask ghc to pass through to
- # gcc. There are plenty of flags which will make gcc produce output that
- # breaks ghc in various ways. The main ones we want to pass through are
- # -mcpu / -march flags. These are important for arches like alpha & sparc.
- # We also use these CFLAGS for building the C parts of ghc, ie the rts.
- strip-flags
- strip-unsupported-flags
-
- # Cmm can't parse line numbers #482086
- replace-flags -ggdb[3-9] -ggdb2
-
- GHC_FLAGS=""
- GHC_PERSISTENT_FLAGS=""
- for flag in ${CFLAGS}; do
- case ${flag} in
-
- # Ignore extra optimisation (ghc passes -O to gcc anyway)
- # -O2 and above break on too many systems
- -O*) ;;
-
- # Arch and ABI flags are what we're really after
- -m*) append-ghc-cflags compile assemble ${flag};;
-
- # Sometimes it's handy to see backtrace of RTS
- # to get an idea what happens there
- -g*) append-ghc-cflags compile ${flag};;
-
- # Ignore all other flags, including all -f* flags
- esac
- done
-
- 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
- # hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
- # are not built with fPIC, bug #606666
- gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
- tc-is-gcc && version_is_at_least 6.3 $(gcc-version) && if ! use ghcbootstrap; then
- # gcc-6.3 has support for -no-pie upstream, but spelling differs from
- # gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
- # hardened users try '-pie' in USE=ghcbootstrap mode.
- append-ghc-cflags compile link -no-pie
- fi
-
- # 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 ...
-relocate_path() {
- local from=$1
- local to=$2
- shift 2
- local file=
- for file in "$@"
- do
- sed -i -e "s|$from|$to|g" \
- "$file" || die "path relocation failed for '$file'"
- done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
- local to=$1 ghc_v=${BIN_PV}
-
- # libdir for prebuilt binary and for current system may mismatch
- # It does for prefix installation for example: bug #476998
- local bin_ghc_prefix=${WORKDIR}/usr
- local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
- local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
- # backup original script to use it later after relocation
- local gp_back="${T}/ghc-pkg-${ghc_v}-orig"
- cp "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
- if [[ ${bin_libdir} != $(get_libdir) ]]; then
- einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
- # moving the dir itself is not strictly needed
- # but then USE=binary would result in installing
- # in '${bin_libdir}'
- mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
- relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
- "${WORKDIR}/usr/bin/ghc-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghci-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/bin/runghc-${ghc_v}" \
- "$gp_back" \
- "${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
- fi
-
- # Relocate from /usr to ${EPREFIX}/usr
- relocate_path "/usr" "${to}/usr" \
- "${WORKDIR}/usr/bin/ghc-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghci-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
- "${WORKDIR}/usr/bin/haddock-ghc-${ghc_v}" \
- "${WORKDIR}/usr/bin/hp2ps" \
- "${WORKDIR}/usr/bin/hpc" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/bin/runghc-${ghc_v}" \
- "${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-
- # this one we will use to regenerate cache
- # so it should point to current tree location
- relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
- if use prefix; then
- hprefixify "${bin_libpath}"/${PN}*/settings
- fi
-
- # regenerate the binary package cache
- "$gp_back" recache || die "failed to update cache after relocation"
- rm "$gp_back"
-}
-
-ghc-check-reqs() {
- # These are pessimistic values (slightly bigger than worst-case)
- # Worst case is UNREG USE=profile ia64. See bug #611866 for some
- # numbers on various arches.
- CHECKREQS_DISK_BUILD=8G
- CHECKREQS_DISK_USR=2G
- # USE=binary roughly takes
- use binary && CHECKREQS_DISK_BUILD=4G
-
- "$@"
-}
-
-pkg_pretend() {
- ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- ghc-check-reqs check-reqs_pkg_setup
-
- # quiet portage about prebuilt binaries
- use binary && QA_PREBUILT="*"
-
- [[ ${MERGE_TYPE} == binary ]] && return
-
- if use ghcbootstrap; then
- ewarn "You requested ghc bootstrapping, this is usually only used"
- ewarn "by Gentoo developers to make binary .tbz2 packages."
-
- [[ -z $(type -P ghc) ]] && \
- die "Could not find a ghc to bootstrap with."
- else
- if ! yet_binary; then
- eerror "Please try emerging with USE=ghcbootstrap and report build"
- eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
- die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
- fi
- fi
-}
-
-src_unpack() {
- # Create the ${S} dir if we're using the binary version
- use binary && mkdir "${S}"
-
- # the Solaris and Darwin binaries from ghc (maeder) need to be
- # unpacked separately, so prevent them from being unpacked
- local ONLYA=${A}
- case ${CHOST} in
- *-darwin* | *-solaris*) ONLYA=${GHC_P}-src.tar.xz ;;
- esac
- unpack ${ONLYA}
-}
-
-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"
- fi
-
- if use binary; then
- if use prefix; then
- relocate_ghc "${EPREFIX}"
- fi
-
- # Move unpacked files to the expected place
- mv "${WORKDIR}/usr" "${S}"
- eapply_user
- else
- if ! use ghcbootstrap; then
- case ${CHOST} in
- *-darwin* | *-solaris*)
- # UPDATE ME for ghc-7
- mkdir "${WORKDIR}"/ghc-bin-installer || die
- pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
- use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
- use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
- use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
- popd > /dev/null
-
- pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
- # fix the binaries so they run, on Solaris we need an
- # LD_LIBRARY_PATH which has our prefix libdirs, on
- # Darwin we need to replace the frameworks with our libs
- # from the prefix fix before installation, because some
- # of the tools are actually used during configure/make
- if [[ ${CHOST} == *-solaris* ]] ; then
- export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
- elif [[ ${CHOST} == *-darwin* ]] ; then
- local readline_framework=GNUreadline.framework/GNUreadline
- local gmp_framework=/opt/local/lib/libgmp.10.dylib
- local ncurses_file=/opt/local/lib/libncurses.5.dylib
- for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
- install_name_tool -change \
- ${readline_framework} \
- "${EPREFIX}"/lib/libreadline.dylib \
- ${binary} || die
- install_name_tool -change \
- ${gmp_framework} \
- "${EPREFIX}"/usr/lib/libgmp.dylib \
- ${binary} || die
- install_name_tool -change \
- ${ncurses_file} \
- "${EPREFIX}"/usr/lib/libncurses.dylib \
- ${binary} || die
- done
- # we don't do frameworks!
- sed -i \
- -e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
- -e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
- rts/package.conf.in || die
- fi
-
- # it is autoconf, but we really don't want to give it too
- # many arguments, in fact we do the make in-place anyway
- ./configure --prefix="${WORKDIR}"/usr || die
- make install || die
- popd > /dev/null
- ;;
- *)
- relocate_ghc "${WORKDIR}"
- ;;
- esac
- fi
-
- sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
- "${S}/ghc/ghc.wrapper"
-
- cd "${S}" # otherwise eapply will break
-
- eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
- eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
- eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
- eapply "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
- eapply "${FILESDIR}"/${PN}-8.4.2-allow-cross-bootstrap.patch
-
- # a bunch of crosscompiler patches
- # needs newer version:
- #eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
-
- # mingw32 target
- pushd "${S}/libraries/Win32"
- eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
- popd
-
- bump_libs
-
- eapply_user
- # as we have changed the build system
- eautoreconf
- fi
-}
-
-src_configure() {
- if ! use binary; then
- # initialize build.mk
- echo '# Gentoo changes' > mk/build.mk
-
- # Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
- echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
- echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-
- # We also need to use the GHC_FLAGS flags when building ghc itself
- echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
- echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
- echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
- # Speed up initial Cabal bootstrap
- echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
- # We can't depend on haddock except when bootstrapping when we
- # must build docs and include them into the binary .tbz2 package
- # app-text/dblatex is not in portage, can not build PDF or PS
- echo "BUILD_SPHINX_PDF = NO" >> mk/build.mk
- echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
- echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
- # this controls presence on 'xhtml' and 'haddock' in final install
- echo "HADDOCK_DOCS = YES" >> mk/build.mk
-
- # not used outside of ghc's test
- if [[ -n ${GHC_BUILD_DPH} ]]; then
- echo "BUILD_DPH = YES" >> mk/build.mk
- else
- echo "BUILD_DPH = NO" >> mk/build.mk
- fi
-
- # Any non-native build has to skip as it needs
- # target haddock binary to be runnabine.
- if ! is_native; then
- # disable docs generation as it requires running stage2
- echo "HADDOCK_DOCS=NO" >> mk/build.mk
- echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
- echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
- fi
-
- if is_crosscompile; then
- # Install ghc-stage1 crosscompiler instead of
- # ghc-stage2 cross-built compiler.
- echo "Stage1Only=YES" >> mk/build.mk
- fi
-
- # allows overriding build flavours for libraries:
- # v - vanilla (static libs)
- # p - profiled
- # dyn - shared libraries
- # example: GHC_LIBRARY_WAYS="v dyn"
- if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
- echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
- fi
- echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
- # Get ghc from the unpacked binary .tbz2
- # except when bootstrapping we just pick ghc up off the path
- if ! use ghcbootstrap; then
- export PATH="${WORKDIR}/usr/bin:${PATH}"
- fi
-
- echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
-
- # don't strip anything. Very useful when stage2 SIGSEGVs on you
- echo "STRIP_CMD = :" >> mk/build.mk
-
- local econf_args=()
-
- # GHC embeds toolchain it was built by and uses it later.
- # Don't allow things like ccache or versioned binary slip.
- # We use stable thing across gcc upgrades.
- # User can use EXTRA_ECONF=CC=... to override this default.
- econf_args+=(
- AR=${CTARGET}-ar
- CC=${CTARGET}-gcc
- # these should be inferred by GHC but ghc defaults
- # to using bundled tools on windows.
- Windres=${CTARGET}-windres
- DllWrap=${CTARGET}-dllwrap
- # we set the linker explicitly below
- --disable-ld-override
- )
- case ${CTARGET} in
- arm*)
- # ld.bfd-2.28 does not work for ghc. Force ld.gold
- # instead. This should be removed once gentoo gets
- # a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
- econf_args+=(LD=${CTARGET}-ld.gold)
- ;;
- sparc*)
- # ld.gold-2.28 does not work for ghc. Force ld.bfd
- # instead. This should be removed once gentoo gets
- # a fix for missing --no-relax support bug:
- # https://sourceware.org/ml/binutils/2017-07/msg00183.html
- econf_args+=(LD=${CTARGET}-ld.bfd)
- ;;
- *)
- econf_args+=(LD=${CTARGET}-ld)
- esac
-
- if [[ ${CBUILD} != ${CHOST} ]]; then
- # GHC bug: ghc claims not to support cross-building.
- # It does, but does not distinct --host= value
- # for stage1 and stage2 compiler.
- econf_args+=(--host=${CBUILD})
- fi
-
- if use ghcmakebinary; then
- # When building booting libary we are trying to
- # bundle or restrict most of external depends
- # with unstable ABI:
- # - embed libffi (default GHC behaviour)
- # - disable ncurses support for ghci (via haskeline)
- # https://bugs.gentoo.org/557478
- # - disable ncurses support for ghc-pkg
- echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
- echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
- elif is_native; then
- # using ${GTARGET}'s libffi is not supported yet:
- # GHC embeds full path for ffi includes without /usr/${CTARGET} account.
- econf_args+=(--with-system-libffi)
- econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
- fi
-
- einfo "Final mk/build.mk:"
- cat mk/build.mk || die
-
- econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
-
- if [[ ${PV} == *9999* ]]; then
- GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
- GHC_P=${PN}-${GHC_PV}
- fi
- fi # ! use binary
-}
-
-src_compile() {
- if ! use binary; then
- # Stage1Only crosscompiler does not build stage2
- if ! is_crosscompile; then
- # 1. build/pax-mark compiler binary first
- emake ghc/stage2/build/tmp/ghc-stage2
- # 2. pax-mark (bug #516430)
- pax-mark -m ghc/stage2/build/tmp/ghc-stage2
- # 2. build/pax-mark haddock using ghc-stage2
- if is_native; then
- # non-native build does not build haddock
- # due to HADDOCK_DOCS=NO, but it could.
- emake utils/haddock/dist/build/tmp/haddock
- pax-mark -m utils/haddock/dist/build/tmp/haddock
- fi
- fi
- # 3. and then all the rest
- emake all
- fi # ! use binary
-}
-
-src_test() {
- # TODO: deal with:
- # - sandbox (pollutes environment)
- # - extra packages (to extend testsuite coverage)
- # bits are taken from 'validate'
- local make_test_target='test' # can be fulltest
- # not 'emake' as testsuite uses '$MAKE' without jobserver available
- make $make_test_target stage=2 THREADS=$(makeopts_jobs)
-}
-
-src_install() {
- if use binary; then
- use prefix && mkdir -p "${ED}"
- mv "${S}/usr" "${ED}"
- else
- [[ -f VERSION ]] || emake VERSION
-
- # -j1 due to a rare race in install script:
- # make --no-print-directory -f ghc.mk phase=final install
- # /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
- # -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
- # /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644 utils/hsc2hs/template-hsc.h \
- # "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
- # /usr/bin/install: cannot create regular file \
- # '/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}"
-
- # Skip for cross-targets as they all share target location:
- # /usr/share/doc/ghc-9999/
- if ! is_crosscompile; then
- dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
- fi
-
- # rename ghc-shipped files to avoid collision
- # of external packages. Motivating example:
- # user had installed:
- # dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
- # dev-haskell/transformers-0.4.2.0
- # then user tried to update to
- # dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
- # this will lead to single .conf file collision.
- local shipped_conf renamed_conf
- local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
- for shipped_conf in "${package_confdir}"/*.conf; do
- # rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
- renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
- mv "${shipped_conf}" "${renamed_conf}" || die
- done
-
- # remove link, but leave 'haddock-${GHC_P}'
- rm -f "${ED}"/usr/bin/$(cross)haddock
-
- if ! is_crosscompile; then
- newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
- newbashcomp utils/completion/ghc.bash ghc
- fi
- fi
-
- # path to the package.cache
- local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
- PKGCACHE="${package_confdir}"/package.cache
- # copy the package.conf.d, including timestamp, save it so we can help
- # users that have a broken package.conf.d
- cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
- # copy the package.conf, including timestamp, save it so we later can put it
- # back before uninstalling, or when upgrading.
- cp -p "${PKGCACHE}"{,.shipped} \
- || die "failed to copy package.conf.d/package.cache"
-}
-
-pkg_preinst() {
- # have we got an earlier version of ghc installed?
- if has_version "<${CATEGORY}/${PF}"; then
- haskell_updater_warn="1"
- fi
-}
-
-pkg_postinst() {
- ghc-reregister
-
- # path to the package.cache
- PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
- # give the cache a new timestamp, it must be as recent as
- # the package.conf.d directory.
- touch "${PKGCACHE}"
-
- if [[ "${haskell_updater_warn}" == "1" ]]; then
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- ewarn "You have just upgraded from an older version of GHC."
- ewarn "You may have to run"
- ewarn " 'haskell-updater'"
- ewarn "to rebuild all ghc-based Haskell libraries."
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- fi
-}
-
-pkg_prerm() {
- PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
- rm -rf "${PKGCACHE}"
-
- cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
- ghc-package_pkg_postrm
-}
diff --git a/dev-lang/ghc/ghc-8.6.5.ebuild b/dev-lang/ghc/ghc-8.6.5.ebuild
deleted file mode 100644
index 89e16a5acd9b..000000000000
--- a/dev-lang/ghc/ghc-8.6.5.ebuild
+++ /dev/null
@@ -1,784 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
- if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- export CTARGET=${CATEGORY/cross-}
- fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib multiprocessing pax-utils toolchain-funcs versionator prefix
-inherit check-reqs
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-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 amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/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 )"
-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 sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
- case "${ARCH}" in
- #alpha) return 0 ;;
- #arm64) return 0 ;;
- #arm) return 0 ;;
- amd64) return 0 ;;
- #ia64) return 0 ;;
- #ppc) return 0 ;;
- ppc64)
- use big-endian && return 1
- return 0
- ;;
- #sparc) return 0 ;;
- x86) return 0 ;;
- *) return 1 ;;
- esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.6.0.20180810 # uncomment only for -alpha, -beta, -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? (
- https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz
- test? ( https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
-)"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
- # "hackage-name hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-# to be rekeyworded when most of revdeps are updated
-#KEYWORDS="~amd64 ~x86"
-IUSE="big-endian doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
-IUSE+=" binary"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- >=dev-lang/perl-5.6.1
- dev-libs/gmp:0=
- sys-libs/ncurses:0=[unicode]
- elfutils? ( dev-libs/elfutils )
- !ghcmakebinary? ( dev-libs/libffi:= )
- numa? ( sys-process/numactl )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-# utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
- !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
- sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}
- doc? ( app-text/docbook-xml-dtd:4.2
- app-text/docbook-xml-dtd:4.5
- app-text/docbook-xsl-stylesheets
- dev-python/sphinx
- >=dev-libs/libxslt-1.1.2 )
- !ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
-
-REQUIRED_USE="?? ( ghcbootstrap binary )"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-is_native() {
- [[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
-}
-
-# returns tool prefix for crosscompiler.
-# Example:
-# CTARGET=armv7a-unknown-linux-gnueabi
-# CHOST=x86_64-pc-linux-gnu
-# "armv7a-unknown-linux-gnueabi-"
-# CTARGET=${CHOST}
-# ""
-# Used in tools and library prefix:
-# "${ED}"/usr/bin/$(cross)haddock
-# "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
- if is_crosscompile; then
- echo "${CTARGET}-"
- else
- echo ""
- fi
-}
-
-append-ghc-cflags() {
- local persistent compile assemble link
- local flag ghcflag
-
- for flag in $*; do
- case ${flag} in
- persistent) persistent="yes";;
- compile) compile="yes";;
- assemble) assemble="yes";;
- link) link="yes";;
- *)
- [[ ${compile} ]] && ghcflag="-optc${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${assemble} ]] && ghcflag="-opta${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${link} ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- ;;
- esac
- done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
- local pn=$1 pv=$2
- local p=${pn}-${pv}
- local f
-
- einfo "Bumping ${pn} up to ${pv}"
-
- for f in ghc.mk GNUmakefile; do
- mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
- done
- mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
- mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
- local p pn pv
- for p in "${BUMP_LIBRARIES[@]}"; do
- set -- $p
- pn=$1 pv=$2
-
- SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
- done
-}
-
-update_SRC_URI
-
-bump_libs() {
- local p pn pv
- for p in "${BUMP_LIBRARIES[@]}"; do
- set -- $p
- pn=$1 pv=$2
-
- bump_lib "${pn}" "${pv}"
- done
-}
-
-ghc_setup_cflags() {
- # TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
- if ! is_native; then
- export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
- export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
- einfo "Crosscompiling mode:"
- einfo " CHOST: ${CHOST}"
- einfo " CTARGET: ${CTARGET}"
- einfo " CFLAGS: ${CFLAGS}"
- einfo " LDFLAGS: ${LDFLAGS}"
- einfo " prefix: $(cross)"
- return
- fi
- # We need to be very careful with the CFLAGS we ask ghc to pass through to
- # gcc. There are plenty of flags which will make gcc produce output that
- # breaks ghc in various ways. The main ones we want to pass through are
- # -mcpu / -march flags. These are important for arches like alpha & sparc.
- # We also use these CFLAGS for building the C parts of ghc, ie the rts.
- strip-flags
- strip-unsupported-flags
-
- # Cmm can't parse line numbers #482086
- replace-flags -ggdb[3-9] -ggdb2
-
- GHC_FLAGS=""
- GHC_PERSISTENT_FLAGS=""
- for flag in ${CFLAGS}; do
- case ${flag} in
-
- # Ignore extra optimisation (ghc passes -O to gcc anyway)
- # -O2 and above break on too many systems
- -O*) ;;
-
- # Arch and ABI flags are what we're really after
- -m*) append-ghc-cflags compile assemble ${flag};;
-
- # Sometimes it's handy to see backtrace of RTS
- # to get an idea what happens there
- -g*) append-ghc-cflags compile ${flag};;
-
- # Ignore all other flags, including all -f* flags
- esac
- done
-
- 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
- # hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
- # are not built with fPIC, bug #606666
- gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
- tc-is-gcc && version_is_at_least 6.3 $(gcc-version) && if ! use ghcbootstrap; then
- # gcc-6.3 has support for -no-pie upstream, but spelling differs from
- # gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
- # hardened users try '-pie' in USE=ghcbootstrap mode.
- append-ghc-cflags compile link -no-pie
- fi
-
- # 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 ...
-relocate_path() {
- local from=$1
- local to=$2
- shift 2
- local file=
- for file in "$@"
- do
- sed -i -e "s|$from|$to|g" \
- "$file" || die "path relocation failed for '$file'"
- done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
- local to=$1 ghc_v=${BIN_PV}
-
- # libdir for prebuilt binary and for current system may mismatch
- # It does for prefix installation for example: bug #476998
- local bin_ghc_prefix=${WORKDIR}/usr
- local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
- local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
- # backup original script to use it later after relocation
- local gp_back="${T}/ghc-pkg-${ghc_v}-orig"
- cp "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
- if [[ ${bin_libdir} != $(get_libdir) ]]; then
- einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
- # moving the dir itself is not strictly needed
- # but then USE=binary would result in installing
- # in '${bin_libdir}'
- mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
- relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
- "${WORKDIR}/usr/bin/ghc-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghci-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/bin/runghc-${ghc_v}" \
- "$gp_back" \
- "${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
- fi
-
- # Relocate from /usr to ${EPREFIX}/usr
- relocate_path "/usr" "${to}/usr" \
- "${WORKDIR}/usr/bin/ghc-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghci-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
- "${WORKDIR}/usr/bin/haddock-ghc-${ghc_v}" \
- "${WORKDIR}/usr/bin/hp2ps" \
- "${WORKDIR}/usr/bin/hpc" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/bin/runghc-${ghc_v}" \
- "${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-
- # this one we will use to regenerate cache
- # so it should point to current tree location
- relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
- if use prefix; then
- hprefixify "${bin_libpath}"/${PN}*/settings
- fi
-
- # regenerate the binary package cache
- "$gp_back" recache || die "failed to update cache after relocation"
- rm "$gp_back"
-}
-
-ghc-check-reqs() {
- # These are pessimistic values (slightly bigger than worst-case)
- # Worst case is UNREG USE=profile ia64. See bug #611866 for some
- # numbers on various arches.
- CHECKREQS_DISK_BUILD=8G
- CHECKREQS_DISK_USR=2G
- # USE=binary roughly takes
- use binary && CHECKREQS_DISK_BUILD=4G
-
- "$@"
-}
-
-pkg_pretend() {
- ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- ghc-check-reqs check-reqs_pkg_setup
-
- # quiet portage about prebuilt binaries
- use binary && QA_PREBUILT="*"
-
- [[ ${MERGE_TYPE} == binary ]] && return
-
- if use ghcbootstrap; then
- ewarn "You requested ghc bootstrapping, this is usually only used"
- ewarn "by Gentoo developers to make binary .tbz2 packages."
-
- [[ -z $(type -P ghc) ]] && \
- die "Could not find a ghc to bootstrap with."
- else
- if ! yet_binary; then
- eerror "Please try emerging with USE=ghcbootstrap and report build"
- eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
- die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
- fi
- fi
-}
-
-src_unpack() {
- # Create the ${S} dir if we're using the binary version
- use binary && mkdir "${S}"
-
- # the Solaris and Darwin binaries from ghc (maeder) need to be
- # unpacked separately, so prevent them from being unpacked
- local ONLYA=${A}
- case ${CHOST} in
- *-darwin* | *-solaris*) ONLYA=${GHC_P}-src.tar.xz ;;
- esac
- unpack ${ONLYA}
-}
-
-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"
- fi
-
- if use binary; then
- if use prefix; then
- relocate_ghc "${EPREFIX}"
- fi
-
- # Move unpacked files to the expected place
- mv "${WORKDIR}/usr" "${S}"
- eapply_user
- else
- if ! use ghcbootstrap; then
- case ${CHOST} in
- *-darwin* | *-solaris*)
- # UPDATE ME for ghc-7
- mkdir "${WORKDIR}"/ghc-bin-installer || die
- pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
- use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
- use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
- use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
- popd > /dev/null
-
- pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
- # fix the binaries so they run, on Solaris we need an
- # LD_LIBRARY_PATH which has our prefix libdirs, on
- # Darwin we need to replace the frameworks with our libs
- # from the prefix fix before installation, because some
- # of the tools are actually used during configure/make
- if [[ ${CHOST} == *-solaris* ]] ; then
- export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
- elif [[ ${CHOST} == *-darwin* ]] ; then
- local readline_framework=GNUreadline.framework/GNUreadline
- local gmp_framework=/opt/local/lib/libgmp.10.dylib
- local ncurses_file=/opt/local/lib/libncurses.5.dylib
- for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
- install_name_tool -change \
- ${readline_framework} \
- "${EPREFIX}"/lib/libreadline.dylib \
- ${binary} || die
- install_name_tool -change \
- ${gmp_framework} \
- "${EPREFIX}"/usr/lib/libgmp.dylib \
- ${binary} || die
- install_name_tool -change \
- ${ncurses_file} \
- "${EPREFIX}"/usr/lib/libncurses.dylib \
- ${binary} || die
- done
- # we don't do frameworks!
- sed -i \
- -e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
- -e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
- rts/package.conf.in || die
- fi
-
- # it is autoconf, but we really don't want to give it too
- # many arguments, in fact we do the make in-place anyway
- ./configure --prefix="${WORKDIR}"/usr || die
- make install || die
- popd > /dev/null
- ;;
- *)
- relocate_ghc "${WORKDIR}"
- ;;
- esac
- fi
-
- sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
- "${S}/ghc/ghc.wrapper"
-
- cd "${S}" # otherwise eapply will break
-
- eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
- eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
- eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
- eapply "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
- eapply "${FILESDIR}"/${PN}-8.4.2-allow-cross-bootstrap.patch
- eapply "${FILESDIR}"/${PN}-8.6.5-numa.patch
-
- # a bunch of crosscompiler patches
- # needs newer version:
- #eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
-
- # mingw32 target
- pushd "${S}/libraries/Win32"
- eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
- popd
-
- bump_libs
-
- eapply_user
- # as we have changed the build system
- eautoreconf
- fi
-}
-
-src_configure() {
- if ! use binary; then
- # initialize build.mk
- echo '# Gentoo changes' > mk/build.mk
-
- # Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
- echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
- echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-
- # We also need to use the GHC_FLAGS flags when building ghc itself
- echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
- echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
- echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
- # Speed up initial Cabal bootstrap
- echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
- # We can't depend on haddock except when bootstrapping when we
- # must build docs and include them into the binary .tbz2 package
- # app-text/dblatex is not in portage, can not build PDF or PS
- echo "BUILD_SPHINX_PDF = NO" >> mk/build.mk
- echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
- echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
- # this controls presence on 'xhtml' and 'haddock' in final install
- echo "HADDOCK_DOCS = YES" >> mk/build.mk
-
- # not used outside of ghc's test
- if [[ -n ${GHC_BUILD_DPH} ]]; then
- echo "BUILD_DPH = YES" >> mk/build.mk
- else
- echo "BUILD_DPH = NO" >> mk/build.mk
- fi
-
- # Any non-native build has to skip as it needs
- # target haddock binary to be runnabine.
- if ! is_native; then
- # disable docs generation as it requires running stage2
- echo "HADDOCK_DOCS=NO" >> mk/build.mk
- echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
- echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
- fi
-
- if is_crosscompile; then
- # Install ghc-stage1 crosscompiler instead of
- # ghc-stage2 cross-built compiler.
- echo "Stage1Only=YES" >> mk/build.mk
- fi
-
- # allows overriding build flavours for libraries:
- # v - vanilla (static libs)
- # p - profiled
- # dyn - shared libraries
- # example: GHC_LIBRARY_WAYS="v dyn"
- if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
- echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
- fi
- echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
- # Get ghc from the unpacked binary .tbz2
- # except when bootstrapping we just pick ghc up off the path
- if ! use ghcbootstrap; then
- export PATH="${WORKDIR}/usr/bin:${PATH}"
- fi
-
- echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
-
- # don't strip anything. Very useful when stage2 SIGSEGVs on you
- echo "STRIP_CMD = :" >> mk/build.mk
-
- local econf_args=()
-
- # GHC embeds toolchain it was built by and uses it later.
- # Don't allow things like ccache or versioned binary slip.
- # We use stable thing across gcc upgrades.
- # User can use EXTRA_ECONF=CC=... to override this default.
- econf_args+=(
- AR=${CTARGET}-ar
- CC=${CTARGET}-gcc
- # these should be inferred by GHC but ghc defaults
- # to using bundled tools on windows.
- Windres=${CTARGET}-windres
- DllWrap=${CTARGET}-dllwrap
- # we set the linker explicitly below
- --disable-ld-override
- )
- case ${CTARGET} in
- arm*)
- # ld.bfd-2.28 does not work for ghc. Force ld.gold
- # instead. This should be removed once gentoo gets
- # a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
- econf_args+=(LD=${CTARGET}-ld.gold)
- ;;
- sparc*)
- # ld.gold-2.28 does not work for ghc. Force ld.bfd
- # instead. This should be removed once gentoo gets
- # a fix for missing --no-relax support bug:
- # https://sourceware.org/ml/binutils/2017-07/msg00183.html
- econf_args+=(LD=${CTARGET}-ld.bfd)
- ;;
- *)
- econf_args+=(LD=${CTARGET}-ld)
- esac
-
- if [[ ${CBUILD} != ${CHOST} ]]; then
- # GHC bug: ghc claims not to support cross-building.
- # It does, but does not distinct --host= value
- # for stage1 and stage2 compiler.
- econf_args+=(--host=${CBUILD})
- fi
-
- if use ghcmakebinary; then
- # When building booting libary we are trying to
- # bundle or restrict most of external depends
- # with unstable ABI:
- # - embed libffi (default GHC behaviour)
- # - disable ncurses support for ghci (via haskeline)
- # https://bugs.gentoo.org/557478
- # - disable ncurses support for ghc-pkg
- echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
- echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
- elif is_native; then
- # using ${GTARGET}'s libffi is not supported yet:
- # GHC embeds full path for ffi includes without /usr/${CTARGET} account.
- econf_args+=(--with-system-libffi)
- econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
- fi
-
- einfo "Final mk/build.mk:"
- cat mk/build.mk || die
-
- econf ${econf_args[@]} \
- --enable-bootstrap-with-devel-snapshot \
- $(use elfutils && echo --enable-dwarf-unwind) \
- $(use_enable numa)
-
- if [[ ${PV} == *9999* ]]; then
- GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
- GHC_P=${PN}-${GHC_PV}
- fi
- fi # ! use binary
-}
-
-src_compile() {
- if ! use binary; then
- # Stage1Only crosscompiler does not build stage2
- if ! is_crosscompile; then
- # 1. build/pax-mark compiler binary first
- emake ghc/stage2/build/tmp/ghc-stage2
- # 2. pax-mark (bug #516430)
- pax-mark -m ghc/stage2/build/tmp/ghc-stage2
- # 2. build/pax-mark haddock using ghc-stage2
- if is_native; then
- # non-native build does not build haddock
- # due to HADDOCK_DOCS=NO, but it could.
- emake utils/haddock/dist/build/tmp/haddock
- pax-mark -m utils/haddock/dist/build/tmp/haddock
- fi
- fi
- # 3. and then all the rest
- emake all
- fi # ! use binary
-}
-
-src_test() {
- # TODO: deal with:
- # - sandbox (pollutes environment)
- # - extra packages (to extend testsuite coverage)
- # bits are taken from 'validate'
- local make_test_target='test' # can be fulltest
- # not 'emake' as testsuite uses '$MAKE' without jobserver available
- make $make_test_target stage=2 THREADS=$(makeopts_jobs)
-}
-
-src_install() {
- if use binary; then
- use prefix && mkdir -p "${ED}"
- mv "${S}/usr" "${ED}"
- else
- [[ -f VERSION ]] || emake VERSION
-
- # -j1 due to a rare race in install script:
- # make --no-print-directory -f ghc.mk phase=final install
- # /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
- # -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
- # /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644 utils/hsc2hs/template-hsc.h \
- # "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
- # /usr/bin/install: cannot create regular file \
- # '/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}"
-
- # Skip for cross-targets as they all share target location:
- # /usr/share/doc/ghc-9999/
- if ! is_crosscompile; then
- dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
- fi
-
- # rename ghc-shipped files to avoid collision
- # of external packages. Motivating example:
- # user had installed:
- # dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
- # dev-haskell/transformers-0.4.2.0
- # then user tried to update to
- # dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
- # this will lead to single .conf file collision.
- local shipped_conf renamed_conf
- local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
- for shipped_conf in "${package_confdir}"/*.conf; do
- # rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
- renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
- mv "${shipped_conf}" "${renamed_conf}" || die
- done
-
- # remove link, but leave 'haddock-${GHC_P}'
- rm -f "${ED}"/usr/bin/$(cross)haddock
-
- if ! is_crosscompile; then
- newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
- newbashcomp utils/completion/ghc.bash ghc
- fi
- fi
-
- # path to the package.cache
- local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
- PKGCACHE="${package_confdir}"/package.cache
- # copy the package.conf.d, including timestamp, save it so we can help
- # users that have a broken package.conf.d
- cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
- # copy the package.conf, including timestamp, save it so we later can put it
- # back before uninstalling, or when upgrading.
- cp -p "${PKGCACHE}"{,.shipped} \
- || die "failed to copy package.conf.d/package.cache"
-}
-
-pkg_preinst() {
- # have we got an earlier version of ghc installed?
- if has_version "<${CATEGORY}/${PF}"; then
- haskell_updater_warn="1"
- fi
-}
-
-pkg_postinst() {
- ghc-reregister
-
- # path to the package.cache
- PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
- # give the cache a new timestamp, it must be as recent as
- # the package.conf.d directory.
- touch "${PKGCACHE}"
-
- if [[ "${haskell_updater_warn}" == "1" ]]; then
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- ewarn "You have just upgraded from an older version of GHC."
- ewarn "You may have to run"
- ewarn " 'haskell-updater'"
- ewarn "to rebuild all ghc-based Haskell libraries."
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- fi
-}
-
-pkg_prerm() {
- PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
- rm -rf "${PKGCACHE}"
-
- cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
- ghc-package_pkg_postrm
-}
diff --git a/dev-lang/ghc/ghc-8.8.1.ebuild b/dev-lang/ghc/ghc-8.8.1.ebuild
deleted file mode 100644
index 00ce56862619..000000000000
--- a/dev-lang/ghc/ghc-8.8.1.ebuild
+++ /dev/null
@@ -1,804 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
- if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- export CTARGET=${CATEGORY/cross-}
- fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib multiprocessing pax-utils toolchain-funcs prefix
-inherit check-reqs
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-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 amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/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 )"
-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 sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
- case "${ARCH}" in
- #alpha) return 0 ;;
- #arm64) return 0 ;;
- #arm) return 0 ;;
- amd64) return 0 ;;
- #ia64) return 0 ;;
- #ppc) return 0 ;;
- ppc64)
- use big-endian && return 1
- return 0
- ;;
- #sparc) return 0 ;;
- x86) return 0 ;;
- *) return 1 ;;
- esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.6.0.20180810 # uncomment only for -alpha, -beta, -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? (
- https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz
- test? ( https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
-)"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
- # "hackage-name hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-KEYWORDS=""
-IUSE="big-endian doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
-IUSE+=" binary"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- >=dev-lang/perl-5.6.1
- dev-libs/gmp:0=
- sys-libs/ncurses:0=[unicode]
- elfutils? ( dev-libs/elfutils )
- !ghcmakebinary? ( dev-libs/libffi:= )
- numa? ( sys-process/numactl )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-# utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
- !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
- sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}
- doc? ( app-text/docbook-xml-dtd:4.2
- app-text/docbook-xml-dtd:4.5
- app-text/docbook-xsl-stylesheets
- dev-python/sphinx
- >=dev-libs/libxslt-1.1.2 )
- !ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-REQUIRED_USE="?? ( ghcbootstrap binary )"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-is_native() {
- [[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
-}
-
-if ! is_crosscompile; then
- PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
-fi
-
-# returns tool prefix for crosscompiler.
-# Example:
-# CTARGET=armv7a-unknown-linux-gnueabi
-# CHOST=x86_64-pc-linux-gnu
-# "armv7a-unknown-linux-gnueabi-"
-# CTARGET=${CHOST}
-# ""
-# Used in tools and library prefix:
-# "${ED}"/usr/bin/$(cross)haddock
-# "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
- if is_crosscompile; then
- echo "${CTARGET}-"
- else
- echo ""
- fi
-}
-
-append-ghc-cflags() {
- local persistent compile assemble link
- local flag ghcflag
-
- for flag in $*; do
- case ${flag} in
- persistent) persistent="yes";;
- compile) compile="yes";;
- assemble) assemble="yes";;
- link) link="yes";;
- *)
- [[ ${compile} ]] && ghcflag="-optc${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${assemble} ]] && ghcflag="-opta${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${link} ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- ;;
- esac
- done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
- local pn=$1 pv=$2
- local p=${pn}-${pv}
- local f
-
- einfo "Bumping ${pn} up to ${pv}"
-
- for f in ghc.mk GNUmakefile; do
- mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
- done
- mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
- mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
- local p pn pv
- for p in "${BUMP_LIBRARIES[@]}"; do
- set -- $p
- pn=$1 pv=$2
-
- SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
- done
-}
-
-update_SRC_URI
-
-bump_libs() {
- local p pn pv
- for p in "${BUMP_LIBRARIES[@]}"; do
- set -- $p
- pn=$1 pv=$2
-
- bump_lib "${pn}" "${pv}"
- done
-}
-
-ghc_setup_cflags() {
- # TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
- if ! is_native; then
- export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
- export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
- einfo "Crosscompiling mode:"
- einfo " CHOST: ${CHOST}"
- einfo " CTARGET: ${CTARGET}"
- einfo " CFLAGS: ${CFLAGS}"
- einfo " LDFLAGS: ${LDFLAGS}"
- einfo " prefix: $(cross)"
- return
- fi
- # We need to be very careful with the CFLAGS we ask ghc to pass through to
- # gcc. There are plenty of flags which will make gcc produce output that
- # breaks ghc in various ways. The main ones we want to pass through are
- # -mcpu / -march flags. These are important for arches like alpha & sparc.
- # We also use these CFLAGS for building the C parts of ghc, ie the rts.
- strip-flags
- strip-unsupported-flags
-
- # Cmm can't parse line numbers #482086
- replace-flags -ggdb[3-9] -ggdb2
-
- GHC_FLAGS=""
- GHC_PERSISTENT_FLAGS=""
- for flag in ${CFLAGS}; do
- case ${flag} in
-
- # Ignore extra optimisation (ghc passes -O to gcc anyway)
- # -O2 and above break on too many systems
- -O*) ;;
-
- # Arch and ABI flags are what we're really after
- -m*) append-ghc-cflags compile assemble ${flag};;
-
- # Sometimes it's handy to see backtrace of RTS
- # to get an idea what happens there
- -g*) append-ghc-cflags compile ${flag};;
-
- # Ignore all other flags, including all -f* flags
- esac
- done
-
- 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
- # hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
- # are not built with fPIC, bug #606666
- gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
- tc-is-gcc && ver_test $(gcc-version) -ge 6.3 && if ! use ghcbootstrap; then
- # gcc-6.3 has support for -no-pie upstream, but spelling differs from
- # gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
- # hardened users try '-pie' in USE=ghcbootstrap mode.
- append-ghc-cflags compile link -no-pie
- fi
-
- # 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 ...
-relocate_path() {
- local from=$1
- local to=$2
- shift 2
- local file=
- for file in "$@"
- do
- sed -i -e "s|$from|$to|g" \
- "$file" || die "path relocation failed for '$file'"
- done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
- local to=$1 ghc_v=${BIN_PV}
-
- # libdir for prebuilt binary and for current system may mismatch
- # It does for prefix installation for example: bug #476998
- local bin_ghc_prefix=${WORKDIR}/usr
- local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
- local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
- # backup original script to use it later after relocation
- local gp_back="${T}/ghc-pkg-${ghc_v}-orig"
- cp "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
- if [[ ${bin_libdir} != $(get_libdir) ]]; then
- einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
- # moving the dir itself is not strictly needed
- # but then USE=binary would result in installing
- # in '${bin_libdir}'
- mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
- relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
- "${WORKDIR}/usr/bin/ghc-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghci-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/bin/runghc-${ghc_v}" \
- "$gp_back" \
- "${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
- fi
-
- # Relocate from /usr to ${EPREFIX}/usr
- relocate_path "/usr" "${to}/usr" \
- "${WORKDIR}/usr/bin/ghc-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghci-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
- "${WORKDIR}/usr/bin/haddock-ghc-${ghc_v}" \
- "${WORKDIR}/usr/bin/hp2ps" \
- "${WORKDIR}/usr/bin/hpc" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/bin/runghc-${ghc_v}" \
- "${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-
- # this one we will use to regenerate cache
- # so it should point to current tree location
- relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
- if use prefix; then
- hprefixify "${bin_libpath}"/${PN}*/settings
- fi
-
- # regenerate the binary package cache
- "$gp_back" recache || die "failed to update cache after relocation"
- rm "$gp_back"
-}
-
-ghc-check-reqs() {
- # These are pessimistic values (slightly bigger than worst-case)
- # Worst case is UNREG USE=profile ia64. See bug #611866 for some
- # numbers on various arches.
- CHECKREQS_DISK_BUILD=8G
- CHECKREQS_DISK_USR=2G
- # USE=binary roughly takes
- use binary && CHECKREQS_DISK_BUILD=4G
-
- "$@"
-}
-
-pkg_pretend() {
- ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- ghc-check-reqs check-reqs_pkg_setup
-
- # quiet portage about prebuilt binaries
- use binary && QA_PREBUILT="*"
-
- [[ ${MERGE_TYPE} == binary ]] && return
-
- if use ghcbootstrap; then
- ewarn "You requested ghc bootstrapping, this is usually only used"
- ewarn "by Gentoo developers to make binary .tbz2 packages."
-
- [[ -z $(type -P ghc) ]] && \
- die "Could not find a ghc to bootstrap with."
- else
- if ! yet_binary; then
- eerror "Please try emerging with USE=ghcbootstrap and report build"
- eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
- die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
- fi
- fi
-}
-
-src_unpack() {
- # Create the ${S} dir if we're using the binary version
- use binary && mkdir "${S}"
-
- # the Solaris and Darwin binaries from ghc (maeder) need to be
- # unpacked separately, so prevent them from being unpacked
- local ONLYA=${A}
- case ${CHOST} in
- *-darwin* | *-solaris*) ONLYA=${GHC_P}-src.tar.xz ;;
- esac
- unpack ${ONLYA}
-}
-
-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"
- fi
-
- if use binary; then
- if use prefix; then
- relocate_ghc "${EPREFIX}"
- fi
-
- # Move unpacked files to the expected place
- mv "${WORKDIR}/usr" "${S}"
- eapply_user
- else
- if ! use ghcbootstrap; then
- case ${CHOST} in
- *-darwin* | *-solaris*)
- # UPDATE ME for ghc-7
- mkdir "${WORKDIR}"/ghc-bin-installer || die
- pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
- use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
- use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
- use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
- popd > /dev/null
-
- pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
- # fix the binaries so they run, on Solaris we need an
- # LD_LIBRARY_PATH which has our prefix libdirs, on
- # Darwin we need to replace the frameworks with our libs
- # from the prefix fix before installation, because some
- # of the tools are actually used during configure/make
- if [[ ${CHOST} == *-solaris* ]] ; then
- export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
- elif [[ ${CHOST} == *-darwin* ]] ; then
- local readline_framework=GNUreadline.framework/GNUreadline
- local gmp_framework=/opt/local/lib/libgmp.10.dylib
- local ncurses_file=/opt/local/lib/libncurses.5.dylib
- for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
- install_name_tool -change \
- ${readline_framework} \
- "${EPREFIX}"/lib/libreadline.dylib \
- ${binary} || die
- install_name_tool -change \
- ${gmp_framework} \
- "${EPREFIX}"/usr/lib/libgmp.dylib \
- ${binary} || die
- install_name_tool -change \
- ${ncurses_file} \
- "${EPREFIX}"/usr/lib/libncurses.dylib \
- ${binary} || die
- done
- # we don't do frameworks!
- sed -i \
- -e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
- -e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
- rts/package.conf.in || die
- fi
-
- # it is autoconf, but we really don't want to give it too
- # many arguments, in fact we do the make in-place anyway
- ./configure --prefix="${WORKDIR}"/usr || die
- make install || die
- popd > /dev/null
- ;;
- *)
- relocate_ghc "${WORKDIR}"
- ;;
- esac
- fi
-
- sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
- "${S}/ghc/ghc.wrapper"
-
- cd "${S}" # otherwise eapply will break
-
- eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
- eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
- eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
- eapply "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
- eapply "${FILESDIR}"/${PN}-8.4.2-allow-cross-bootstrap.patch
- eapply "${FILESDIR}"/${PN}-8.6.5-numa.patch
- eapply "${FILESDIR}"/${PN}-8.8.1-no-alex.patch
- eapply "${FILESDIR}"/${PN}-8.8.1-revert-CPP.patch
-
- # a bunch of crosscompiler patches
- # needs newer version:
- #eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
-
- # mingw32 target
- pushd "${S}/libraries/Win32"
- eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
- popd
-
- bump_libs
-
- eapply_user
- # as we have changed the build system
- eautoreconf
- fi
-}
-
-src_configure() {
- if ! use binary; then
- # initialize build.mk
- echo '# Gentoo changes' > mk/build.mk
-
- # Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
- echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
- echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-
- # We also need to use the GHC_FLAGS flags when building ghc itself
- echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
- echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
- echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
- # Speed up initial Cabal bootstrap
- echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
- # We can't depend on haddock except when bootstrapping when we
- # must build docs and include them into the binary .tbz2 package
- # app-text/dblatex is not in portage, can not build PDF or PS
- echo "BUILD_SPHINX_PDF = NO" >> mk/build.mk
- echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
- echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
- # this controls presence on 'xhtml' and 'haddock' in final install
- echo "HADDOCK_DOCS = YES" >> mk/build.mk
-
- # not used outside of ghc's test
- if [[ -n ${GHC_BUILD_DPH} ]]; then
- echo "BUILD_DPH = YES" >> mk/build.mk
- else
- echo "BUILD_DPH = NO" >> mk/build.mk
- fi
-
- # Any non-native build has to skip as it needs
- # target haddock binary to be runnabine.
- if ! is_native; then
- # disable docs generation as it requires running stage2
- echo "HADDOCK_DOCS=NO" >> mk/build.mk
- echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
- echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
- fi
-
- if is_crosscompile; then
- # Install ghc-stage1 crosscompiler instead of
- # ghc-stage2 cross-built compiler.
- echo "Stage1Only=YES" >> mk/build.mk
- fi
-
- # allows overriding build flavours for libraries:
- # v - vanilla (static libs)
- # p - profiled
- # dyn - shared libraries
- # example: GHC_LIBRARY_WAYS="v dyn"
- if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
- echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
- fi
- echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
- # Get ghc from the unpacked binary .tbz2
- # except when bootstrapping we just pick ghc up off the path
- if ! use ghcbootstrap; then
- export PATH="${WORKDIR}/usr/bin:${PATH}"
- fi
-
- echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
-
- # don't strip anything. Very useful when stage2 SIGSEGVs on you
- echo "STRIP_CMD = :" >> mk/build.mk
-
- local econf_args=()
-
- # GHC embeds toolchain it was built by and uses it later.
- # Don't allow things like ccache or versioned binary slip.
- # We use stable thing across gcc upgrades.
- # User can use EXTRA_ECONF=CC=... to override this default.
- econf_args+=(
- AR=${CTARGET}-ar
- CC=${CTARGET}-gcc
- # these should be inferred by GHC but ghc defaults
- # to using bundled tools on windows.
- Windres=${CTARGET}-windres
- DllWrap=${CTARGET}-dllwrap
- # we set the linker explicitly below
- --disable-ld-override
- )
- case ${CTARGET} in
- arm*)
- # ld.bfd-2.28 does not work for ghc. Force ld.gold
- # instead. This should be removed once gentoo gets
- # a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
- econf_args+=(LD=${CTARGET}-ld.gold)
- ;;
- sparc*)
- # ld.gold-2.28 does not work for ghc. Force ld.bfd
- # instead. This should be removed once gentoo gets
- # a fix for missing --no-relax support bug:
- # https://sourceware.org/ml/binutils/2017-07/msg00183.html
- econf_args+=(LD=${CTARGET}-ld.bfd)
- ;;
- *)
- econf_args+=(LD=${CTARGET}-ld)
- esac
-
- if [[ ${CBUILD} != ${CHOST} ]]; then
- # GHC bug: ghc claims not to support cross-building.
- # It does, but does not distinct --host= value
- # for stage1 and stage2 compiler.
- econf_args+=(--host=${CBUILD})
- fi
-
- if use ghcmakebinary; then
- # When building booting libary we are trying to
- # bundle or restrict most of external depends
- # with unstable ABI:
- # - embed libffi (default GHC behaviour)
- # - disable ncurses support for ghci (via haskeline)
- # https://bugs.gentoo.org/557478
- # - disable ncurses support for ghc-pkg
- echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
- echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
- elif is_native; then
- # using ${GTARGET}'s libffi is not supported yet:
- # GHC embeds full path for ffi includes without /usr/${CTARGET} account.
- econf_args+=(--with-system-libffi)
- econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
- fi
-
- einfo "Final mk/build.mk:"
- cat mk/build.mk || die
-
- econf ${econf_args[@]} \
- --enable-bootstrap-with-devel-snapshot \
- $(use elfutils && echo --enable-dwarf-unwind) \
- $(use_enable numa)
-
- if [[ ${PV} == *9999* ]]; then
- GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
- GHC_P=${PN}-${GHC_PV}
- fi
- fi # ! use binary
-}
-
-src_compile() {
- if ! use binary; then
- # Stage1Only crosscompiler does not build stage2
- if ! is_crosscompile; then
- # 1. build/pax-mark compiler binary first
- emake ghc/stage2/build/tmp/ghc-stage2
- # 2. pax-mark (bug #516430)
- pax-mark -m ghc/stage2/build/tmp/ghc-stage2
- # 2. build/pax-mark haddock using ghc-stage2
- if is_native; then
- # non-native build does not build haddock
- # due to HADDOCK_DOCS=NO, but it could.
- emake utils/haddock/dist/build/tmp/haddock
- pax-mark -m utils/haddock/dist/build/tmp/haddock
- fi
- fi
- # 3. and then all the rest
- emake all
- fi # ! use binary
-}
-
-src_test() {
- # TODO: deal with:
- # - sandbox (pollutes environment)
- # - extra packages (to extend testsuite coverage)
- # bits are taken from 'validate'
- local make_test_target='test' # can be fulltest
- # not 'emake' as testsuite uses '$MAKE' without jobserver available
- make $make_test_target stage=2 THREADS=$(makeopts_jobs)
-}
-
-src_install() {
- if use binary; then
- use prefix && mkdir -p "${ED}"
- mv "${S}/usr" "${ED}"
- else
- [[ -f VERSION ]] || emake VERSION
-
- # -j1 due to a rare race in install script:
- # make --no-print-directory -f ghc.mk phase=final install
- # /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
- # -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
- # /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644 utils/hsc2hs/template-hsc.h \
- # "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
- # /usr/bin/install: cannot create regular file \
- # '/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}"
-
- # Skip for cross-targets as they all share target location:
- # /usr/share/doc/ghc-9999/
- if ! is_crosscompile; then
- dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
- fi
-
- # rename ghc-shipped files to avoid collision
- # of external packages. Motivating example:
- # user had installed:
- # dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
- # dev-haskell/transformers-0.4.2.0
- # then user tried to update to
- # dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
- # this will lead to single .conf file collision.
- local shipped_conf renamed_conf
- local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
- for shipped_conf in "${package_confdir}"/*.conf; do
- # rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
- renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
- mv "${shipped_conf}" "${renamed_conf}" || die
- done
-
- # remove link, but leave 'haddock-${GHC_P}'
- rm -f "${ED}"/usr/bin/$(cross)haddock
-
- if ! is_crosscompile; then
- newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
- newbashcomp utils/completion/ghc.bash ghc
- fi
- fi
-
- # path to the package.cache
- local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
- PKGCACHE="${package_confdir}"/package.cache
- # copy the package.conf.d, including timestamp, save it so we can help
- # users that have a broken package.conf.d
- cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
- # copy the package.conf, including timestamp, save it so we later can put it
- # back before uninstalling, or when upgrading.
- cp -p "${PKGCACHE}"{,.shipped} \
- || die "failed to copy package.conf.d/package.cache"
-
- if is_crosscompile; then
- # When we build a cross-compiler the layout is the following:
- # usr/lib/${CTARGET}-ghc-${VER}/ contains target libraries
- # but
- # usr/lib/${CTARGET}-ghc-${VER}/bin/ directory
- # containst host binaries (modulo bugs).
-
- # Portage's stripping mechanism does not skip stripping
- # foreign binaries. This frequently causes binaries to be
- # broken.
- #
- # Thus below we disable stripping of target libraries and allow
- # stripping hosts executables.
- dostrip -x "/usr/$(get_libdir)/$(cross)${GHC_P}"
- dostrip "/usr/$(get_libdir)/$(cross)${GHC_P}/bin"
- fi
-}
-
-pkg_preinst() {
- # have we got an earlier version of ghc installed?
- if has_version "<${CATEGORY}/${PF}"; then
- haskell_updater_warn="1"
- fi
-}
-
-pkg_postinst() {
- ghc-reregister
-
- # path to the package.cache
- PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
- # give the cache a new timestamp, it must be as recent as
- # the package.conf.d directory.
- touch "${PKGCACHE}"
-
- if [[ "${haskell_updater_warn}" == "1" ]]; then
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- ewarn "You have just upgraded from an older version of GHC."
- ewarn "You may have to run"
- ewarn " 'haskell-updater'"
- ewarn "to rebuild all ghc-based Haskell libraries."
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- fi
-}
-
-pkg_prerm() {
- PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
- rm -rf "${PKGCACHE}"
-
- cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
- ghc-package_pkg_postrm
-}
diff --git a/dev-lang/ghc/ghc-8.8.2.ebuild b/dev-lang/ghc/ghc-8.8.2.ebuild
deleted file mode 100644
index 61b81fb8fb23..000000000000
--- a/dev-lang/ghc/ghc-8.8.2.ebuild
+++ /dev/null
@@ -1,803 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
- if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- export CTARGET=${CATEGORY/cross-}
- fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib multiprocessing pax-utils toolchain-funcs prefix
-inherit check-reqs
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-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 amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/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 )"
-#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 sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
- case "${ARCH}" in
- #alpha) return 0 ;;
- #arm64) return 0 ;;
- #arm) return 0 ;;
- amd64) return 0 ;;
- #ia64) return 0 ;;
- #ppc) return 0 ;;
- #ppc64)
- # use big-endian && return 1
- # return 0
- # ;;
- #sparc) return 0 ;;
- x86) return 0 ;;
- *) return 1 ;;
- esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.6.0.20180810 # uncomment only for -alpha, -beta, -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? (
- https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz
- test? ( https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
-)"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
- # "hackage-name hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-KEYWORDS=""
-IUSE="big-endian doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
-IUSE+=" binary"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- >=dev-lang/perl-5.6.1
- dev-libs/gmp:0=
- sys-libs/ncurses:0=[unicode]
- elfutils? ( dev-libs/elfutils )
- !ghcmakebinary? ( dev-libs/libffi:= )
- numa? ( sys-process/numactl )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-# utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
- !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
- sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}
- doc? ( app-text/docbook-xml-dtd:4.2
- app-text/docbook-xml-dtd:4.5
- app-text/docbook-xsl-stylesheets
- dev-python/sphinx
- >=dev-libs/libxslt-1.1.2 )
- !ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-REQUIRED_USE="?? ( ghcbootstrap binary )"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-is_native() {
- [[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
-}
-
-if ! is_crosscompile; then
- PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
-fi
-
-# returns tool prefix for crosscompiler.
-# Example:
-# CTARGET=armv7a-unknown-linux-gnueabi
-# CHOST=x86_64-pc-linux-gnu
-# "armv7a-unknown-linux-gnueabi-"
-# CTARGET=${CHOST}
-# ""
-# Used in tools and library prefix:
-# "${ED}"/usr/bin/$(cross)haddock
-# "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
- if is_crosscompile; then
- echo "${CTARGET}-"
- else
- echo ""
- fi
-}
-
-append-ghc-cflags() {
- local persistent compile assemble link
- local flag ghcflag
-
- for flag in $*; do
- case ${flag} in
- persistent) persistent="yes";;
- compile) compile="yes";;
- assemble) assemble="yes";;
- link) link="yes";;
- *)
- [[ ${compile} ]] && ghcflag="-optc${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${assemble} ]] && ghcflag="-opta${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${link} ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- ;;
- esac
- done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
- local pn=$1 pv=$2
- local p=${pn}-${pv}
- local f
-
- einfo "Bumping ${pn} up to ${pv}"
-
- for f in ghc.mk GNUmakefile; do
- mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
- done
- mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
- mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
- local p pn pv
- for p in "${BUMP_LIBRARIES[@]}"; do
- set -- $p
- pn=$1 pv=$2
-
- SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
- done
-}
-
-update_SRC_URI
-
-bump_libs() {
- local p pn pv
- for p in "${BUMP_LIBRARIES[@]}"; do
- set -- $p
- pn=$1 pv=$2
-
- bump_lib "${pn}" "${pv}"
- done
-}
-
-ghc_setup_cflags() {
- # TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
- if ! is_native; then
- export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
- export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
- einfo "Crosscompiling mode:"
- einfo " CHOST: ${CHOST}"
- einfo " CTARGET: ${CTARGET}"
- einfo " CFLAGS: ${CFLAGS}"
- einfo " LDFLAGS: ${LDFLAGS}"
- einfo " prefix: $(cross)"
- return
- fi
- # We need to be very careful with the CFLAGS we ask ghc to pass through to
- # gcc. There are plenty of flags which will make gcc produce output that
- # breaks ghc in various ways. The main ones we want to pass through are
- # -mcpu / -march flags. These are important for arches like alpha & sparc.
- # We also use these CFLAGS for building the C parts of ghc, ie the rts.
- strip-flags
- strip-unsupported-flags
-
- # Cmm can't parse line numbers #482086
- replace-flags -ggdb[3-9] -ggdb2
-
- GHC_FLAGS=""
- GHC_PERSISTENT_FLAGS=""
- for flag in ${CFLAGS}; do
- case ${flag} in
-
- # Ignore extra optimisation (ghc passes -O to gcc anyway)
- # -O2 and above break on too many systems
- -O*) ;;
-
- # Arch and ABI flags are what we're really after
- -m*) append-ghc-cflags compile assemble ${flag};;
-
- # Sometimes it's handy to see backtrace of RTS
- # to get an idea what happens there
- -g*) append-ghc-cflags compile ${flag};;
-
- # Ignore all other flags, including all -f* flags
- esac
- done
-
- 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
- # hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
- # are not built with fPIC, bug #606666
- gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
- tc-is-gcc && ver_test $(gcc-version) -ge 6.3 && if ! use ghcbootstrap; then
- # gcc-6.3 has support for -no-pie upstream, but spelling differs from
- # gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
- # hardened users try '-pie' in USE=ghcbootstrap mode.
- append-ghc-cflags compile link -no-pie
- fi
-
- # 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 ...
-relocate_path() {
- local from=$1
- local to=$2
- shift 2
- local file=
- for file in "$@"
- do
- sed -i -e "s|$from|$to|g" \
- "$file" || die "path relocation failed for '$file'"
- done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
- local to=$1 ghc_v=${BIN_PV}
-
- # libdir for prebuilt binary and for current system may mismatch
- # It does for prefix installation for example: bug #476998
- local bin_ghc_prefix=${WORKDIR}/usr
- local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
- local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
- # backup original script to use it later after relocation
- local gp_back="${T}/ghc-pkg-${ghc_v}-orig"
- cp "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
- if [[ ${bin_libdir} != $(get_libdir) ]]; then
- einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
- # moving the dir itself is not strictly needed
- # but then USE=binary would result in installing
- # in '${bin_libdir}'
- mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
- relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
- "${WORKDIR}/usr/bin/ghc-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghci-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/bin/runghc-${ghc_v}" \
- "$gp_back" \
- "${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
- fi
-
- # Relocate from /usr to ${EPREFIX}/usr
- relocate_path "/usr" "${to}/usr" \
- "${WORKDIR}/usr/bin/ghc-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghci-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
- "${WORKDIR}/usr/bin/haddock-ghc-${ghc_v}" \
- "${WORKDIR}/usr/bin/hp2ps" \
- "${WORKDIR}/usr/bin/hpc" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/bin/runghc-${ghc_v}" \
- "${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-
- # this one we will use to regenerate cache
- # so it should point to current tree location
- relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
- if use prefix; then
- hprefixify "${bin_libpath}"/${PN}*/settings
- fi
-
- # regenerate the binary package cache
- "$gp_back" recache || die "failed to update cache after relocation"
- rm "$gp_back"
-}
-
-ghc-check-reqs() {
- # These are pessimistic values (slightly bigger than worst-case)
- # Worst case is UNREG USE=profile ia64. See bug #611866 for some
- # numbers on various arches.
- CHECKREQS_DISK_BUILD=8G
- CHECKREQS_DISK_USR=2G
- # USE=binary roughly takes
- use binary && CHECKREQS_DISK_BUILD=4G
-
- "$@"
-}
-
-pkg_pretend() {
- ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- ghc-check-reqs check-reqs_pkg_setup
-
- # quiet portage about prebuilt binaries
- use binary && QA_PREBUILT="*"
-
- [[ ${MERGE_TYPE} == binary ]] && return
-
- if use ghcbootstrap; then
- ewarn "You requested ghc bootstrapping, this is usually only used"
- ewarn "by Gentoo developers to make binary .tbz2 packages."
-
- [[ -z $(type -P ghc) ]] && \
- die "Could not find a ghc to bootstrap with."
- else
- if ! yet_binary; then
- eerror "Please try emerging with USE=ghcbootstrap and report build"
- eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
- die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
- fi
- fi
-}
-
-src_unpack() {
- # Create the ${S} dir if we're using the binary version
- use binary && mkdir "${S}"
-
- # the Solaris and Darwin binaries from ghc (maeder) need to be
- # unpacked separately, so prevent them from being unpacked
- local ONLYA=${A}
- case ${CHOST} in
- *-darwin* | *-solaris*) ONLYA=${GHC_P}-src.tar.xz ;;
- esac
- unpack ${ONLYA}
-}
-
-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"
- fi
-
- if use binary; then
- if use prefix; then
- relocate_ghc "${EPREFIX}"
- fi
-
- # Move unpacked files to the expected place
- mv "${WORKDIR}/usr" "${S}"
- eapply_user
- else
- if ! use ghcbootstrap; then
- case ${CHOST} in
- *-darwin* | *-solaris*)
- # UPDATE ME for ghc-7
- mkdir "${WORKDIR}"/ghc-bin-installer || die
- pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
- use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
- use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
- use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
- popd > /dev/null
-
- pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
- # fix the binaries so they run, on Solaris we need an
- # LD_LIBRARY_PATH which has our prefix libdirs, on
- # Darwin we need to replace the frameworks with our libs
- # from the prefix fix before installation, because some
- # of the tools are actually used during configure/make
- if [[ ${CHOST} == *-solaris* ]] ; then
- export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
- elif [[ ${CHOST} == *-darwin* ]] ; then
- local readline_framework=GNUreadline.framework/GNUreadline
- local gmp_framework=/opt/local/lib/libgmp.10.dylib
- local ncurses_file=/opt/local/lib/libncurses.5.dylib
- for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
- install_name_tool -change \
- ${readline_framework} \
- "${EPREFIX}"/lib/libreadline.dylib \
- ${binary} || die
- install_name_tool -change \
- ${gmp_framework} \
- "${EPREFIX}"/usr/lib/libgmp.dylib \
- ${binary} || die
- install_name_tool -change \
- ${ncurses_file} \
- "${EPREFIX}"/usr/lib/libncurses.dylib \
- ${binary} || die
- done
- # we don't do frameworks!
- sed -i \
- -e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
- -e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
- rts/package.conf.in || die
- fi
-
- # it is autoconf, but we really don't want to give it too
- # many arguments, in fact we do the make in-place anyway
- ./configure --prefix="${WORKDIR}"/usr || die
- make install || die
- popd > /dev/null
- ;;
- *)
- relocate_ghc "${WORKDIR}"
- ;;
- esac
- fi
-
- sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
- "${S}/ghc/ghc.wrapper"
-
- cd "${S}" # otherwise eapply will break
-
- eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
- eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
- eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
- eapply "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
- eapply "${FILESDIR}"/${PN}-8.4.2-allow-cross-bootstrap.patch
- eapply "${FILESDIR}"/${PN}-8.6.5-numa.patch
- eapply "${FILESDIR}"/${PN}-8.8.1-revert-CPP.patch
-
- # a bunch of crosscompiler patches
- # needs newer version:
- #eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
-
- # mingw32 target
- pushd "${S}/libraries/Win32"
- eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
- popd
-
- bump_libs
-
- eapply_user
- # as we have changed the build system
- eautoreconf
- fi
-}
-
-src_configure() {
- if ! use binary; then
- # initialize build.mk
- echo '# Gentoo changes' > mk/build.mk
-
- # Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
- echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
- echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-
- # We also need to use the GHC_FLAGS flags when building ghc itself
- echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
- echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
- echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
- # Speed up initial Cabal bootstrap
- echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
- # We can't depend on haddock except when bootstrapping when we
- # must build docs and include them into the binary .tbz2 package
- # app-text/dblatex is not in portage, can not build PDF or PS
- echo "BUILD_SPHINX_PDF = NO" >> mk/build.mk
- echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
- echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
- # this controls presence on 'xhtml' and 'haddock' in final install
- echo "HADDOCK_DOCS = YES" >> mk/build.mk
-
- # not used outside of ghc's test
- if [[ -n ${GHC_BUILD_DPH} ]]; then
- echo "BUILD_DPH = YES" >> mk/build.mk
- else
- echo "BUILD_DPH = NO" >> mk/build.mk
- fi
-
- # Any non-native build has to skip as it needs
- # target haddock binary to be runnabine.
- if ! is_native; then
- # disable docs generation as it requires running stage2
- echo "HADDOCK_DOCS=NO" >> mk/build.mk
- echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
- echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
- fi
-
- if is_crosscompile; then
- # Install ghc-stage1 crosscompiler instead of
- # ghc-stage2 cross-built compiler.
- echo "Stage1Only=YES" >> mk/build.mk
- fi
-
- # allows overriding build flavours for libraries:
- # v - vanilla (static libs)
- # p - profiled
- # dyn - shared libraries
- # example: GHC_LIBRARY_WAYS="v dyn"
- if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
- echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
- fi
- echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
- # Get ghc from the unpacked binary .tbz2
- # except when bootstrapping we just pick ghc up off the path
- if ! use ghcbootstrap; then
- export PATH="${WORKDIR}/usr/bin:${PATH}"
- fi
-
- echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
-
- # don't strip anything. Very useful when stage2 SIGSEGVs on you
- echo "STRIP_CMD = :" >> mk/build.mk
-
- local econf_args=()
-
- # GHC embeds toolchain it was built by and uses it later.
- # Don't allow things like ccache or versioned binary slip.
- # We use stable thing across gcc upgrades.
- # User can use EXTRA_ECONF=CC=... to override this default.
- econf_args+=(
- AR=${CTARGET}-ar
- CC=${CTARGET}-gcc
- # these should be inferred by GHC but ghc defaults
- # to using bundled tools on windows.
- Windres=${CTARGET}-windres
- DllWrap=${CTARGET}-dllwrap
- # we set the linker explicitly below
- --disable-ld-override
- )
- case ${CTARGET} in
- arm*)
- # ld.bfd-2.28 does not work for ghc. Force ld.gold
- # instead. This should be removed once gentoo gets
- # a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
- econf_args+=(LD=${CTARGET}-ld.gold)
- ;;
- sparc*)
- # ld.gold-2.28 does not work for ghc. Force ld.bfd
- # instead. This should be removed once gentoo gets
- # a fix for missing --no-relax support bug:
- # https://sourceware.org/ml/binutils/2017-07/msg00183.html
- econf_args+=(LD=${CTARGET}-ld.bfd)
- ;;
- *)
- econf_args+=(LD=${CTARGET}-ld)
- esac
-
- if [[ ${CBUILD} != ${CHOST} ]]; then
- # GHC bug: ghc claims not to support cross-building.
- # It does, but does not distinct --host= value
- # for stage1 and stage2 compiler.
- econf_args+=(--host=${CBUILD})
- fi
-
- if use ghcmakebinary; then
- # When building booting libary we are trying to
- # bundle or restrict most of external depends
- # with unstable ABI:
- # - embed libffi (default GHC behaviour)
- # - disable ncurses support for ghci (via haskeline)
- # https://bugs.gentoo.org/557478
- # - disable ncurses support for ghc-pkg
- echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
- echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
- elif is_native; then
- # using ${GTARGET}'s libffi is not supported yet:
- # GHC embeds full path for ffi includes without /usr/${CTARGET} account.
- econf_args+=(--with-system-libffi)
- econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
- fi
-
- einfo "Final mk/build.mk:"
- cat mk/build.mk || die
-
- econf ${econf_args[@]} \
- --enable-bootstrap-with-devel-snapshot \
- $(use elfutils && echo --enable-dwarf-unwind) \
- $(use_enable numa)
-
- if [[ ${PV} == *9999* ]]; then
- GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
- GHC_P=${PN}-${GHC_PV}
- fi
- fi # ! use binary
-}
-
-src_compile() {
- if ! use binary; then
- # Stage1Only crosscompiler does not build stage2
- if ! is_crosscompile; then
- # 1. build/pax-mark compiler binary first
- emake ghc/stage2/build/tmp/ghc-stage2
- # 2. pax-mark (bug #516430)
- pax-mark -m ghc/stage2/build/tmp/ghc-stage2
- # 2. build/pax-mark haddock using ghc-stage2
- if is_native; then
- # non-native build does not build haddock
- # due to HADDOCK_DOCS=NO, but it could.
- emake utils/haddock/dist/build/tmp/haddock
- pax-mark -m utils/haddock/dist/build/tmp/haddock
- fi
- fi
- # 3. and then all the rest
- emake all
- fi # ! use binary
-}
-
-src_test() {
- # TODO: deal with:
- # - sandbox (pollutes environment)
- # - extra packages (to extend testsuite coverage)
- # bits are taken from 'validate'
- local make_test_target='test' # can be fulltest
- # not 'emake' as testsuite uses '$MAKE' without jobserver available
- make $make_test_target stage=2 THREADS=$(makeopts_jobs)
-}
-
-src_install() {
- if use binary; then
- use prefix && mkdir -p "${ED}"
- mv "${S}/usr" "${ED}"
- else
- [[ -f VERSION ]] || emake VERSION
-
- # -j1 due to a rare race in install script:
- # make --no-print-directory -f ghc.mk phase=final install
- # /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
- # -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
- # /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644 utils/hsc2hs/template-hsc.h \
- # "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
- # /usr/bin/install: cannot create regular file \
- # '/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}"
-
- # Skip for cross-targets as they all share target location:
- # /usr/share/doc/ghc-9999/
- if ! is_crosscompile; then
- dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
- fi
-
- # rename ghc-shipped files to avoid collision
- # of external packages. Motivating example:
- # user had installed:
- # dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
- # dev-haskell/transformers-0.4.2.0
- # then user tried to update to
- # dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
- # this will lead to single .conf file collision.
- local shipped_conf renamed_conf
- local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
- for shipped_conf in "${package_confdir}"/*.conf; do
- # rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
- renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
- mv "${shipped_conf}" "${renamed_conf}" || die
- done
-
- # remove link, but leave 'haddock-${GHC_P}'
- rm -f "${ED}"/usr/bin/$(cross)haddock
-
- if ! is_crosscompile; then
- newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
- newbashcomp utils/completion/ghc.bash ghc
- fi
- fi
-
- # path to the package.cache
- local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
- PKGCACHE="${package_confdir}"/package.cache
- # copy the package.conf.d, including timestamp, save it so we can help
- # users that have a broken package.conf.d
- cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
- # copy the package.conf, including timestamp, save it so we later can put it
- # back before uninstalling, or when upgrading.
- cp -p "${PKGCACHE}"{,.shipped} \
- || die "failed to copy package.conf.d/package.cache"
-
- if is_crosscompile; then
- # When we build a cross-compiler the layout is the following:
- # usr/lib/${CTARGET}-ghc-${VER}/ contains target libraries
- # but
- # usr/lib/${CTARGET}-ghc-${VER}/bin/ directory
- # containst host binaries (modulo bugs).
-
- # Portage's stripping mechanism does not skip stripping
- # foreign binaries. This frequently causes binaries to be
- # broken.
- #
- # Thus below we disable stripping of target libraries and allow
- # stripping hosts executables.
- dostrip -x "/usr/$(get_libdir)/$(cross)${GHC_P}"
- dostrip "/usr/$(get_libdir)/$(cross)${GHC_P}/bin"
- fi
-}
-
-pkg_preinst() {
- # have we got an earlier version of ghc installed?
- if has_version "<${CATEGORY}/${PF}"; then
- haskell_updater_warn="1"
- fi
-}
-
-pkg_postinst() {
- ghc-reregister
-
- # path to the package.cache
- PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
- # give the cache a new timestamp, it must be as recent as
- # the package.conf.d directory.
- touch "${PKGCACHE}"
-
- if [[ "${haskell_updater_warn}" == "1" ]]; then
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- ewarn "You have just upgraded from an older version of GHC."
- ewarn "You may have to run"
- ewarn " 'haskell-updater'"
- ewarn "to rebuild all ghc-based Haskell libraries."
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- fi
-}
-
-pkg_prerm() {
- PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
- rm -rf "${PKGCACHE}"
-
- cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
- ghc-package_pkg_postrm
-}
diff --git a/dev-lang/ghc/ghc-8.8.3.ebuild b/dev-lang/ghc/ghc-8.8.3.ebuild
deleted file mode 100644
index eb0ede0ad7fe..000000000000
--- a/dev-lang/ghc/ghc-8.8.3.ebuild
+++ /dev/null
@@ -1,808 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-# to make make a crosscompiler use crossdev and symlink ghc tree into
-# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
- if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- export CTARGET=${CATEGORY/cross-}
- fi
-fi
-
-inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
-inherit multilib multiprocessing pax-utils toolchain-funcs prefix
-inherit check-reqs
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="https://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-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 amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/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 )"
-#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 sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-# 0 - yet
-yet_binary() {
- case "${ARCH}" in
- #alpha) return 0 ;;
- #arm64) return 0 ;;
- #arm) return 0 ;;
- amd64) return 0 ;;
- #ia64) return 0 ;;
- #ppc) return 0 ;;
- #ppc64)
- # use big-endian && return 1
- # return 0
- # ;;
- #sparc) return 0 ;;
- x86) return 0 ;;
- *) return 1 ;;
- esac
-}
-
-GHC_PV=${PV}
-#GHC_PV=8.6.0.20180810 # uncomment only for -alpha, -beta, -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? (
- https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-src.tar.xz
- test? ( https://downloads.haskell.org/~ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
-)"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-
-BUMP_LIBRARIES=(
- # "hackage-name hackage-version"
-)
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-KEYWORDS=""
-IUSE="big-endian doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
-IUSE+=" binary"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- >=dev-lang/perl-5.6.1
- dev-libs/gmp:0=
- sys-libs/ncurses:0=[unicode]
- elfutils? ( dev-libs/elfutils )
- !ghcmakebinary? ( dev-libs/libffi:= )
- numa? ( sys-process/numactl )
-"
-
-# This set of dependencies is needed to run
-# prebuilt ghc. We specifically avoid ncurses
-# dependency with:
-# utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
-PREBUILT_BINARY_DEPENDS="
- !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
-"
-# This set of dependencies is needed to install
-# ghc[binary] in system. terminfo package is linked
-# against ncurses.
-PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
- sys-libs/ncurses:0/6
-"
-
-RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
-
-DEPEND="${RDEPEND}
- doc? ( app-text/docbook-xml-dtd:4.2
- app-text/docbook-xml-dtd:4.5
- app-text/docbook-xsl-stylesheets
- dev-python/sphinx
- >=dev-libs/libxslt-1.1.2 )
- !ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
-
-# we build binaries without profiling support
-REQUIRED_USE="
- ?? ( ghcbootstrap binary )
- ?? ( profile binary )
-"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-is_native() {
- [[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
-}
-
-if ! is_crosscompile; then
- PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
-fi
-
-# returns tool prefix for crosscompiler.
-# Example:
-# CTARGET=armv7a-unknown-linux-gnueabi
-# CHOST=x86_64-pc-linux-gnu
-# "armv7a-unknown-linux-gnueabi-"
-# CTARGET=${CHOST}
-# ""
-# Used in tools and library prefix:
-# "${ED}"/usr/bin/$(cross)haddock
-# "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
-
-cross() {
- if is_crosscompile; then
- echo "${CTARGET}-"
- else
- echo ""
- fi
-}
-
-append-ghc-cflags() {
- local persistent compile assemble link
- local flag ghcflag
-
- for flag in $*; do
- case ${flag} in
- persistent) persistent="yes";;
- compile) compile="yes";;
- assemble) assemble="yes";;
- link) link="yes";;
- *)
- [[ ${compile} ]] && ghcflag="-optc${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${assemble} ]] && ghcflag="-opta${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- [[ ${link} ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
- [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
- ;;
- esac
- done
-}
-
-# $1 - lib name (under libraries/)
-# $2 - lib version
-# example: bump_lib "transformers" "0.4.2.0"
-bump_lib() {
- local pn=$1 pv=$2
- local p=${pn}-${pv}
- local f
-
- einfo "Bumping ${pn} up to ${pv}"
-
- for f in ghc.mk GNUmakefile; do
- mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
- done
- mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
- mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
-}
-
-update_SRC_URI() {
- local p pn pv
- for p in "${BUMP_LIBRARIES[@]}"; do
- set -- $p
- pn=$1 pv=$2
-
- SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
- done
-}
-
-update_SRC_URI
-
-bump_libs() {
- local p pn pv
- for p in "${BUMP_LIBRARIES[@]}"; do
- set -- $p
- pn=$1 pv=$2
-
- bump_lib "${pn}" "${pv}"
- done
-}
-
-ghc_setup_cflags() {
- # TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
- if ! is_native; then
- export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
- export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
- einfo "Crosscompiling mode:"
- einfo " CHOST: ${CHOST}"
- einfo " CTARGET: ${CTARGET}"
- einfo " CFLAGS: ${CFLAGS}"
- einfo " LDFLAGS: ${LDFLAGS}"
- einfo " prefix: $(cross)"
- return
- fi
- # We need to be very careful with the CFLAGS we ask ghc to pass through to
- # gcc. There are plenty of flags which will make gcc produce output that
- # breaks ghc in various ways. The main ones we want to pass through are
- # -mcpu / -march flags. These are important for arches like alpha & sparc.
- # We also use these CFLAGS for building the C parts of ghc, ie the rts.
- strip-flags
- strip-unsupported-flags
-
- # Cmm can't parse line numbers #482086
- replace-flags -ggdb[3-9] -ggdb2
-
- GHC_FLAGS=""
- GHC_PERSISTENT_FLAGS=""
- for flag in ${CFLAGS}; do
- case ${flag} in
-
- # Ignore extra optimisation (ghc passes -O to gcc anyway)
- # -O2 and above break on too many systems
- -O*) ;;
-
- # Arch and ABI flags are what we're really after
- -m*) append-ghc-cflags compile assemble ${flag};;
-
- # Sometimes it's handy to see backtrace of RTS
- # to get an idea what happens there
- -g*) append-ghc-cflags compile ${flag};;
-
- # Ignore all other flags, including all -f* flags
- esac
- done
-
- 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
- # hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
- # are not built with fPIC, bug #606666
- gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
- tc-is-gcc && ver_test $(gcc-version) -ge 6.3 && if ! use ghcbootstrap; then
- # gcc-6.3 has support for -no-pie upstream, but spelling differs from
- # gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
- # hardened users try '-pie' in USE=ghcbootstrap mode.
- append-ghc-cflags compile link -no-pie
- fi
-
- # 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 ...
-relocate_path() {
- local from=$1
- local to=$2
- shift 2
- local file=
- for file in "$@"
- do
- sed -i -e "s|$from|$to|g" \
- "$file" || die "path relocation failed for '$file'"
- done
-}
-
-# changes hardcoded ghc paths and updates package index
-# $1 - new absolute root path
-relocate_ghc() {
- local to=$1 ghc_v=${BIN_PV}
-
- # libdir for prebuilt binary and for current system may mismatch
- # It does for prefix installation for example: bug #476998
- local bin_ghc_prefix=${WORKDIR}/usr
- local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
- local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
-
- # backup original script to use it later after relocation
- local gp_back="${T}/ghc-pkg-${ghc_v}-orig"
- cp "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
- if [[ ${bin_libdir} != $(get_libdir) ]]; then
- einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
- # moving the dir itself is not strictly needed
- # but then USE=binary would result in installing
- # in '${bin_libdir}'
- mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
-
- relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
- "${WORKDIR}/usr/bin/ghc-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghci-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/bin/runghc-${ghc_v}" \
- "$gp_back" \
- "${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
- fi
-
- # Relocate from /usr to ${EPREFIX}/usr
- relocate_path "/usr" "${to}/usr" \
- "${WORKDIR}/usr/bin/ghc-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghci-${ghc_v}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
- "${WORKDIR}/usr/bin/haddock-ghc-${ghc_v}" \
- "${WORKDIR}/usr/bin/hp2ps" \
- "${WORKDIR}/usr/bin/hpc" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/bin/runghc-${ghc_v}" \
- "${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
-
- # this one we will use to regenerate cache
- # so it should point to current tree location
- relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
- if use prefix; then
- hprefixify "${bin_libpath}"/${PN}*/settings
- fi
-
- # regenerate the binary package cache
- "$gp_back" recache || die "failed to update cache after relocation"
- rm "$gp_back"
-}
-
-ghc-check-reqs() {
- # These are pessimistic values (slightly bigger than worst-case)
- # Worst case is UNREG USE=profile ia64. See bug #611866 for some
- # numbers on various arches.
- CHECKREQS_DISK_BUILD=8G
- CHECKREQS_DISK_USR=2G
- # USE=binary roughly takes
- use binary && CHECKREQS_DISK_BUILD=4G
-
- "$@"
-}
-
-pkg_pretend() {
- ghc-check-reqs check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- ghc-check-reqs check-reqs_pkg_setup
-
- # quiet portage about prebuilt binaries
- use binary && QA_PREBUILT="*"
-
- [[ ${MERGE_TYPE} == binary ]] && return
-
- if use ghcbootstrap; then
- ewarn "You requested ghc bootstrapping, this is usually only used"
- ewarn "by Gentoo developers to make binary .tbz2 packages."
-
- [[ -z $(type -P ghc) ]] && \
- die "Could not find a ghc to bootstrap with."
- else
- if ! yet_binary; then
- eerror "Please try emerging with USE=ghcbootstrap and report build"
- eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
- die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
- fi
- fi
-}
-
-src_unpack() {
- # Create the ${S} dir if we're using the binary version
- use binary && mkdir "${S}"
-
- # the Solaris and Darwin binaries from ghc (maeder) need to be
- # unpacked separately, so prevent them from being unpacked
- local ONLYA=${A}
- case ${CHOST} in
- *-darwin* | *-solaris*) ONLYA=${GHC_P}-src.tar.xz ;;
- esac
- unpack ${ONLYA}
-}
-
-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"
- fi
-
- if use binary; then
- if use prefix; then
- relocate_ghc "${EPREFIX}"
- fi
-
- # Move unpacked files to the expected place
- mv "${WORKDIR}/usr" "${S}"
- eapply_user
- else
- if ! use ghcbootstrap; then
- case ${CHOST} in
- *-darwin* | *-solaris*)
- # UPDATE ME for ghc-7
- mkdir "${WORKDIR}"/ghc-bin-installer || die
- pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
- use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
- use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
- use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
- popd > /dev/null
-
- pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
- # fix the binaries so they run, on Solaris we need an
- # LD_LIBRARY_PATH which has our prefix libdirs, on
- # Darwin we need to replace the frameworks with our libs
- # from the prefix fix before installation, because some
- # of the tools are actually used during configure/make
- if [[ ${CHOST} == *-solaris* ]] ; then
- export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
- elif [[ ${CHOST} == *-darwin* ]] ; then
- local readline_framework=GNUreadline.framework/GNUreadline
- local gmp_framework=/opt/local/lib/libgmp.10.dylib
- local ncurses_file=/opt/local/lib/libncurses.5.dylib
- for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
- install_name_tool -change \
- ${readline_framework} \
- "${EPREFIX}"/lib/libreadline.dylib \
- ${binary} || die
- install_name_tool -change \
- ${gmp_framework} \
- "${EPREFIX}"/usr/lib/libgmp.dylib \
- ${binary} || die
- install_name_tool -change \
- ${ncurses_file} \
- "${EPREFIX}"/usr/lib/libncurses.dylib \
- ${binary} || die
- done
- # we don't do frameworks!
- sed -i \
- -e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
- -e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
- rts/package.conf.in || die
- fi
-
- # it is autoconf, but we really don't want to give it too
- # many arguments, in fact we do the make in-place anyway
- ./configure --prefix="${WORKDIR}"/usr || die
- make install || die
- popd > /dev/null
- ;;
- *)
- relocate_ghc "${WORKDIR}"
- ;;
- esac
- fi
-
- sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
- "${S}/ghc/ghc.wrapper"
-
- cd "${S}" # otherwise eapply will break
-
- eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
- eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
- eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
- eapply "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
- eapply "${FILESDIR}"/${PN}-8.4.2-allow-cross-bootstrap.patch
- eapply "${FILESDIR}"/${PN}-8.6.5-numa.patch
- # rumors say this is fixed properly in 8.8.3. Let's check!
- #eapply "${FILESDIR}"/${PN}-8.8.1-revert-CPP.patch
-
- # a bunch of crosscompiler patches
- # needs newer version:
- #eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
-
- # mingw32 target
- pushd "${S}/libraries/Win32"
- eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
- popd
-
- bump_libs
-
- eapply_user
- # as we have changed the build system
- eautoreconf
- fi
-}
-
-src_configure() {
- if ! use binary; then
- # initialize build.mk
- echo '# Gentoo changes' > mk/build.mk
-
- # Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
- echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
- echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
-
- # We also need to use the GHC_FLAGS flags when building ghc itself
- echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
- echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
- echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
- # Speed up initial Cabal bootstrap
- echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
-
- # We can't depend on haddock except when bootstrapping when we
- # must build docs and include them into the binary .tbz2 package
- # app-text/dblatex is not in portage, can not build PDF or PS
- echo "BUILD_SPHINX_PDF = NO" >> mk/build.mk
- echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
- echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
-
- # this controls presence on 'xhtml' and 'haddock' in final install
- echo "HADDOCK_DOCS = YES" >> mk/build.mk
-
- # not used outside of ghc's test
- if [[ -n ${GHC_BUILD_DPH} ]]; then
- echo "BUILD_DPH = YES" >> mk/build.mk
- else
- echo "BUILD_DPH = NO" >> mk/build.mk
- fi
-
- # Any non-native build has to skip as it needs
- # target haddock binary to be runnabine.
- if ! is_native; then
- # disable docs generation as it requires running stage2
- echo "HADDOCK_DOCS=NO" >> mk/build.mk
- echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
- echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
- fi
-
- if is_crosscompile; then
- # Install ghc-stage1 crosscompiler instead of
- # ghc-stage2 cross-built compiler.
- echo "Stage1Only=YES" >> mk/build.mk
- fi
-
- # allows overriding build flavours for libraries:
- # v - vanilla (static libs)
- # p - profiled
- # dyn - shared libraries
- # example: GHC_LIBRARY_WAYS="v dyn"
- if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
- echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
- fi
- echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
-
- # Get ghc from the unpacked binary .tbz2
- # except when bootstrapping we just pick ghc up off the path
- if ! use ghcbootstrap; then
- export PATH="${WORKDIR}/usr/bin:${PATH}"
- fi
-
- echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
-
- # don't strip anything. Very useful when stage2 SIGSEGVs on you
- echo "STRIP_CMD = :" >> mk/build.mk
-
- local econf_args=()
-
- # GHC embeds toolchain it was built by and uses it later.
- # Don't allow things like ccache or versioned binary slip.
- # We use stable thing across gcc upgrades.
- # User can use EXTRA_ECONF=CC=... to override this default.
- econf_args+=(
- AR=${CTARGET}-ar
- CC=${CTARGET}-gcc
- # these should be inferred by GHC but ghc defaults
- # to using bundled tools on windows.
- Windres=${CTARGET}-windres
- DllWrap=${CTARGET}-dllwrap
- # we set the linker explicitly below
- --disable-ld-override
- )
- case ${CTARGET} in
- arm*)
- # ld.bfd-2.28 does not work for ghc. Force ld.gold
- # instead. This should be removed once gentoo gets
- # a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
- econf_args+=(LD=${CTARGET}-ld.gold)
- ;;
- sparc*)
- # ld.gold-2.28 does not work for ghc. Force ld.bfd
- # instead. This should be removed once gentoo gets
- # a fix for missing --no-relax support bug:
- # https://sourceware.org/ml/binutils/2017-07/msg00183.html
- econf_args+=(LD=${CTARGET}-ld.bfd)
- ;;
- *)
- econf_args+=(LD=${CTARGET}-ld)
- esac
-
- if [[ ${CBUILD} != ${CHOST} ]]; then
- # GHC bug: ghc claims not to support cross-building.
- # It does, but does not distinct --host= value
- # for stage1 and stage2 compiler.
- econf_args+=(--host=${CBUILD})
- fi
-
- if use ghcmakebinary; then
- # When building booting libary we are trying to
- # bundle or restrict most of external depends
- # with unstable ABI:
- # - embed libffi (default GHC behaviour)
- # - disable ncurses support for ghci (via haskeline)
- # https://bugs.gentoo.org/557478
- # - disable ncurses support for ghc-pkg
- echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
- echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
- elif is_native; then
- # using ${GTARGET}'s libffi is not supported yet:
- # GHC embeds full path for ffi includes without /usr/${CTARGET} account.
- econf_args+=(--with-system-libffi)
- econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
- fi
-
- einfo "Final mk/build.mk:"
- cat mk/build.mk || die
-
- econf ${econf_args[@]} \
- --enable-bootstrap-with-devel-snapshot \
- $(use elfutils && echo --enable-dwarf-unwind) \
- $(use_enable numa)
-
- if [[ ${PV} == *9999* ]]; then
- GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
- GHC_P=${PN}-${GHC_PV}
- fi
- fi # ! use binary
-}
-
-src_compile() {
- if ! use binary; then
- # Stage1Only crosscompiler does not build stage2
- if ! is_crosscompile; then
- # 1. build/pax-mark compiler binary first
- emake ghc/stage2/build/tmp/ghc-stage2
- # 2. pax-mark (bug #516430)
- pax-mark -m ghc/stage2/build/tmp/ghc-stage2
- # 2. build/pax-mark haddock using ghc-stage2
- if is_native; then
- # non-native build does not build haddock
- # due to HADDOCK_DOCS=NO, but it could.
- emake utils/haddock/dist/build/tmp/haddock
- pax-mark -m utils/haddock/dist/build/tmp/haddock
- fi
- fi
- # 3. and then all the rest
- emake all
- fi # ! use binary
-}
-
-src_test() {
- # TODO: deal with:
- # - sandbox (pollutes environment)
- # - extra packages (to extend testsuite coverage)
- # bits are taken from 'validate'
- local make_test_target='test' # can be fulltest
- # not 'emake' as testsuite uses '$MAKE' without jobserver available
- make $make_test_target stage=2 THREADS=$(makeopts_jobs)
-}
-
-src_install() {
- if use binary; then
- use prefix && mkdir -p "${ED}"
- mv "${S}/usr" "${ED}"
- else
- [[ -f VERSION ]] || emake VERSION
-
- # -j1 due to a rare race in install script:
- # make --no-print-directory -f ghc.mk phase=final install
- # /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
- # -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
- # /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644 utils/hsc2hs/template-hsc.h \
- # "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
- # /usr/bin/install: cannot create regular file \
- # '/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}"
-
- # Skip for cross-targets as they all share target location:
- # /usr/share/doc/ghc-9999/
- if ! is_crosscompile; then
- dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
- fi
-
- # rename ghc-shipped files to avoid collision
- # of external packages. Motivating example:
- # user had installed:
- # dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
- # dev-haskell/transformers-0.4.2.0
- # then user tried to update to
- # dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
- # this will lead to single .conf file collision.
- local shipped_conf renamed_conf
- local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
- for shipped_conf in "${package_confdir}"/*.conf; do
- # rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
- renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
- mv "${shipped_conf}" "${renamed_conf}" || die
- done
-
- # remove link, but leave 'haddock-${GHC_P}'
- rm -f "${ED}"/usr/bin/$(cross)haddock
-
- if ! is_crosscompile; then
- newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
- newbashcomp utils/completion/ghc.bash ghc
- fi
- fi
-
- # path to the package.cache
- local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
- PKGCACHE="${package_confdir}"/package.cache
- # copy the package.conf.d, including timestamp, save it so we can help
- # users that have a broken package.conf.d
- cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
-
- # copy the package.conf, including timestamp, save it so we later can put it
- # back before uninstalling, or when upgrading.
- cp -p "${PKGCACHE}"{,.shipped} \
- || die "failed to copy package.conf.d/package.cache"
-
- if is_crosscompile; then
- # When we build a cross-compiler the layout is the following:
- # usr/lib/${CTARGET}-ghc-${VER}/ contains target libraries
- # but
- # usr/lib/${CTARGET}-ghc-${VER}/bin/ directory
- # containst host binaries (modulo bugs).
-
- # Portage's stripping mechanism does not skip stripping
- # foreign binaries. This frequently causes binaries to be
- # broken.
- #
- # Thus below we disable stripping of target libraries and allow
- # stripping hosts executables.
- dostrip -x "/usr/$(get_libdir)/$(cross)${GHC_P}"
- dostrip "/usr/$(get_libdir)/$(cross)${GHC_P}/bin"
- fi
-}
-
-pkg_preinst() {
- # have we got an earlier version of ghc installed?
- if has_version "<${CATEGORY}/${PF}"; then
- haskell_updater_warn="1"
- fi
-}
-
-pkg_postinst() {
- ghc-reregister
-
- # path to the package.cache
- PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
-
- # give the cache a new timestamp, it must be as recent as
- # the package.conf.d directory.
- touch "${PKGCACHE}"
-
- if [[ "${haskell_updater_warn}" == "1" ]]; then
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- ewarn "You have just upgraded from an older version of GHC."
- ewarn "You may have to run"
- ewarn " 'haskell-updater'"
- ewarn "to rebuild all ghc-based Haskell libraries."
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- fi
-}
-
-pkg_prerm() {
- PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
- rm -rf "${PKGCACHE}"
-
- cp -p "${PKGCACHE}"{.shipped,}
-}
-
-pkg_postrm() {
- ghc-package_pkg_postrm
-}
diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest
index cbb79dde25b8..b68f0ff8fb18 100644
--- a/dev-lang/go/Manifest
+++ b/dev-lang/go/Manifest
@@ -1,17 +1,7 @@
AUX go-sets.conf 313 BLAKE2B 03e94776e317d34b72bfb8385b8b0dfa6a599a6086e4d0c9214e7b49293768947c21d9afb323ffcc7fd85ba0af72d9cb243dbb571eee9eb81de9400fd5f5e79c SHA512 7d01b98bc8d1b609183682dd942bd4c9fa757a98243c7de3cf6c497c7bc20b8cdbe59dd669ce4bb11f914a0e9b6d100e65cea2dffd99f38be50b18e0ecf66315
-DIST go1.14.14.src.tar.gz 22557733 BLAKE2B aa3638c7a20f89e90bf17e9da1b12323cc8c0f52fb0a92ca6a850f7b2c94e406ea50a57fc28cc34b951bf7ecee0a9bb1ce884ad86dfc23241d7b62cd9435f881 SHA512 76213b19eeec66ca6c6b5bdef875bea0b64c3877c70eec64dd65f7869ceb8db016ff19193f01771f8944fd5f0ae3b54c68185e158f2622d1db5552fec1f37976
-DIST go1.14.15.src.tar.gz 22557340 BLAKE2B 1170cb9d5c0c6686c0c49b4bef1f5d7afcf495a3989fb98c51f1e881eaf1c7502a9517dd9da8d84e091bd6e0d5a88f1d448bf430733a69b44ae0b00c217ba2ba SHA512 94cacf8c86789600fae09a1da4055b9a436977b18488d85bb91494eece8a8e012e1b68924a8a50714c2d17db19d1e84a4a6bec91fa10fd8415c9739c9a348dc1
DIST go1.15.10.src.tar.gz 23021993 BLAKE2B 8143f7703d07d4793521bbb6b935b87ecd87df451cc5d03370a01bddabc284e85ec94a16fed378ee9ac8e3f0d6999402025bb1d6afa3c1810c6343205c4eb2d4 SHA512 4f0ceff8dc035ec50cd0d136678573f4d624bca6a19293d5ffd75868d94d264291e44519bc450e40e8de486ee44d720555550eecf86cbae1f0d64dee00f90764
-DIST go1.15.7.src.tar.gz 23017978 BLAKE2B 15b0827fb56b8e9208c65e8f7f11c7f67820efce1627b4123e937301bb437c597e87adfff9a2eee9aaf53ba0f22eb2f10746bafb7247b4250566f20181b7a2a0 SHA512 7b3e8bcd2fc95baad41f8b5f0456c009e01896d160e65c2670d51c23d8cfcf7a6801e831e6f9a8877fe58c8f54ac8f75bf6e7935b38ba7aaa51dc8e46cf76ddb
-DIST go1.15.8.src.tar.gz 23018628 BLAKE2B 234208b16865f0ac1567e12d3f2dee379f64220a8a04e4b4057d065d3b12e1a110688f165ddc25accf96eab7d8bd2da3717cdd18b74f8d391da8b404bf40ae4f SHA512 4b805425550aff5c38f1f66fa7f7b3282b20850b1c0735898ee62820080514a2a6ab573f1d6984656c5bb955ec2b10cef90fbb7ab6a6c8f1e75ebc0964a04a80
DIST go1.16.2.src.tar.gz 20905135 BLAKE2B 35fccc72604bf8cc7b1b5677d995b88e3232559e32af51f96a63bfc8cabecec09d885b5b8aa4b2ba03c481254da20dbf9bd83387091931c08a1c5c180c071931 SHA512 d14858a75cc7411975aaca705e66145287dc96b4fac1b1b06b95377dc5e5d2762f060973744114f42c780b34ea4baef7038c94616649c2dcc5c97e261cefc6bd
-DIST go1.16.src.tar.gz 20895394 BLAKE2B 7ac4939394f873d748b7436fccc926591d34e5f046d6a5dc4548e494b523ceae5f0c30e90494993536240ebf01563774fb2103cd2e7911f72997dd2d20aeb112 SHA512 9c43e0ebb2d35c694b652cae8d4040ce3f3c8c014abd9496c92c78cc015ecea5b5331e7c2acf098d0c24dec222454ea09d834df4b6bc90d46e9feeac0ac578bf
-EBUILD go-1.14.14.ebuild 4574 BLAKE2B c9833658e5cd6f2a032663144aaf037d72a9175da16c4ca2562b49030d434335c9a981761c7ba13217bc3e80805eb127a6a16705fdacc681017a67f96235c20d SHA512 ff8b197a487280639b7e687a823277e260da97ce44d12ccbdbda00d25cb6dbae2b683b34ea8eceb3a98f368bd5fe6eb18f37b4ebd3bab10c2536c85334809122
-EBUILD go-1.14.15.ebuild 4579 BLAKE2B d6e3779180ce639f03387ec3a5021b31e8d30493180c01cf86a5f69aa4d93bb3c265db1c23d5e6dd69c319b9845b5a7d0dafda47c0ae840b1a1d56e099e65744 SHA512 4cb133223e319b4c12679cc39e32f1262192fcac68e918ba69a501979f9cf97760589d28a897f5ae2a7c26da7b17e8f9c0593509467f85223daf7aed95e7974c
-EBUILD go-1.15.10.ebuild 4575 BLAKE2B 59478da54b06e96c39ae118da8a34afd9326c4adc54ea1de82f79d5022fc9b168cb2a972be881806b2ec5483ae3fff0050b5eba8c8a8113c5884d8e7c2cd86a5 SHA512 60a5ab131234a322fbf48997359cf89fbd684507b14757c8d368c7ddac1ba85fdfc6e741dbbbeaedb07067944c62e8a60ff55c5fc6aca96239c1c158c65cbf2f
-EBUILD go-1.15.7.ebuild 4574 BLAKE2B c9833658e5cd6f2a032663144aaf037d72a9175da16c4ca2562b49030d434335c9a981761c7ba13217bc3e80805eb127a6a16705fdacc681017a67f96235c20d SHA512 ff8b197a487280639b7e687a823277e260da97ce44d12ccbdbda00d25cb6dbae2b683b34ea8eceb3a98f368bd5fe6eb18f37b4ebd3bab10c2536c85334809122
-EBUILD go-1.15.8.ebuild 4579 BLAKE2B d6e3779180ce639f03387ec3a5021b31e8d30493180c01cf86a5f69aa4d93bb3c265db1c23d5e6dd69c319b9845b5a7d0dafda47c0ae840b1a1d56e099e65744 SHA512 4cb133223e319b4c12679cc39e32f1262192fcac68e918ba69a501979f9cf97760589d28a897f5ae2a7c26da7b17e8f9c0593509467f85223daf7aed95e7974c
-EBUILD go-1.16.2.ebuild 4575 BLAKE2B 59478da54b06e96c39ae118da8a34afd9326c4adc54ea1de82f79d5022fc9b168cb2a972be881806b2ec5483ae3fff0050b5eba8c8a8113c5884d8e7c2cd86a5 SHA512 60a5ab131234a322fbf48997359cf89fbd684507b14757c8d368c7ddac1ba85fdfc6e741dbbbeaedb07067944c62e8a60ff55c5fc6aca96239c1c158c65cbf2f
-EBUILD go-1.16.ebuild 4579 BLAKE2B d6e3779180ce639f03387ec3a5021b31e8d30493180c01cf86a5f69aa4d93bb3c265db1c23d5e6dd69c319b9845b5a7d0dafda47c0ae840b1a1d56e099e65744 SHA512 4cb133223e319b4c12679cc39e32f1262192fcac68e918ba69a501979f9cf97760589d28a897f5ae2a7c26da7b17e8f9c0593509467f85223daf7aed95e7974c
+EBUILD go-1.15.10.ebuild 4574 BLAKE2B c9833658e5cd6f2a032663144aaf037d72a9175da16c4ca2562b49030d434335c9a981761c7ba13217bc3e80805eb127a6a16705fdacc681017a67f96235c20d SHA512 ff8b197a487280639b7e687a823277e260da97ce44d12ccbdbda00d25cb6dbae2b683b34ea8eceb3a98f368bd5fe6eb18f37b4ebd3bab10c2536c85334809122
+EBUILD go-1.16.2.ebuild 4574 BLAKE2B c9833658e5cd6f2a032663144aaf037d72a9175da16c4ca2562b49030d434335c9a981761c7ba13217bc3e80805eb127a6a16705fdacc681017a67f96235c20d SHA512 ff8b197a487280639b7e687a823277e260da97ce44d12ccbdbda00d25cb6dbae2b683b34ea8eceb3a98f368bd5fe6eb18f37b4ebd3bab10c2536c85334809122
EBUILD go-9999.ebuild 4579 BLAKE2B c19b3d07e84df70393c8242eb825444436b97d591b214bf1fbd6d265ac0e276fd147d1cfa96e61b1e33468d56eb355cdeda807af7beaa0b3fdcb2f1d1f989374 SHA512 768d17b68de2925267e8274f9e216cd5f79c13be54cb986d0126ab85beaaaa4e46d8ca18422786ee09813b4707aafc6695df815e234fa330dc0211c2ebd398d3
MISC metadata.xml 462 BLAKE2B d9d4280e921286791a55619a7e5557c7041b0de157aa0f8bf6f17cf5041f802df4037270eeb3e8d37263f9fc17939c619a0dd3bce449c5f247279884da10bf67 SHA512 26fa7bfe26f00e8e1766cc0a1052fb8b5352799a33c9eb8f0c4f4523601d3eb5d1da8adc4b731f0d778039788734a9ad483f22e58e4bf1551ec8e9dccbcb87ba
diff --git a/dev-lang/go/go-1.14.14.ebuild b/dev-lang/go/go-1.14.14.ebuild
deleted file mode 100644
index 55fd0c4f6bf1..000000000000
--- a/dev-lang/go/go-1.14.14.ebuild
+++ /dev/null
@@ -1,197 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-
-MY_PV=${PV/_/}
-
-inherit toolchain-funcs
-
-case ${PV} in
-*9999*)
- EGIT_REPO_URI="https://github.com/golang/go.git"
- inherit git-r3
- ;;
-*)
- SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz "
- S="${WORKDIR}"/go
- case ${PV} in
- *_beta*|*_rc*) ;;
- *)
- KEYWORDS="-* amd64 arm arm64 ppc64 ~s390 x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
- ;;
- esac
-esac
-
-DESCRIPTION="A concurrent garbage collected and typesafe programming language"
-HOMEPAGE="https://golang.org"
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-
-BDEPEND="|| (
- dev-lang/go
- dev-lang/go-bootstrap )"
-RDEPEND="!<dev-go/go-tools-0_pre20150902"
-
-# Do not complain about CFLAGS, etc, since Go doesn't use them.
-QA_FLAGS_IGNORED='.*'
-
-# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
-QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
-
-# Do not strip this package. Stripping is unsupported upstream and may
-# fail.
-RESTRICT+=" strip"
-
-DOCS=(
-AUTHORS
-CONTRIBUTING.md
-CONTRIBUTORS
-PATENTS
-README.md
-)
-
-go_arch()
-{
- # By chance most portage arch names match Go
- local portage_arch=$(tc-arch $@)
- case "${portage_arch}" in
- x86) echo 386;;
- x64-*) echo amd64;;
- ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
- s390) echo s390x ;;
- *) echo "${portage_arch}";;
- esac
-}
-
-go_arm()
-{
- case "${1:-${CHOST}}" in
- armv5*) echo 5;;
- armv6*) echo 6;;
- armv7*) echo 7;;
- *)
- die "unknown GOARM for ${1:-${CHOST}}"
- ;;
- esac
-}
-
-go_os()
-{
- case "${1:-${CHOST}}" in
- *-linux*) echo linux;;
- *-darwin*) echo darwin;;
- *-freebsd*) echo freebsd;;
- *-netbsd*) echo netbsd;;
- *-openbsd*) echo openbsd;;
- *-solaris*) echo solaris;;
- *-cygwin*|*-interix*|*-winnt*)
- echo windows
- ;;
- *)
- die "unknown GOOS for ${1:-${CHOST}}"
- ;;
- esac
-}
-
-go_tuple()
-{
- echo "$(go_os $@)_$(go_arch $@)"
-}
-
-go_cross_compile()
-{
- [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
-}
-
-src_compile()
-{
- if has_version -b dev-lang/go; then
- export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go"
- elif has_version -b dev-lang/go-bootstrap; then
- export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap"
- else
- eerror "Go cannot be built without go or go-bootstrap installed"
- die "Should not be here, please report a bug"
- fi
-
- export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
- export GOROOT="$(pwd)"
- export GOBIN="${GOROOT}/bin"
-
- # Go's build script does not use BUILD/HOST/TARGET consistently. :(
- export GOHOSTARCH=$(go_arch ${CBUILD})
- export GOHOSTOS=$(go_os ${CBUILD})
- export CC=$(tc-getBUILD_CC)
-
- export GOARCH=$(go_arch)
- export GOOS=$(go_os)
- export CC_FOR_TARGET=$(tc-getCC)
- export CXX_FOR_TARGET=$(tc-getCXX)
- if [[ ${ARCH} == arm ]]; then
- export GOARM=$(go_arm)
- fi
-
- cd src
- bash -x ./make.bash || die "build failed"
-}
-
-src_test()
-{
- go_cross_compile && return 0
-
- cd src
- PATH="${GOBIN}:${PATH}" \
- ./run.bash -no-rebuild || die "tests failed"
- cd ..
- rm -fr pkg/*_race || die
- rm -fr pkg/obj/go-build || die
-}
-
-src_install()
-{
- # There is a known issue which requires the source tree to be installed [1].
- # Once this is fixed, we can consider using the doc use flag to control
- # installing the doc and src directories.
- # The use of cp is deliberate in order to retain permissions
- # [1] https://golang.org/issue/2775
- dodir /usr/lib/go
- cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
- einstalldocs
-
- # testdata directories are not needed on the installed system
- rm -fr $(find "${ED}"/usr/lib/go -iname testdata -type d -print)
-
- local bin_path
- if go_cross_compile; then
- bin_path="bin/$(go_tuple)"
- else
- bin_path=bin
- fi
- local f x
- for x in ${bin_path}/*; do
- f=${x##*/}
- dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
- done
-
- # install the @golang-rebuild set for Portage
- insinto /usr/share/portage/config/sets
- newins "${FILESDIR}"/go-sets.conf go.conf
-}
-
-pkg_postinst() {
- [[ -z ${REPLACING_VERSIONS} ]] && return
- einfo "After ${CATEGORY}/${PN} is updated it is recommended to rebuild"
- einfo "all packages compiled with previous versions of ${CATEGORY}/${PN}"
- einfo "due to the static linking nature of go."
- einfo "If this is not done, the packages compiled with the older"
- einfo "version of the compiler will not be updated until they are"
- einfo "updated individually, which could mean they will have"
- einfo "vulnerabilities."
- einfo "Run 'emerge @golang-rebuild' to rebuild all 'go' packages"
- einfo "See https://bugs.gentoo.org/752153 for more info"
-}
diff --git a/dev-lang/go/go-1.14.15.ebuild b/dev-lang/go/go-1.14.15.ebuild
deleted file mode 100644
index 461f57dcd52f..000000000000
--- a/dev-lang/go/go-1.14.15.ebuild
+++ /dev/null
@@ -1,197 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-
-MY_PV=${PV/_/}
-
-inherit toolchain-funcs
-
-case ${PV} in
-*9999*)
- EGIT_REPO_URI="https://github.com/golang/go.git"
- inherit git-r3
- ;;
-*)
- SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz "
- S="${WORKDIR}"/go
- case ${PV} in
- *_beta*|*_rc*) ;;
- *)
- KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc64 ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
- ;;
- esac
-esac
-
-DESCRIPTION="A concurrent garbage collected and typesafe programming language"
-HOMEPAGE="https://golang.org"
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-
-BDEPEND="|| (
- dev-lang/go
- dev-lang/go-bootstrap )"
-RDEPEND="!<dev-go/go-tools-0_pre20150902"
-
-# Do not complain about CFLAGS, etc, since Go doesn't use them.
-QA_FLAGS_IGNORED='.*'
-
-# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
-QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
-
-# Do not strip this package. Stripping is unsupported upstream and may
-# fail.
-RESTRICT+=" strip"
-
-DOCS=(
-AUTHORS
-CONTRIBUTING.md
-CONTRIBUTORS
-PATENTS
-README.md
-)
-
-go_arch()
-{
- # By chance most portage arch names match Go
- local portage_arch=$(tc-arch $@)
- case "${portage_arch}" in
- x86) echo 386;;
- x64-*) echo amd64;;
- ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
- s390) echo s390x ;;
- *) echo "${portage_arch}";;
- esac
-}
-
-go_arm()
-{
- case "${1:-${CHOST}}" in
- armv5*) echo 5;;
- armv6*) echo 6;;
- armv7*) echo 7;;
- *)
- die "unknown GOARM for ${1:-${CHOST}}"
- ;;
- esac
-}
-
-go_os()
-{
- case "${1:-${CHOST}}" in
- *-linux*) echo linux;;
- *-darwin*) echo darwin;;
- *-freebsd*) echo freebsd;;
- *-netbsd*) echo netbsd;;
- *-openbsd*) echo openbsd;;
- *-solaris*) echo solaris;;
- *-cygwin*|*-interix*|*-winnt*)
- echo windows
- ;;
- *)
- die "unknown GOOS for ${1:-${CHOST}}"
- ;;
- esac
-}
-
-go_tuple()
-{
- echo "$(go_os $@)_$(go_arch $@)"
-}
-
-go_cross_compile()
-{
- [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
-}
-
-src_compile()
-{
- if has_version -b dev-lang/go; then
- export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go"
- elif has_version -b dev-lang/go-bootstrap; then
- export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap"
- else
- eerror "Go cannot be built without go or go-bootstrap installed"
- die "Should not be here, please report a bug"
- fi
-
- export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
- export GOROOT="$(pwd)"
- export GOBIN="${GOROOT}/bin"
-
- # Go's build script does not use BUILD/HOST/TARGET consistently. :(
- export GOHOSTARCH=$(go_arch ${CBUILD})
- export GOHOSTOS=$(go_os ${CBUILD})
- export CC=$(tc-getBUILD_CC)
-
- export GOARCH=$(go_arch)
- export GOOS=$(go_os)
- export CC_FOR_TARGET=$(tc-getCC)
- export CXX_FOR_TARGET=$(tc-getCXX)
- if [[ ${ARCH} == arm ]]; then
- export GOARM=$(go_arm)
- fi
-
- cd src
- bash -x ./make.bash || die "build failed"
-}
-
-src_test()
-{
- go_cross_compile && return 0
-
- cd src
- PATH="${GOBIN}:${PATH}" \
- ./run.bash -no-rebuild || die "tests failed"
- cd ..
- rm -fr pkg/*_race || die
- rm -fr pkg/obj/go-build || die
-}
-
-src_install()
-{
- # There is a known issue which requires the source tree to be installed [1].
- # Once this is fixed, we can consider using the doc use flag to control
- # installing the doc and src directories.
- # The use of cp is deliberate in order to retain permissions
- # [1] https://golang.org/issue/2775
- dodir /usr/lib/go
- cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
- einstalldocs
-
- # testdata directories are not needed on the installed system
- rm -fr $(find "${ED}"/usr/lib/go -iname testdata -type d -print)
-
- local bin_path
- if go_cross_compile; then
- bin_path="bin/$(go_tuple)"
- else
- bin_path=bin
- fi
- local f x
- for x in ${bin_path}/*; do
- f=${x##*/}
- dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
- done
-
- # install the @golang-rebuild set for Portage
- insinto /usr/share/portage/config/sets
- newins "${FILESDIR}"/go-sets.conf go.conf
-}
-
-pkg_postinst() {
- [[ -z ${REPLACING_VERSIONS} ]] && return
- einfo "After ${CATEGORY}/${PN} is updated it is recommended to rebuild"
- einfo "all packages compiled with previous versions of ${CATEGORY}/${PN}"
- einfo "due to the static linking nature of go."
- einfo "If this is not done, the packages compiled with the older"
- einfo "version of the compiler will not be updated until they are"
- einfo "updated individually, which could mean they will have"
- einfo "vulnerabilities."
- einfo "Run 'emerge @golang-rebuild' to rebuild all 'go' packages"
- einfo "See https://bugs.gentoo.org/752153 for more info"
-}
diff --git a/dev-lang/go/go-1.15.10.ebuild b/dev-lang/go/go-1.15.10.ebuild
index aaafc03202c3..55fd0c4f6bf1 100644
--- a/dev-lang/go/go-1.15.10.ebuild
+++ b/dev-lang/go/go-1.15.10.ebuild
@@ -21,7 +21,7 @@ case ${PV} in
case ${PV} in
*_beta*|*_rc*) ;;
*)
- KEYWORDS="-* amd64 arm arm64 ppc64 ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
+ KEYWORDS="-* amd64 arm arm64 ppc64 ~s390 x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
;;
esac
esac
diff --git a/dev-lang/go/go-1.15.7.ebuild b/dev-lang/go/go-1.15.7.ebuild
deleted file mode 100644
index 55fd0c4f6bf1..000000000000
--- a/dev-lang/go/go-1.15.7.ebuild
+++ /dev/null
@@ -1,197 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-
-MY_PV=${PV/_/}
-
-inherit toolchain-funcs
-
-case ${PV} in
-*9999*)
- EGIT_REPO_URI="https://github.com/golang/go.git"
- inherit git-r3
- ;;
-*)
- SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz "
- S="${WORKDIR}"/go
- case ${PV} in
- *_beta*|*_rc*) ;;
- *)
- KEYWORDS="-* amd64 arm arm64 ppc64 ~s390 x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
- ;;
- esac
-esac
-
-DESCRIPTION="A concurrent garbage collected and typesafe programming language"
-HOMEPAGE="https://golang.org"
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-
-BDEPEND="|| (
- dev-lang/go
- dev-lang/go-bootstrap )"
-RDEPEND="!<dev-go/go-tools-0_pre20150902"
-
-# Do not complain about CFLAGS, etc, since Go doesn't use them.
-QA_FLAGS_IGNORED='.*'
-
-# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
-QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
-
-# Do not strip this package. Stripping is unsupported upstream and may
-# fail.
-RESTRICT+=" strip"
-
-DOCS=(
-AUTHORS
-CONTRIBUTING.md
-CONTRIBUTORS
-PATENTS
-README.md
-)
-
-go_arch()
-{
- # By chance most portage arch names match Go
- local portage_arch=$(tc-arch $@)
- case "${portage_arch}" in
- x86) echo 386;;
- x64-*) echo amd64;;
- ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
- s390) echo s390x ;;
- *) echo "${portage_arch}";;
- esac
-}
-
-go_arm()
-{
- case "${1:-${CHOST}}" in
- armv5*) echo 5;;
- armv6*) echo 6;;
- armv7*) echo 7;;
- *)
- die "unknown GOARM for ${1:-${CHOST}}"
- ;;
- esac
-}
-
-go_os()
-{
- case "${1:-${CHOST}}" in
- *-linux*) echo linux;;
- *-darwin*) echo darwin;;
- *-freebsd*) echo freebsd;;
- *-netbsd*) echo netbsd;;
- *-openbsd*) echo openbsd;;
- *-solaris*) echo solaris;;
- *-cygwin*|*-interix*|*-winnt*)
- echo windows
- ;;
- *)
- die "unknown GOOS for ${1:-${CHOST}}"
- ;;
- esac
-}
-
-go_tuple()
-{
- echo "$(go_os $@)_$(go_arch $@)"
-}
-
-go_cross_compile()
-{
- [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
-}
-
-src_compile()
-{
- if has_version -b dev-lang/go; then
- export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go"
- elif has_version -b dev-lang/go-bootstrap; then
- export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap"
- else
- eerror "Go cannot be built without go or go-bootstrap installed"
- die "Should not be here, please report a bug"
- fi
-
- export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
- export GOROOT="$(pwd)"
- export GOBIN="${GOROOT}/bin"
-
- # Go's build script does not use BUILD/HOST/TARGET consistently. :(
- export GOHOSTARCH=$(go_arch ${CBUILD})
- export GOHOSTOS=$(go_os ${CBUILD})
- export CC=$(tc-getBUILD_CC)
-
- export GOARCH=$(go_arch)
- export GOOS=$(go_os)
- export CC_FOR_TARGET=$(tc-getCC)
- export CXX_FOR_TARGET=$(tc-getCXX)
- if [[ ${ARCH} == arm ]]; then
- export GOARM=$(go_arm)
- fi
-
- cd src
- bash -x ./make.bash || die "build failed"
-}
-
-src_test()
-{
- go_cross_compile && return 0
-
- cd src
- PATH="${GOBIN}:${PATH}" \
- ./run.bash -no-rebuild || die "tests failed"
- cd ..
- rm -fr pkg/*_race || die
- rm -fr pkg/obj/go-build || die
-}
-
-src_install()
-{
- # There is a known issue which requires the source tree to be installed [1].
- # Once this is fixed, we can consider using the doc use flag to control
- # installing the doc and src directories.
- # The use of cp is deliberate in order to retain permissions
- # [1] https://golang.org/issue/2775
- dodir /usr/lib/go
- cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
- einstalldocs
-
- # testdata directories are not needed on the installed system
- rm -fr $(find "${ED}"/usr/lib/go -iname testdata -type d -print)
-
- local bin_path
- if go_cross_compile; then
- bin_path="bin/$(go_tuple)"
- else
- bin_path=bin
- fi
- local f x
- for x in ${bin_path}/*; do
- f=${x##*/}
- dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
- done
-
- # install the @golang-rebuild set for Portage
- insinto /usr/share/portage/config/sets
- newins "${FILESDIR}"/go-sets.conf go.conf
-}
-
-pkg_postinst() {
- [[ -z ${REPLACING_VERSIONS} ]] && return
- einfo "After ${CATEGORY}/${PN} is updated it is recommended to rebuild"
- einfo "all packages compiled with previous versions of ${CATEGORY}/${PN}"
- einfo "due to the static linking nature of go."
- einfo "If this is not done, the packages compiled with the older"
- einfo "version of the compiler will not be updated until they are"
- einfo "updated individually, which could mean they will have"
- einfo "vulnerabilities."
- einfo "Run 'emerge @golang-rebuild' to rebuild all 'go' packages"
- einfo "See https://bugs.gentoo.org/752153 for more info"
-}
diff --git a/dev-lang/go/go-1.15.8.ebuild b/dev-lang/go/go-1.15.8.ebuild
deleted file mode 100644
index 461f57dcd52f..000000000000
--- a/dev-lang/go/go-1.15.8.ebuild
+++ /dev/null
@@ -1,197 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-
-MY_PV=${PV/_/}
-
-inherit toolchain-funcs
-
-case ${PV} in
-*9999*)
- EGIT_REPO_URI="https://github.com/golang/go.git"
- inherit git-r3
- ;;
-*)
- SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz "
- S="${WORKDIR}"/go
- case ${PV} in
- *_beta*|*_rc*) ;;
- *)
- KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc64 ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
- ;;
- esac
-esac
-
-DESCRIPTION="A concurrent garbage collected and typesafe programming language"
-HOMEPAGE="https://golang.org"
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-
-BDEPEND="|| (
- dev-lang/go
- dev-lang/go-bootstrap )"
-RDEPEND="!<dev-go/go-tools-0_pre20150902"
-
-# Do not complain about CFLAGS, etc, since Go doesn't use them.
-QA_FLAGS_IGNORED='.*'
-
-# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
-QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
-
-# Do not strip this package. Stripping is unsupported upstream and may
-# fail.
-RESTRICT+=" strip"
-
-DOCS=(
-AUTHORS
-CONTRIBUTING.md
-CONTRIBUTORS
-PATENTS
-README.md
-)
-
-go_arch()
-{
- # By chance most portage arch names match Go
- local portage_arch=$(tc-arch $@)
- case "${portage_arch}" in
- x86) echo 386;;
- x64-*) echo amd64;;
- ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
- s390) echo s390x ;;
- *) echo "${portage_arch}";;
- esac
-}
-
-go_arm()
-{
- case "${1:-${CHOST}}" in
- armv5*) echo 5;;
- armv6*) echo 6;;
- armv7*) echo 7;;
- *)
- die "unknown GOARM for ${1:-${CHOST}}"
- ;;
- esac
-}
-
-go_os()
-{
- case "${1:-${CHOST}}" in
- *-linux*) echo linux;;
- *-darwin*) echo darwin;;
- *-freebsd*) echo freebsd;;
- *-netbsd*) echo netbsd;;
- *-openbsd*) echo openbsd;;
- *-solaris*) echo solaris;;
- *-cygwin*|*-interix*|*-winnt*)
- echo windows
- ;;
- *)
- die "unknown GOOS for ${1:-${CHOST}}"
- ;;
- esac
-}
-
-go_tuple()
-{
- echo "$(go_os $@)_$(go_arch $@)"
-}
-
-go_cross_compile()
-{
- [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
-}
-
-src_compile()
-{
- if has_version -b dev-lang/go; then
- export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go"
- elif has_version -b dev-lang/go-bootstrap; then
- export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap"
- else
- eerror "Go cannot be built without go or go-bootstrap installed"
- die "Should not be here, please report a bug"
- fi
-
- export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
- export GOROOT="$(pwd)"
- export GOBIN="${GOROOT}/bin"
-
- # Go's build script does not use BUILD/HOST/TARGET consistently. :(
- export GOHOSTARCH=$(go_arch ${CBUILD})
- export GOHOSTOS=$(go_os ${CBUILD})
- export CC=$(tc-getBUILD_CC)
-
- export GOARCH=$(go_arch)
- export GOOS=$(go_os)
- export CC_FOR_TARGET=$(tc-getCC)
- export CXX_FOR_TARGET=$(tc-getCXX)
- if [[ ${ARCH} == arm ]]; then
- export GOARM=$(go_arm)
- fi
-
- cd src
- bash -x ./make.bash || die "build failed"
-}
-
-src_test()
-{
- go_cross_compile && return 0
-
- cd src
- PATH="${GOBIN}:${PATH}" \
- ./run.bash -no-rebuild || die "tests failed"
- cd ..
- rm -fr pkg/*_race || die
- rm -fr pkg/obj/go-build || die
-}
-
-src_install()
-{
- # There is a known issue which requires the source tree to be installed [1].
- # Once this is fixed, we can consider using the doc use flag to control
- # installing the doc and src directories.
- # The use of cp is deliberate in order to retain permissions
- # [1] https://golang.org/issue/2775
- dodir /usr/lib/go
- cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
- einstalldocs
-
- # testdata directories are not needed on the installed system
- rm -fr $(find "${ED}"/usr/lib/go -iname testdata -type d -print)
-
- local bin_path
- if go_cross_compile; then
- bin_path="bin/$(go_tuple)"
- else
- bin_path=bin
- fi
- local f x
- for x in ${bin_path}/*; do
- f=${x##*/}
- dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
- done
-
- # install the @golang-rebuild set for Portage
- insinto /usr/share/portage/config/sets
- newins "${FILESDIR}"/go-sets.conf go.conf
-}
-
-pkg_postinst() {
- [[ -z ${REPLACING_VERSIONS} ]] && return
- einfo "After ${CATEGORY}/${PN} is updated it is recommended to rebuild"
- einfo "all packages compiled with previous versions of ${CATEGORY}/${PN}"
- einfo "due to the static linking nature of go."
- einfo "If this is not done, the packages compiled with the older"
- einfo "version of the compiler will not be updated until they are"
- einfo "updated individually, which could mean they will have"
- einfo "vulnerabilities."
- einfo "Run 'emerge @golang-rebuild' to rebuild all 'go' packages"
- einfo "See https://bugs.gentoo.org/752153 for more info"
-}
diff --git a/dev-lang/go/go-1.16.2.ebuild b/dev-lang/go/go-1.16.2.ebuild
index aaafc03202c3..55fd0c4f6bf1 100644
--- a/dev-lang/go/go-1.16.2.ebuild
+++ b/dev-lang/go/go-1.16.2.ebuild
@@ -21,7 +21,7 @@ case ${PV} in
case ${PV} in
*_beta*|*_rc*) ;;
*)
- KEYWORDS="-* amd64 arm arm64 ppc64 ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
+ KEYWORDS="-* amd64 arm arm64 ppc64 ~s390 x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
;;
esac
esac
diff --git a/dev-lang/go/go-1.16.ebuild b/dev-lang/go/go-1.16.ebuild
deleted file mode 100644
index 461f57dcd52f..000000000000
--- a/dev-lang/go/go-1.16.ebuild
+++ /dev/null
@@ -1,197 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-
-MY_PV=${PV/_/}
-
-inherit toolchain-funcs
-
-case ${PV} in
-*9999*)
- EGIT_REPO_URI="https://github.com/golang/go.git"
- inherit git-r3
- ;;
-*)
- SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz "
- S="${WORKDIR}"/go
- case ${PV} in
- *_beta*|*_rc*) ;;
- *)
- KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc64 ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
- ;;
- esac
-esac
-
-DESCRIPTION="A concurrent garbage collected and typesafe programming language"
-HOMEPAGE="https://golang.org"
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-
-BDEPEND="|| (
- dev-lang/go
- dev-lang/go-bootstrap )"
-RDEPEND="!<dev-go/go-tools-0_pre20150902"
-
-# Do not complain about CFLAGS, etc, since Go doesn't use them.
-QA_FLAGS_IGNORED='.*'
-
-# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
-QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
-
-# Do not strip this package. Stripping is unsupported upstream and may
-# fail.
-RESTRICT+=" strip"
-
-DOCS=(
-AUTHORS
-CONTRIBUTING.md
-CONTRIBUTORS
-PATENTS
-README.md
-)
-
-go_arch()
-{
- # By chance most portage arch names match Go
- local portage_arch=$(tc-arch $@)
- case "${portage_arch}" in
- x86) echo 386;;
- x64-*) echo amd64;;
- ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
- s390) echo s390x ;;
- *) echo "${portage_arch}";;
- esac
-}
-
-go_arm()
-{
- case "${1:-${CHOST}}" in
- armv5*) echo 5;;
- armv6*) echo 6;;
- armv7*) echo 7;;
- *)
- die "unknown GOARM for ${1:-${CHOST}}"
- ;;
- esac
-}
-
-go_os()
-{
- case "${1:-${CHOST}}" in
- *-linux*) echo linux;;
- *-darwin*) echo darwin;;
- *-freebsd*) echo freebsd;;
- *-netbsd*) echo netbsd;;
- *-openbsd*) echo openbsd;;
- *-solaris*) echo solaris;;
- *-cygwin*|*-interix*|*-winnt*)
- echo windows
- ;;
- *)
- die "unknown GOOS for ${1:-${CHOST}}"
- ;;
- esac
-}
-
-go_tuple()
-{
- echo "$(go_os $@)_$(go_arch $@)"
-}
-
-go_cross_compile()
-{
- [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
-}
-
-src_compile()
-{
- if has_version -b dev-lang/go; then
- export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go"
- elif has_version -b dev-lang/go-bootstrap; then
- export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap"
- else
- eerror "Go cannot be built without go or go-bootstrap installed"
- die "Should not be here, please report a bug"
- fi
-
- export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
- export GOROOT="$(pwd)"
- export GOBIN="${GOROOT}/bin"
-
- # Go's build script does not use BUILD/HOST/TARGET consistently. :(
- export GOHOSTARCH=$(go_arch ${CBUILD})
- export GOHOSTOS=$(go_os ${CBUILD})
- export CC=$(tc-getBUILD_CC)
-
- export GOARCH=$(go_arch)
- export GOOS=$(go_os)
- export CC_FOR_TARGET=$(tc-getCC)
- export CXX_FOR_TARGET=$(tc-getCXX)
- if [[ ${ARCH} == arm ]]; then
- export GOARM=$(go_arm)
- fi
-
- cd src
- bash -x ./make.bash || die "build failed"
-}
-
-src_test()
-{
- go_cross_compile && return 0
-
- cd src
- PATH="${GOBIN}:${PATH}" \
- ./run.bash -no-rebuild || die "tests failed"
- cd ..
- rm -fr pkg/*_race || die
- rm -fr pkg/obj/go-build || die
-}
-
-src_install()
-{
- # There is a known issue which requires the source tree to be installed [1].
- # Once this is fixed, we can consider using the doc use flag to control
- # installing the doc and src directories.
- # The use of cp is deliberate in order to retain permissions
- # [1] https://golang.org/issue/2775
- dodir /usr/lib/go
- cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
- einstalldocs
-
- # testdata directories are not needed on the installed system
- rm -fr $(find "${ED}"/usr/lib/go -iname testdata -type d -print)
-
- local bin_path
- if go_cross_compile; then
- bin_path="bin/$(go_tuple)"
- else
- bin_path=bin
- fi
- local f x
- for x in ${bin_path}/*; do
- f=${x##*/}
- dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
- done
-
- # install the @golang-rebuild set for Portage
- insinto /usr/share/portage/config/sets
- newins "${FILESDIR}"/go-sets.conf go.conf
-}
-
-pkg_postinst() {
- [[ -z ${REPLACING_VERSIONS} ]] && return
- einfo "After ${CATEGORY}/${PN} is updated it is recommended to rebuild"
- einfo "all packages compiled with previous versions of ${CATEGORY}/${PN}"
- einfo "due to the static linking nature of go."
- einfo "If this is not done, the packages compiled with the older"
- einfo "version of the compiler will not be updated until they are"
- einfo "updated individually, which could mean they will have"
- einfo "vulnerabilities."
- einfo "Run 'emerge @golang-rebuild' to rebuild all 'go' packages"
- einfo "See https://bugs.gentoo.org/752153 for more info"
-}
diff --git a/dev-lang/icon/Manifest b/dev-lang/icon/Manifest
index 7ca7b01d2130..3b04b0647f6f 100644
--- a/dev-lang/icon/Manifest
+++ b/dev-lang/icon/Manifest
@@ -2,8 +2,10 @@ AUX icon-9.5.1-flags.patch 2148 BLAKE2B 37fcaca92f67be74caddbf7789ca4e666a4e0b98
AUX icon-9.5.1-fpoll.patch 977 BLAKE2B 720fac1a8109d3400b6a718f708904d14e2d4207840a2e4d31888dd4be2d02c241c2f40271b89f6e3273732288e203e9298f061dfb485ca4eb0c24baea02534c SHA512 4b9d471d7d2992a75cccea98790339318b8a622d993a34affc69e0dbbbfa7103e8b994494eb33aaf26168bdb18623c5419f2c34471dee4adb1a004b420b793ab
AUX icon-9.5.1-musl.patch 726 BLAKE2B 83aff0d45e50afa88830d18dbec53838e8adaaa4099fbe405b2212fbc0e53240fc0b21d934f2dfc263afc576bf671924d253784dc65e498b4bacecc91d479255 SHA512 b2be4642126edd75f6ae3466879841ec0123c367c93d74d91d9b9f290deaef9d7bbaa6642ad0440e297850664c6da7f33931782214c9afd8ca2d380b75d588e1
DIST icon-9.5.20h.tar.gz 3137602 BLAKE2B 093290f7df4d0c1686b57c1debabdae5ab607fab00849885fd97b68b872db9d360e9ffe61b7be2e503f5ffa70a387011128c65586b0d48e298577d0ca690a729 SHA512 c3dec5d9d6f2e01fb27b09897cf9e54103749e64e64feb6503e1d25a00bf7da498e40207d8d220af8aca134df6fb281484bd8c8444d256f04ddc39de6a23ca1f
+DIST icon-9.5.20i.tar.gz 3138826 BLAKE2B adb4010926f2a7bbfc03c12c1c669ac202c41949556fafdf8f6e41be418e329c5c4b0697a1af0eddd0cb6acd65d03dedabf171be99ba6e5c80a92fac91323027 SHA512 31f43f0ff672e81b459c8364960b780733820000c31405ddcd13d14927f065b48d1fae47aeb90a2cd31b65340c77ec7f85e8da27797fb186fa49474e7c8be394
DIST icon-v951src.tgz 3133040 BLAKE2B 790a66a8210c1b9c55514a560590f08d3e52d7c5115d60554183f1118b5705fc1754b8188dcc3b5b739318374d568b6eafc1e3c4266de5416709e7ce6056925b SHA512 032dc9cfa57af5af2eb84b2116d0537124b5efb87b7cf744ecace2ccf49e461d5be5f91df99d85e8a988520d144fe4ecf06a6e78f7fff997b78afa95355449ad
EBUILD icon-9.5.1-r1.ebuild 2507 BLAKE2B 5493470ee8d9a3bdad899e84d76f84b760e6bbcecc27e783247ffc386970948e3a097bb786e546f9c6473247f9707f50eb623cf270e6db2d401bea627d56967a SHA512 65aca9dfd666661578110c0056371a2b2647cadf11410f1f0af73669e2153a5d813da401b1f80ff97cccc7d507a265e80c8357ee86d86516b4de243d02f6f18e
EBUILD icon-9.5.1-r2.ebuild 2971 BLAKE2B 811c5a0670ec4b68d5ff63f26b16f5b180a08aee91e9afe4399ddc05d22ab962c91b14055a3e2c3ed82e62fc2bfde5da1a07eec04f0b1050a777f8115001219d SHA512 4cca14040a76bdcd15d8b3e200425d9e2ad0dffc9883054f1d0a628f62fb83786928f17eaff5f2eb64bdab8d82c559895471491cac57ae90e9089d902a6956be
EBUILD icon-9.5.20h.ebuild 3292 BLAKE2B 07c2221714a69ae1a35577bd195879f5203d03bbc8942ae777583153664d766100020a1a221f6a94f254fdff68f1383d828a078a20d9782e0c18064754c46a65 SHA512 c99f537832b4c172a15410202461f45ab1b94794bf7f9f65b52f3ab608691b193ec1ef5af91bc5df14998c840e6fc6ea0c19d2de351aa6ae822eadaa8331e5bb
-MISC metadata.xml 467 BLAKE2B b480285505dec662f62038d22a88323f01f21b100de7ee652f2e3d5f5f4cdf4345ad7d303f2713b1a2816157c46610c2f5287cb385c61998f68fd95d09bf9d5b SHA512 1a77000b72ae453ecb2bd4452e32ea917328a61bb882e107b96f013ddaa218e951743569e38e97210a341755bd7c891324123d96e56da9a5a7caa93ad4dbb93a
+EBUILD icon-9.5.20i.ebuild 3399 BLAKE2B 275f027efa50c2b5c04f068294b9e3af4f28505b11db82d3c245c67cd050e5edc44e2003413cb43d1437a434528342fd6fcf5d88404578b735d66f38f6ff866f SHA512 838293a4e49f19d30e46115aac6a567c4093db22ad589500a7797e305f23a874348392df23870a67111560ca9f5b2be5e74855bab941302d42ab07153bb523f1
+MISC metadata.xml 497 BLAKE2B 789a576ce23fa3a1e3ff1675d08268dff5ec7f4ee2c12ad6bb49f9d1533f2d7066aa42bea4b1719890d7f796378eaa492d15c0f8a1921ca0766c645765469585 SHA512 9ae10c0e4f75d79ca89325d6894f29b41f167c9c9d8eef56df9d525bff24ee5703afa4017868f2bc1196ee9185ad441bdd257c50cabf8d2d0ec8f63ad81f8cb3
diff --git a/dev-lang/icon/icon-9.5.20i.ebuild b/dev-lang/icon/icon-9.5.20i.ebuild
new file mode 100644
index 000000000000..ba49cb68f235
--- /dev/null
+++ b/dev-lang/icon/icon-9.5.20i.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="Very high level language"
+HOMEPAGE="http://www.cs.arizona.edu/icon/"
+
+SRC_URI="https://github.com/gtownsend/icon/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="public-domain HPND"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+IUSE="X"
+
+S="${WORKDIR}/icon-${PV}"
+
+RDEPEND="
+ X? ( x11-libs/libX11:= )"
+DEPEND="
+ ${RDEPEND}
+ X? (
+ x11-libs/libXpm
+ x11-libs/libXt
+ )"
+
+src_prepare() {
+ default
+ # Add CFLAGS and LDFLAGS to Makefiles as needed
+ sed -i -e 's/CFLAGS="$(CFLAGS)"/& LDFLAGS="$(LDFLAGS)"/g' ipl/cfuncs/Makefile || die
+ sed -i -e 's/^CFLAGS = \(.*\)/CFLAGS = $(CFLAGS) \1/g' ipl/packs/loadfunc/Makefile || die
+ sed -i -e 's/CFLAGS="$(CFLAGS)"/& LDFLAGS="$(LDFLAGS)"/g' ipl/packs/loadfunc/Makefile || die
+ sed -i -e 's/-o $LIBNAME $CFLAGS/& $LDFLAGS/g' ipl/cfuncs/mklib.sh || die
+ sed -i -e 's/$LIBNAME -fPIC/$LIBNAME -fPIC $LDFLAGS/g' ipl/cfuncs/mklib.sh || die
+ sed -i -e 's/$(RLINK)/& $(LDFLAGS)/g' src/runtime/Makefile || die
+
+ # executables in src/common are only used to prep the build
+ sed -i -e 's/$(CC) $(CFLAGS)/& $(LDFLAGS)/g' src/common/Makefile || die
+ # executables in src/rtt are only used to perform the build
+ sed -i -e 's/$(CC) $(CFLAGS)/& $(LDFLAGS)/g' src/rtt/Makefile || die
+
+ # do not prestrip files
+ find "src" -name 'Makefile' -exec sed -i -e '/strip/d' '{}' \; || die
+}
+
+src_configure() {
+ # select the right compile target. Note there are many platforms
+ # available
+ local mytarget;
+ if [[ ${CHOST} == *-darwin* ]]; then
+ mytarget="macintosh"
+ else
+ mytarget="linux"
+ fi
+
+ # Fails if more then one make job process.
+ # This is an upstream requirement.
+ emake -j1 $(usex X X-Configure Configure) name=${mytarget}
+
+ # sanitise the Makedefs file generated by 'make Configure'
+ sed -i \
+ -e 's:-L/usr/X11R6/lib64::g' \
+ -e 's:-L/usr/X11R6/lib::g' \
+ -e 's:-I/usr/X11R6/include::g' \
+ -e 's:-I/usr/X11R6/include::g' \
+ -e '/^CFLAGS/d' \
+ Makedefs || die "sed of Makedefs failed"
+
+ if use elibc_musl; then
+ append-flags "-D_MUSL"
+ fi
+ append-flags $(test-flags -fno-strict-aliasing -fwrapv)
+}
+
+src_compile() {
+ # Fails if more then one make job process.
+ # This is an upstream requirement.
+ emake -j1 CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
+}
+
+src_test() {
+ emake Samples
+ emake Test
+}
+
+src_install() {
+ # Needed for make Install
+ dodir /usr/$(get_libdir)
+
+ emake Install dest="${D}/usr/$(get_libdir)/icon"
+ dosym ../$(get_libdir)/icon/bin/icont /usr/bin/icont
+ dosym ../$(get_libdir)/icon/bin/iconx /usr/bin/iconx
+ dosym ../$(get_libdir)/icon/bin/icon /usr/bin/icon
+ if use X; then
+ dosym ../$(get_libdir)/icon/bin/vib /usr/bin/vib
+ fi
+
+ cd "${S}/man/man1" || die
+ doman "${PN}"t.1
+ doman "${PN}".1
+
+ cd "${S}/doc" || die
+ local DOCS=( *.txt ../README )
+
+ local HTML_DOCS=( *.{htm,gif,jpg,css} )
+ einstalldocs
+
+ # Clean up items from make Install that get installed elsewhere
+ rm -r "${ED}"/usr/$(get_libdir)/${PN}/man || die
+ rm -r "${ED}"/usr/$(get_libdir)/icon/{doc,README} || die
+
+ cd "${S}" || die
+
+ # Install Icon Programming Library files
+
+ # Remove files only needed for building the library before copying
+ rm -v ipl/{BuildBin,BuildExe,CheckAll,Makefile} || die
+
+ insinto /usr/$(get_libdir)/icon
+ doins -r ipl
+}
diff --git a/dev-lang/icon/metadata.xml b/dev-lang/icon/metadata.xml
index 3a8dc81cb0aa..3c41d2c6915b 100644
--- a/dev-lang/icon/metadata.xml
+++ b/dev-lang/icon/metadata.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
+ <maintainer type="person" proxied="yes">
<email>cwills@witznd.net</email>
<name>Cheyenne Wills</name>
</maintainer>
- <maintainer type="project">
+ <maintainer type="project" proxied="proxy">
<email>proxy-maint@gentoo.org</email>
<name>Gentoo Proxy Maintainers Project</name>
</maintainer>
diff --git a/dev-lang/janet/Manifest b/dev-lang/janet/Manifest
index d9155f4fb42a..ad9ce04a40ac 100644
--- a/dev-lang/janet/Manifest
+++ b/dev-lang/janet/Manifest
@@ -2,4 +2,4 @@ DIST janet-1.12.2.tar.gz 558788 BLAKE2B 0cdbc33d968b0b589cfc0ccd6dd5ffffe23932da
DIST janet-1.13.1.tar.gz 584998 BLAKE2B f1bfd9e62dde786127a1307d38f48fc7e75b9fb09f009f9d01eeefa593b67c2469e213fd366fac7c52e0372e61b1a9afdb558e8a1be1ab2f4f538b5fb39075f3 SHA512 8022ecbaf7680855611202a3c17b8e5f6dc61a9302508c9de5312dbd9e80d40c24786bb5e8ae653ab5a7b00191a2d7c44cc3e305d31245e3e8c53be0e1c80372
EBUILD janet-1.12.2.ebuild 1748 BLAKE2B a03cc9399f248d6050bf59f6ce251fbce076a9276da10415cc13c58cfc07e44d3ac6772a7c86394ed83e4b78063742d2f42d7c52eeb47227b8c9d7ffd657cf56 SHA512 ddec46f26a72ddb59c9bc5f46db601625afb1764ebeb5826221ab4d89634538f6d840e622d292bd8ece3a4577c31b5a8a7746fd88f8e25baeb8e2b1df3f6c9f8
EBUILD janet-1.13.1.ebuild 1748 BLAKE2B d33aedc446e1692e0c39aace488070501e3cff1efff6545fd0d43710efa16d7a5a5cc52d0fbc360756b04d78dd8f015c12526cab986bad05bd75de5326fae923 SHA512 9d41ab1921792cfc549d1bb8b9bebe3b8080de6ade08ca189ea8422bfa3a7106e722374b31d240caee2d00656b85dca99bf69608218ee20e2c2677b43083b09d
-MISC metadata.xml 960 BLAKE2B fe836e1f5b7313091bf2c4341a30f7c395056fd4c63a2477a83a55daecede052eea148dc44cb253e8bead356e7b501b7698be4c787f05fdabc08638b2db7163c SHA512 a54e679498bc1239c6eda2302213e220a69eb25e5be02d3c945c89ed3943849adb7043ea6794aa5ad6e3a53026f7b06c16e7ba2ea35d5022d1cc97a9f561a4ba
+MISC metadata.xml 990 BLAKE2B 7e8a261e9007ef46da4944eb81ff4ea35cde6c9c510e63f5407215974302fa0410d9c38ce1356fb7ce1648c81e0c42cb16dd74b46c2d9f277c7bf1044c5a44e3 SHA512 35291cbd14a89e3ce9b6ed31eee97253dcc7e82f6a6310f669449518778eb137a1240d04a55e5f30d5de479c50ca7eec6e0bee5e64d035e8e0705746de6cfe3d
diff --git a/dev-lang/janet/metadata.xml b/dev-lang/janet/metadata.xml
index 9baceda37874..87a61a029b50 100644
--- a/dev-lang/janet/metadata.xml
+++ b/dev-lang/janet/metadata.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="person">
+<maintainer type="person" proxied="yes">
<name>Oz Tiram</name>
<email>oz.tiram@gmail.com</email>
</maintainer>
-<maintainer type="project">
+<maintainer type="project" proxied="proxy">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
diff --git a/dev-lang/jimtcl/Manifest b/dev-lang/jimtcl/Manifest
index 438fba39c40f..4d5210b6b2af 100644
--- a/dev-lang/jimtcl/Manifest
+++ b/dev-lang/jimtcl/Manifest
@@ -1,7 +1,4 @@
-AUX jimtcl-0.75-bootstrap.patch 585 BLAKE2B 7d1cce053ae41100764bdc9a7beca121b002774bcd2b5eb5f0e0fa318aa390cb852c62430ff30171695e44c274f2e4200a6b189ed3d2a07aef79c7cac7d9d83e SHA512 fe82d393a1a46e3db4567287717af4c1813205945459702ebc3a9423395994a9fa2a337a5569241f4aada4176ce8abd65f88081112a1e2def9a4b5eb237cb647
AUX jimtcl-0.78-no-bootstrap.patch 1370 BLAKE2B 1f584727970d7103a183b9099818bafb9a94aa7634463bb47387b4aa0afa330d477a15c50c19f383575251677d42a27d5cec1ede116bbf8d709c32378384eb6a SHA512 827bb679b322da790f68f5c6c3a469362edbb6e0128a439a6f9c98b3877e2d32c67c9826e0cd20762e6f234df332d05b9ccc309bbb4367e3b8d6de3d5d7afa3d
-DIST jimtcl-0.76.zip 2326715 BLAKE2B 50ea032cf46d2edeeecde1dc3b4deffcbd09b5dd3a6880963608b3f20616bf162fafc4ec2869bfe5de90231c4c9a29fb04710bd299cc5e8728ff20a86e46f32d SHA512 50763ea897fb5393083749cdd9e57a3f3d2d6dbebc40ee6371b1b86ebfc2f515e9775cd2acd6627f0f81b54bd72cd8c74be5aa9d0dbefc7c16372887e07f6ea4
DIST jimtcl-0.78.tar.gz 3073533 BLAKE2B f0cdaf2807c7dd0e7c64e37cbc8dd019d8460e6a0320c239b0d01549aede8c86a89d84d7a3c5200c8d8cea428dbd1038d57dc66f5b580bdea8fe39710f967bbb SHA512 2a2cff12d7fdc4cf36734e41727eef08f6d74fb13d70bb0a3e01839e66859e57dd927ddedc161a6a7928881d640bd4e20a1bb313ed24aa2bb7bcb00eaf64fbf6
-EBUILD jimtcl-0.76.ebuild 1499 BLAKE2B 84a6faae307b4e6e67e48e5424b7826cf179d9dd3cec74d452559d7e65e6e924f6ac3aa901e5c0e94c4e30cf790f8d07ed8bfdcf9ff9a9ecd25cac40cd45ee63 SHA512 5ef245dc133b79cbc9664c6a7ef63f1a24ad295c2f784d3221d33634b456840d86cd49886d11d8cf67e872591b6bd475c7fca8b2213d22a7e50f9b6c433f73c2
EBUILD jimtcl-0.78-r2.ebuild 1301 BLAKE2B 2a4303f35d1889620f9f85876c1c269815843dec92a34a481edc2f2ed5530b98389dee28091615c2705b4f9155ad2f1a5013c38755813c3ee229ad529b343666 SHA512 01ddc863f39ceb5825142bb58b31a37c1ec53beada967460df3d77bd231e29587a30455c28b73d3098bea3959da95b5990369440521bbfae95654464abea0557
MISC metadata.xml 251 BLAKE2B f23df3a2dcf096cee2f8d5cf2ef4fcc6c741ae312d2193f1d449aac7cd19126aa8197d4f3e2bd7828abf1aeeabf60f4a3ef8cc05b8152e6f6ce55b4897de5eb0 SHA512 0186a63dbf97f1800694d0bcb67528a7da92d30412398d5916452cc45c17d823f84ba7ffeae533476b7a48e7da19dabd0e431155ab66c19e68b113c910a4c03c
diff --git a/dev-lang/jimtcl/files/jimtcl-0.75-bootstrap.patch b/dev-lang/jimtcl/files/jimtcl-0.75-bootstrap.patch
deleted file mode 100644
index 60850e0b6d0b..000000000000
--- a/dev-lang/jimtcl/files/jimtcl-0.75-bootstrap.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-always do a bootstrap w/local jimsh0 to avoid requiring tcl or jimtcl
-to be installed first. the bootstrap prog is small too.
-
---- a/autosetup/find-tclsh
-+++ b/autosetup/find-tclsh
-@@ -4,9 +4,6 @@
- d=`dirname "$0"`
- { "$d/jimsh0" "$d/test-tclsh"; } 2>/dev/null && exit 0
- PATH="$PATH:$d"; export PATH
--for tclsh in jimsh tclsh tclsh8.5 tclsh8.6; do
-- { $tclsh "$d/test-tclsh"; } 2>/dev/null && exit 0
--done
- echo 1>&2 "No installed jimsh or tclsh, building local bootstrap jimsh0"
- for cc in ${CC_FOR_BUILD:-cc} gcc; do
- { $cc -o "$d/jimsh0" "$d/jimsh0.c"; } 2>/dev/null || continue
diff --git a/dev-lang/jimtcl/jimtcl-0.76.ebuild b/dev-lang/jimtcl/jimtcl-0.76.ebuild
deleted file mode 100644
index 64ca59df29e6..000000000000
--- a/dev-lang/jimtcl/jimtcl-0.76.ebuild
+++ /dev/null
@@ -1,69 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-inherit eutils
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="http://repo.or.cz/r/jimtcl.git"
- inherit git-r3
-else
- inherit vcs-snapshot
- SRC_URI="https://github.com/msteveb/jimtcl/zipball/${PV} -> ${P}.zip"
- KEYWORDS="amd64 arm ~arm64 ~m68k ~mips ~s390 x86"
-fi
-
-DESCRIPTION="Small footprint implementation of Tcl programming language"
-HOMEPAGE="http://jim.tcl.tk/"
-
-LICENSE="LGPL-2"
-SLOT="0"
-IUSE="doc static-libs"
-
-RDEPEND=""
-DEPEND="doc? ( app-text/asciidoc )
- app-arch/unzip"
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git-2_src_unpack
- else
- default
- cd "${WORKDIR}"/msteveb-jimtcl-* || die
- S=${PWD}
- fi
-}
-
-src_prepare() {
- epatch "${FILESDIR}"/${PN}-0.75-bootstrap.patch
-}
-
-src_configure() {
- CCACHE=None econf --with-jim-shared
- if use static-libs ; then
- # The build does not support doing both simultaneously.
- mkdir static-libs || die
- cd static-libs || die
- CCACHE=None ECONF_SOURCE=${S} econf
- fi
-}
-
-src_compile() {
- # Must build static-libs first.
- use static-libs && emake -C static-libs libjim.a
- emake all
- use doc && emake docs
-}
-
-src_install() {
- dobin jimsh
- use static-libs && dolib.a static-libs/libjim.a
- ln -sf libjim.so.* libjim.so || die
- dolib.so libjim.so*
- insinto /usr/include
- doins jim.h jimautoconf.h jim-subcmd.h jim-signal.h \
- jim-win32compat.h jim-eventloop.h jim-config.h
- dodoc AUTHORS README TODO
- use doc && dohtml Tcl.html
-}
diff --git a/dev-lang/jsonnet/Manifest b/dev-lang/jsonnet/Manifest
index 246b0c96a94e..955a56833998 100644
--- a/dev-lang/jsonnet/Manifest
+++ b/dev-lang/jsonnet/Manifest
@@ -9,4 +9,4 @@ EBUILD jsonnet-0.15.0.ebuild 1351 BLAKE2B 70adc1ac64534dcf8d7ed647d81942b5918ab6
EBUILD jsonnet-0.16.0-r2.ebuild 1601 BLAKE2B 2de253f42358c8258f7f38b53b6fb8f6ed9127b5407375b8f69306701c884efa3ce280713411eaba899a972441eb92ed404ca02575a611dfd997dda99adb8ba1 SHA512 264866ca79d21d8f5870db27f14993d8d86fec27b44190ce69acab8d597417004edfd4a018b9100a289ad49e0aac7d670c568196b604d0e4107220bfd91a1012
EBUILD jsonnet-0.16.0.ebuild 1375 BLAKE2B 4990a4e9754dd0fbc96ce2d6b557b4f9d2325f705ead68db7c768a6942c77a2d235f2a7db961c41263c629a90c4d56633b07d66f26f610c1252a8613ebe9bbdc SHA512 34012d168676b6ad7b519c580085166e7c290e760bb3362003fffb509917d3496d4424f1beb067350d0da6f3a4197aeb87bcfcf84008c6937db63704249e2e16
EBUILD jsonnet-0.17.0-r1.ebuild 1752 BLAKE2B 93381b8c8546fefefdda73e2940a95bcd8b7c5de6ea8f09b53c6012027f4a4c01903af0f27a48f086dcfc471ec848905c572529332d07e2a7ff43dd5c57daf60 SHA512 befcf6b7ec73933ca127413ecea98169f55aec5346bfa94d0bfce4c1303f582ed3625467f744e791da7521f085705f6636c95cfffd3f4de17a0f2d08e7174402
-MISC metadata.xml 621 BLAKE2B cf9e06f9981b454578c1769425dc15a7a271063b2a95c296db1326c4b4ce0f93ff96a2df42143d9d6fb8e1e196039a26119c35a4881c7d6b2241b58b01cdc948 SHA512 ea583ea6df7d0994e13bf01fff4b99b65ac288e734d41f52bffa4ae8a83d27196622074a6a29bfbbf190125a9cf29e6602f5b4a55ccec76c6324f3ac0b1f50ef
+MISC metadata.xml 635 BLAKE2B 41d32196b19d3eef61d882b18bab0c192fd8a77b1745feab25789aafb15921d8f6fdc6046fac908330152df87cdf355e0b0924513293ef7dd6e2c678c5f84c5b SHA512 908d1303309420992e4334e77013534d5cb63168d76983f82369c3c2f98d811aed1f2981a2e64361742d1283a74a7f7c23f2b9e7db459317b0be64ceae7da383
diff --git a/dev-lang/jsonnet/metadata.xml b/dev-lang/jsonnet/metadata.xml
index 6a3ebc349696..484bd8095c53 100644
--- a/dev-lang/jsonnet/metadata.xml
+++ b/dev-lang/jsonnet/metadata.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
+ <maintainer type="person" proxied="yes">
<email>coles.david@gmail.com</email>
<name>David Coles</name>
</maintainer>
diff --git a/dev-lang/julia-bin/Manifest b/dev-lang/julia-bin/Manifest
index 58ce2802de2c..16a72ea81581 100644
--- a/dev-lang/julia-bin/Manifest
+++ b/dev-lang/julia-bin/Manifest
@@ -10,4 +10,4 @@ DIST julia-1.5.3-linux-x86_64.tar.gz 105260711 BLAKE2B b132fbe090ca4a4cba518efcf
DIST julia-1.5.3-musl-x86_64.tar.gz 101802400 BLAKE2B da69c1b4ff5bde8692c3fc9ed3d60fd655a32121a0e11a4d1f00b5e4494cc4bcdb0e323a2644cca3a291fa7f7604925d387204df90cc19fee89048c4ba83b2d5 SHA512 e98c74ce2a49532a491a46efe81a2edc85103f9ec04347fe6b052cffdaecadcecb48a02b15ad71853fff6ebb2281498000e89d44732f36d31b6252a1a88bd0a6
EBUILD julia-bin-1.5.2.ebuild 1238 BLAKE2B 1f20fe4f0fabe3953a53fc3f810992bc545dd4d56d92a49628486a3d65fa2e9fb671619560d6a0409e398d441249df0c74448eb6fbfd70c49a955292c70a8016 SHA512 2174cc671417ff92eeb245a1bce7a722f8b76b37dbee11f72b1503e494b1c9a15eb0936e0bb9b4437546be64d4a2377573f76bd364977293f422261c98b8a177
EBUILD julia-bin-1.5.3.ebuild 1238 BLAKE2B 1f20fe4f0fabe3953a53fc3f810992bc545dd4d56d92a49628486a3d65fa2e9fb671619560d6a0409e398d441249df0c74448eb6fbfd70c49a955292c70a8016 SHA512 2174cc671417ff92eeb245a1bce7a722f8b76b37dbee11f72b1503e494b1c9a15eb0936e0bb9b4437546be64d4a2377573f76bd364977293f422261c98b8a177
-MISC metadata.xml 1269 BLAKE2B c7ca56d7660c41df452725bae9526d587d79754a3e7b0cb0584bacc588b63523e4fbae113b26f48290d874bc49fac1eb2ecfc97946e516212cc511346f876e26 SHA512 8e0325b241bc76162b843b64e2fdac98873cba21e8e39d2ddd439647466d94e163fe315eeeae78435398db17635d3447ec9c713bf53d894487ac6acb67c5afdf
+MISC metadata.xml 1299 BLAKE2B 58046d07189fcdada72dc58487d1316cfe7d7d189170ddb59f3ee88edd0edf7f043d40f2420d84411e928f57c177d6d98f0ce5862ef7bdadbd8aaa5194f75601 SHA512 b7e1e0cdbc2ace51b3b78432b4edf553d5e9dce4cbe9ed8a0d9d77a01d8eee33842f5f5b70deadc9073db09cca8f47b00db11ff25366e055f6d93fe49ba1f83f
diff --git a/dev-lang/julia-bin/metadata.xml b/dev-lang/julia-bin/metadata.xml
index 33f454aec98f..8322da953acb 100644
--- a/dev-lang/julia-bin/metadata.xml
+++ b/dev-lang/julia-bin/metadata.xml
@@ -5,11 +5,11 @@
<email>tamiko@gentoo.org</email>
<name>Matthias Maier</name>
</maintainer>
- <maintainer type="person">
+ <maintainer type="person" proxied="yes">
<email>jeffrey@icurse.nl</email>
<name>Jeffrey Lin</name>
</maintainer>
- <maintainer type="project">
+ <maintainer type="project" proxied="proxy">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
diff --git a/dev-lang/jwasm/Manifest b/dev-lang/jwasm/Manifest
index 0ed9712d4eb4..9bb85837e91c 100644
--- a/dev-lang/jwasm/Manifest
+++ b/dev-lang/jwasm/Manifest
@@ -1,4 +1,4 @@
AUX jwasm-2.11-types-test.patch 1761 BLAKE2B b719bb79504e708925bfa407e72df7a37044b834bc3118fa9baf1a0cb478a0ab852872147148462188324954ef958af30cbcbca28fc992660276a15100ecb1b6 SHA512 0a4f3e613c8e724939ce9e23f8f4ce10ca89bf6c1579929719b3ccad62ac66cceecc3f8799c20c2875b7d4dcc7390bf0e4ca64aa08aab0b39bd7a4ab381b150b
DIST jwasm-2.13.tar.gz 578365 BLAKE2B 8c6fbe3e6cb56c0fe8135c30c629534d2b6e2a2ed534249834e0e2674bf6635cb15ab94d4fa05c5378cb0db8569ddc3ba49d2d7c9615b7ddb769cba1a2d5b715 SHA512 03f80f4a74b39c6093f5cd5334364f7458836a52ad01279c95683e7053cb4211c40235e16f6f2ee40bc7316dcd8a4fbcb57bf3606d31249d96d01933a8aa0563
EBUILD jwasm-2.13.ebuild 730 BLAKE2B c54d0438b6fcb0d339ae7b8d10a9948b2099c8db3b5f3e68a521d75979d3b6b51eab780530eb67d6e84af6ebe6e9b9c76464cebf1fb7a0d7e6a2d8dfd8c91464 SHA512 7269d7e817d3348b794878bc57fc729d14142c97adc0022adf1fd82eb3447a037127e0d44ae90f1baaa44a4966053f1b41e3043e8e009aa61594a4876df59807
-MISC metadata.xml 326 BLAKE2B 6824de006351db2d3fcd9da82e45fe8c81c083209af168ef5a4cb838e44cdf951377ddebd539b198b9fdb082b4ae384dc2d6cf0357ed86e234c7226f2234af27 SHA512 ff2d01893c3ac2522da224e1526c83f9b0c081e21d735064da6b71163e8f3b8e6c3ac2e27b083b03b30c54af433c4cad29efea7984367c56d077c804675872ba
+MISC metadata.xml 326 BLAKE2B 74fb3400512995784ba11f7f23a7730233a6c6698ad0c4c620f29a1f0d2f4c249e19e1e61664ab88f65e7f617cbe320780248527acd911daf69b4717140d454e SHA512 c319281a95b48cba52da17bdbf084fda50f0da5cc9c4fe50f135a8d8cadad4f4ba37755ac781335b14257b72f6ada693308ca05e6e8740285a4f1cea308b67a2
diff --git a/dev-lang/jwasm/metadata.xml b/dev-lang/jwasm/metadata.xml
index be7d54b1219a..d1d88c49d6fc 100644
--- a/dev-lang/jwasm/metadata.xml
+++ b/dev-lang/jwasm/metadata.xml
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
diff --git a/dev-lang/metadata.xml b/dev-lang/metadata.xml
index e19c9e95cee0..ab776f0fbdc5 100644
--- a/dev-lang/metadata.xml
+++ b/dev-lang/metadata.xml
@@ -37,4 +37,3 @@
związane z nimi narzędzia.
</longdescription>
</catmetadata>
-
diff --git a/dev-lang/mlton/Manifest b/dev-lang/mlton/Manifest
index 08c659755b81..2ea39c405493 100644
--- a/dev-lang/mlton/Manifest
+++ b/dev-lang/mlton/Manifest
@@ -1,13 +1,6 @@
-AUX mlton-20070826-no-execmem.patch 1236 BLAKE2B 1d708bba547f8ea3076bdd494a5e45f8352430b9a852c45296258b6371fd2bee07a7d2d9cb224bc426e8c364b07d8d37b92d98d6fc186b0217b0650ac961e128 SHA512 d6f323bc181656fbdfdf25e0472e7e13e93b565f3ba64ea9cc81fbcb6c935580c1811f783035a5b1c45be082a38f157610666276aad9fb36d3fdb009fe7ce1c9
-AUX mlton-20130715-no-PIE.patch 2399 BLAKE2B a0af01c4eea65a38d788744f593303d8732a754de19230ce13ce14ce6368058840e9076934311385bed7951d94f1daed878847a57e70ac9330f4af575f35c1bf SHA512 ef0d675acfcbe05c1f810da2b9d684b4412a0f283e6025930c13d80912036ffc650972664f5a4fdd955e4c78c3564c751c1ba9bf279f738eca96801eeb57f0b2
-AUX mlton-20130715-split-make-for-pax-mark.patch 556 BLAKE2B a98f9a6b01edfc19723ef20eaeb0e9046162e179f3c63c69f59d07a39e0b723c4b429c3f10adb6099f912340431e8ea7b06a63d397cb8feff46d3d7d256a0e22 SHA512 9d334c930abe38f222bdd16c7dbdb0b1e0a70955aa8832fd441c9443c53f9d66c3ec49c06f59de501c014a66c6265a6df64269e0534c0ffdae0115718febb694
AUX mlton-20180207-bootstrap.patch 980 BLAKE2B 4128d0d3aae1e30c6b234e9cc3e0d91ee6de7338e2f8d4e8da7bb5b63ea62138db3148f8ec9ab16966983587dac7c9040a52aea80d21409d5d8fdbb020d13f7f SHA512 7657185d7f4c4e9bff4fd44f3991cd3d115ea0e1e4f6c3b702ecba74a3b2fcb7c1c0c47a814dc26bd3af7a523a92aac50df4d4ddb873eba938c2689ac6b5cf0b
AUX mlton-20180207-paxmark.patch 728 BLAKE2B 05bb27260dc8007a815ce74276a537a48127b4c336472afca571c39b0e29368be5be79ae03c21940dde6bd37f79613817adc8f22d986d570fab4cb184051b141 SHA512 78526ab383f481663cc892938f74ad1783aa7a2b1fcfd7032a67c4489daa5d141877806fb16232b8f0843e7b4e001d3f76a9a171a8da6413cd921688f493f7f9
-DIST mlton-20130715-1.amd64-linux.tgz 19512324 BLAKE2B 972688dcf6fc6ec17146e2597e6f5dab3b5df4e894697a98c68de61cf4728bf7e2e3ef1cee96befae90f9b555bed0b09cef846912225f8b770d20782fa833212 SHA512 ac41cf8b2afbba80ed25908b1842348eac1507b2aada103648171db1482358c4176b01d9266dfee053b20fc224653ec58ee9d3265672c02fa3774b7562a319bf
-DIST mlton-20130715-1.x86-linux.tgz 18065793 BLAKE2B d05ca4f46fb35b0b819e2678f282943fc9cd8f701bdf2a20da68b285db4618401b4138a227352e8aacef9f604528c7fafc0973631115954cfd91e01e9dd01a9d SHA512 13a996952df27420f05f8290920055231156c8982c1cf3c31259d73e0c534258e2aad91596e51809719ffb0b74652aa052d296000f2ab99462714d4ef9a41859
-DIST mlton-20130715.src.tgz 25606142 BLAKE2B 3fa3e8cf4991faef98e23ae4cbe9e0db5cae2e46ce27be57b784a81b576eeed17a179018e8b70d1264cb9595a3467900f034a2b4a7c114d1bac74025450741e1 SHA512 db273de47dc0059e830332b559918567f5153a0518e067ba71927e3705157f1984d6f6202201cef25aaef29d1a71a637e9a1cb30951e94dbfae4ab1a5e5d40d1
DIST mlton-20180207-1.amd64-linux.tgz 18772644 BLAKE2B 7fe2d9db7edfb2d3e301be88e90b7dffe1441ff315ddac1464ef42fb436be1a9dc4e2c03fdb93880779360aed04cb7662a1a5a733f2d4158082d228f718d8b93 SHA512 74ab847ff567cde365a113f8819bae69cc18df20c441a6c6666b600980d2687faf143311f42be21a261b2493dc5c45fbecb4737c599cf767c3680afec06c2e0c
DIST mlton-20180207.src.tgz 25003695 BLAKE2B 8cddfe83c76e05fda446917ddc85035b3d74534fe4bc597a839cd13cb59a15538f40a3f68bb8f7136f9cf8cb27a582e88ca0d14b8f7a4582a202b3bd075f3c9a SHA512 3599159950e857d257abce92abf5c548dd9c0b0cdc4ba0d7cdf9badb5d997f73386cd1ff79f563221b394dd831cb344e287927f90683b0715678edb3ca0ae15a
-EBUILD mlton-20130715.ebuild 3920 BLAKE2B 327347ad498c3b70d8d108c9ee2decf54fa3812bbec0bbc8d7eb0802edcb52b0881e8e538763334a853296e63fdc6b70c3adb23616f6b6a1a7bd95bfe789dfb3 SHA512 f5d40634f59e41015970599b3c6bf8812acb92aa21411a0a692cdef9bb6eb0de01c0bd079060c7b86a5922d9fbb4335f4ff132741b13eeba5c3aa71a9f7475c4
-EBUILD mlton-20180207.ebuild 7017 BLAKE2B 53c358f730da457736d81529dbc905fbe94823e38458ea10c11cc634f60c9d317b20a9dc7529f7acc0068631a4638a8f24c6b5df1085b5b985fe6d3c21c618b4 SHA512 d63023ea41b2c5cf97bd5b19698221349163e3083f898a67739b691df19ebed7db63214f321d8de436b027f5fb35ff837589530885b6710032a074dd54023f23
+EBUILD mlton-20180207.ebuild 7013 BLAKE2B f5619b234c8ab703370cf446db52fa05adf9a32c4a8cce94ac906029e8bf2353f73bf0d88e287343562a45e7f36a6ab7d888e43d46af6fbc9122edc10b53f6a0 SHA512 f4548995a8860ca5b05c4b9937f311c7d8db1e5951c057a9b77cc1799b50c296cae9adf0f0e9894029af14848c71cb49bcf475032c0975f2631a0d34db37d0c1
MISC metadata.xml 672 BLAKE2B 1fd22f7212a973039a94dc14bc3f2853a7b56968d3b4a106605018ec53b45926b11cd8ee6b9ea187ea863ad5a43f8a094dc9baced81cdc57927d213ee587af6e SHA512 fa72f182a62140658bdbcc67268fd42ffe979d8370473af755fd691a156b3027002e3a80f341a4d9c2a8840d99e5140b8d4f6efb604c99bed2d6042ac811cfcf
diff --git a/dev-lang/mlton/files/mlton-20070826-no-execmem.patch b/dev-lang/mlton/files/mlton-20070826-no-execmem.patch
deleted file mode 100644
index f4d4bdf540bf..000000000000
--- a/dev-lang/mlton/files/mlton-20070826-no-execmem.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 544930de3b1c754fa8803169902a63bce7cc02ba Mon Sep 17 00:00:00 2001
-From: Adam Goode <adam@spicenitz.org>
-Date: Wed, 6 Feb 2008 20:17:51 -0500
-Subject: [PATCH] Remove PROT_EXEC from mprotect
-
-It looks like mprotect is used here as part of signal handling.
-There doesn't seems to be a reason to have the area of memory
-marked as executable. In fact, on Fedora 9, this causes MLton
-compiled binaries (including MLton itself) to fail.
----
- runtime/platform/mmap-protect.c | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/runtime/platform/mmap-protect.c b/runtime/platform/mmap-protect.c
-index f0dea49..df42215 100644
---- a/runtime/platform/mmap-protect.c
-+++ b/runtime/platform/mmap-protect.c
-@@ -7,7 +7,7 @@ void *GC_mmapAnon_safe_protect (void *start, size_t length,
- if (mprotect (low, dead_low, PROT_NONE))
- diee ("mprotect failed");
- result = (void*)((pointer)low + dead_low);
-- if (mprotect (result, length, PROT_READ | PROT_WRITE | PROT_EXEC))
-+ if (mprotect (result, length, PROT_READ | PROT_WRITE))
- diee ("mprotect failed");
- high = (void*)((pointer)result + length);
- if (mprotect (high, dead_high, PROT_NONE))
---
-1.5.4
-
diff --git a/dev-lang/mlton/files/mlton-20130715-no-PIE.patch b/dev-lang/mlton/files/mlton-20130715-no-PIE.patch
deleted file mode 100644
index a059b1598bec..000000000000
--- a/dev-lang/mlton/files/mlton-20130715-no-PIE.patch
+++ /dev/null
@@ -1,66 +0,0 @@
---- mlton-20130715-orig/bin/upgrade-basis 2013-07-16 05:59:09.000000000 +1000
-+++ mlton-20130715/bin/upgrade-basis 2013-12-17 18:17:24.165889500 +1100
-@@ -28,7 +28,7 @@
- tmp="$$.sml"
-
- echo "val () = print \"I work\"" >"$tmp"
--if ! mlton "$tmp" 1>&2; then
-+if ! mlton -link-opt -fno-PIE "$tmp" 1>&2; then
- die "Error: cannot upgrade basis because the compiler doesn't work"
- fi
-
---- mlton-20130715-orig/mlton/Makefile 2013-07-16 05:59:09.000000000 +1000
-+++ mlton-20130715/mlton/Makefile 2013-12-17 23:35:06.137421195 +1100
-@@ -106,7 +106,7 @@
- rm -f control/version.sml
- $(MAKE) control/version.sml
- @echo 'Compiling mlton (takes a while)'
-- mlton $(FLAGS) $(FILE)
-+ mlton $(FLAGS) -link-opt -fno-PIE $(FILE)
-
- .PHONY: def-use
- def-use: mlton.def-use
---- mlton-20130715-orig/mllex/Makefile 2013-07-16 05:59:09.000000000 +1000
-+++ mlton-20130715/mllex/Makefile 2013-12-18 07:03:29.592171611 +1100
-@@ -21,7 +21,7 @@
-
- $(NAME): $(NAME).mlb $(shell PATH="$(BIN):$$PATH" && "$(MLTON)" -stop f $(NAME).mlb)
- @echo 'Compiling $(NAME)'
-- "$(MLTON)" $(FLAGS) $(NAME).mlb
-+ "$(MLTON)" $(FLAGS) -link-opt -fno-PIE $(NAME).mlb
-
- html/index.html: $(TEX_FILES)
- mkdir -p html
---- mlton-20130715-orig/mlnlffigen/Makefile 2013-07-16 05:59:09.000000000 +1000
-+++ mlton-20130715/mlnlffigen/Makefile 2013-12-18 11:55:33.590660407 +1100
-@@ -22,7 +22,7 @@
-
- $(NAME): $(NAME).mlb $(shell PATH="$(BIN):$$PATH" && "$(MLTON)" -stop f $(NAME).mlb)
- @echo 'Compiling $(NAME)'
-- $(MLTON) $(FLAGS) $(NAME).mlb
-+ $(MLTON) $(FLAGS) -link-opt -fno-PIE $(NAME).mlb
-
- .PHONY: clean
- clean:
---- mlton-20130715-orig/mlprof/Makefile 2013-07-16 05:59:09.000000000 +1000
-+++ mlton-20130715/mlprof/Makefile 2013-12-20 14:02:50.292677796 +1100
-@@ -21,7 +21,7 @@
-
- $(NAME): $(NAME).mlb $(shell PATH="$(BIN):$$PATH" && "$(MLTON)" -stop f $(NAME).mlb)
- @echo 'Compiling $(NAME)'
-- $(MLTON) $(FLAGS) $(NAME).mlb
-+ $(MLTON) $(FLAGS) -link-opt -fno-PIE $(NAME).mlb
-
- .PHONY: clean
- clean:
---- mlton-20130715-orig/mlyacc/Makefile 2013-07-16 05:59:09.000000000 +1000
-+++ mlton-20130715/mlyacc/Makefile 2013-12-20 15:01:26.567775876 +1100
-@@ -41,7 +41,7 @@
-
- $(NAME): $(NAME).mlb $(shell PATH="$(BIN):$$PATH" && "$(MLTON)" -stop f $(NAME).mlb)
- @echo 'Compiling $(NAME)'
-- "$(MLTON)" $(FLAGS) $(NAME).mlb
-+ "$(MLTON)" $(FLAGS) -link-opt -fno-PIE $(NAME).mlb
-
- src/yacc.lex.sml: src/yacc.lex
- rm -f src/yacc.lex.sml && \
diff --git a/dev-lang/mlton/files/mlton-20130715-split-make-for-pax-mark.patch b/dev-lang/mlton/files/mlton-20130715-split-make-for-pax-mark.patch
deleted file mode 100644
index 3286d44e3522..000000000000
--- a/dev-lang/mlton/files/mlton-20130715-split-make-for-pax-mark.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- mlton-20130715-orig/Makefile 2013-07-16 05:59:09.000000000 +1000
-+++ mlton-20130715/Makefile 2013-12-27 13:29:35.259563131 +1100
-@@ -58,7 +58,7 @@
-
- .PHONY: all-no-docs
- all-no-docs:
-- $(MAKE) dirs runtime compiler basis-no-check script mlbpathmap constants libraries tools
-+ $(MAKE) basis-no-check script mlbpathmap constants libraries tools
- # Remove $(AOUT) so that the $(MAKE) compiler below will remake MLton.
- # We also want to re-run the just-built tools (mllex and mlyacc)
- # because they may be better than those that were used for the first
diff --git a/dev-lang/mlton/mlton-20130715.ebuild b/dev-lang/mlton/mlton-20130715.ebuild
deleted file mode 100644
index 1e3533a37670..000000000000
--- a/dev-lang/mlton/mlton-20130715.ebuild
+++ /dev/null
@@ -1,119 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit check-reqs eutils pax-utils
-
-DESCRIPTION="Standard ML optimizing compiler and libraries"
-BASE_URI="mirror://sourceforge/${PN}"
-SRC_URI="!binary? ( ${BASE_URI}/${P}.src.tgz )
- binary? ( amd64? ( ${BASE_URI}/${P}-1.amd64-linux.tgz )
- x86? ( ${BASE_URI}/${P}-1.x86-linux.tgz ) )"
-
-HOMEPAGE="http://www.mlton.org"
-
-LICENSE="HPND MIT"
-SLOT="0/${PV}"
-# there is support for ppc64 and ia64, but no
-# binaries are provided and there is no native
-# code generation for these platforms
-KEYWORDS="-* ~amd64 ~x86"
-IUSE="binary doc"
-
-DEPEND="dev-libs/gmp:*
- doc? ( virtual/latex-base )"
-RDEPEND="dev-libs/gmp:*"
-
-QA_PRESTRIPPED="binary? (
- usr/bin/mlnlffigen
- usr/bin/mllex
- usr/bin/mlprof
- usr/bin/mlyacc
- usr/lib/mlton/mlton-compile
-)"
-
-# The resident set size of mlton-compile is 10GB on amd64
-CHECKREQS_MEMORY="4G"
-
-pkg_pretend() {
- if use !binary; then
- check-reqs_pkg_pretend
- fi
-}
-
-src_unpack() {
- if use !binary; then
- unpack ${A}
- else
- mkdir -p "${S}" || die "Could not create ${S} directory"
- pushd "${S}" || die "Could not cd to ${S}"
- unpack ${A}
- popd
- fi
-}
-
-src_prepare() {
- if use !binary; then
- # The patch removing executable permissions from mmap'd memory regions is not upstreamed:
- # http://pkgs.fedoraproject.org/cgit/mlton.git/tree/mlton-20070826-no-execmem.patch
- epatch "${FILESDIR}/${PN}-20070826-no-execmem.patch"
- # PIE in hardened requires executables to be linked with -fPIC. mlton by default tries
- # to link executables against the non PIC objects in libmlton.a. We may be bootstrapping
- # with an old mlton install, if we tried to patch it (to link with libmlton-pic.a) we would
- # need a patched binary.
- # http://mlton.org/MLtonWorld says Executables that save and load worlds are incompatible
- # with address space layout randomization (ASLR) of the executable.
- epatch "${FILESDIR}/${PN}-20130715-no-PIE.patch"
- # Remove dirs runtime compiler from all-no-docs to avoid repeating these steps.
- # As we need to pax-mark the mlton-compiler executable.
- epatch "${FILESDIR}/${PN}-20130715-split-make-for-pax-mark.patch"
- fi
-}
-
-src_compile() {
- if use !binary; then
- has_version dev-lang/mlton || die "emerge with binary use flag first"
-
- # Fix location in which to install man pages
- sed -i 's@^MAN_PREFIX_EXTRA :=.*@MAN_PREFIX_EXTRA := /share@' \
- Makefile || die 'sed Makefile failed'
-
- emake -j1 dirs runtime compiler CFLAGS="${CFLAGS}"
- pax-mark m "${S}/mlton/mlton-compile"
- pax-mark m "${S}/build/lib/mlton-compile"
-
- # Does not support parallel make
- emake -j1 all-no-docs CFLAGS="${CFLAGS}"
- if use doc; then
- export VARTEXFONTS="${T}/fonts"
- emake docs
- fi
- fi
-}
-
-src_install() {
- if use binary; then
- # Fix location in which to install man pages
- mv "${S}/usr/man" "${S}/usr/share" || die "mv man failed"
- pax-mark m "${S}/usr/lib/mlton/mlton-compile"
- pax-mark m "${S}/usr/bin/mllex"
- pax-mark m "${S}/usr/bin/mlyacc"
- mv "${S}/usr" "${D}" || die "mv failed"
- else
- emake DESTDIR="${D}" install-no-docs
- use doc && emake DESTDIR="${D}" TDOC="${D}"/usr/share/doc/${P} install-docs
- fi
-}
-
-pkg_postinst() {
- # There are PIC objects in libmlton-pic.a. -link-opt -lmlton-pic does not help as mlton
- # specifies -lmlton before -lmlton-pic. It appears that it would be necessary to patch mlton
- # to convince mlton to use the lib*-pic.a libraries when linking an executable.
- ewarn 'PIE in Gentoo hardened requires executables to be linked with -fPIC. mlton by default links'
- ewarn 'executables against the non PIC objects in libmlton.a. http://mlton.org/MLtonWorld notes:'
- ewarn 'Executables that save and load worlds are incompatible with address space layout'
- ewarn 'randomization (ASLR) of the executable.'
- ewarn 'To suppress the generation of position-independent executables.'
- ewarn '-link-opt -fno-PIE'
-}
diff --git a/dev-lang/mlton/mlton-20180207.ebuild b/dev-lang/mlton/mlton-20180207.ebuild
index dc132ad34edc..f55bb40d5a14 100644
--- a/dev-lang/mlton/mlton-20180207.ebuild
+++ b/dev-lang/mlton/mlton-20180207.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
-inherit check-reqs eutils multibuild pax-utils
+inherit check-reqs multibuild pax-utils
DESCRIPTION="Standard ML optimizing compiler and libraries"
BASE_URI="mirror://sourceforge/${PN}"
@@ -147,12 +147,15 @@ mlton_create_bin_stubs() {
src_prepare() {
if ! use binary; then
# For Gentoo hardened: paxmark the mlton-compiler, mllex and mlyacc executables
- epatch "${FILESDIR}/${PN}-20180207-paxmark.patch"
+ eapply "${FILESDIR}/${PN}-20180207-paxmark.patch"
# Fix the bootstrap-smlnj and bootstrap-polyml Makefile targets
- epatch "${FILESDIR}/${PN}-20180207-bootstrap.patch"
+ eapply "${FILESDIR}/${PN}-20180207-bootstrap.patch"
fi
+
default
+
$(mlton_create_bin_stubs)
+
if use binary; then
pax-mark m "${R}/lib/${PN}/mlton-compile"
pax-mark m "${R}/bin/mllex"
diff --git a/dev-lang/moarvm/Manifest b/dev-lang/moarvm/Manifest
index a94a47007194..731e026bfa6e 100644
--- a/dev-lang/moarvm/Manifest
+++ b/dev-lang/moarvm/Manifest
@@ -15,6 +15,6 @@ EBUILD moarvm-2020.09.ebuild 1467 BLAKE2B c20140017696176cf63a887c76bbd511a69349
EBUILD moarvm-2020.10.ebuild 1467 BLAKE2B c20140017696176cf63a887c76bbd511a693493aa0fcad043a4919871f5eac4ee67d686b8dae5bbdea08576f5d576118064f41cfa4aefca8b55d6121eef20e1f SHA512 db2302a7eee365b212c122eb3389f417d34fd68ef828c705e992cf7e38283fc61343d4fc70a69d9d6677e4047ac698c173d2d2ceb2def85de46389e04803ae93
EBUILD moarvm-2020.11.ebuild 1449 BLAKE2B c54c97f3c62bac54d140d3bd881cc616434fa88909dfa76f1168a22b9ea3acf346e06573cdb082e306bbc9b134b1ce82f3efbb760eedc91552f37cdbcbbc4fee SHA512 125e657028ada97b7e7cc5fcdcfec2a05450a494110aac1698fadd06465518423b5032f42f5a41692b3a8fb98964e3d8d225e1e6956fffb65937d6e637c670fb
EBUILD moarvm-2020.12.ebuild 1449 BLAKE2B c54c97f3c62bac54d140d3bd881cc616434fa88909dfa76f1168a22b9ea3acf346e06573cdb082e306bbc9b134b1ce82f3efbb760eedc91552f37cdbcbbc4fee SHA512 125e657028ada97b7e7cc5fcdcfec2a05450a494110aac1698fadd06465518423b5032f42f5a41692b3a8fb98964e3d8d225e1e6956fffb65937d6e637c670fb
-EBUILD moarvm-2021.02.ebuild 1462 BLAKE2B 2e8676db60a8c03ec4c284f99285efaea1898aea9e11e6fbdd5779e7e313f9649089bb81ba02ca7c71b2d2d4d7aa91ac25a83974beffe431c5ff76aa9a2d2979 SHA512 d51d33f67857a4d4620bb0d7af5a3bbbd97f7ce10c54efa91961ab6a195c9ef0483c4da92fabdb05868d10fe729adb72f1035d91661a35d6444b8b3539e0e7db
+EBUILD moarvm-2021.02.ebuild 1449 BLAKE2B c54c97f3c62bac54d140d3bd881cc616434fa88909dfa76f1168a22b9ea3acf346e06573cdb082e306bbc9b134b1ce82f3efbb760eedc91552f37cdbcbbc4fee SHA512 125e657028ada97b7e7cc5fcdcfec2a05450a494110aac1698fadd06465518423b5032f42f5a41692b3a8fb98964e3d8d225e1e6956fffb65937d6e637c670fb
EBUILD moarvm-9999.ebuild 1736 BLAKE2B 9f434f8561c55716165952dce8e35bd3659fbd0f3a42f688049e023faa0f10c4aa245ca810279ae80527c4ec5fe5c514bc5ae534aa30e839693657ce68fc7f9c SHA512 5867e2ee90401a86cd0341d8ab5ae75fecb7d366d88e1269439248686942b5c1855e45857b4388491631b26361aac3b0495d7214158931e955655a34d557fada
MISC metadata.xml 920 BLAKE2B dc15290595649a4f4c514f26cd219c3d8a97bb589fedac8cca202b64abe49f6851fe50d24f95f82c0dd61d183ed1f4091a4fb0f500e8f89a9b91dd7e932cc1ff SHA512 9250682955318d688f59e27b740e1b04095a85f036578d8fe2a2eeb31e159e34845a191734ba4997034dca80a32e29c8f4a0658b9a76ea78ff5fb4479124696b
diff --git a/dev-lang/moarvm/moarvm-2021.02.ebuild b/dev-lang/moarvm/moarvm-2021.02.ebuild
index 27ecb3b89048..df017e9cd54a 100644
--- a/dev-lang/moarvm/moarvm-2021.02.ebuild
+++ b/dev-lang/moarvm/moarvm-2021.02.ebuild
@@ -9,7 +9,6 @@ MY_PN="MoarVM"
if [[ ${PV} == "9999" ]]; then
EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}.git"
inherit git-r3
- KEYWORDS=""
S="${WORKDIR}/${P}"
else
SRC_URI="http://moarvm.org/releases/${MY_PN}-${PV}.tar.gz"
diff --git a/dev-lang/mujs/Manifest b/dev-lang/mujs/Manifest
index fc0eeee26c26..447bd46a7fb9 100644
--- a/dev-lang/mujs/Manifest
+++ b/dev-lang/mujs/Manifest
@@ -2,6 +2,6 @@ AUX mujs-1.0.5-flags.patch 839 BLAKE2B 843d1bf60167dfb91a5736ee936098c8f6b716f7a
AUX mujs-1.1.0-flags.patch 376 BLAKE2B 6bcfc39f97b35ae2230aa33ca99d4338915224a9b1ffbc39d747bb9e1ec566d36510cefc75906695c729ea2b44b2c118519ba25998aebb09dee51ad622bd1f3e SHA512 fc86b1422db6b3a934bf6e0da5c18a7a61fbf8c691c2dbf1355c0b7fc669d7f324af81d7e39c6042b0006ad294e4b21cb4c16bf77b3f1be18a07fc9037e09039
DIST mujs-1.0.9.tar.gz 123113 BLAKE2B c55deaf14508c412394bf5fe3a53ef581d4e4726024d65f2ba5155eb2400a6e2f043c9f6721b170d19297e2cd38c62c462f3b4e102eb4bfe6e7857b40156c18b SHA512 a3dbc8dbf5c16b7de9803954fe38ea9f77c0e5b7de3895966ec0877e063d463c9950499791ea0d102e464bd0426413689f3edb15e38db3f13915d72f27556725
DIST mujs-1.1.0.tar.gz 123450 BLAKE2B e7bc05d35566ff26346e713645e0f417a9acd1a73b5fb5c7f0c35bf940765fba1ab04199f4ed1dd6ce0e3bb2bf1547703335a1c125353da24de72f2b1adfb243 SHA512 10b61453f8483e3e67c95a742aa7868e255816b2ce25c84d8e24c5c737bad1f23ade67531c5c5bb914804be446da33c0cbe8e95a6d5889250dd8520ce56f23a0
-EBUILD mujs-1.0.9.ebuild 1367 BLAKE2B da737815523e53241a5bbe38c36b172cb01ca99a5d45961374124b63b207f9ee3482e33cd5bd114774b9b4c25aa17a48cd60a5d5e6a516b7df3993c2d95c75f1 SHA512 acc4b05e6e5a737831f96e959e706a6f49abd72addc2d274bc596fe79777cad755e88df78512bc1bfab22fdd6325047b8e5f2ce85c8d545d9108cecbccee6759
-EBUILD mujs-1.1.0.ebuild 1375 BLAKE2B d57fbc773fe1c7588df706d564c21be2c045a32c30c4de6f2ee96068b5ca09d10a9d09dd2a28a44576f681c636c751f61606f32c414bf35070b3b420ea58d9b4 SHA512 a5e6bd7ac2f450b4a93cb184a79fb86eae85beae3bd3a25f11e1f96aa2418fd5b70c613063e145bc37831108754bd27b4d20aded694d1370200f206498640cec
+EBUILD mujs-1.0.9.ebuild 1366 BLAKE2B 1b15c2443c8e1129e37607d419a26fcefe8f878a72be1bb48ba75d397dce75fd40cc5f0c5fcc0b1a8455d4c670fcc8e991b6b5892a347d49e995b820fc31b63d SHA512 e521e558017aba8623eee10ea1992524423661fcb2adf1ac5f9a4449ba70c4091067e0c270c5bb2c8db44e12e69b023ebf987c9bccf4fb937bde9dd9f8f5b9e1
+EBUILD mujs-1.1.0.ebuild 1374 BLAKE2B 9ff2daf4c70862e967e0b1484a9d19bc381e51e18d8171079bb2cde612e558caa375cc9c61d68b0aee74a2464ac889901c175ffa397b250c8728970ff6484a3c SHA512 27a48528e47345ef57f54175a4d39e87f86616643e4c20787bc16e77afd874665b9207c628f46172e7e80ac53d86326702aa0a0847a809b752d47d39f39d4fa4
MISC metadata.xml 547 BLAKE2B fcf818d9a103347b5b47f7b7c77654e84db6aa2a8dd12f169d58522cb47a455f02f0bf66fc85057a2a10916c4a24dcdca87a5f2e12c54d184ea8d5af1db65810 SHA512 e6bac32e74df77c2ded4e9a9e6200ab76e06217b9a236d6bf5f0df23a031eab2519f26e3d402ff106f9506a4dbe3baf66cae5f961f6d016e7c42fe83fc532799
diff --git a/dev-lang/mujs/mujs-1.0.9.ebuild b/dev-lang/mujs/mujs-1.0.9.ebuild
index 0761367df73f..5d2b197be958 100644
--- a/dev-lang/mujs/mujs-1.0.9.ebuild
+++ b/dev-lang/mujs/mujs-1.0.9.ebuild
@@ -5,7 +5,7 @@ EAPI=7
inherit flag-o-matic toolchain-funcs
-DESCRIPTION="An embeddable Javascript interpreter in C."
+DESCRIPTION="An embeddable JavaScript interpreter in C"
HOMEPAGE="https://mujs.com/ https://github.com/ccxvii/mujs"
SRC_URI="https://github.com/ccxvii/mujs/archive/${PV}.tar.gz -> ${P}.tar.gz"
# Not available right now.
diff --git a/dev-lang/mujs/mujs-1.1.0.ebuild b/dev-lang/mujs/mujs-1.1.0.ebuild
index af61b9b01bf5..6488566e188c 100644
--- a/dev-lang/mujs/mujs-1.1.0.ebuild
+++ b/dev-lang/mujs/mujs-1.1.0.ebuild
@@ -5,7 +5,7 @@ EAPI=7
inherit flag-o-matic toolchain-funcs
-DESCRIPTION="An embeddable Javascript interpreter in C."
+DESCRIPTION="An embeddable JavaScript interpreter in C"
HOMEPAGE="https://mujs.com/ https://github.com/ccxvii/mujs"
SRC_URI="https://github.com/ccxvii/mujs/archive/${PV}.tar.gz -> ${P}.tar.gz"
# Not available right now.
diff --git a/dev-lang/ocaml/Manifest b/dev-lang/ocaml/Manifest
index 16b9dcc2d47d..62e83d6f0579 100644
--- a/dev-lang/ocaml/Manifest
+++ b/dev-lang/ocaml/Manifest
@@ -5,15 +5,11 @@ AUX ocaml-rebuild.sh 1120 BLAKE2B 6f88a9f2b99fae7f89b884bb08d2c6ad6a0e14d4a8fd06
AUX ocaml.conf 177 BLAKE2B da070848d9e3a30ad303c296f55de87c30fd15feee3304ccc1d1f844d83c5a646664cd4d9958375ead2324e25bb88280fdb78f9e4230eeb8cd5825eed6f2f91d SHA512 4f0a48b8101b77d568d8d0a852f2a21fd46b7947c5d3f975ee4cd8a9c37c993d689cf5fb53b54a6b2740cb865051dc50c74c0c373eb697fca800ca143d401aa4
DIST ocaml-4.05.0.tar.gz 4431750 BLAKE2B c2ab003a13e0a581ebd0e1c96eeb8a9baea9bfe6bee08823b0e4541819201ec109f1846e13fc1aefa51a001eefbb8f73320ba854d41975fc68cef41bc75b1ecc SHA512 9a060ae4b741e1687277403e5bdb8f6eda2e2ebf6c45f7c0149b66ea1213cb26d13febfbb3f11c12543e244cfdd053b786b09c4145e2348e5d89a7206f7de225
DIST ocaml-4.09.0.tar.gz 4838748 BLAKE2B 80f29d535c64bf2371b480217723ed20b2b21cfd93ce31366a7b91e7ddffdf68db4e88d085288b7e21efee567a13f42ecff24c3a0115507b006acf844239cefd SHA512 dc0271e591bf929b751705835790949a9d741e12d085c8b207c3689b5838a02ea8de80da8b2605d2e6744f2f541b0d1694ffafff9509e99ce01f3a391f6ef2ae
-DIST ocaml-4.10.0.tar.gz 4927867 BLAKE2B 71b8448a10bf3049e3b005dfbb2030d479e69e4c2ef00055f1dacd38eff838b0a5c18b4883d899b5eb4cbd05bb7ca35867010794ed25682ad51b2fe19ef2114d SHA512 f39269d572b3f7755f7881b7a9fdfe5253e49d847835ae2a8695f67e3309fc1e925523d66ecbe1fb8bc0cc3b5602e077ce7feac4926aab571383766442265179
DIST ocaml-4.10.2.tar.gz 4933135 BLAKE2B ec5e92adb23c28a254247182c79ab555fd82603e02f24799049b8057abf869d18234302408c8ae89b9997a2b210ed6965e45c2c03e4f0cab34262ad3f6ebb528 SHA512 1dd827da07f01e815fd74dd7ee84db0900f24782f8f7fd426e2d71b9fb03c7b8045f22e018120a0446c362315751365d1bd8c1724edef2b182394e76eb0a07b2
-DIST ocaml-4.11.1.tar.gz 5069552 BLAKE2B a731d4b60d7965c860dda5c9dfb26b968320760501ff3cac908b8cd96e34391c417e16077cdf753b27b85a79857451e6ff0b566a9158178026a0e6bd5240aac4 SHA512 93fa8b2ff71d5f645e3ed72913205e7d35aa523cfa87d1939d77e796495b94c2fdb4a429ea65330cdeecfb0a36f7ab053b15090d9baa151b58e5331148dc8150
DIST ocaml-4.11.2.tar.gz 5075323 BLAKE2B bdc503d9a8d0e39dd11060febcd0287657b460e50ed81e55578a3e778af990ca5d4ef9011753eee4e1a144da33eb76c95b1672dc99b76e65a2e107eee472fe06 SHA512 03d8a9f6e130142c121ff2eb3d54f584f1e7c8475f066a5803bb0edd2fa172ca06a56a3ec548b225f5c8b12112d7a68511b1e16f3ade075b5f02610d4247bbb3
DIST ocaml-patches-9.tar.bz2 1700 BLAKE2B 4e46b8fb490db28f815414e285f54e251394ea53e1d25c529bbea9f03e426fd19132b1e2c7c2be7d14983fceb4cad073d191b001f6da522fee4226371d4a2eca SHA512 cc19f9104fac69aecc5effa8cb772342e1fb61cdcd38ba0176efe04cf3d710b1c56d5178748f3bd29099af91fa684da432a8ef8d42de76dbd1b6954a255ea6c0
EBUILD ocaml-4.05.0-r3.ebuild 4032 BLAKE2B e661b119edf65d14fd040274a9cf4d04600eedaf25990a9045898ff95d036510e15e966539ddd6f3a0c7336fe6a24d4c14ae7ca419dec5a1c9536b8b2dcd10c4 SHA512 07285302718df64b0a00678d931c222837b38d92850409e260591f24df1c031714c02d29e7854ae6ce374f843cf10061ec89705bd2a0f772eb04ca88dc7d71e1
EBUILD ocaml-4.09.0.ebuild 2459 BLAKE2B 41e75a2bcde313c4205e9b5e1dcc704c1aed3fc02bac569b1ae764f6644bb0da02281fb96f4c8e3ad7ebacb5aea94ac328c444e8f228d90cfa1caa50b70b2d4d SHA512 04b7dd810ef40c89c41810725af3cc3702e8645e0b267357d747d9c5de053bbbc553c71e3ce7d1eb758566d9ff61e4eb4d09447e12302fce3fb9dccc01ba17f2
-EBUILD ocaml-4.10.0.ebuild 2466 BLAKE2B 44c527e6343fa8232e3edfbad8b95d1116e2a27355023f1aa9758cd4da56345f9a5391f048071127005103feabd0c7d2d2fceaf379dac78405353fd712726de1 SHA512 722b30025e8285bddc98c38bef1c70b48ed00197cc7057a1c5142f2e9e15d4da9af8fcc1b5df5ee1c08ca5ed6ea060dad29da3681574945df4f205bd1570c9b3
EBUILD ocaml-4.10.2.ebuild 2417 BLAKE2B d10cc95f1518619bef972b5eb219f45de8d1143c97ff9cd01a9acf74190636ac3316835f7f26523d9388e5be0954c04c4aaea34f2ccf02b4e926fa6abccce842 SHA512 fa701247c912886020d2ff57f03bb94661954ae0f58f95b69f527c2f4efab10bb26fa51d402f7fd236f0932a986424cb72925586e82c41daabbc3cb628cd3541
-EBUILD ocaml-4.11.1.ebuild 2288 BLAKE2B 7b948d5bf90b17cfa8e0d476382e6f6fad60d0b52e0018bc0a71c5857e92bbafb10805d6ed95bfddac37e5ce026c7dbb3822dafc0e33478c71b60345145cfeaa SHA512 e74a344c78dc505fb8b24a674126f5ded5f0e695d3f4584316eac44055d7bce78e2208a3bade84f49d0280508041f9e6582868e1ffa3f275c2930662f48a82ce
EBUILD ocaml-4.11.2.ebuild 2290 BLAKE2B 73ecfc03f0e61821174790f5d360b1cf392517c7c961f0625159c04febb1ffc43c3c6fa4e5705f2d1dbb1cf7e40d84c50782b63411ca2462348c151ae2734df9 SHA512 bcd82adcb04843f597e08efd7d5e904336f47f412d2360c89dd4c1e1802375c60de0fcd77f9edafbe9bdf61be2e65863e84f0cad74d424c52787694e64b21288
MISC metadata.xml 775 BLAKE2B dfddcb1e262074326ede7fb648bb524404e86a302270b6bc9e502124689077cd54ebafbfca277d516d2763cd18580a09f749f45ca215c34c26c7ae1c56c2e841 SHA512 3551489dac19dddcf6490c74df4c8e2aa370565b207bcdee28a8160caab7394d8d770ed4408ce8db3d3c224b61439f29c4eae84180adf01a468e0ef515980818
diff --git a/dev-lang/ocaml/ocaml-4.10.0.ebuild b/dev-lang/ocaml/ocaml-4.10.0.ebuild
deleted file mode 100644
index a91786e03014..000000000000
--- a/dev-lang/ocaml/ocaml-4.10.0.ebuild
+++ /dev/null
@@ -1,89 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit flag-o-matic
-
-HOMEPAGE="https://ocaml.org/"
-SRC_URI="https://github.com/ocaml/ocaml/archive/${PV}.tar.gz -> ${P}.tar.gz"
-DESCRIPTION="Programming language supporting functional, imperative & object-oriented styles"
-
-LICENSE="LGPL-2.1"
-SLOT="0/${PV}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
-IUSE="emacs flambda latex +ocamlopt spacetime xemacs"
-
-RDEPEND="sys-libs/binutils-libs:=
- spacetime? ( sys-libs/libunwind:= )"
-BDEPEND="${RDEPEND}
- virtual/pkgconfig"
-PDEPEND="emacs? ( app-emacs/ocaml-mode )
- xemacs? ( app-xemacs/ocaml )"
-
-#PATCHES=("${FILESDIR}"/${PN}-4.10.0-gcc-10.patch)
-
-src_prepare() {
- default
-
- # OCaml generates textrels on 32-bit arches
- # We can't do anything about it, but disabling it means that tests
- # for OCaml-based packages won't fail on unexpected output
- # bug #773226
- if use arm || use ppc || use x86 ; then
- append-ldflags "-Wl,-z,notext"
- fi
-
- # Upstream build ignores LDFLAGS in several places.
- sed -i -e 's/\(^MKDLL=.*\)/\1 $(LDFLAGS)/' \
- -e 's/\(^OC_CFLAGS=.*\)/\1 $(LDFLAGS)/' \
- -e 's/\(^OC_LDFLAGS=.*\)/\1 $(LDFLAGS)/' \
- Makefile.config.in || die "LDFLAGS fix failed"
- # ${P} overrides upstream build's own P due to a wrong assignment operator.
- sed -i -e 's/^P ?=/P =/' stdlib/StdlibModules || die "P fix failed"
-}
-
-src_configure() {
- local opt=(
- --bindir="${EPREFIX}/usr/bin"
- --libdir="${EPREFIX}/usr/$(get_libdir)/ocaml"
- --mandir="${EPREFIX}/usr/share/man"
- --prefix="${EPREFIX}/usr"
- $(use_enable flambda)
- $(use_enable spacetime)
- )
- econf ${opt[@]}
-}
-
-src_compile() {
- if use ocamlopt ; then
- emake world.opt
- else
- emake world
- fi
-}
-
-src_test() {
- if use ocamlopt ; then
- # OCaml tests only work when run sequentially
- emake -j1 -C testsuite all
- else
- ewarn "${PN} was built without 'ocamlopt' USE flag; skipping tests."
- fi
-}
-
-src_install() {
- default
- dodir /usr/include
- # Create symlink for header files
- dosym "../$(get_libdir)/ocaml/caml" /usr/include/caml
- dodoc Changes README.adoc
- # Create envd entry for latex input files
- if use latex ; then
- echo "TEXINPUTS=\"${EPREFIX}/usr/$(get_libdir)/ocaml/ocamldoc:\"" > "${T}/99ocamldoc"
- doenvd "${T}/99ocamldoc"
- fi
- # Install ocaml-rebuild portage set
- insinto /usr/share/portage/config/sets
- doins "${FILESDIR}/ocaml.conf"
-}
diff --git a/dev-lang/ocaml/ocaml-4.11.1.ebuild b/dev-lang/ocaml/ocaml-4.11.1.ebuild
deleted file mode 100644
index b9fe45e6172d..000000000000
--- a/dev-lang/ocaml/ocaml-4.11.1.ebuild
+++ /dev/null
@@ -1,85 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit flag-o-matic
-
-HOMEPAGE="https://ocaml.org/"
-SRC_URI="https://github.com/ocaml/ocaml/archive/${PV}.tar.gz -> ${P}.tar.gz"
-DESCRIPTION="Programming language supporting functional, imperative & object-oriented styles"
-
-LICENSE="QPL-1.0 LGPL-2"
-SLOT="0/${PV}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
-IUSE="emacs flambda latex +ocamlopt spacetime xemacs"
-
-RDEPEND="sys-libs/binutils-libs:=
- spacetime? ( sys-libs/libunwind:= )"
-BDEPEND="${RDEPEND}
- virtual/pkgconfig"
-PDEPEND="emacs? ( app-emacs/ocaml-mode )
- xemacs? ( app-xemacs/ocaml )"
-
-src_prepare() {
- default
-
- # OCaml generates textrels on 32-bit arches
- # We can't do anything about it, but disabling it means that tests
- # for OCaml-based packages won't fail on unexpected output
- # bug #773226
- if use arm || use ppc || use x86 ; then
- append-ldflags "-Wl,-z,notext"
- fi
-
- # Upstream build ignores LDFLAGS in several places.
- sed -i -e 's/\(^MKDLL=.*\)/\1 $(LDFLAGS)/' \
- -e 's/\(^OC_CFLAGS=.*\)/\1 $(LDFLAGS)/' \
- -e 's/\(^OC_LDFLAGS=.*\)/\1 $(LDFLAGS)/' \
- Makefile.config.in || die "LDFLAGS fix failed"
-}
-
-src_configure() {
- local opt=(
- --bindir="${EPREFIX}/usr/bin"
- --libdir="${EPREFIX}/usr/$(get_libdir)/ocaml"
- --mandir="${EPREFIX}/usr/share/man"
- --prefix="${EPREFIX}/usr"
- $(use_enable flambda)
- $(use_enable spacetime)
- )
- econf ${opt[@]}
-}
-
-src_compile() {
- if use ocamlopt ; then
- env -u P emake world.opt
- else
- env -u P emake world
- fi
-}
-
-src_test() {
- if use ocamlopt ; then
- # OCaml tests only work when run sequentially
- emake -j1 tests
- else
- ewarn "${PN} was built without 'ocamlopt' USE flag; skipping tests."
- fi
-}
-
-src_install() {
- default
- dodir /usr/include
- # Create symlink for header files
- dosym "../$(get_libdir)/ocaml/caml" /usr/include/caml
- dodoc Changes README.adoc
- # Create envd entry for latex input files
- if use latex ; then
- echo "TEXINPUTS=\"${EPREFIX}/usr/$(get_libdir)/ocaml/ocamldoc:\"" > "${T}/99ocamldoc"
- doenvd "${T}/99ocamldoc"
- fi
- # Install ocaml-rebuild portage set
- insinto /usr/share/portage/config/sets
- doins "${FILESDIR}/ocaml.conf"
-}
diff --git a/dev-lang/perl/Manifest b/dev-lang/perl/Manifest
index 637c074570df..7a11a1d7d151 100644
--- a/dev-lang/perl/Manifest
+++ b/dev-lang/perl/Manifest
@@ -13,4 +13,4 @@ EBUILD perl-5.30.3-r2.ebuild 26146 BLAKE2B e0756d8250acfd3dbbdeac414f2515270820a
EBUILD perl-5.30.3.ebuild 20131 BLAKE2B 2857fa2e63c9245dcd3b2683258313dc6e2ff1eab768a2e26a6c942f2b43753b8b26e47a54bc538747500d730d66e03177cc4ea9ce145d160c2e2d0f333ae3b7 SHA512 46d0f78a965df0945c14ac75e203e6957e54542b04de688cabd722402c6494c5583f95842de91510722c26e58345e6c3afca53848d239965629ed2eacc240d08
EBUILD perl-5.32.0-r1.ebuild 25913 BLAKE2B a97f41da180ee9e0beeb163ffbbc1c1f944d8dae32954603c9a3a9bf24d9623db6146b8440917dc891ce24ddb41c6c782e04630e4cfa68649f526d7a3e57def3 SHA512 1223ca91df30ccdc247f8a9659376e4407920c1223753b00da91859935117f5361c128b3b1f5d38596f70a4d0ec0e6e6fda58f1b135525c67183fe906bbb2cd4
EBUILD perl-5.32.1.ebuild 25766 BLAKE2B fdb6aa92e7f88c273d918cc11ddf964ce9baa4b832c5dc7f6f2d68d1cfc6ee5121ba665747f6550192ddb4d3fe4c76be67809db333ccf6a4ace34b1022fe0048 SHA512 21b9d98f4166472dc869f8ef680fd09635e78a5b6e69fe5d042430e362ec25852e045e615dfced0e3fdf3328ee5445c337eb06050e55356b7410a4a8ed6892a0
-MISC metadata.xml 430 BLAKE2B 8625fd07f63a7943a85c3919d6ae6db622b752caa2803c56c72a22b270244261331fbab8b760e6d00acb8480770c9ef1d1beaaa22cc6044660821687c0cd8c33 SHA512 ca4c43e2016b7df707894713465700a90d2b8551b57fc4d660cff75edb1e8cc2456f9ae10431839ad6738f290d4f5911fae360eaa1d4670859d855de3d568583
+MISC metadata.xml 430 BLAKE2B 65949096d565c5754b25bb708f80ab17e95d21b252f6a3b7a1104b01bed26db1f9351c100d1cc59cbf4161d662bba6fb17d232d146165e97f82681c410feb98d SHA512 b3aaad1820fb62287c8da2806ad385e1ced8d8d2a05fbcd2448214120a4682d503c3dcba60d03a5d02cd8e1b4f5b13568759a096a5d8a3a5ecc5c35c5680b670
diff --git a/dev-lang/perl/metadata.xml b/dev-lang/perl/metadata.xml
index 0edcddc60b41..bc06f09b5269 100644
--- a/dev-lang/perl/metadata.xml
+++ b/dev-lang/perl/metadata.xml
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
diff --git a/dev-lang/polyml/Manifest b/dev-lang/polyml/Manifest
index a17ab4b6036d..b722c99b869a 100644
--- a/dev-lang/polyml/Manifest
+++ b/dev-lang/polyml/Manifest
@@ -1,7 +1,5 @@
AUX polyml-5.6-configure.patch 390 BLAKE2B 7f20e9de1c00a429ed86ab33cd05bd2aed0a4c431d92f52e7c93c4c44f4f4611637299020d3cbf7c32b9d43f868757f4b7c534f68e5b7120c75ee0b27b5f8316 SHA512 d868d6739e88ccacf7ab5ee495ffaa54fb3ace83c57633fde2d97fb894c9e0c81e896e15192318f9b8bbcb678efb95a827549a0fd30d2ca87473b582fa09f850
AUX polyml-5.6-ffi3.patch 584 BLAKE2B 6c7e38c077968f439f03739a4d95bad6d5f631b4cf4e1a51a58ae6273c40a1ae5dbd1fe3aa6e338215f9cedec950435e846351275be7bccb80fd313965888b78 SHA512 22bb8e13672ddb0a8f7a3ed9908fb652e238c849b553ab3ceb9b33daebc35d6502dbff3f099ab933f4e2639b5eac2294e21d45bfc96dcb1b9c6be0129c57232d
-DIST polyml-5.6.tar.gz 6066166 BLAKE2B dc7e35ad1f51f270f9043736bca8b3d8a96e208dfa2833a2de3c06c969e8bb9d5e92c3ab025e4e55539188a9d6d5000b7befdd3cfc17aa3b0e54315778ab71b0 SHA512 cd4f25c225831dec512f7136dfda4ba31abd6939d9e8e0cacdb6d48212488b56ba5969c76e76fcbfcfa83d015a67d9cf62457286086f3c2b3f7914a7939d7b59
DIST polyml-5.8.tar.gz 9817105 BLAKE2B 93992c8baa78017bfda6c2151d1f48805829b77c0b7ed9bec87c951fc4a4236459ed59aab1eca88ed4a1d7aa10eb9734f93324583e012b18bb7d8cce84b5a35b SHA512 50baed79b50b14bd87acc637de93fd6d0f05e61fe0f03682a12a1d2c5f382313488d48f84b49ad915b01acc5a3a5769fb05fcaa7b24499c56402ddd3ba393930
-EBUILD polyml-5.6.ebuild 1212 BLAKE2B d59d404d9d735dc700fdb62534284aef3ab6260df7ff22fa192c8edf5e9ade50bd219cde51afaf95022633df105e99d156f07609a1071359c12fba04d7d1d7ba SHA512 90bef019b8717e55409b52cf812704955778b21023d2364b8a8f0414d43cb0d1f32c31c67d9975f52c571b7f802964a14756dc7d45920651dd54b274d99504d7
EBUILD polyml-5.8.ebuild 1222 BLAKE2B 303ce107ff8f8131ea957ed8cf871a979529cd1bd51032f4b032a0dc1757535253a4085c8f4bed274a533be6f51b554525267171ea41ad5217e8aeee442ee15e SHA512 6773ac8ab453edc3a2e6dd4091881c7c8719a6806e270f64ef35027527fd362cabe52555c46f692b3d5bf0ef5364ab3c06fe01ab221c5f71fbca11f33ac2e3b0
MISC metadata.xml 357 BLAKE2B f994f420abc8bb1020fc533a0adf04c861961b8e6cd72626db3d7d2e8ef8558903df895d182266eb419e75f6293524e690b45738902cb74ac79afe04a94f2a99 SHA512 d7f4c4c4f07e7f516fac55a58d83256f54566e0bce940d178e739b05c740abf842f6f343add927dd098546828547f16f3176e874fb8501e84d12ca7ead9fcb32
diff --git a/dev-lang/polyml/polyml-5.6.ebuild b/dev-lang/polyml/polyml-5.6.ebuild
deleted file mode 100644
index 8d2700996b92..000000000000
--- a/dev-lang/polyml/polyml-5.6.ebuild
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-inherit autotools pax-utils
-
-DESCRIPTION="Poly/ML is a full implementation of Standard ML"
-HOMEPAGE="https://www.polyml.org"
-SRC_URI="https://codeload.github.com/polyml/polyml/tar.gz/v${PV} -> ${P}.tar.gz"
-
-LICENSE="LGPL-2.1"
-SLOT="0/${PV}"
-KEYWORDS="~amd64 ~x86"
-IUSE="X elibc_glibc +gmp portable test +threads"
-RESTRICT="!test? ( test )"
-
-RDEPEND="X? ( x11-libs/motif:0 )
- gmp? ( >=dev-libs/gmp-5 )
- elibc_glibc? ( threads? ( >=sys-libs/glibc-2.13 ) )
- dev-libs/libffi:="
-DEPEND="${RDEPEND}"
-
-PATCHES=(
- "${FILESDIR}"/${P}-configure.patch
- "${FILESDIR}"/${P}-ffi3.patch
-)
-
-src_prepare() {
- default
- eautoreconf
-}
-
-src_configure() {
- econf \
- --enable-shared \
- --disable-static \
- --with-system-libffi \
- --with-pic=pic-only \
- $(use_with X x) \
- $(use_with gmp) \
- $(use_with portable) \
- $(use_with threads)
-}
-
-src_compile() {
- # Bug 453146 - dev-lang/polyml-5.5.0: fails to build (pax kernel?)
- pushd libpolyml || die "Could not cd to libpolyml"
- emake
- popd
- emake polyimport
- pax-mark m "${S}/.libs/polyimport"
- emake
- pax-mark m "${S}/.libs/poly"
-}
-
-src_test() {
- emake tests
-}
diff --git a/dev-lang/python-exec-conf/Manifest b/dev-lang/python-exec-conf/Manifest
index 399181c739ce..6174182b6358 100644
--- a/dev-lang/python-exec-conf/Manifest
+++ b/dev-lang/python-exec-conf/Manifest
@@ -1,3 +1,3 @@
DIST python-exec-2.4.6.tar.bz2 87634 BLAKE2B 7b6de8ad0e0603fafd3284e6e3c5247ad83f145ab4db6728914318ae8e6f5aaa3c0247f4e01238fca11519ef72fb1b11436aea7e2b8c988b8717b3f6a2a43c37 SHA512 e05eaf01b83de196a10933636ab6b1a5489a421592df49b8b58eabd0e732de970f902744cd3a06b5ab530a6d69fe6dfa8f270fbb09b9fe3df4ae04d516828050
EBUILD python-exec-conf-2.4.6.ebuild 1159 BLAKE2B a690cc1742a93c17206d85b2b2fd29412283965b0e1116322e5c491296327536bc6320e226d162bfb54cbc5ce1e8c6b1367bf7157fa2d6122695e49cc6822339 SHA512 e129ef635bf197c7fd8826ae550a0b4f5ed03ed8d3f7e0de5e9da449f7a209e9f99ac1f4d870d0581c05670708e9bc50ae3d40f3459c29856d9f9388fedb8897
-MISC metadata.xml 240 BLAKE2B 97c523cb7da7b4b1e2c1809fadbe80a88f0760dd98356fc1b9a1d8f7514fb8a696f1d36bc45285a3dc169994c78176d2bcf1397df51f9e3227c7b2dff5849742 SHA512 57181dfbeaab954ce3f81beb68ef3458f78d2f1fb9c9c2954e0553d19806b3455721f8845eb45beccd79a20941f682487fa0e09763339012a4b5057ed4e2a524
+MISC metadata.xml 240 BLAKE2B 41e6a4d9da33dab2decc5ff419924f382a8f64d27a81fdb97576db8c6cf125be95911747946ec8be1b453f56617fef1084f5947f84b50a8db419d46df2ae8a0f SHA512 9c23321eaa853f851bf00195ea64ac2ba093e516f9b57855ee5aa58fbb1988130c9f0c17c2a9ce9fae4ee033e0a28a70c868e0f5acdfa1dd316ab533c5279d59
diff --git a/dev-lang/python-exec-conf/metadata.xml b/dev-lang/python-exec-conf/metadata.xml
index aa2793060bf8..7f4f33c6dbc9 100644
--- a/dev-lang/python-exec-conf/metadata.xml
+++ b/dev-lang/python-exec-conf/metadata.xml
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
diff --git a/dev-lang/python-exec/Manifest b/dev-lang/python-exec/Manifest
index 4b5e6ba9db81..a03bef1faa72 100644
--- a/dev-lang/python-exec/Manifest
+++ b/dev-lang/python-exec/Manifest
@@ -1,3 +1,3 @@
DIST python-exec-2.4.6.tar.bz2 87634 BLAKE2B 7b6de8ad0e0603fafd3284e6e3c5247ad83f145ab4db6728914318ae8e6f5aaa3c0247f4e01238fca11519ef72fb1b11436aea7e2b8c988b8717b3f6a2a43c37 SHA512 e05eaf01b83de196a10933636ab6b1a5489a421592df49b8b58eabd0e732de970f902744cd3a06b5ab530a6d69fe6dfa8f270fbb09b9fe3df4ae04d516828050
EBUILD python-exec-2.4.6-r4.ebuild 1705 BLAKE2B 6e108a8d4870eda9f2d931ddec0e53a981257439447b84a73132948926960794f028d8808c2636687252f4ecd485954735126371a5561130c78254de89904d92 SHA512 8e2177bfd56dfff934e3f4b15e98f8b7db889587f96d173b2bce1bc9344de72f5428c63d823cd74c9f5b12cfeafff7b25cca365e3f7ddc22aeaadd61916c394b
-MISC metadata.xml 791 BLAKE2B ba836a4142e78972a7a6b603749bb4df0fe99cf0f054e286d9ede512db5cdab18f18fa484036e9ef7e19c20afcf1c94b70d0f813e7790dbd9decda996dd53713 SHA512 be18445f875537d03532d2ab30241951c2abc0929b382c351eda05003fd84cd84c545018941117bec5a2f74e2e2a1dd17b60bb2dae99eb81909826947ceabba9
+MISC metadata.xml 791 BLAKE2B 5be47111a2bd77ad817b6c4fe9822b3ab0e859ccc13bbccf7439549e0b2f2ff4734896942aa4324f5c35fe2097b8454828df0b7a1e2c855824fcebe60925431d SHA512 a6782b79df1d7b130cb93cd77fa3292bcbc23fd0b35158ce8231904d1593c9e5659a55d00d158c88bb1326b5c375e7aa8591d9b74e9e12f5e1192a42c037a9ad
diff --git a/dev-lang/python-exec/metadata.xml b/dev-lang/python-exec/metadata.xml
index cef85cf6ce7d..c2f36c68fea1 100644
--- a/dev-lang/python-exec/metadata.xml
+++ b/dev-lang/python-exec/metadata.xml
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index 2758cc7c845a..51232c4c735a 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -40,21 +40,21 @@ DIST python-gentoo-patches-3.9.1-r1.tar.xz 10464 BLAKE2B d69ce207020b7a34eb45c14
DIST python-gentoo-patches-3.9.1_p2.tar.xz 15556 BLAKE2B 5e265ef8edee70694d73c6df6eb908a747be34e1e89b900d2470d41e7e043d179408bc643a52ade6e54e61a210ee8850d02a2cb452a9336f3973345c1d027158 SHA512 eabfd304b39975258705f5e9b238f709196ce0cbd3803f157dc77d864631a3eea380084a3a4de180e3ba7e92239608ae369e810f8066c0f1ff9fa251bbc1816c
DIST python-gentoo-patches-3.9.2.tar.xz 8824 BLAKE2B a1cd122837b50e6cf0459f86a1d88ecc4b266f5a0658975c9913f1f4e9cf6a79a0309c89c37421e92ab59f3854309cdea8ea233b771cdf517c7aea432e44bc53 SHA512 2e619ad2a7b2af2fef9070c85619e3104d99977f2c839eb1e20ed9cc3dd6c5092f7d9587c94e76d530f89272741fe6ce345e36448f6aa2800f2dc9b6b425b1e7
EBUILD python-2.7.18-r6.ebuild 10337 BLAKE2B 014fdba169450128f1a0b9cb3af177db0135b0bcd71c8c6e91b4074e0919c6e83105c778a07f976f6bc430b5ce2950b470a5efacd3d7be5ab0e0f34a94a04456 SHA512 4c223212c0878987503ac9ab358678d21d6f7244b1426d80ccb46454792e6be523741baf1559be0a6fa29cd04e2f7b779d5f25200a87e6e3941a8b7eb7529086
-EBUILD python-2.7.18_p7.ebuild 10347 BLAKE2B ded8ce3ad4f1cee4c13d38206f3d3cdd0158c13ff8ca450a70bac1199ba8c23c0cffca0583d0d22431591a53b6012671fea6ec385f158b0484f2adf4f135a521 SHA512 fa6986369baf88d98c93947fd9350b54f7e59a04c038e335e0f31ca39789c26ce509c95fa1e36699140ec84253e47ff59fc350b357d8da681a4f557afbbf17f5
+EBUILD python-2.7.18_p7.ebuild 10344 BLAKE2B 115506409e91074bf69ad685c3d00152bd9b491bc01b109e42e1fb36119d496ac6abc154a8395bf8f0a2b7c07cb7b110178505f1b61e1e8d80c85408fc7499bb SHA512 a458b7bd6b3b07c5f5deb16c38114a740324f2b2bd84d7f5de800503a4c004bcd2f5e3886cc7dcc8277230ca3ace3aee8f511dbbde1ef79b997136aea39ddad6
EBUILD python-3.10.0_alpha5.ebuild 10019 BLAKE2B c5e228133915489c20e6979ef3a37209922e5b5c4f280674669f322470e5bf50a5bb0bdbcc8c301c673fb6def152006ec65188889a2b2a1ef1ca9b15baf8554b SHA512 a730f9a4ed404f3d0df5f57f772c7d8a6eefb70f25bca174c6b4971e96002f1dda6f2f0344da6591dd3f129bf3751df8ac0f564077c94bdec19caba51212768e
EBUILD python-3.10.0_alpha5_p1.ebuild 10040 BLAKE2B 24835b3340fe4ad65f05490f174e177e2b632aed63446dfa0a9a017a542b18351f316c4b56927e8eff32cfdb225fe5eacc051e921429a2ce79d088090fa09243 SHA512 c1f549bfadd97ab8d667609cfc971db3be8932f57f0ae998fc52d0ae50698ef004ce9f789a2196e95b680b8490f89e2539835c1397b57001bbed8aebe98765ad
EBUILD python-3.10.0_alpha6-r1.ebuild 10137 BLAKE2B 411b359510370cd0d1fa7602bc9ebccd45e7a987455fff2d167e9d5b89b1e1e95f8b4ffee85c8aa11aab25c953a8fc3bf25a4f9722e293e603384aa467cf01ae SHA512 45b15e538790b2fd5eea8ca90573e1d824f602a75f6d10619899fdbff3f9fa273406404fd2b3233bf1d1c958257d531cc066eddbc69da1c5b69c61c99389af47
-EBUILD python-3.10.0_alpha6-r2.ebuild 10108 BLAKE2B 360796ea9118662281e571a396b38897ece476ceb56ed73301551d42599640f2a98467a02ce39ab53ad996d3b949ce3f5ddbc4c4050edc69194977ff08406502 SHA512 0ef5f571b4108446953cf03dc948cb2ea643f29ac0164605506c898f5d4223d4e2e072cb990fc786e2b8fbef9b0ea4ed0191b7e3a9d5746961607eacd9398bd8
+EBUILD python-3.10.0_alpha6-r2.ebuild 10109 BLAKE2B 10d3497a3b1c2142a0b4df37eacddef81d8e7f500ce031256d84f3b69353d37fc3f996ebec8a3360b8fc9664b55b3f3b90f6eb44cf996e3df6e3462ca4f1bbfc SHA512 f462e316d5867ba9aee69c18442dbc088ddeef93e8df3f960a472ae46845e1138b3cebb2d7bc00d6fbf695fc0d7a6913f5990c102efd5bf023d93527d091342c
EBUILD python-3.6.12-r2.ebuild 9884 BLAKE2B 6070ecc3e0b388012426d9591d87bdceed4ab7c76e7bfec69aca3a1980e0720fe8295b8d7fc9e5e6914fa68a4e7f3d146ff0f403a4959c5f9b750db46349a414 SHA512 f7f207e63071dfc4ff475d1106e970d83e6b03acb85ba09481a05f9279f96b2cccee6adae0ebf8a23c4ec9f5b8ccb74db4130270821457999075655c1e62852b
EBUILD python-3.6.12_p3.ebuild 9897 BLAKE2B a3de467ac2e729268d122a6ba2572caf4671fd67526d0cb553755368d892340d03e06785b012cfe3d6aefaee2cce8aaac2ae397739210c8ed4ac859e1bfd8d89 SHA512 7b93d6ba30855586f451113c933555f1edc7efec3b97f6e6f161a32670f7717add5fde19effa6e5d712d834fb19dd8a4b727f608aa9d3231280664e75c34ed08
-EBUILD python-3.6.13.ebuild 9895 BLAKE2B 6a3be039de9e3b89b8ba88641981b93593c446be9d3169154191a7d6f9e97a0a026c2ffa69efe4667e62f18062fdc8b0df378c14951a4dc2c14f425d1fa20166 SHA512 c4ad6a0b10484b1cf53d85f86f91b6b6cd256f87daf322e74a5f45e3015a72eb19ccdf38ecef4f8927eee7844ff1f8a8c2760fa68676183f0493018ca16e26c9
-EBUILD python-3.7.10.ebuild 9700 BLAKE2B 83df5ca5fee6ab856da3778710782cb666eec2569faf470e9756eb9cf46e5091da981c07fd5922e175aad1f512d201e4b73273dedea2bb63f4b9f772ee25688e SHA512 e3f070549c58c987ee3a030bbfaa2e75ef3f819756d2d119f6e0f1952298aa3f3615db0a421c5e16f75d2b5bfc577de1fc9e75b6565a53af60c34ee2d84560c5
+EBUILD python-3.6.13.ebuild 9892 BLAKE2B 85823ef6ed5265c577fcff0ad99ade598bde878a03f2bbd9d45f88dc41fef425a63c1635e07588df43b530d5bad050723c2b96a678c378ce9d8d4f24a2eab417 SHA512 71bf96b3a193ac51edff7b514ad350cc4edabb2d69b0bb13a07650a09818de6da72af2e4c4cd7da2990245e4cf242d41300f5840a8ba67acd84bf211c73b3dd0
+EBUILD python-3.7.10.ebuild 9697 BLAKE2B f1c2a5677765bc71822b9c3e98e8af5ea693bc3185ff61ef9bfa43512cae980ea11d1d6f98b19418def8a7eb38388cac291012751975014e1cfe008619b34279 SHA512 80f7a855d9b8f76a5cad9dc5594db36b1fe918030c0c585d65b57a6dfb8ab13c4645e8313b27b28484ad49e4173d29b4d46e73839849ed08f288e18c4f456ee7
EBUILD python-3.7.9-r2.ebuild 9689 BLAKE2B a7b010040fce4663b1693e36fd4f417a7774f4f72f3294656013d3c2ee6076cb1e8e3caf6f0ec76162248ba9db2bc73814e99c7ae83ddb2c59a4cc97f08fb079 SHA512 c59a1e356cca66351789f13b0aa78d322ea5d8e472746f120635a12bb5abba638f2f32033c4ccd0a9e986c7c531b85879772155ac47b194c8393d90384fc788d
EBUILD python-3.7.9_p3.ebuild 9702 BLAKE2B 1732961443de66431d4363eef2d5ec0caa044afc102227bcf85efc51a6a9cdebe8be9dadfa1aedec7c757f478897d2af47c3fdbcbb9dccf05ff4f15b0509b957 SHA512 d6e2660554f8bb3acdfc93141ceb8132e9b880ff89bb8b3b12eb475a14c298b2141d1143e21470d378aace07d64f2169525aecd7d4be8c688db5918f5c2717e2
EBUILD python-3.8.7-r1.ebuild 9790 BLAKE2B aad0ae19e4e64af3ac6da2b1f73fd46e6d32cac53b56dbbec74a4176ff7987137c06f8f793b50355cc1f1bff6a41b30024ff044413a8fb9ab585c6e9f0718cd9 SHA512 035e1ec195a2625acc37656a6689cec71d631d013e4bbab2f95fe43f68578e7b0f922fff2b6962f389e5de04a316908e6e49eba3088a7c076ee3a898adebfb47
EBUILD python-3.8.7_p2.ebuild 9803 BLAKE2B af3770efda34e9281819b81cbfce96d8cb8096ab2a9e31e132b0e898737750937726430b3455e739a7a26dbe430d4bbe933ff9d8e937357e4afefaac187cf028 SHA512 93ed9d7d56fd0d66b8c55229f14603d5a041a690bb47c2fcf8f9291e45fbaf0b93d15be82529e75f18a9b5662e83526fa862efdf952cb4de188ee69f5841d9b8
-EBUILD python-3.8.8.ebuild 9826 BLAKE2B bda1d45792be1e6d1c94b8b3c55716c5797c852f7eb9466303a2058730fef1c6464be1042e0d587a479d860cdc4ff87fc624e99abc7493e4402f8f43d8806e0e SHA512 b9f9e90afb4439d2f73ecf835e7b531eaaab3c7eb2845a52518fe28f466dd359e09906a700cf6d435749119312f260d0095fec702f123b468fe2f63f24887d48
+EBUILD python-3.8.8.ebuild 9823 BLAKE2B e38ae691ac7957ff8ab3440b828f11f5d1c660055117ec2af9d5a54cebce8bca99f0fcbf5cb0fd344f0fff0479d925962b324de5d7a6ab486e9443b7551518f1 SHA512 d3d78e5bf036853915e4604d6b7be81f84dcb8e52a57efaac56a2c7b0942a2ef9618f651726cabf36b39e9e113582a6a3ebf1c52c3dd5afe7a1f9989fa66f536
EBUILD python-3.9.1-r1.ebuild 9935 BLAKE2B 7c8f73800e02697200748e4beea21af471cd23664f6b35b40dc26d5f46fb3aa96c1bb3a4f2fc9038613b4117ddcb71586c68d3fefc1f6a646b083bdefff7a223 SHA512 f1536b40a0ccb25d41bd9f7933e1ec6391f367400a9a5b4a08541c7e4d69bf50c3235a20c80c84d7825611dd3c71adea7dceb476ffad2c5dfb316c3a6a6a0332
EBUILD python-3.9.1_p2.ebuild 9942 BLAKE2B efad280cd9b6b8792defdb63e1618053e195a7c1421900032c1ade8de288a4fa6abd5f1705fd31d6f54740f5ed235c924b7244c816a6bf4ef5e32fc074926c92 SHA512 b9085e3ace1d842bd1e81b0882ece3249700936129cfd5f904635fb9c42a6e914c5699953a216e61663f3ed6fa4b3d6cc5f84af12048ffffce6b4d8ec846a12e
-EBUILD python-3.9.2.ebuild 9965 BLAKE2B 639f7d5c44d7eb1f0d98de81b40aa5dfbec89b27c9ec42f7824b659fcb02671b58d28d59ebe7111d17a2327ae8554d0bd917486ca5fd0b4c9e2a615992b77c38 SHA512 304ede26ae513794b9e5bee6708193c6f7a5717e07e8f61bb3ba87fb0f7b2bce758c7a217da0b070b30107c8c08068aa4381d4e67ecd3e60a51f1a4777411105
+EBUILD python-3.9.2.ebuild 9962 BLAKE2B 3630079f824ca7cf90005c284da6293e7e78b50c2aa7a76961646f107de726b60e19200a7b82c8b99928d9386ea52c4cb2dc5205bb4cbc678813d5f374650de8 SHA512 07b4404d0d836ab6d271e7463bffae001c8d7fd5be6b8e99703a84feaf70df8b6db57ad19dca677102afa6ac3e10c464938b4314d6ccc2ab066b4643f130e7ab
MISC metadata.xml 819 BLAKE2B 120c7c65d77488e726c5a0f4aa19469867ea6900e747169fae2f9cf8f14ec2936089d5edfe1935ce610bec26387273e261b1cc4b023680c8c4b229f2141a7223 SHA512 08f45707e5490067a21951b9d37c8ae67064ab67cccc5b8d8c204eab8d4a004fb910627b62989c67b849b89d301618f8f8f7996e99e1ef5bab38a239c49c124d
diff --git a/dev-lang/python/python-2.7.18_p7.ebuild b/dev-lang/python/python-2.7.18_p7.ebuild
index b022d92234dd..72e7050e9ebf 100644
--- a/dev-lang/python/python-2.7.18_p7.ebuild
+++ b/dev-lang/python/python-2.7.18_p7.ebuild
@@ -22,8 +22,8 @@ S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
-KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~s390 ~sparc ~x86"
-IUSE="-berkdb bluetooth build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml"
+KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86"
+IUSE="-berkdb bluetooth build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline +sqlite +ssl +threads tk +wide-unicode wininst +xml"
# Do not add a dependency on dev-lang/python to this ebuild.
# If you need to apply a patch which requires python for bootstrapping, please
diff --git a/dev-lang/python/python-3.10.0_alpha6-r2.ebuild b/dev-lang/python/python-3.10.0_alpha6-r2.ebuild
index adedfd6f3388..7d2e54b48f91 100644
--- a/dev-lang/python/python-3.10.0_alpha6-r2.ebuild
+++ b/dev-lang/python/python-3.10.0_alpha6-r2.ebuild
@@ -24,7 +24,7 @@ S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml"
+IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline +sqlite +ssl test tk wininst +xml"
RESTRICT="!test? ( test )"
# Do not add a dependency on dev-lang/python to this ebuild.
diff --git a/dev-lang/python/python-3.6.13.ebuild b/dev-lang/python/python-3.6.13.ebuild
index 9c9faa0f5c7f..7160fb22e843 100644
--- a/dev-lang/python/python-3.6.13.ebuild
+++ b/dev-lang/python/python-3.6.13.ebuild
@@ -22,8 +22,8 @@ S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}/${PYVER}m"
-KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~s390 ~sparc ~x86"
-IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tk wininst +xml"
+KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86"
+IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline +sqlite +ssl test +threads tk wininst +xml"
RESTRICT="!test? ( test )"
# Do not add a dependency on dev-lang/python to this ebuild.
diff --git a/dev-lang/python/python-3.7.10.ebuild b/dev-lang/python/python-3.7.10.ebuild
index 0228c646c667..a05732f9e83a 100644
--- a/dev-lang/python/python-3.7.10.ebuild
+++ b/dev-lang/python/python-3.7.10.ebuild
@@ -22,8 +22,8 @@ S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}/${PYVER}m"
-KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml"
+KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline +sqlite +ssl test tk wininst +xml"
RESTRICT="!test? ( test )"
# Do not add a dependency on dev-lang/python to this ebuild.
diff --git a/dev-lang/python/python-3.8.8.ebuild b/dev-lang/python/python-3.8.8.ebuild
index e30fdd1c11fb..ce899ff36271 100644
--- a/dev-lang/python/python-3.8.8.ebuild
+++ b/dev-lang/python/python-3.8.8.ebuild
@@ -23,8 +23,8 @@ S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
-KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml"
+KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline +sqlite +ssl test tk wininst +xml"
RESTRICT="!test? ( test )"
# Do not add a dependency on dev-lang/python to this ebuild.
diff --git a/dev-lang/python/python-3.9.2.ebuild b/dev-lang/python/python-3.9.2.ebuild
index 9d724f7f9372..8fe2c15ca58a 100644
--- a/dev-lang/python/python-3.9.2.ebuild
+++ b/dev-lang/python/python-3.9.2.ebuild
@@ -23,8 +23,8 @@ S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
-KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml"
+KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline +sqlite +ssl test tk wininst +xml"
RESTRICT="!test? ( test )"
# Do not add a dependency on dev-lang/python to this ebuild.
diff --git a/dev-lang/ruby/Manifest b/dev-lang/ruby/Manifest
index adbd6bc59b6a..a69e77a36ac4 100644
--- a/dev-lang/ruby/Manifest
+++ b/dev-lang/ruby/Manifest
@@ -25,7 +25,10 @@ DIST ruby-3.0.0.tar.xz 14374176 BLAKE2B 9e7520e0b1ae6644285449c4ae92983d306772b3
EBUILD ruby-2.5.8-r1.ebuild 7073 BLAKE2B eaf5037da9841527af3e3197442c31c69eca718d25fdeb89836e61e40e5b63f6d34aa5116d50477348cd589f560fc85affd8dc04cb8d69f1c26d1aad1deeada4 SHA512 762019ac4eba249710a190579659112ba6b5152c75074fe6b2b20d2e310a2ecc860c8b7207bae371b31e9cf26820201b6aa8a514235f69eaa3af3278beafa6d5
EBUILD ruby-2.5.8.ebuild 6189 BLAKE2B aa04b9f393085468d3452bfcc55a45c721bcbe51c9602d6f44510d1f936369f1c741ade879d24c619b1722270a460ba20bc679f0714a98d310d8293bc84c3678 SHA512 156ac0da5b5e6d1240bcb42ad9a7ce455a17077a3bfd66610d5425216ff7436462e8e1362764c8614900376eef146b168e1dd4691cddd9f13ded5a4a30204c9e
EBUILD ruby-2.6.6-r2.ebuild 7483 BLAKE2B 5a35f894ad96b5fd275ced79d45efc8ef3eae80a4649bf78bae35bbe97e129d9e9a7ea1a76fed0ce013f391159aa202015a805c401c13639825c138b3dad3ccb SHA512 9f248423913fffb984744387f1fd2d8b2b38cbe8a90d60fd75e5bbf25ddf9e90064a4fa24ae8cb5ab158c3201024cf2c3646706c24464e6973ecb739046e9c16
+EBUILD ruby-2.6.6-r3.ebuild 7579 BLAKE2B 133498c36d4d1e24fe23033d4d104b68db45eaa1b02f9db2435caecc0e2c01b1d73f5fb89ffd48e7217c28c3af5261bc40474648585de52dfeee18ca4dc6ea6c SHA512 777fa647d01c55e98b87a308fe0c1d496af509485939ade4de0dd65c285fa4b26fac60327140a0a606cda17bab11c4fd553b541307203cbb6b2e05aa4ca361d1
+EBUILD ruby-2.7.2-r1.ebuild 7775 BLAKE2B 973a836d11245fb58f101d154551b17a97556197b81ed8f95ae39196f213ff624774a38993de697443e18c8941e68729c5b5fe77d705f734cbbd620b89e8b844 SHA512 7200904496e46e1d6dbf11b36a374f718b4391f7bc9f4e6d7de7ad0225d70e875c7bd34b74274c06b500fc9130385a7d0dbdcca5ff27485ecec5b3c9ba1899d4
EBUILD ruby-2.7.2.ebuild 7654 BLAKE2B 9c3a093850ad70ff63c334b2f3dfe3e3d8637e23667f4f5b0e4d969e287a3ed5ce5055f22cbd3c334ffd1ddb3b0ec09c7bafa8a8c87ecdc3d2d2d392cf5860cf SHA512 c284e72bd6847aaaca2bb2481af752e56eff49ac45007f4757edd80237bba092d21bfdc2d863d1e0fc6b9b7ccb3bdbb3898b91490261325621d8c7b395c0875b
EBUILD ruby-3.0.0-r1.ebuild 7658 BLAKE2B 16d96d395cb398a2bb2f3b986996163453b44769b667545f5ca1d8527c48d4b9f17c5ba3da41769cc6fcf482f2f1e0e3e5be44a11b40bb3a0c175757ae9ceedf SHA512 0fc8907e181c259a30cbb6db82b66a99791b131bd93068b3fd924a6babb4e89729a4efe8437b143cd0e907a6ee5804a3a1c55634ec72c65a9f37d1e31f22aad1
+EBUILD ruby-3.0.0-r2.ebuild 7779 BLAKE2B 4c214a8c79a5742e46f714907f440eabbd82e6dda34d38fd0a665bdd49c7f1c7652a734c6ef8e9c29dd3217ded2e1ecbd38bd603567c2b02e0db2c6bf0e9da48 SHA512 652b35ae989b4af553a8666de36903c8d0028a6c125d9d8cdfee5bb97785269add49c612a6441fd7a19fba575de3f63d7821272f493b164dedaf7dc8ce1c229b
EBUILD ruby-3.0.0.ebuild 7652 BLAKE2B 3e67942dd8dd944bd7af027d257bdc6a41769c3099f5a5f9e391fc0bbb4916e7203dae81bc4b568121bbbfe0b758b229bb66e25eebcde3cffee1766652adc036 SHA512 5b02c7620ba26e49007ecc105d946ddbcc286b848ab90210dd712130a8e05c4d7a1e258ebbbec257bab4801b5c018404b284e0eda8cc66f2d130e1cc4b73286e
MISC metadata.xml 523 BLAKE2B 4ed08360a279c8d44fe87f677cdc24a76eda6d37c591186951e16321f464d4451d0d1299c4e1d996bffe15a8cca672d4c5c1bc5fb0aa6cda69b8eff90ec31df8 SHA512 f74c386a3d6314d630aff11c40314db40b7f9fb202910480b37aa65b7bac62d6e87fa7590b2a26aa1713bb65be486ed84138e1273eaf7c8b966d7414e6b55464
diff --git a/dev-lang/ruby/ruby-2.6.6-r3.ebuild b/dev-lang/ruby/ruby-2.6.6-r3.ebuild
new file mode 100644
index 000000000000..acd4660da3fa
--- /dev/null
+++ b/dev-lang/ruby/ruby-2.6.6-r3.ebuild
@@ -0,0 +1,259 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools flag-o-matic multilib
+
+MY_P="${PN}-$(ver_cut 1-3)"
+S=${WORKDIR}/${MY_P}
+
+SLOT=$(ver_cut 1-2)
+MY_SUFFIX=$(ver_rs 1 '' ${SLOT})
+RUBYVERSION=${SLOT}.0
+
+DESCRIPTION="An object-oriented scripting language"
+HOMEPAGE="https://www.ruby-lang.org/"
+SRC_URI="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz"
+
+LICENSE="|| ( Ruby-BSD BSD-2 )"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit libressl +rdoc rubytests socks5 +ssl static-libs systemtap tk xemacs"
+
+RDEPEND="
+ berkdb? ( sys-libs/db:= )
+ gdbm? ( sys-libs/gdbm:= )
+ jemalloc? ( dev-libs/jemalloc )
+ jit? ( || ( sys-devel/gcc:* sys-devel/clang:* ) )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl )
+ )
+ socks5? ( >=net-proxy/dante-1.1.13 )
+ systemtap? ( dev-util/systemtap )
+ tk? (
+ dev-lang/tcl:0=[threads]
+ dev-lang/tk:0=[threads]
+ )
+ dev-libs/libyaml
+ dev-libs/libffi:=
+ sys-libs/readline:0=
+ sys-libs/zlib
+ >=app-eselect/eselect-ruby-20181225
+"
+
+DEPEND="${RDEPEND}"
+
+BUNDLED_GEMS="
+ >=dev-ruby/did_you_mean-1.2.1[ruby_targets_ruby26]
+ >=dev-ruby/minitest-5.11.3[ruby_targets_ruby26]
+ >=dev-ruby/net-telnet-0.2.0[ruby_targets_ruby26]
+ >=dev-ruby/power_assert-1.1.3[ruby_targets_ruby26]
+ >=dev-ruby/rake-12.3.2[ruby_targets_ruby26]
+ >=dev-ruby/test-unit-3.2.9[ruby_targets_ruby26]
+ >=dev-ruby/xmlrpc-0.3.0[ruby_targets_ruby26]
+"
+
+PDEPEND="
+ ${BUNDLED_GEMS}
+ virtual/rubygems[ruby_targets_ruby26]
+ >=dev-ruby/bundler-1.17.2[ruby_targets_ruby26]
+ >=dev-ruby/json-2.0.2[ruby_targets_ruby26]
+ rdoc? ( >=dev-ruby/rdoc-6.1.2[ruby_targets_ruby26] )
+ xemacs? ( app-xemacs/ruby-modes )"
+
+src_prepare() {
+ # 005 does not compile bigdecimal and is questionable because it
+ # compiles ruby in a non-standard way, may be dropped
+ eapply "${FILESDIR}"/2.6/{002,010}*.patch
+
+ einfo "Unbundling gems..."
+ cd "$S"
+ # Remove bundled gems that we will install via PDEPEND, bug
+ # 539700.
+ rm -fr gems/* || die
+
+ einfo "Removing bundled libraries..."
+ rm -fr ext/fiddle/libffi-3.2.1 || die
+
+ if use prefix ; then
+ # Fix hardcoded SHELL var in mkmf library
+ sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb || die
+
+ if [[ ${CHOST} == *darwin* ]] ; then
+ # avoid symlink loop on Darwin (?!)
+ sed -i \
+ -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).$(SOEXT)//' \
+ configure.ac || die
+
+ # make ar/libtool hack for Darwin work
+ sed -i \
+ -e "s/ac_cv_prog_ac_ct_AR='libtool/ac_cv_prog_AR='${CHOST}-libtool/" \
+ configure.ac || die
+ fi
+ fi
+
+ eapply_user
+
+ eautoreconf
+}
+
+src_configure() {
+ local modules= myconf=
+
+ # -fomit-frame-pointer makes ruby segfault, see bug #150413.
+ filter-flags -fomit-frame-pointer
+ # In many places aliasing rules are broken; play it safe
+ # as it's risky with newer compilers to leave it as it is.
+ append-flags -fno-strict-aliasing
+
+ # Socks support via dante
+ if use socks5 ; then
+ # Socks support can't be disabled as long as SOCKS_SERVER is
+ # set and socks library is present, so need to unset
+ # SOCKS_SERVER in that case.
+ unset SOCKS_SERVER
+ fi
+
+ # Increase GC_MALLOC_LIMIT if set (default is 8000000)
+ if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
+ append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
+ fi
+
+ # ipv6 hack, bug 168939. Needs --enable-ipv6.
+ use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
+
+ # Determine which modules *not* to build depending in the USE flags.
+ if ! use berkdb ; then
+ modules="${modules},dbm"
+ fi
+ if ! use gdbm ; then
+ modules="${modules},gdbm"
+ fi
+ if ! use ssl ; then
+ modules="${modules},openssl"
+ fi
+ if ! use tk ; then
+ modules="${modules},tk"
+ fi
+
+ # Provide an empty LIBPATHENV because we disable rpath but we do not
+ # need LD_LIBRARY_PATH by default since that breaks USE=multitarget
+ # #564272
+ INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \
+ --program-suffix=${MY_SUFFIX} \
+ --with-soname=ruby${MY_SUFFIX} \
+ --with-readline-dir="${EPREFIX}"/usr \
+ --enable-shared \
+ --enable-pthread \
+ --disable-rpath \
+ --with-out-ext="${modules}" \
+ $(use_with jemalloc jemalloc) \
+ $(use_enable jit jit-support ) \
+ $(use_enable socks5 socks) \
+ $(use_enable systemtap dtrace) \
+ $(use_enable doc install-doc) \
+ --enable-ipv6 \
+ $(use_enable static-libs static) \
+ $(use_enable static-libs install-static-library) \
+ $(use_with static-libs static-linked-ext) \
+ $(use_enable debug) \
+ ${myconf} \
+ --enable-option-checking=no
+
+ # Makefile is broken because it lacks -ldl
+ rm -rf ext/-test-/popen_deadlock || die
+}
+
+src_compile() {
+ emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS=""
+}
+
+src_test() {
+ emake -j1 V=1 test
+
+ elog "Ruby's make test has been run. Ruby also ships with a make check"
+ elog "that cannot be run until after ruby has been installed."
+ elog
+ if use rubytests; then
+ elog "You have enabled rubytests, so they will be installed to"
+ elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
+ elog "than root, and you must place them into a writeable directory."
+ elog "Then call: "
+ elog
+ elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
+ else
+ elog "Enable the rubytests USE flag to install the make check tests"
+ fi
+}
+
+src_install() {
+ # Remove the remaining bundled gems. We do this late in the process
+ # since they are used during the build to e.g. create the
+ # documentation.
+ einfo "Removing default gems before installation"
+ rm -rf .ext/common/json.rb .ext/common/json ext/json || die
+ rm -rf lib/bundler* lib/rdoc/rdoc.gemspec || die
+
+ # Ruby is involved in the install process, we don't want interference here.
+ unset RUBYOPT
+
+ local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
+
+ LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
+
+ if [[ ${CHOST} == *darwin* ]] ; then
+ DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_LIBRARY_PATH}"
+ export DYLD_LIBRARY_PATH
+ fi
+
+ RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
+ for d in $(find "${S}/ext" -type d) ; do
+ RUBYLIB="${RUBYLIB}:$d"
+ done
+ export LD_LIBRARY_PATH RUBYLIB
+
+ # Create directory for the default gems
+ local gem_home="${EPREFIX}/usr/$(get_libdir)/ruby/gems/${RUBYVERSION}"
+ mkdir -p "${D}/${gem_home}" || die "mkdir gem home failed"
+
+ emake V=1 DESTDIR="${D}" GEM_DESTDIR=${gem_home} install
+
+ # Remove installed rubygems and rdoc copy
+ rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
+ rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed"
+ rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
+ rm -rf "${ED}/usr/bin/"{bundle,bundler,ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
+
+ if use doc; then
+ emake DESTDIR="${D}" GEM_DESTDIR=${gem_home} install-doc
+ fi
+
+ if use examples; then
+ dodoc -r sample
+ fi
+
+ dodoc ChangeLog NEWS doc/NEWS* README*
+
+ if use rubytests; then
+ pushd test
+ insinto /usr/share/${PN}-${SLOT}/test
+ doins -r .
+ popd
+ fi
+}
+
+pkg_postinst() {
+ if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then
+ eselect ruby set ruby${MY_SUFFIX}
+ fi
+
+ elog
+ elog "To switch between available Ruby profiles, execute as root:"
+ elog "\teselect ruby set ruby(23|24|...)"
+ elog
+}
+
+pkg_postrm() {
+ eselect ruby cleanup
+}
diff --git a/dev-lang/ruby/ruby-2.7.2-r1.ebuild b/dev-lang/ruby/ruby-2.7.2-r1.ebuild
new file mode 100644
index 000000000000..cecc334b06d6
--- /dev/null
+++ b/dev-lang/ruby/ruby-2.7.2-r1.ebuild
@@ -0,0 +1,263 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools flag-o-matic multilib
+
+MY_P="${PN}-$(ver_cut 1-3)"
+S=${WORKDIR}/${MY_P}
+
+SLOT=$(ver_cut 1-2)
+MY_SUFFIX=$(ver_rs 1 '' ${SLOT})
+RUBYVERSION=${SLOT}.0
+
+DESCRIPTION="An object-oriented scripting language"
+HOMEPAGE="https://www.ruby-lang.org/"
+SRC_URI="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz"
+
+LICENSE="|| ( Ruby-BSD BSD-2 )"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit libressl +rdoc rubytests socks5 +ssl static-libs systemtap tk xemacs"
+
+RDEPEND="
+ berkdb? ( sys-libs/db:= )
+ gdbm? ( sys-libs/gdbm:= )
+ jemalloc? ( dev-libs/jemalloc )
+ jit? ( || ( sys-devel/gcc:* sys-devel/clang:* ) )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl )
+ )
+ socks5? ( >=net-proxy/dante-1.1.13 )
+ systemtap? ( dev-util/systemtap )
+ tk? (
+ dev-lang/tcl:0=[threads]
+ dev-lang/tk:0=[threads]
+ )
+ dev-libs/libyaml
+ dev-libs/libffi:=
+ sys-libs/readline:0=
+ sys-libs/zlib
+ >=app-eselect/eselect-ruby-20191222
+"
+
+DEPEND="${RDEPEND}"
+
+BUNDLED_GEMS="
+ >=dev-ruby/minitest-5.13.0[ruby_targets_ruby27]
+ >=dev-ruby/net-telnet-0.2.0[ruby_targets_ruby27]
+ >=dev-ruby/power_assert-1.1.7[ruby_targets_ruby27]
+ >=dev-ruby/rake-13.0.1[ruby_targets_ruby27]
+ >=dev-ruby/test-unit-3.3.4[ruby_targets_ruby27]
+ >=dev-ruby/xmlrpc-0.3.0[ruby_targets_ruby27]
+"
+
+PDEPEND="
+ ${BUNDLED_GEMS}
+ virtual/rubygems[ruby_targets_ruby27]
+ >=dev-ruby/bundler-2.1.4[ruby_targets_ruby27]
+ >=dev-ruby/did_you_mean-1.3.1[ruby_targets_ruby27]
+ >=dev-ruby/json-2.0.2[ruby_targets_ruby27]
+ rdoc? ( >=dev-ruby/rdoc-6.1.2[ruby_targets_ruby27] )
+ xemacs? ( app-xemacs/ruby-modes )"
+
+src_prepare() {
+ # 005 does not compile bigdecimal and is questionable because it
+ # compiles ruby in a non-standard way, may be dropped
+ eapply "${FILESDIR}"/2.7/{002,010}*.patch
+
+ einfo "Unbundling gems..."
+ cd "$S"
+ # Remove bundled gems that we will install via PDEPEND, bug
+ # 539700.
+ rm -fr gems/* || die
+ # Don't install CLI tools since they will clash with the gem
+ rm -f bin/{racc,racc2y,y2racc} || die
+ sed -i -e '/executables/ s:^:#:' lib/racc/racc.gemspec || die
+
+ einfo "Removing bundled libraries..."
+ rm -fr ext/fiddle/libffi-3.2.1 || die
+
+ if use prefix ; then
+ # Fix hardcoded SHELL var in mkmf library
+ sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb || die
+
+ if [[ ${CHOST} == *darwin* ]] ; then
+ # avoid symlink loop on Darwin (?!)
+ sed -i \
+ -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).$(SOEXT)//' \
+ configure.ac || die
+
+ # make ar/libtool hack for Darwin work
+ sed -i \
+ -e "s/ac_cv_prog_ac_ct_AR='libtool/ac_cv_prog_AR='${CHOST}-libtool/" \
+ configure.ac || die
+ fi
+ fi
+
+ eapply_user
+
+ eautoreconf
+}
+
+src_configure() {
+ local modules= myconf=
+
+ # -fomit-frame-pointer makes ruby segfault, see bug #150413.
+ filter-flags -fomit-frame-pointer
+ # In many places aliasing rules are broken; play it safe
+ # as it's risky with newer compilers to leave it as it is.
+ append-flags -fno-strict-aliasing
+
+ # Socks support via dante
+ if use socks5 ; then
+ # Socks support can't be disabled as long as SOCKS_SERVER is
+ # set and socks library is present, so need to unset
+ # SOCKS_SERVER in that case.
+ unset SOCKS_SERVER
+ fi
+
+ # Increase GC_MALLOC_LIMIT if set (default is 8000000)
+ if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
+ append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
+ fi
+
+ # ipv6 hack, bug 168939. Needs --enable-ipv6.
+ use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
+
+ # Determine which modules *not* to build depending in the USE flags.
+ if ! use berkdb ; then
+ modules="${modules},dbm"
+ fi
+ if ! use gdbm ; then
+ modules="${modules},gdbm"
+ fi
+ if ! use ssl ; then
+ modules="${modules},openssl"
+ fi
+ if ! use tk ; then
+ modules="${modules},tk"
+ fi
+
+ # Provide an empty LIBPATHENV because we disable rpath but we do not
+ # need LD_LIBRARY_PATH by default since that breaks USE=multitarget
+ # #564272
+ INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \
+ --program-suffix=${MY_SUFFIX} \
+ --with-soname=ruby${MY_SUFFIX} \
+ --with-readline-dir="${EPREFIX}"/usr \
+ --enable-shared \
+ --enable-pthread \
+ --disable-rpath \
+ --with-out-ext="${modules}" \
+ $(use_with jemalloc jemalloc) \
+ $(use_enable jit jit-support ) \
+ $(use_enable socks5 socks) \
+ $(use_enable systemtap dtrace) \
+ $(use_enable doc install-doc) \
+ --enable-ipv6 \
+ $(use_enable static-libs static) \
+ $(use_enable static-libs install-static-library) \
+ $(use_with static-libs static-linked-ext) \
+ $(use_enable debug) \
+ ${myconf} \
+ --enable-option-checking=no
+
+ # Makefile is broken because it lacks -ldl
+ rm -rf ext/-test-/popen_deadlock || die
+}
+
+src_compile() {
+ emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS=""
+}
+
+src_test() {
+ emake -j1 V=1 test
+
+ elog "Ruby's make test has been run. Ruby also ships with a make check"
+ elog "that cannot be run until after ruby has been installed."
+ elog
+ if use rubytests; then
+ elog "You have enabled rubytests, so they will be installed to"
+ elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
+ elog "than root, and you must place them into a writeable directory."
+ elog "Then call: "
+ elog
+ elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
+ else
+ elog "Enable the rubytests USE flag to install the make check tests"
+ fi
+}
+
+src_install() {
+ # Remove the remaining bundled gems. We do this late in the process
+ # since they are used during the build to e.g. create the
+ # documentation.
+ einfo "Removing default gems before installation"
+ rm -rf .ext/common/json.rb .ext/common/json ext/json || die
+ rm -rf lib/bundler* lib/rdoc/rdoc.gemspec || die
+ rm -rf lib/did_you_mean* || die
+
+ # Ruby is involved in the install process, we don't want interference here.
+ unset RUBYOPT
+
+ local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
+
+ LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
+
+ if [[ ${CHOST} == *darwin* ]] ; then
+ DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_LIBRARY_PATH}"
+ export DYLD_LIBRARY_PATH
+ fi
+
+ RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
+ for d in $(find "${S}/ext" -type d) ; do
+ RUBYLIB="${RUBYLIB}:$d"
+ done
+ export LD_LIBRARY_PATH RUBYLIB
+
+ # Create directory for the default gems
+ local gem_home="${EPREFIX}/usr/$(get_libdir)/ruby/gems/${RUBYVERSION}"
+ mkdir -p "${D}/${gem_home}" || die "mkdir gem home failed"
+
+ emake V=1 DESTDIR="${D}" GEM_DESTDIR=${gem_home} install
+
+ # Remove installed rubygems and rdoc copy
+ rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
+ rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed"
+ rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
+ rm -rf "${ED}/usr/bin/"{bundle,bundler,ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
+
+ if use doc; then
+ emake DESTDIR="${D}" GEM_DESTDIR=${gem_home} install-doc
+ fi
+
+ if use examples; then
+ dodoc -r sample
+ fi
+
+ dodoc ChangeLog NEWS doc/NEWS* README*
+
+ if use rubytests; then
+ pushd test
+ insinto /usr/share/${PN}-${SLOT}/test
+ doins -r .
+ popd
+ fi
+}
+
+pkg_postinst() {
+ if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then
+ eselect ruby set ruby${MY_SUFFIX}
+ fi
+
+ elog
+ elog "To switch between available Ruby profiles, execute as root:"
+ elog "\teselect ruby set ruby(23|24|...)"
+ elog
+}
+
+pkg_postrm() {
+ eselect ruby cleanup
+}
diff --git a/dev-lang/ruby/ruby-3.0.0-r2.ebuild b/dev-lang/ruby/ruby-3.0.0-r2.ebuild
new file mode 100644
index 000000000000..096518f2ba62
--- /dev/null
+++ b/dev-lang/ruby/ruby-3.0.0-r2.ebuild
@@ -0,0 +1,264 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools flag-o-matic multilib
+
+MY_P="${PN}-$(ver_cut 1-3)"
+S=${WORKDIR}/${MY_P}
+
+SLOT=$(ver_cut 1-2)
+MY_SUFFIX=$(ver_rs 1 '' ${SLOT})
+RUBYVERSION=${SLOT}.0
+
+DESCRIPTION="An object-oriented scripting language"
+HOMEPAGE="https://www.ruby-lang.org/"
+SRC_URI="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz"
+
+LICENSE="|| ( Ruby-BSD BSD-2 )"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit libressl +rdoc rubytests socks5 +ssl static-libs systemtap tk xemacs"
+
+RDEPEND="
+ berkdb? ( sys-libs/db:= )
+ gdbm? ( sys-libs/gdbm:= )
+ jemalloc? ( dev-libs/jemalloc )
+ jit? ( || ( sys-devel/gcc:* sys-devel/clang:* ) )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl )
+ )
+ socks5? ( >=net-proxy/dante-1.1.13 )
+ systemtap? ( dev-util/systemtap )
+ tk? (
+ dev-lang/tcl:0=[threads]
+ dev-lang/tk:0=[threads]
+ )
+ dev-libs/libyaml
+ dev-libs/libffi:=
+ sys-libs/readline:0=
+ sys-libs/zlib
+ >=app-eselect/eselect-ruby-20201225
+"
+
+DEPEND="${RDEPEND}"
+
+BUNDLED_GEMS="
+ >=dev-ruby/minitest-5.14.2[ruby_targets_ruby30]
+ >=dev-ruby/power_assert-1.2.0[ruby_targets_ruby30]
+ >=dev-ruby/rake-13.0.3[ruby_targets_ruby30]
+ >=dev-ruby/rbs-1.0.0[ruby_targets_ruby30]
+ >=dev-ruby/rexml-3.2.4[ruby_targets_ruby30]
+ >=dev-ruby/rss-0.2.9[ruby_targets_ruby30]
+ >=dev-ruby/test-unit-3.3.7[ruby_targets_ruby30]
+ >=dev-ruby/typeprof-0.11.0[ruby_targets_ruby30]
+"
+
+PDEPEND="
+ ${BUNDLED_GEMS}
+ virtual/rubygems[ruby_targets_ruby30]
+ >=dev-ruby/bundler-2.1.4[ruby_targets_ruby30]
+ >=dev-ruby/did_you_mean-1.5.0[ruby_targets_ruby30]
+ >=dev-ruby/json-2.5.1[ruby_targets_ruby30]
+ rdoc? ( >=dev-ruby/rdoc-6.3.0[ruby_targets_ruby30] )
+ xemacs? ( app-xemacs/ruby-modes )"
+
+src_prepare() {
+ eapply "${FILESDIR}"/"${SLOT}"/{001,010}*.patch
+
+ einfo "Unbundling gems..."
+ cd "$S"
+ # Remove bundled gems that we will install via PDEPEND, bug
+ # 539700.
+ rm -fr gems/* || die
+ touch gems/bundled_gems || die
+ # Don't install CLI tools since they will clash with the gem
+ rm -f bin/{racc,racc2y,y2racc} || die
+ sed -i -e '/executables/ s:^:#:' lib/racc/racc.gemspec || die
+
+ einfo "Removing bundled libraries..."
+ rm -fr ext/fiddle/libffi-3.2.1 || die
+
+ if use prefix ; then
+ # Fix hardcoded SHELL var in mkmf library
+ sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb || die
+
+ if [[ ${CHOST} == *darwin* ]] ; then
+ # avoid symlink loop on Darwin (?!)
+ sed -i \
+ -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).$(SOEXT)//' \
+ configure.ac || die
+
+ # make ar/libtool hack for Darwin work
+ sed -i \
+ -e "s/ac_cv_prog_ac_ct_AR='libtool/ac_cv_prog_AR='${CHOST}-libtool/" \
+ configure.ac || die
+ fi
+ fi
+
+ eapply_user
+
+ eautoreconf
+}
+
+src_configure() {
+ local modules= myconf=
+
+ # -fomit-frame-pointer makes ruby segfault, see bug #150413.
+ filter-flags -fomit-frame-pointer
+ # In many places aliasing rules are broken; play it safe
+ # as it's risky with newer compilers to leave it as it is.
+ append-flags -fno-strict-aliasing
+
+ # Socks support via dante
+ if use socks5 ; then
+ # Socks support can't be disabled as long as SOCKS_SERVER is
+ # set and socks library is present, so need to unset
+ # SOCKS_SERVER in that case.
+ unset SOCKS_SERVER
+ fi
+
+ # Increase GC_MALLOC_LIMIT if set (default is 8000000)
+ if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
+ append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
+ fi
+
+ # ipv6 hack, bug 168939. Needs --enable-ipv6.
+ use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
+
+ # Determine which modules *not* to build depending in the USE flags.
+ if ! use berkdb ; then
+ modules="${modules},dbm"
+ fi
+ if ! use gdbm ; then
+ modules="${modules},gdbm"
+ fi
+ if ! use ssl ; then
+ modules="${modules},openssl"
+ fi
+ if ! use tk ; then
+ modules="${modules},tk"
+ fi
+
+ # Provide an empty LIBPATHENV because we disable rpath but we do not
+ # need LD_LIBRARY_PATH by default since that breaks USE=multitarget
+ # #564272
+ INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \
+ --program-suffix=${MY_SUFFIX} \
+ --with-soname=ruby${MY_SUFFIX} \
+ --with-readline-dir="${EPREFIX}"/usr \
+ --enable-shared \
+ --enable-pthread \
+ --disable-rpath \
+ --with-out-ext="${modules}" \
+ $(use_with jemalloc jemalloc) \
+ $(use_enable jit jit-support ) \
+ $(use_enable socks5 socks) \
+ $(use_enable systemtap dtrace) \
+ $(use_enable doc install-doc) \
+ --enable-ipv6 \
+ $(use_enable static-libs static) \
+ $(use_enable static-libs install-static-library) \
+ $(use_with static-libs static-linked-ext) \
+ $(use_enable debug) \
+ ${myconf} \
+ --enable-option-checking=no
+
+ # Makefile is broken because it lacks -ldl
+ rm -rf ext/-test-/popen_deadlock || die
+}
+
+src_compile() {
+ emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS=""
+}
+
+src_test() {
+ emake -j1 V=1 test
+
+ elog "Ruby's make test has been run. Ruby also ships with a make check"
+ elog "that cannot be run until after ruby has been installed."
+ elog
+ if use rubytests; then
+ elog "You have enabled rubytests, so they will be installed to"
+ elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
+ elog "than root, and you must place them into a writeable directory."
+ elog "Then call: "
+ elog
+ elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
+ else
+ elog "Enable the rubytests USE flag to install the make check tests"
+ fi
+}
+
+src_install() {
+ # Remove the remaining bundled gems. We do this late in the process
+ # since they are used during the build to e.g. create the
+ # documentation.
+ einfo "Removing default gems before installation"
+ rm -rf .ext/common/json.rb .ext/common/json ext/json || die
+ rm -rf lib/bundler* lib/rdoc/rdoc.gemspec || die
+ rm -rf lib/did_you_mean* || die
+
+ # Ruby is involved in the install process, we don't want interference here.
+ unset RUBYOPT
+
+ local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
+
+ LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
+
+ if [[ ${CHOST} == *darwin* ]] ; then
+ DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_LIBRARY_PATH}"
+ export DYLD_LIBRARY_PATH
+ fi
+
+ RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
+ for d in $(find "${S}/ext" -type d) ; do
+ RUBYLIB="${RUBYLIB}:$d"
+ done
+ export LD_LIBRARY_PATH RUBYLIB
+
+ # Create directory for the default gems
+ local gem_home="${EPREFIX}/usr/$(get_libdir)/ruby/gems/${RUBYVERSION}"
+ mkdir -p "${D}/${gem_home}" || die "mkdir gem home failed"
+
+ emake V=1 DESTDIR="${D}" GEM_DESTDIR=${gem_home} install
+
+ # Remove installed rubygems and rdoc copy
+ rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
+ rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed"
+ rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
+ rm -rf "${ED}/usr/bin/"{bundle,bundler,ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
+
+ if use doc; then
+ emake DESTDIR="${D}" GEM_DESTDIR=${gem_home} install-doc
+ fi
+
+ if use examples; then
+ dodoc -r sample
+ fi
+
+ dodoc ChangeLog NEWS.md doc/NEWS* README*
+
+ if use rubytests; then
+ pushd test
+ insinto /usr/share/${PN}-${SLOT}/test
+ doins -r .
+ popd
+ fi
+}
+
+pkg_postinst() {
+ if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then
+ eselect ruby set ruby${MY_SUFFIX}
+ fi
+
+ elog
+ elog "To switch between available Ruby profiles, execute as root:"
+ elog "\teselect ruby set ruby(23|24|...)"
+ elog
+}
+
+pkg_postrm() {
+ eselect ruby cleanup
+}
diff --git a/dev-lang/sassc/Manifest b/dev-lang/sassc/Manifest
index ba7f450084cb..57cadd83e6d2 100644
--- a/dev-lang/sassc/Manifest
+++ b/dev-lang/sassc/Manifest
@@ -1,5 +1,3 @@
-DIST sassc-3.6.0.tar.gz 26111 BLAKE2B 91d634bd652607407c48f141aa39260739357f6eeb4bade1fff1bfdd4e4e6e0757712501395c913ef1a8944ec9174649fa5ce657af4afec6f9f0eb7f804e1ff2 SHA512 0d8de651b1587f4994a5da85ad09ec2ce6e240213dbaa567c6b9baa612fe82e337061d9a5a8a3a5588e4c366c1178b6fd04e9d699a0be3d83c68f98bac774527
DIST sassc-3.6.1.tar.gz 26137 BLAKE2B 73aaabe4f4dab7efdaef591918da8a4bd79e98dff0105666548f00b09657f46d2e28523988d60eef7f4b1eedacbfe17638e96f5a9c98a5325ef9e56f681c0e28 SHA512 b6df8f481db0737ca08808c0849dcbd83e80799d883271d382607b7a74028153195f5f9c26768ffe1a9a92ee8c26be3c382ad7b3a5336eb6e4a0dad58132690e
-EBUILD sassc-3.6.0.ebuild 499 BLAKE2B 32e47680611689f022aa863cb12310bc456cf14817c871da23108872d2a7af046f73d9cf14ebb8a1ca48b5c688a15f4d6c9799268b75218a3ca5fe5a11d9313e SHA512 178d94cff7e1f973beac530b4f0f602d190c31977bfd0bc2a6e9966856fa8aa12aaa90e1995d6ec1201f0dbd5f362820d44b9fef73f6b9bfb944268bcd84574a
EBUILD sassc-3.6.1.ebuild 543 BLAKE2B c9f38480e2554b1116b98beb2e0a003177200c7e38482ea09a71213971a19057f00fbf07d152a3fc868ca9ac3ed853cdbc9108ec3c142a6faeb8f1cbe6b90bdc SHA512 ea199a2b858a3c701d8c88857b392928a8f0fe390279cf649b373d6cc59cc9fdc4c52e836ff546d707d20a03b605eaee3580ce51624e34317486c3703123fe93
MISC metadata.xml 481 BLAKE2B 4f5d2e0062ba66e18b394807ae98e1ebe8925d0f094f969406f4d3c3cbed7fb001adfe41f1b61246df24f89e11b142d31027dfde07cfb919c60a2fece1ed20fe SHA512 2ba528dc5a56c29561f5b7644b5a428d99383965052233f4b5b03e0796a5e0bf1d7747548f9a7edde41471cacab1269d3c1cce089bba8ab33d903b4cd48585f7
diff --git a/dev-lang/sassc/sassc-3.6.0.ebuild b/dev-lang/sassc/sassc-3.6.0.ebuild
deleted file mode 100644
index f66b0dc86192..000000000000
--- a/dev-lang/sassc/sassc-3.6.0.ebuild
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools
-
-SRC_URI="https://github.com/sass/sassc/archive/${PV}.tar.gz -> ${P}.tar.gz"
-KEYWORDS="amd64 ~arm arm64 ~ia64 ~ppc ~ppc64 x86 ~amd64-linux"
-
-DESCRIPTION="A libsass command line driver"
-HOMEPAGE="https://github.com/sass/sassc"
-LICENSE="MIT"
-SLOT="0"
-IUSE=""
-
-RDEPEND="dev-libs/libsass:="
-DEPEND="${RDEPEND}"
-
-DOCS=( Readme.md )
-
-src_prepare() {
- default
- eautoreconf
-}
diff --git a/dev-lang/teyjus/Manifest b/dev-lang/teyjus/Manifest
index c6e3dcac2c50..e17cfd2731a3 100644
--- a/dev-lang/teyjus/Manifest
+++ b/dev-lang/teyjus/Manifest
@@ -5,4 +5,4 @@ AUX teyjus-2.1-p003-Removing-deprecated-function-String.set.patch 1599 BLAKE2B e
DIST teyjus-2.1.tar.gz 723763 BLAKE2B ab6a98c2d2291620b586ab0b419a214b0f7c0b27aad444324e5a417c1a0b27382e2d5c622f798ea88cab77853bca3305ec37904c50a7304ace20237afb993b91 SHA512 1f71d19502f4f4da00f635d2c3d4e141403182d65f039e0d43660edf84c5fcd900e7225ac92dc5bdbe0c8379c4e2ce6e27879af504fcfafddf2695a0c8a13379
EBUILD teyjus-2.1-r1.ebuild 2951 BLAKE2B 2b5ad60a50908053416b7633eae435da838621ea15ee09cfab961710db1e7d4b7ac8f35e70a3819fd4658ed8b110902d6abf37b6f525ab7e3cf606fcf823d6aa SHA512 5502e778ddfbe97973949e638af3c73631efa9d9b2af53fd1435e1eb47f7e68df8a4e49411ee20748e17535c786c2c04a5bde4d913ef70fc2bffd933ad9de4d7
EBUILD teyjus-2.1.ebuild 2907 BLAKE2B ea6e92b665791e776f737885a883fe4f04bc05dec026cfbf0e9b3da84ec9cb6d54aeb5c9f124ce958a27eadc624eefec651b3f69e35c0a4e7175241e9887d764 SHA512 809cbdce2b3ffd69e7fb1281feaad43220e688539be1ce63fc99febe3ac2adf57da12ed2f8f4b5ffe86df13dec3f08557afe6c7321da75f1b631b54f2488ecd1
-MISC metadata.xml 1653 BLAKE2B a9c2315795d7eb61708ff4b163a0588900bcaea661b052a24f83834acbded91f3dabaa0a14525e1ff729175d7c17ac393946c21ae801b60efd591448b07b7c1c SHA512 5b82a25d9ef5e24c4c9bbd633b7de98f92ce79ae041c3056df6dd0471824c98884d1ef608352431c34aecdaa79736c7f163762206adb9207eeebca2886f5aa1b
+MISC metadata.xml 1653 BLAKE2B 8780391a497177661949fc7754d04138147c8987e7cdaa3744ba4a1aca153aa1e1e4f5cefc891220625fbe2b31c940d89645c9a903b94c143f283cf2bbc0713c SHA512 98392884cabd672c278e7b78bf817055acd369bbdb9144448afcff0f8c095fd27f9af02da1df4d3ef54b4cfad39444b9426979c66a2459afe526b07bc21cb44a
diff --git a/dev-lang/teyjus/metadata.xml b/dev-lang/teyjus/metadata.xml
index 472f7ac2b56a..7ea6eb93b45a 100644
--- a/dev-lang/teyjus/metadata.xml
+++ b/dev-lang/teyjus/metadata.xml
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
diff --git a/dev-lang/vala/Manifest b/dev-lang/vala/Manifest
index 205074bacf06..ff4e20258690 100644
--- a/dev-lang/vala/Manifest
+++ b/dev-lang/vala/Manifest
@@ -16,12 +16,12 @@ DIST vala-0.50.2.tar.xz 3514208 BLAKE2B f2f7e86b90ac1245d593ba82204667a830843e2f
EBUILD vala-0.36.20.ebuild 802 BLAKE2B 0e7711a1a9ae8af349595084c930ab419675a33fcc28ee041bcf9e4b81a45be47ca630840a111b6a92051299af6147832b2ae5d27274475ed02cecf00437a7b8 SHA512 e8c2813a11363f4c6875c943b89626b35ab164d833b11b9bf4c163b7dbf080ddf441a731d9eab0c1c1b4958c6c5155d59e7d92c65bc8f541faadf2c491dae386
EBUILD vala-0.40.20.ebuild 1189 BLAKE2B 6e83aeb9ed64a5e84245acd2817fc378d35f8e54811094f0443db19162bcaa805a27512d4d40b91b8ba6b7f7a2936245f3394d12ab6324fc91c266390d389f86 SHA512 ee4e6c0cf1608758ff204ed09ac847dddb861f652d5275c4f9e9fc9bc9518d692aabe87047ef61976b78ae3457d407abede2178a58bcc92e0b41b16dc6891217
EBUILD vala-0.40.23.ebuild 1189 BLAKE2B 6e83aeb9ed64a5e84245acd2817fc378d35f8e54811094f0443db19162bcaa805a27512d4d40b91b8ba6b7f7a2936245f3394d12ab6324fc91c266390d389f86 SHA512 ee4e6c0cf1608758ff204ed09ac847dddb861f652d5275c4f9e9fc9bc9518d692aabe87047ef61976b78ae3457d407abede2178a58bcc92e0b41b16dc6891217
-EBUILD vala-0.40.24.ebuild 1195 BLAKE2B 9b158f53417106993669d21f72a52c3ab61ef3ab92680dcafb56c1db278fa2c59c4f84ed9baba93550e2afcd3f289d344e0c0931fbfe151a753e0e8f8146b6de SHA512 8864a84a674feba6971cabc3ae51f3855db90e4e181e102e39d44c1ef085241b4d64b1af20928c261de5543f2af6b8f99bdf5aadac0881e10b84d171b16fbaf1
+EBUILD vala-0.40.24.ebuild 1194 BLAKE2B d4fcf457089c81defbf66ac93c51f6242a0cfc22c5fcee5aa7b82f35b9969b06014ab5fba3b8471b864ea953ecff59946bcc514a2a4f8b52e8cde67353a436a6 SHA512 4c19985e30a50a898fedef09d22dc712ecee70dd7c95c53d75958265aba19d849dfcf5a2dc9d7e9be49b47932c347fa8181ee9c5e1b30021aab254765fd10a70
EBUILD vala-0.44.11.ebuild 1111 BLAKE2B eb0baf6ec735ba36bbbb4b2c79d272f92511c3bf01b072096409305e01b9d866f28817165881707504c007667810d4898ed8c2aeff055d22de28feaa89796ef7 SHA512 2a030743cf3ba4fd4ba2cc3fcec83003c04de9b40e61ae4cfd8a3084b6d18a726f32302f41d03559c53ef8edd4d69aa36cf74d34418771ecbba924167bb62967
EBUILD vala-0.46.10.ebuild 1304 BLAKE2B e1f8ea4781878b96860e364d6428259bea06e520294d73bb069727b1423de08758e91ce56749b12de32b8fc238237498d8e5fe21dc4f0f48c3ab78b5b09d228d SHA512 54a3cbb1817ee0a24c196ef5c48357026ff0ee77987e51babb3f6ba26bafa0e60e9deedec627e94b098e4bbea99ae514883a08f5660507a4fd3216e7852ce45a
EBUILD vala-0.46.13.ebuild 1304 BLAKE2B e1f8ea4781878b96860e364d6428259bea06e520294d73bb069727b1423de08758e91ce56749b12de32b8fc238237498d8e5fe21dc4f0f48c3ab78b5b09d228d SHA512 54a3cbb1817ee0a24c196ef5c48357026ff0ee77987e51babb3f6ba26bafa0e60e9deedec627e94b098e4bbea99ae514883a08f5660507a4fd3216e7852ce45a
EBUILD vala-0.48.11.ebuild 1312 BLAKE2B 2a5c969f40a6f1ec8869e5de0e41e16ee78db748069bc0016e9b5b5ecb1dbc2be307995939134fe36a37b94e4a89284478d4704c04f32db9ae9c0a2786b875b8 SHA512 7354b9ffa72a263f0035b6803d6ab4071c7870cc90a1c9a57355ca637392420e78be6d5bedb866f327a522c0f852f1c78ea798ba66c62f8b5753fac9ec21a969
-EBUILD vala-0.48.12.ebuild 1311 BLAKE2B a045355c6c6da5dc2ffd2eddf0f357acc88d634724df5cbda5adb4c67afde228a9bf8ce5c0c0e112f3107b9b115e42c3a21483ab2fe1bb4e2440d236d4afb8fe SHA512 226ee4a014ed5e15607b62d76fce20c7c9968258e6fcf951b340aff36551195f014b50be90fe92f74dab1039d70b07f40b4a41b9f3e7ef50d2ebfc8768cc003a
+EBUILD vala-0.48.12.ebuild 1310 BLAKE2B a67852970bce5c7722ea5b3b9f83c87cde1a6b081d9a31af0db83592159324263120586260549aedf97425ce9ff2425064a9cad69c527aefaaacd6fd016b0ab6 SHA512 ac9182b38eb5fbfde254d2d2bec74d41c4d96bf5d957bd5af46998d1eac11fbdc9c5912cb8e8c74749701e025d8302090ab128b9fd887f2b3ec7ebcbd392e01a
EBUILD vala-0.48.6.ebuild 1304 BLAKE2B f1a1eef0f848d21caabd058030ec26d50db969af3a8f5a8f2463a15c11cb02333f2cbce222f7d99796613a55edc2980be622bec0ed234198399ce1226d565b20 SHA512 9b6dcb5a0ecfe47b308f24f94746585962b0fc016f748599c9d76921ca581f75fb5615d34dd233a78f7ea999f7906e62c23db271573f32a44d7cba00fd6def86
EBUILD vala-0.48.9.ebuild 1304 BLAKE2B f1a1eef0f848d21caabd058030ec26d50db969af3a8f5a8f2463a15c11cb02333f2cbce222f7d99796613a55edc2980be622bec0ed234198399ce1226d565b20 SHA512 9b6dcb5a0ecfe47b308f24f94746585962b0fc016f748599c9d76921ca581f75fb5615d34dd233a78f7ea999f7906e62c23db271573f32a44d7cba00fd6def86
EBUILD vala-0.50.2.ebuild 1312 BLAKE2B 507ce10645273e1b88b85552e019ac819425b5b483fb0ae2d711d8632e4d6c01da13b9a263455e876634aa9671713dc3b88ec7abe7c8187da3d7430ee75f7d29 SHA512 2d85349c7a4ad95d79e44f4c4fb259edbe4f83e44ceda05ad22d74f2fab9d5d745465537aa6f1a06e771f062a4f19d72f597ede88c4efa52bae9627d60c565e3
diff --git a/dev-lang/vala/vala-0.40.24.ebuild b/dev-lang/vala/vala-0.40.24.ebuild
index 09138c9f8325..6c813e1d316b 100644
--- a/dev-lang/vala/vala-0.40.24.ebuild
+++ b/dev-lang/vala/vala-0.40.24.ebuild
@@ -11,7 +11,7 @@ HOMEPAGE="https://wiki.gnome.org/Projects/Vala"
LICENSE="LGPL-2.1"
SLOT="0.40"
-KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x86-linux"
+KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 sparc ~x86 ~x86-linux"
IUSE="test valadoc"
RESTRICT="!test? ( test )"
diff --git a/dev-lang/vala/vala-0.48.12.ebuild b/dev-lang/vala/vala-0.48.12.ebuild
index d680177a7c44..486138e84d76 100644
--- a/dev-lang/vala/vala-0.48.12.ebuild
+++ b/dev-lang/vala/vala-0.48.12.ebuild
@@ -10,7 +10,7 @@ HOMEPAGE="https://wiki.gnome.org/Projects/Vala"
LICENSE="LGPL-2.1+"
SLOT="0.48"
-KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x86-linux"
+KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 sparc ~x86 ~x86-linux"
IUSE="test valadoc"
RESTRICT="!test? ( test )"
diff --git a/dev-lang/xsb/Manifest b/dev-lang/xsb/Manifest
index 55c87fa42ec1..5885a32c0e51 100644
--- a/dev-lang/xsb/Manifest
+++ b/dev-lang/xsb/Manifest
@@ -1,4 +1,4 @@
DIST XSB38.tar.gz 13830570 BLAKE2B 60a6ab38435348d09e2d08bc65ca62c06b38495b72f40a6f3f10fe8d23949bfed0c580c9be0c8304d8a88a53b227bb695870b558d67f33a47543de6c1529180f SHA512 457c691450afcf3ed4e2fffc28deaef0949ef4bbf6fd69b504acc6507fbb144f2c6e427a25da2b6346b15b82e803c02d1b6962af698d16c1fcb9a3d56160ea30
-DIST xsb-3.8.0-gentoo-patchset-3.tar.gz 7297 BLAKE2B b3da3b4458e6e97c32fc6318bfa95d9755398572b85fe10a00af327c7cf940e18b8ae49cd2543544b363daf39bdc9db3963487e134c3a1b3a31c05344ed927fd SHA512 96064c2a27c4570b213613b97386bed1dac8082881794b7e18e5ae9ee9c28af78412c793b1fe26a293664ba88236257fbb3804cdda63799fff6fb72ca498b4a4
-EBUILD xsb-3.8.0.ebuild 3684 BLAKE2B 7c80f0e041e0ed06e2f8a6d14a4aae6ea63875182865bf46afc6c6871399c6554329eb91e71f8c1ffd90e6398eb835748a1ab99b8718f25fdb8c4fa3b0ece609 SHA512 17281a3bbecf9750c7491dba0ce97d375485376668246e2df0a24754f363fa17c46753d2ae0ee5c6efd7438d28d9196a89fbfca73846894163073f2273287ba6
+DIST xsb-3.8.0-gentoo-patchset-4.tar.gz 7373 BLAKE2B d34925e314c2b4726cdb1d5d6256f9ce5f0e9dbba408e77d1383ba72c6499be601fbd93f2ad20ef30e5df965016dd377bffed3dd3aba9f8256d8c4b57afd12d8 SHA512 8fcdaa3b2cafbd4e3b91fd1dc5c00b2986158a17968cfbffba263acd0752bdb76e342256b92f691c40d535a6f2f1c8632bbf8b095691fced55d18a67080ef559
+EBUILD xsb-3.8.0.ebuild 3684 BLAKE2B 63bff0d8c8b5fb73e0a99d302259a55bd111c42c569a8635e3e6a996e4626055d89498060687cad6187ee742c979f837305132d2cc91fe71fa77ab2e4f9c3116 SHA512 8adba13ce781f0dcab430a443c19a0668f9772efa307e0b19b68427dc32f8b6d8beedcfdfc8392762f203b8a6e9932934a0aeaccb6c512f992edf73f4faa32ee
MISC metadata.xml 313 BLAKE2B e6feaeb68ae7144def50a0dff4671b3a9ff070be4d447d45e5b8fbab61940026a5ea9d13c54fb21a808ed67630debf2f55e44d9186e83ea094b26dccab3bf1e6 SHA512 e271dc66bb407abe43ebc5b1fc27c318cc8082b4b14f43f1c33f3453e4a248c83ba2fcc73ba32a63828e172093a00b507f81c629d022799c4cd5a14417fc5ef0
diff --git a/dev-lang/xsb/xsb-3.8.0.ebuild b/dev-lang/xsb/xsb-3.8.0.ebuild
index 5c18dc3bfc1e..e1453eb2ca5e 100644
--- a/dev-lang/xsb/xsb-3.8.0.ebuild
+++ b/dev-lang/xsb/xsb-3.8.0.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PATCHSET_VER="3"
+PATCHSET_VER="4"
inherit autotools java-pkg-opt-2
diff --git a/dev-lang/zig/Manifest b/dev-lang/zig/Manifest
index 2083598a1e3e..68ffc061ec43 100644
--- a/dev-lang/zig/Manifest
+++ b/dev-lang/zig/Manifest
@@ -1,4 +1,4 @@
DIST zig-0.7.1.tar.gz 16082917 BLAKE2B 401bb079f2d0e2ad26837940e3b79c14237a492bd0b4df616f91b8b454ebd4ac3de36b2c988369c9eaaf7c2df4f95d4b1bb97760629f813ac8c7220e9542e12b SHA512 ad0b36f7b40481aca03940adfd42d34a724922993fc29a23a80412dc087ca6ce4876a400dc9bb7da455564521a88ea205c218988759ff6c56251a08232bfa41a
EBUILD zig-0.7.1.ebuild 1276 BLAKE2B 39e057ffe802b2983cb3f0515ebb176564dc50b6da99fba92436a7fd65c0a01c70d6af98bd661706af55ba5f3060848493744b2402d5206266a1ca9634a3aeee SHA512 ceda6aee196248e2af7af35aa6877c90fc6c1498bffcff3ceb7ab12988cc809c17febbedabcbbf86ce6c0c8ce8bb708c7faca37ca14bb1498c2fa178afbbe7c4
EBUILD zig-9999.ebuild 1276 BLAKE2B 39e057ffe802b2983cb3f0515ebb176564dc50b6da99fba92436a7fd65c0a01c70d6af98bd661706af55ba5f3060848493744b2402d5206266a1ca9634a3aeee SHA512 ceda6aee196248e2af7af35aa6877c90fc6c1498bffcff3ceb7ab12988cc809c17febbedabcbbf86ce6c0c8ce8bb708c7faca37ca14bb1498c2fa178afbbe7c4
-MISC metadata.xml 554 BLAKE2B 79d6e6148b3e2ba0d4eff9bf40e28bf75d29945e72b25eadf786d0f01ac7ede2705b63f8ff53303ab040246b6467964eb4225abf4d3a8de9d705835fde53e4d5 SHA512 b20d35c23d4e01f10e858fcda8c215400f56c62bd22c69a100acf7d20f3e2d08b6b1681bfaf0d6e4c47b99fbb4eff12337e0d7bc42caf1cbb2cf01d1c0646cce
+MISC metadata.xml 584 BLAKE2B a9ef261216e4ae4d9d21d6d7572515e9eb34d11c7df499b93ff86d62e349a6794aa8cabe89ec2f62cda2840d521887ec7ae9970e275a995d9dfe3d61eb691e7e SHA512 291034cec0f3b45d461d05fcf1512d5df0f3985b15c4bcf52aea4f61b25307986ca014e8e00f9d2a3a43f847941c5cf1c59c8065ff2b5878451f60743f95abe2
diff --git a/dev-lang/zig/metadata.xml b/dev-lang/zig/metadata.xml
index bd080b506d5a..734a3df4906c 100644
--- a/dev-lang/zig/metadata.xml
+++ b/dev-lang/zig/metadata.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
+ <maintainer type="person" proxied="yes">
<email>gentoo@aisha.cc</email>
<name>Aisha Tammy</name>
</maintainer>
- <maintainer type="project">
+ <maintainer type="project" proxied="proxy">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>