summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2016-12-28 22:20:50 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2016-12-28 22:37:38 +0000
commitce2c3248dff78e70172969b90055f439936be773 (patch)
tree3a595eb6d91b673ab0e9524bdc59431a3392a6e7 /dev-lang/ghc
parentdev-haskell/cabal: drop old (diff)
downloadgentoo-ce2c3248dff78e70172969b90055f439936be773.tar.gz
gentoo-ce2c3248dff78e70172969b90055f439936be773.tar.bz2
gentoo-ce2c3248dff78e70172969b90055f439936be773.zip
dev-lang/ghc: drop old
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'dev-lang/ghc')
-rw-r--r--dev-lang/ghc/Manifest26
-rw-r--r--dev-lang/ghc/files/ghc-7.0.4-darwin8.patch18
-rw-r--r--dev-lang/ghc/files/ghc-7.10.1-T10590-dequeue.patch89
-rw-r--r--dev-lang/ghc/files/ghc-7.2.1-freebsd-CHOST.patch13
-rw-r--r--dev-lang/ghc/files/ghc-7.4-rc2-macos-prefix-respect-gcc.patch23
-rw-r--r--dev-lang/ghc/files/ghc-7.4.1-darwin-CHOST.patch18
-rw-r--r--dev-lang/ghc/files/ghc-7.4.1-ticket-7339-fix-unaligned-unreg.patch28
-rw-r--r--dev-lang/ghc/files/ghc-7.4.2-system-libffi.patch119
-rw-r--r--dev-lang/ghc/files/ghc-7.5.20120505-system-libffi.patch88
-rw-r--r--dev-lang/ghc/files/ghc-7.6.2-integer-simple-div-mod.patch57
-rw-r--r--dev-lang/ghc/files/ghc-7.6.3-trac-3333-weak-syms.patch387
-rw-r--r--dev-lang/ghc/files/ghc-7.8.3-cc-lang.patch129
-rw-r--r--dev-lang/ghc/files/ghc-7.8.3-deRefStablePtr.patch38
-rw-r--r--dev-lang/ghc/files/ghc-7.8.3-ia64-prim.patch69
-rw-r--r--dev-lang/ghc/files/ghc-7.8.3-pic-asm.patch107
-rw-r--r--dev-lang/ghc/files/ghc-7.8.3-unreg-lit.patch84
-rw-r--r--dev-lang/ghc/files/terminfo-0.3.2.5-tinfo.patch25
-rw-r--r--dev-lang/ghc/ghc-7.10.2-r1.ebuild662
-rw-r--r--dev-lang/ghc/ghc-7.10.2.ebuild652
-rw-r--r--dev-lang/ghc/ghc-7.4.2.ebuild640
-rw-r--r--dev-lang/ghc/ghc-7.6.3-r1.ebuild829
-rw-r--r--dev-lang/ghc/ghc-7.8.3.ebuild624
-rw-r--r--dev-lang/ghc/metadata.xml1
23 files changed, 0 insertions, 4726 deletions
diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index a9b82dcd12cd..d15ace8f8f07 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -1,16 +1,7 @@
-DIST binary-0.7.5.0.tar.gz 45764 SHA256 4709c5aa7cc99cb4a465a68de1648968208d0c60c368e2fece476d977530ef19 SHA512 232e7c3da1c0055f3e9f211a86e81c76bc44ab1b70cabd23c93634dbaa42eed8bd9314fbedc16b9703d3ca92b0bbf232e6c30bb1384687dad0e6e85c9abb8947 WHIRLPOOL 1d8dcf9d5125ff398375f4024c0e43fa168004811db7824e2739ec5c0451b38dae9ad74f757c7708427deed0044580b182e35d1c7ecffec25f7b10c70bd32075
DIST binary-0.7.6.1.tar.gz 47086 SHA256 8f85cafc15be660757878a665d024ce595d4422fead174e20a501c9ec8f81067 SHA512 655daa93a52b845a85d440810452933d7bc3398ad1b51e1e955b2d19a0a32679325a0d1751ad50d252531e493528262e14dab32af4b9a515855fe7f64e0730b2 WHIRLPOOL 6853eb2c817e8ae792226c6c7764ce495833f965c3d503fe7e39c0502019d12f7bd46309b72dfdb276c7dbce8c004cb59fdea4936d69ede0a7c8b487acda2702
-DIST ghc-7.10.2-src.tar.bz2 12651156 SHA256 908a01ca86238318f4e880fda400ea399d0a0008d699c912b85d0e0f746e5689 SHA512 e3f99a9e848c12b728212da24bf9029ec8cde88cdfa7eeb4ee2ea223ad8bcaae3e7c27456d09d60a3d21efa8f907ccd2490caf5630ca5fe3ce87f04901275a66 WHIRLPOOL dee757e79de8ac6bcf127212703985282ce96d050be50e78c3f249f13dc0212c9fd96899502748ceb26b9fc3a804379a456e19a9bedfef72f6890992b00492da
DIST ghc-7.10.3-src.tar.bz2 13281867 SHA256 3e29a56a74ed6a74d3ee2a6db9389f2462837da46ca6dce9d2965f9c152f0c15 SHA512 97a8282d8a75399c78d85d6faab7ac253a993dc69f1840358572f1878b8fd1a527c28801e5823c8200b5690e268e4a0c00941945ada13790852c75a83b612c17 WHIRLPOOL 04af6ea2738a1cc9e266efbb0e1b41b70d4cd915b48ca1265fade62b1c56cd51056fd1a82fc14cebc19a0c16782609a991c1a181ebe59574f1a10b4f26ad830d
-DIST ghc-7.4.2-src.tar.bz2 25836446 SHA256 f2ee1289a33cc70539287129841acc7eaf16112bb60c59b5a6ee91887bfd836d SHA512 5a3d06a36702fa7e337b482c9de92ce1f84a68f18d8560bcc11f3617d6d46f93167fee27e786de6483a9ef0eab3b1ac6909a71dd53908d36156df4e465075050 WHIRLPOOL 61865eed2bf92728e7c4c4a0c48be44081bf728cfd824760d643e2fad838d96c19e173052d3aac073e0795b5efa3720ba5ddf13cca1ec7952b7524bbe1f204bc
-DIST ghc-7.6.3-src.tar.bz2 110763823 SHA256 bd43823d31f6b5d0b2ca7b74151a8f98336ab0800be85f45bb591c9c26aac998 SHA512 ac86f18b4feeb0bdc9e867261600b210caf62740d73ae657259bbe8149b8c2c4f5a73d09d74d944d4e50f85cc87503485365f0a0ae65befe8d2b6844e5e1253a WHIRLPOOL 0fe1f5f2987699067494559e6a679d28f027eee8fb2a00c683161dbce5443b1faeebfb51572209b75231cee24c7f0c929cabbc82a93f70e16d05e351fdfe2eaf
-DIST ghc-7.8.3-src.tar.xz 9160092 SHA256 b0cd96a549ba3b5e512847a4a8cd1a3174e4b2b75dadfc41c568fb812887b958 SHA512 2cc8c2aa6f18ba565c1e2aa637045e246f1214c2a77e95c2a97dfb97203b8983e4ad3cc13178b4b51aff70c58d59a1f68f94cd813d043745cb02411bad04bb00 WHIRLPOOL 3a2e8eea0db7a150e4732efed488a3a5eb56da00a9a90a3379afcb4090323925a2a7485fec6676e784139f112d7c825e8d18a576c34c760af4a7f3adb22c021a
DIST ghc-7.8.4-ia64-CLOSUREs-regenerated.patch.gz 13268 SHA256 3bdff22e654aee6f942d43edf1bf6cf70404c0152c4fcf89276f10d2c4c5b4b9 SHA512 a655713e06324b56f0041edf70837487e296d28e6f3ee35fe116b9938765aaf3469d25e92645e0940655ed3607dff27d3826fe0f995c84e81b51bfc956816e7d WHIRLPOOL d2cb53bdc6debc0278d554168ea3ab22b0fd8314adac81444637278a92d21b766280fedfb4b7d1b4540c7381c7962dec6b13a799ab2fee4d456fe2875d5c6a5b
DIST ghc-7.8.4-src.tar.bz2 10600755 SHA256 59e3bd514a1820cc1c03e1808282205c0b8518369acae12645ceaf839e6f114b SHA512 079a53891d8ebd8d9b88da96170e60981608a619f8282e4b7948f35244e99bd87277649ac7fcebc227a61a4d21960db8d5e5b9e92f2c69c82d8d68d7fd0a41d3 WHIRLPOOL a9be7641adbd237ed6e0f644c312e655e98be9566097aee5e2c0022e8756d5b2236e42dd86d76c638a001b5ca3f67307e89ec0cd003a92cd112a5d6d3e3d8467
-DIST ghc-bin-7.10.2-amd64.tbz2 112028560 SHA256 536297ac402da44ec1aafb1a937960883d12d192db16715ca34ab6469773a4c7 SHA512 207d8032c99d52bf4215ddeea2dbcd5816bb8d4caf2c3c31190e3ca92b49667d98a4f97aaf4cd6b40090f150854d520f75b5420dfe1ade7f036cf35d3dcb5100 WHIRLPOOL 8e43956a61c2c0fead242e3b179cde4918c04f3db7dbb27cc986f00f981261d98028ead82548b87d183d8da928635d5db4aa62ff1161f4077e5370483530a316
-DIST ghc-bin-7.10.2-r1-amd64-noncurses.tbz2 111863814 SHA256 782a68a13343ac8d6ed97540b411f714c4e826ccc3d152724198548c9240aceb SHA512 b154dbd7fb4fefc4283ec337b0c6ce6b6b6b3a62e9d889ca9c5dd5b5e5987f811a1c87845239ca94941afea630fc8bf1d8db94eb11a4023abd4b1d772dfb17c1 WHIRLPOOL 1e1f1ec82c831d115cd5f0b27f1914da94d92a9eca9af634210eb5f72b54281de6e08ea8e304bebaec8a456659b40866b9f0e24ef0e72c3f5a63d85296eb172a
-DIST ghc-bin-7.10.2-r1-x86-noncurses.tbz2 113572461 SHA256 3ad1e2888d26b6858cd1efe0e9863bc325b97c47be19fdd2e8dd5bbc86f7266b SHA512 573b7228b576a47ca1c3796cc2d4180a6c9dcaff58555cf52fc85a9b487920fc19487ff9ee8e0b6c33d6196ba05b9908f0d984bf3a4c0d91f52667e7389580a5 WHIRLPOOL 2c8cda95d04e9f345aa2f20fe8758761dd35648b788b7bf9b8f571687a8aae92456552883684d83ec2d2acaf22a002121643316df3c82349400c7de3d0300f7d
-DIST ghc-bin-7.10.2-x86.tbz2 113900477 SHA256 eefb7a3002e3dcdd6d936b2b2826eadf3cd100352babad4c9a355b944064240a SHA512 61dae4b9c80bfef6b1e0550c77b70f25d11f4a9fbe3b57d6c4ad451b4b584884432405d39dc32b9f85f3a5ad9d02657356ae0ebd99518848f3d330314c74b595 WHIRLPOOL da0d7eb62d2ee2aeb80a3f495da2ff123e29151b7517fbcd212f83ab3722638f10019511f4f237e8e001c68dd957ed2817fb0f1a2b42c2710239343f1d801496
DIST ghc-bin-7.10.3-alpha.tbz2 183558856 SHA256 780ac45b9b38fb40f08eeb7dae741649ac19dce2271df4bc764cac9be6c5c225 SHA512 08709fe9b4036ab41715c9a637a2a160104e3ab9e0ed9efaaf73428e3cfe19619e50c42b72c60bbbd27be2b9c2ea68f63d72c1a27d4519756e7c0d909f724230 WHIRLPOOL f488ecc945c6100ba86b9ae25eb6a472693556be0205a6c8634f2c235e779fe17b391ced7fec5d89c0c6c3d21583fe9f9b80bf628f3307890becf3f3ffb57a96
DIST ghc-bin-7.10.3-amd64.tbz2 112040431 SHA256 c3c71aff288f7de2785d1c3d54f0fd636144eb3dcb590bdda087b0775203e517 SHA512 e1554b3944edbe8e16537de5a29132dc6a22d780d9a700cdc9b76387b94191164398d6f2242bf8199527802572e2bb02545569d4f0930a0ee0dbfdeb25978558 WHIRLPOOL c2497a9565abf7d37e7928f508f7bf7241dd529aa252da708517f9f067e3d016341b7a73cac34888b99c9b84a8d01fd9e8d76f2b332d53e0d708b078f20ee807
DIST ghc-bin-7.10.3-ia64.tbz2 238680956 SHA256 0da9b5966f0920341f4cf041b814817e1ed06060e8a491481ab19a68153767db SHA512 3694011aec8a6dc37889418b318993cb82f9b46a5175dd837713f396c8f59a19a920e0b0669fe3b4ec37d5bd8837c115264c0a8fc97c5a4ce06a3bdd52fcfce5 WHIRLPOOL 9e059a953607b6477ea7c27bf55175d838c6aa3c57fcf92f13fa6112e9e728037073047be300a5a757395d759d30545546cb46816ec879a2d31c3c0a78868e42
@@ -18,22 +9,6 @@ DIST ghc-bin-7.10.3-ppc.tbz2 125832171 SHA256 67817636f5b91e04ecf94972c0bfe8e4e9
DIST ghc-bin-7.10.3-ppc64.tbz2 142469712 SHA256 c8fa2ea861d4c5373f7f67fd3a29db4e48593d669c8616c2f349592af7e4846f SHA512 eb59d3abc8b10010311d59df9473c5ea649eb0dd7f9ad41a1929a540a0ef8c20abaccd68254f8abab037fb1fc94d824f474e18e4316b8f2a7a954d0645a2a2a4 WHIRLPOOL 14ccfbcf818a80f1daf39b44dc7562304af925e548407ce0deecd2d4593f4e138da38cfe63d4e5b8b0303c0237c678c27eaac4331288ee9b9dcbcf8be7390f74
DIST ghc-bin-7.10.3-sparc.tbz2 163105069 SHA256 b9ef4179d87f4a56e9a786b28b0674f817118c73784b0dce283affadab296875 SHA512 d467a42487378d7dee311eb33aa1c151f5c16a6e7a4ab5bd8177df229f474adf19da3e1ca1064943a40abafcab6852b0589dd34413da82b33a03ede1ac17bf5d WHIRLPOOL 26ecb662f1d0eae524388008c24b3d25f954668aba781e997afd934c10b379b32e3376bc3a1232b066de84d3e1d1ad838dcef667b0f7606d0ac52acd7ef78a72
DIST ghc-bin-7.10.3-x86.tbz2 113877175 SHA256 a06d54e7256292123b49c4d429761794b53d2440d2efeb98bcfe79920c65b044 SHA512 75096fe9106d975c15e646b0a559c544621fd02791f491bce54926efabf0e55b97150069ddfa7a9f02cc30bb6975d3d3121a82207a9f67b8dda5ebfe17ec4744 WHIRLPOOL 63fea83be14ae317f313251b7c952c974a8e4f9671d78d1b3ef77c3ab317d2194faddc8d71431c5e1fc42215abed1842913f2f40ba383288784e984c47cd27f0
-DIST ghc-bin-7.4.2-alpha.tbz2 130483507 SHA256 cd8e72e569574f137bf10fcdb4337bb0dc320deb2a2c4d72529a821735c53ae6 SHA512 6fb99dea706965afa60f4aeb68da3da1c69dda477f5fcfb4e67b73d75b78583193148ce9f623a356679a57f1a740f8010f28a22f08e56ace50f3fcd42142f83f WHIRLPOOL e5ec69ab24dc963ac709f13928c0e35931d5d50ca6b21dfb0aa79f9088c0ce1196b64bb4d9668e35d73dcdf9e2df9c3da59c95eaf3db8b793a6bb65b1f4ba6c0
-DIST ghc-bin-7.4.2-amd64-stable-glibc.tbz2 93139900 SHA256 f06dff00585cc1a8ecc8ac29aeca7fdc601d272eed29d7613f7a2f2924cad585 SHA512 9b725f2613dd9013851a16eaea4000ea424c51cbafa97d3860f120fdb9936247f8c65208775a80a2f49b74946ddda2e843a54dec00b78c521197374aa3dd2d50 WHIRLPOOL 9e2630b1de40a059c324be38a1fe68b16ea484bc7afc2a397ea05192263d1964aed1d29fde543622ceab12ed2df111204576fdc72b7e35b2bbf9c6b9519901d1
-DIST ghc-bin-7.4.2-ia64.tbz2 155787636 SHA256 a1d89221645832cc5d11cde4937cce75d564e6a79eba334b92a4c465eb3f161f SHA512 c7138ed8eaf40ee7e7559b6063096351b64fc35cbd1adb4c734b2f2c6b77fb98368b1296fcb67c1a0b21b0faf053a82f8f98c3656b89c593e677ce78165d0c74 WHIRLPOOL 7ff2db2932a6d56961dcca386c9ec8f8eb1ee12e1b84230fbb089ff137eeb216117eecaa37b33b4c037ebee0063a07cd380077b754e64ef0219759b54a4f7fe2
-DIST ghc-bin-7.4.2-ppc.tbz2 89396808 SHA256 ebf6083a1f3256a978a9408cffa2562e837b641136e5d6ad41a8ab5c2f50e804 SHA512 d7abd4a2612f26b6937dd20c11d2081b2c846178347a8e09f4ef5d8b1ef2ad3eabb9d5429fd0c214f6c5bd53eb194ccf199745904d6b861650c9eef681a48bc1 WHIRLPOOL e2f8a4c8e3209432a744fd8587be39591d7b4fb026dca36755933f49e6f650e1b34e6087d9260aee65206a700f9d70e2fb6cbe42d29645b52f060729845a347e
-DIST ghc-bin-7.4.2-ppc64.tbz2 105431655 SHA256 d0aecf47749a9862085aec6403f25197465d99a02a3c721dffd5314bf81d74eb SHA512 f220fb91b1856da37f72166fe050d4908049845eec03626d09c5b6e88701b0002835c3343c3584baf9f9d9efb5c7cbc210eb64c6eb711a58764d0fea92e8ac9f WHIRLPOOL e27022a72c254fd189995fd1b39629d5328927b83237ae4e61e97ab5efb5c451c92fe77f944c724bf9d14130d5a6cd2e0896a7cd6052de1ef7091531aa39fa0f
-DIST ghc-bin-7.4.2-sparc.tbz2 121224130 SHA256 e5eaf1f31ddc4790e0226f0075236af340ec9674d98701452d5c51455ca1cb52 SHA512 a3647d82bbb36fe0ca55185ebc9479a264e785eb5a8a33be6c37b8a6cbcf8c55373374801c685eef004de78db5aa1c96760b2bedb2ca0ac9097d39fe286984e9 WHIRLPOOL d2d5f8c5abb001fb5425e68d3d26d941569b832c373e40b5a96aaa11f589db9e2b72eb1cbcf8df7b8d4473e2cc1c61498b284d8b006cc20822c3a203fd0fe2cd
-DIST ghc-bin-7.4.2-x86-stable-glibc.tbz2 92394017 SHA256 2c42257a60aec03ae622c1a600cd210a6094f26ac310fbd307006e7f2260e2a4 SHA512 9e8ef72d2aeb5681e6bb71e2eb875587ddd51089cfc3443c33c69f93274a29e5680de4bf4884af05cd84f0e9cea13d66d20f1e89994460137910cbc987b64359 WHIRLPOOL 5722824af91f1191e6a38a8eb4696e765468e3bf54ad411b1d387ae4bcc7cd4cb772bdf2054d7013a3cff41feaaf5607f051b3c0d9f609ca19f1a1f92dd02586
-DIST ghc-bin-7.6.3-amd64.tbz2 94441516 SHA256 3ef747e96a40c9d5021e88b8afee0a97838c27b00619d9187783d95279c31779 SHA512 89f6c693d83d6309a0e44fcc68e30279c858adb0a0ea9317dd168b2e632c22a8507da78ed953523f5d7156db98e06c6df56d6edc19c0c50b3941ea578263dc64 WHIRLPOOL 891dfbfc9d88fa579b6a837651f7cc6d9aecef8b8752ec7bcebbdfef2a6d8929d0edaceff27ec61d6160d36d1b0e8406b7829a04a858ed64210b5c57b9c98940
-DIST ghc-bin-7.6.3-r1-alpha.tbz2 123486983 SHA256 fb6828d9dff7b90563cc7b3277ed38801907930aebd6042a7e5ba61e5f50db73 SHA512 7821bdf7490283dc062be090d224138dd34641e014cc6742edaa51dcc9cb1de9724d575955b596c9273b878dfe79023daf172b132b124f67567132649cf9a30d WHIRLPOOL 4e51a7e7f54fcb4aeb7a4ade4140533413348f9aacf04f683fe7cc5e20843dc6a95bdd6d79a995e5e1085747be9e584df6ada61430662f06eb600abae0c7eabd
-DIST ghc-bin-7.6.3-r1-ia64.tbz2 154480728 SHA256 9a176312f796a189c0354deab9a7c446db274f75f40554963c2f86597a5951fb SHA512 2aa945cebcd3d0c26af5ddb53cf2002ec6d263d071173495905dd52898bd2ab6605370b0025554c1f6afbd28e276abc708708e4add9a9b8cb08b4bb39f8f50a1 WHIRLPOOL 6371531141e707618577e924c01102481a12d91e2c85e24694ba64f9b2545869c248999138146f63ca379a4243ccd0dfa322ea01a23d222b9757584787c5a899
-DIST ghc-bin-7.6.3-r1-ppc.tbz2 91800558 SHA256 c9b2262957585c9f02136014aa05423e1b7674c8eb0731a6d991e400e053e33a SHA512 2a101a30a4324780f1a614e044ba614f9094cd57d026c56f2b3ba514ae049c26ce8e4acbc89e93229da451b6fbe05ba0980b500cdd785bb2bce968a60434403a WHIRLPOOL 3a3b7e1eb945be01ab195880c7709514d2d11d25bab12fc15c2257207da48a37e6d6d7699c9ed5c1cc32d01057240a4d795e43cdf9d9d2748a1d94b93fb283ed
-DIST ghc-bin-7.6.3-r1-ppc64.tbz2 121213680 SHA256 7d820988a762dc56ec471c9fcb5510f2e0bb47560181aa7dea8a934e73952477 SHA512 17fb269a2eae326db927b8734cd8326061b059ecd50a377c51c37cd657380be1ae61964df299009259de6e4e00aa71a525a9224f8fa607d6cc7994c221848358 WHIRLPOOL 76e9664a535e6be54c5288be683959ab6aadafb04d03c5d2f08f8ee663868b3ed390e2a0c8e6d233a532af694709e03dc0f78d16dfe51b87e201655219da4704
-DIST ghc-bin-7.6.3-r1-sparc.tbz2 121641337 SHA256 0fb31b9584c1c6caafb44a51158bfd3d85c28d2313f8201855f58c019a1692c0 SHA512 d71efc47769efb091f93cb288b54a1fadfd4184053149b1cd7c219a0c9c95ed97c32b101c712e20643fea12546357b70a11f2852bebeac2141e961a3e4bf8764 WHIRLPOOL 37d320e01d8e43ecba6e90f8d0a9c440d30ea31ff79d9094a8205d9ce892570f81b8641080034215fdddf71131de1acc364e2a485383af8346190c36201c1e91
-DIST ghc-bin-7.6.3-x86.tbz2 93718672 SHA256 a55024f66a048437fcd6ef0f33cdb994a43628998a2f0fe4d094cc9ba83d1615 SHA512 624f2a3238dee15853018d45632d1363e42d34099a77e5e9ce5c8da976cb4c33578144f7c39dbf25ee68c17d8d42910db2347186849eeeda6bc20053ce2be990 WHIRLPOOL bc646fc19906b59416358fb7558b6e2c3f7ad069c2fcf443be36b621894cfcecb0844acf5b5f9c383e034dfff3e24d312a7da0d7a629836134ec5dc1ecd6f139
-DIST ghc-bin-7.8.3-amd64.tbz2 100786052 SHA256 af49f547336a4f9f13cd625155d5a6a998e52ae7da8bbbddc856f88b00b6aff4 SHA512 b1826095b67fa2028678057f70909bff4e082b82f3b70f1aedbc91073efad54334fa1864bc8248c9249eec6edab3671dc38ac1650be86f1245e2fecf92528952 WHIRLPOOL 5b44fff77a0d79c6f7c5c8ca792eb6b36987d1de58d5ebc0a9b05da9c19a2c312eca6b9d40e7e63437742b7f9c28c925feb3bea7f9803dda95fac7acaa7a3132
-DIST ghc-bin-7.8.3-x86.tbz2 102583755 SHA256 c67f0d2471e594b4fdfc5b219bb6b61e57e6ba75132aa3f63d171550af8cbe3c SHA512 badabbba2f46b5ab3a2601e53997ce6533162afeec7dc36eeb877a62680a9f599aeb05dd3682f45d3e273d71d28b8bd01eee37dcad3c7354e8f83b7be4e58536 WHIRLPOOL 7b99b6bbeb4ad6d203f270d8446285825ad0857a8ab058d8c126155b49e8819e0efc2f6c42b5ff775dc0ece5488e97fcc7ae2459fe87fdceef43d63a75443430
DIST ghc-bin-7.8.4-alpha.tbz2 210691009 SHA256 23c9e5ef97b444fa87d3b9509a7b2b7b68c526ca4139739dd60c08fb1279d48a SHA512 f08230de82f0c4112da9d0b48227ca74d5d0b4a84046d746b023557b7aeeb9678f5ac037fe89a863178df4b9036e5c5c63182d14dfbb42c772011de883e3966f WHIRLPOOL d624b4d5eac8aa68f389b81e68d7fa2ea960c9b9c5fabb27ddf4da5140c18fd0ee9080725fb645e2c532bb0a01ade32da2cf6aac08707f9d89a94ea9752b8e72
DIST ghc-bin-7.8.4-amd64.tbz2 100573133 SHA256 bd9d144c08caa0ff345ada8d7eed7592531b8f8b9ef2f94d0b9a42fd747440aa SHA512 e4416d6dae3c644f74bafb3aecf1a123f985427aba32d0e0c43143a137d64a9220fc5947cd9bde8a3bc44555ae71184fc06a3f7df7976aadd065ad5681b90954 WHIRLPOOL ab0bd6219d68e08cb473cf2f3f15538d65940f28e84f026361032c3a6bc09f7820faf67629e915f27c2afda7de41fa9c6010a1b5cd487df0936d968c7e58a3a4
DIST ghc-bin-7.8.4-ia64.tbz2 222789275 SHA256 8bbbc11ba64d08bad691593afafc4c6a7cf078b10cf33cb8508bf0a0b3ccf523 SHA512 2d8b89e399cbe9bfeae29cf3ceea736bfaa65ea21483fa2ee95d9814e122fcfbb67ce22ad8175493fab088e9a9d0139610c67e9d5c8b4f797b5e14846df32b6e WHIRLPOOL 181d48bbb53d181c8febf63ddae620bec1a6c212a5b5bf938228689df2ff45ba68d7d4a99ebb1b68aa516d5633be41125321e3f8fdef6e5f0cd1e4a7f9b8774c
@@ -41,6 +16,5 @@ DIST ghc-bin-7.8.4-ppc.tbz2 112803496 SHA256 a47e0fb17137878af1e7b5a166046bee20d
DIST ghc-bin-7.8.4-ppc64.tbz2 129284515 SHA256 1e8a350af39d1db1e58a74c9bc4a4c57765eceb33e5b32751fb31340b9ff02ff SHA512 53974e15c26cf6b62d8f838607abd209ec57cf0f45fcc48b90ad62736f5e4e7ff263dcd326ae03d8d5557a22eb9730e5eb8ae4eda55e52dd3d973bc73c84935e WHIRLPOOL adaaa92323d319f6576423ac41678f7d263f36e0e30d89fc14ee89104b006772c26d7b408be7f85225d1bddaf5f15ebdcbb7136f5c8bf7bda4bb0938eefbe6c2
DIST ghc-bin-7.8.4-sparc.tbz2 147340595 SHA256 1cde749ce3c47016c5c7a7179423d0aa2b174ddae4af0392ae3b7f57b098ec0c SHA512 ee5f0b2f1cf2693a0f2be9df71ef61b52bc2327225d40b8be955c1584b9901ffc6aaab63c1e46bf9bb352633b605c98378f8fd3e6cd71aef1c089007e4110217 WHIRLPOOL 27d55a016ffb49852553f920c29929c3bdf383e28b4b806ceb9ffc8b46a59b438801101402e498b069aa6eb56870b70a00ba7b1f4098f3fd8d8ddf1b20caa626
DIST ghc-bin-7.8.4-x86.tbz2 102312459 SHA256 4c53148836e5a1ba55b8db5bb7c3eb915103e0955fb503b2facdc5a72f12a974 SHA512 cabc5bd6d8760ce4120e7053f6c1dffca7d161ba454b6201087760096c037c932e3ff8c82e53346c8278855bf0cff1c2f5fb8046242ca4d8307355b060a9556e WHIRLPOOL 0171d67dc1b63381a491e1577a783eb0e8f53cb579ba96a9b4fdf6685d494d78eb2be780f77ff33422d3b7c320ed102d9b48f6e954f8fee5532982575001a4a5
-DIST hoopl-3.10.1.0.tar.gz 241582 SHA256 7af615dfd4051670dccf31e5a7e1e71a9ae5f301e6a0668557fd84f61f6bc2d4 SHA512 943fe7034c89f4f914617cf1bccf7f66c3e660328fbbd9ae40f78a3f78a4a5b6fdd86c2afd40c11d4c4c4a34bc8fd47ab7e6227cdf9f3f4887b5cc796720e7aa WHIRLPOOL 3a410081f70c4ebbb563a48d71ec6f1e226a13b965ea12d01ca521b32041308394c7da6d3b3e36e75d1322c188b81fc08f4b2bf6037df5d8ac4998a944326be2
DIST hoopl-3.10.2.0.tar.gz 241940 SHA256 6740814c774e51815e8260ae1b4ac8af6ab69f02e112904450f689c4792f1121 SHA512 083baa8a5eb53247aff8d5b9b2144e0f63adb9400934297bbd80bfcec607dd90a34def4301045a60472ef10b0fb90ab84692fc08f786e7f806c28afdab1ef66a WHIRLPOOL 761e7440d2bc32b594ab55ea967c5b075bb638b2fdba6606beaf9c31a90e20031e914146828004b3d11203668210a6994be9fabc3b0ebb428d516b57cae9ee68
DIST transformers-0.4.3.0.tar.gz 28632 SHA256 b3d0a797e815ca50d411e20c02f781efe7751308007d880af7f0b5c4365c3a9d SHA512 c3ec0893ebba4fbd6087c3202e919552c4a9bff3350b5c0589e7ebb18751a515d98b8cac15b0a3252906ea72b5a0eb09b7fe88c8da88b09d6ce4fbf0f50b2780 WHIRLPOOL 89591781926b1d025056dedcfc5de61705056c1e3a8eba72f2e89789e78d2ed4d8909f84d6560dfc66bc0b360f98cb3dc3835f3a05c2325f747498373c88aa4b
diff --git a/dev-lang/ghc/files/ghc-7.0.4-darwin8.patch b/dev-lang/ghc/files/ghc-7.0.4-darwin8.patch
deleted file mode 100644
index bfbee41b4f93..000000000000
--- a/dev-lang/ghc/files/ghc-7.0.4-darwin8.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Workaround headers problem in Darwin 8 as well.
-
---- rts/PosixSource.h
-+++ rts/PosixSource.h
-@@ -11,6 +11,13 @@
-
- #include <ghcplatform.h>
-
-+#if defined(darwin_HOST_OS)
-+/* unfortunately the hack below only works for Darwin 9 and
-+ * above, so as hack include sys/types early (before setting
-+ * _POSIX_C_SOURCE) (this obviously obsoletes the hack below) */
-+#include <sys/types.h>
-+#endif
-+
- #if defined(freebsd_HOST_OS)
- #define _POSIX_C_SOURCE 200112L
- #define _XOPEN_SOURCE 600
diff --git a/dev-lang/ghc/files/ghc-7.10.1-T10590-dequeue.patch b/dev-lang/ghc/files/ghc-7.10.1-T10590-dequeue.patch
deleted file mode 100644
index be0f7a05b1e3..000000000000
--- a/dev-lang/ghc/files/ghc-7.10.1-T10590-dequeue.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-diff --git a/rts/RaiseAsync.c b/rts/RaiseAsync.c
-index 3b206ff..08c031c 100644
---- a/rts/RaiseAsync.c
-+++ b/rts/RaiseAsync.c
-@@ -56,7 +56,8 @@ static void throwToSendMsg (Capability *cap USED_IF_THREADS,
-
- static void
- throwToSingleThreaded__ (Capability *cap, StgTSO *tso, StgClosure *exception,
-- rtsBool stop_at_atomically, StgUpdateFrame *stop_here)
-+ rtsBool stop_at_atomically, StgUpdateFrame *stop_here,
-+ rtsBool dequeue)
- {
- // Thread already dead?
- if (tso->what_next == ThreadComplete || tso->what_next == ThreadKilled) {
-@@ -64,7 +65,9 @@ throwToSingleThreaded__ (Capability *cap, StgTSO *tso, StgClosure *exception,
- }
-
- // Remove it from any blocking queues
-- removeFromQueues(cap,tso);
-+ if (dequeue) {
-+ removeFromQueues(cap,tso);
-+ }
-
- raiseAsync(cap, tso, exception, stop_at_atomically, stop_here);
- }
-@@ -72,20 +75,26 @@ throwToSingleThreaded__ (Capability *cap, StgTSO *tso, StgClosure *exception,
- void
- throwToSingleThreaded (Capability *cap, StgTSO *tso, StgClosure *exception)
- {
-- throwToSingleThreaded__(cap, tso, exception, rtsFalse, NULL);
-+ throwToSingleThreaded__(cap, tso, exception, rtsFalse, NULL, rtsTrue);
-+}
-+
-+void
-+throwToSingleThreadedNoDequeue (Capability *cap, StgTSO *tso, StgClosure *exception)
-+{
-+ throwToSingleThreaded__(cap, tso, exception, rtsFalse, NULL, rtsFalse);
- }
-
- void
- throwToSingleThreaded_ (Capability *cap, StgTSO *tso, StgClosure *exception,
- rtsBool stop_at_atomically)
- {
-- throwToSingleThreaded__ (cap, tso, exception, stop_at_atomically, NULL);
-+ throwToSingleThreaded__ (cap, tso, exception, stop_at_atomically, NULL, rtsTrue);
- }
-
- void // cannot return a different TSO
- suspendComputation (Capability *cap, StgTSO *tso, StgUpdateFrame *stop_here)
- {
-- throwToSingleThreaded__ (cap, tso, NULL, rtsFalse, stop_here);
-+ throwToSingleThreaded__ (cap, tso, NULL, rtsFalse, stop_here, rtsTrue);
- }
-
- /* -----------------------------------------------------------------------------
-diff --git a/rts/RaiseAsync.h b/rts/RaiseAsync.h
-index 6bfed8d..2e8a7a3 100644
---- a/rts/RaiseAsync.h
-+++ b/rts/RaiseAsync.h
-@@ -23,6 +23,10 @@ void throwToSingleThreaded (Capability *cap,
- StgTSO *tso,
- StgClosure *exception);
-
-+void throwToSingleThreadedNoDequeue (Capability *cap,
-+ StgTSO *tso,
-+ StgClosure *exception);
-+
- void throwToSingleThreaded_ (Capability *cap,
- StgTSO *tso,
- StgClosure *exception,
-diff --git a/rts/posix/Select.c b/rts/posix/Select.c
-index 4b19235..6889499 100644
---- a/rts/posix/Select.c
-+++ b/rts/posix/Select.c
-@@ -412,8 +412,12 @@ awaitEvent(rtsBool wait)
- IF_DEBUG(scheduler,
- debugBelch("Killing blocked thread %lu on bad fd=%i\n",
- (unsigned long)tso->id, fd));
-- throwToSingleThreaded(&MainCapability, tso,
-- (StgClosure *)blockedOnBadFD_closure);
-+ /*
-+ * We can't use throwToSingleThreaded() here
-+ * as 'RTS_FD_IS_READY' breaks blocked_queue_hd list
-+ */
-+ throwToSingleThreadedNoDequeue(&MainCapability, tso,
-+ (StgClosure *)blockedOnBadFD_closure);
- break;
- case RTS_FD_IS_READY:
- IF_DEBUG(scheduler,
diff --git a/dev-lang/ghc/files/ghc-7.2.1-freebsd-CHOST.patch b/dev-lang/ghc/files/ghc-7.2.1-freebsd-CHOST.patch
deleted file mode 100644
index da59cd789f99..000000000000
--- a/dev-lang/ghc/files/ghc-7.2.1-freebsd-CHOST.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/aclocal.m4 b/aclocal.m4
-index 11bb003..52df243 100644
---- a/aclocal.m4
-+++ b/aclocal.m4
-@@ -1545,7 +1545,7 @@ case "$1" in
- freebsd|netbsd|openbsd|dragonfly|osf1|osf3|hpux|linuxaout|kfreebsdgnu|freebsd2|solaris2|cygwin32|mingw32|darwin|gnu|nextstep2|nextstep3|sunos4|ultrix|irix|aix|haiku)
- $2="$1"
- ;;
-- freebsd8) # like i686-gentoo-freebsd8
-+ freebsd*) # like i686-gentoo-freebsd8 or i686-gentoo-freebsd8.2
- $2="freebsd"
- ;;
- darwin*)
diff --git a/dev-lang/ghc/files/ghc-7.4-rc2-macos-prefix-respect-gcc.patch b/dev-lang/ghc/files/ghc-7.4-rc2-macos-prefix-respect-gcc.patch
deleted file mode 100644
index 770fd650606b..000000000000
--- a/dev-lang/ghc/files/ghc-7.4-rc2-macos-prefix-respect-gcc.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff --git a/aclocal.m4 b/aclocal.m4
-index a377cb9..4f8fd69 100644
---- a/aclocal.m4
-+++ b/aclocal.m4
-@@ -1950,17 +1950,7 @@ AC_DEFUN([XCODE_VERSION],[
- # --------------------------------
- # Finds where gcc is
- AC_DEFUN([FIND_GCC],[
-- if test "$TargetOS_CPP" = "darwin" &&
-- test "$XCodeVersion1" -eq 4 &&
-- test "$XCodeVersion2" -lt 2
-- then
-- # In Xcode 4.1, 'gcc-4.2' is the gcc legacy backend (rather
-- # than the LLVM backend). We prefer the legacy gcc, but in
-- # Xcode 4.2 'gcc-4.2' was removed.
-- FP_ARG_WITH_PATH_GNU_PROG([CC], [gcc-4.2])
-- else
-- FP_ARG_WITH_PATH_GNU_PROG([CC], [gcc])
-- fi
-+ FP_ARG_WITH_PATH_GNU_PROG([CC], [gcc])
- export CC
- WhatGccIsCalled="$CC"
- AC_SUBST(WhatGccIsCalled)
diff --git a/dev-lang/ghc/files/ghc-7.4.1-darwin-CHOST.patch b/dev-lang/ghc/files/ghc-7.4.1-darwin-CHOST.patch
deleted file mode 100644
index 348158882aaf..000000000000
--- a/dev-lang/ghc/files/ghc-7.4.1-darwin-CHOST.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-like the other CHOST patches, but this one catches another case where
-$host is used (instead of the cannonicalised variables)
-
---- aclocal.m4
-+++ aclocal.m4
-@@ -93,10 +93,10 @@
- exeext='.exe'
- soext='.dll'
- ;;
-- i386-apple-darwin|powerpc-apple-darwin)
-+ i386-apple-darwin*|powerpc-apple-darwin*)
- soext='.dylib'
- ;;
-- x86_64-apple-darwin)
-+ x86_64-apple-darwin*)
- soext='.dylib'
- ;;
- esac
diff --git a/dev-lang/ghc/files/ghc-7.4.1-ticket-7339-fix-unaligned-unreg.patch b/dev-lang/ghc/files/ghc-7.4.1-ticket-7339-fix-unaligned-unreg.patch
deleted file mode 100644
index f2f19f1bbab4..000000000000
--- a/dev-lang/ghc/files/ghc-7.4.1-ticket-7339-fix-unaligned-unreg.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 26f8466507bd9383e0a7d1e62e397eca4a13822a Mon Sep 17 00:00:00 2001
-From: Sergei Trofimovich <slyfox@gentoo.org>
-Date: Tue, 13 Nov 2012 01:39:14 +0300
-Subject: [PATCH] Fix unaligned access on alpha and friends (ticket #7339)
-
-Assume unknown arch (alpha and mips) an alignment sensitive target.
-Otherwise on alpha it causes ghc-7.4.1 to generate invalud lexers.
-
-Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
----
- compiler/cmm/PprC.hs | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs
-index 21826f8..8cdcde6 100644
---- a/compiler/cmm/PprC.hs
-+++ b/compiler/cmm/PprC.hs
-@@ -963,6 +963,7 @@ cLoad platform expr rep
- | otherwise
- = char '*' <> parens (cCast platform (machRepPtrCType rep) expr)
- where -- On these platforms, unaligned loads are known to cause problems
-+ bewareLoadStoreAlignment ArchUnknown = True -- like alpha or mips
- bewareLoadStoreAlignment (ArchARM {}) = True
- bewareLoadStoreAlignment _ = False
-
---
-1.8.0
-
diff --git a/dev-lang/ghc/files/ghc-7.4.2-system-libffi.patch b/dev-lang/ghc/files/ghc-7.4.2-system-libffi.patch
deleted file mode 100644
index 73c4aa278dd8..000000000000
--- a/dev-lang/ghc/files/ghc-7.4.2-system-libffi.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-Make ghc use the libffi installed on the system instead of the bundled one.
-
-This patch is based on the one used by Debian and Fedora, but was
-augmented by additional lines to identify the libffi include directory
-using pkg-config, as libffi on Gentoo installs into a subdirectory of
-the system include directory.
-
-2012-04-24 Martin von Gagern
-
-References:
-https://bugs.gentoo.org/411925
-http://hackage.haskell.org/trac/ghc/ticket/5743
-
-Index: ghc-7.4.1/ghc.mk
-===================================================================
---- ghc-7.4.1.orig/ghc.mk
-+++ ghc-7.4.1/ghc.mk
-@@ -579,7 +579,6 @@ BUILD_DIRS += \
- driver/ghci \
- driver/ghc \
- driver/haddock \
-- libffi \
- includes \
- rts
-
-Index: ghc-7.4.1/rts/ghc.mk
-===================================================================
---- ghc-7.4.1.orig/rts/ghc.mk
-+++ ghc-7.4.1/rts/ghc.mk
-@@ -86,8 +86,7 @@
- ALL_RTS_DEF_LIBNAMES = base ghc-prim
- ALL_RTS_DEF_LIBS = \
- rts/dist/build/win32/libHSbase.dll.a \
-- rts/dist/build/win32/libHSghc-prim.dll.a \
-- libffi/build/inst/lib/libffi.dll.a
-+ rts/dist/build/win32/libHSghc-prim.dll.a
-
- # -- import libs for the regular Haskell libraries
- define make-importlib-def # args $1 = lib name
-@@ -172,12 +171,12 @@
- # Making a shared library for the RTS.
- ifneq "$$(findstring dyn, $1)" ""
- ifeq "$$(HOSTPLATFORM)" "i386-unknown-mingw32"
--$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/libs.depend rts/dist/build/libffi-5.dll
-+$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/libs.depend
- "$$(RM)" $$(RM_OPTS) $$@
- "$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \
- -no-auto-link-packages -Lrts/dist/build -lffi-5 `cat rts/libs.depend` $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) -o $$@
- else
--$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/libs.depend rts/dist/build/libffi$$(soext)
-+$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/libs.depend
- "$$(RM)" $$(RM_OPTS) $$@
- "$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \
- -no-auto-link-packages -Lrts/dist/build -lffi `cat rts/libs.depend` $$(rts_$1_OBJS) \
-@@ -188,9 +187,9 @@
- endif
- endif
- else
--$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) $$(rts_ffi_objs_stamp)
-+$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS)
- "$$(RM)" $$(RM_OPTS) $$@
-- echo $$(rts_ffi_objs) $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) | "$$(XARGS)" $$(XARGS_OPTS) "$$(AR_STAGE1)" \
-+ echo $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) | "$$(XARGS)" $$(XARGS_OPTS) "$$(AR_STAGE1)" \
- $$(AR_OPTS_STAGE1) $$(EXTRA_AR_ARGS_STAGE1) $$@
- endif
-
-@@ -403,6 +402,12 @@
- rts/dist/build/sm/Evac_thr_CC_OPTS += -DPARALLEL_GC -Irts/sm
- rts/dist/build/sm/Scav_thr_CC_OPTS += -DPARALLEL_GC -Irts/sm
-
-+# Use system libffi
-+libffi_include_flags:=$(shell pkg-config --cflags-only-I libffi)
-+rts/Adjustor_CC_OPTS += $(libffi_include_flags)
-+rts/Interpreter_CC_OPTS += $(libffi_include_flags)
-+rts/sm/Storage_CC_OPTS += $(libffi_include_flags)
-+
- #-----------------------------------------------------------------------------
- # Add PAPI library if needed
-
-@@ -504,10 +509,8 @@
- # installing
-
- INSTALL_LIBS += $(ALL_RTS_LIBS)
--INSTALL_LIBS += $(wildcard rts/dist/build/libffi$(soext)*)
--INSTALL_LIBS += $(wildcard rts/dist/build/libffi-5.dll)
-
--install: install_libffi_headers
-+install:
-
- .PHONY: install_libffi_headers
- install_libffi_headers :
-Index: ghc-7.4.1/rts/package.conf.in
-===================================================================
---- ghc-7.4.1.orig/rts/package.conf.in
-+++ ghc-7.4.1/rts/package.conf.in
-@@ -24,8 +24,9 @@
- hs-libraries: "HSrts"
-
- extra-libraries:
-+ "ffi"
- #ifdef HAVE_LIBM
-- "m" /* for ldexp() */
-+ , "m" /* for ldexp() */
- #endif
- #ifdef HAVE_LIBRT
- , "rt"
-Index: ghc-7.4.1/compiler/ghc.mk
-===================================================================
---- ghc-7.4.1.orig/compiler/ghc.mk
-+++ ghc-7.4.1/compiler/ghc.mk
-@@ -260,6 +260,8 @@
-
- compiler_CPP_OPTS += -I$(GHC_INCLUDE_DIR)
- compiler_CPP_OPTS += ${GhcCppOpts}
-+libffi_include_flags := $(shell pkg-config --cflags-only-I libffi)
-+compiler/ghci/LibFFI_HSC2HS_OPTS += $(addprefix --cflag=,$(libffi_include_flags))
-
- $(PRIMOPS_TXT) compiler/parser/Parser.y: %: %.pp compiler/stage1/$(PLATFORM_H)
- $(CPP) $(RAWCPP_FLAGS) -P $(compiler_CPP_OPTS) -x c $< | grep -v '^#pragma GCC' > $@
diff --git a/dev-lang/ghc/files/ghc-7.5.20120505-system-libffi.patch b/dev-lang/ghc/files/ghc-7.5.20120505-system-libffi.patch
deleted file mode 100644
index f3b0c71c5454..000000000000
--- a/dev-lang/ghc/files/ghc-7.5.20120505-system-libffi.patch
+++ /dev/null
@@ -1,88 +0,0 @@
---- ghc-7.5.20120505-orig/ghc.mk 2012-05-06 03:01:29.000000000 +1000
-+++ ghc-7.5.20120505/ghc.mk 2012-05-06 17:22:01.023416003 +1000
-@@ -584,7 +584,6 @@
- $(MAYBE_GHCI) \
- driver/ghc \
- driver/haddock \
-- libffi \
- includes \
- rts
-
---- ghc-7.5.20120505-orig/rts/ghc.mk 2012-05-06 03:01:30.000000000 +1000
-+++ ghc-7.5.20120505/rts/ghc.mk 2012-05-06 17:28:31.925897226 +1000
-@@ -171,12 +171,12 @@
- # Making a shared library for the RTS.
- ifneq "$$(findstring dyn, $1)" ""
- ifeq "$$(HostOS_CPP)" "mingw32"
--$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/libs.depend rts/dist/build/$$(LIBFFI_DLL)
-+$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/libs.depend
- "$$(RM)" $$(RM_OPTS) $$@
- "$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \
- -no-auto-link-packages -Lrts/dist/build -l$(LIBFFI_WINDOWS_LIB) `cat rts/libs.depend` $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) -o $$@
- else
--$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/libs.depend rts/dist/build/libffi$$(soext)
-+$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/libs.depend
- "$$(RM)" $$(RM_OPTS) $$@
- "$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \
- -no-auto-link-packages -Lrts/dist/build -lffi `cat rts/libs.depend` $$(rts_$1_OBJS) \
-@@ -187,9 +187,9 @@
- endif
- endif
- else
--$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) $$(rts_ffi_objs_stamp)
-+$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS)
- "$$(RM)" $$(RM_OPTS) $$@
-- echo $$(rts_ffi_objs) $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) | "$$(XARGS)" $$(XARGS_OPTS) "$$(AR_STAGE1)" \
-+ echo $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) | "$$(XARGS)" $$(XARGS_OPTS) "$$(AR_STAGE1)" \
- $$(AR_OPTS_STAGE1) $$(EXTRA_AR_ARGS_STAGE1) $$@
- endif
-
-@@ -407,6 +407,12 @@
- rts/dist/build/sm/Evac_thr_CC_OPTS += -DPARALLEL_GC -Irts/sm
- rts/dist/build/sm/Scav_thr_CC_OPTS += -DPARALLEL_GC -Irts/sm
-
-+# Use system libffi
-+libffi_include_flags:=$(shell pkg-config --cflags-only-I libffi)
-+rts/Adjustor_CC_OPTS += $(libffi_include_flags)
-+rts/Interpreter_CC_OPTS += $(libffi_include_flags)
-+rts/sm/Storage_CC_OPTS += $(libffi_include_flags)
-+
- #-----------------------------------------------------------------------------
- # Add PAPI library if needed
-
-@@ -508,10 +514,8 @@
- # installing
-
- INSTALL_LIBS += $(ALL_RTS_LIBS)
--INSTALL_LIBS += $(wildcard rts/dist/build/libffi$(soext)*)
--INSTALL_LIBS += $(wildcard rts/dist/build/$(LIBFFI_DLL))
-
--install: install_libffi_headers
-+install:
-
- .PHONY: install_libffi_headers
- install_libffi_headers :
---- ghc-7.5.20120505-orig/rts/package.conf.in 2012-05-06 03:01:30.000000000 +1000
-+++ ghc-7.5.20120505/rts/package.conf.in 2012-05-06 17:22:01.025416056 +1000
-@@ -24,8 +24,9 @@
- hs-libraries: "HSrts"
-
- extra-libraries:
-+ "ffi"
- #ifdef HAVE_LIBM
-- "m" /* for ldexp() */
-+ , "m" /* for ldexp() */
- #endif
- #ifdef HAVE_LIBRT
- , "rt"
---- ghc-7.5.20120505-orig/compiler/ghc.mk 2012-05-06 03:01:29.000000000 +1000
-+++ ghc-7.5.20120505/compiler/ghc.mk 2012-05-06 17:22:01.026416083 +1000
-@@ -260,6 +260,8 @@
-
- compiler_CPP_OPTS += $(addprefix -I,$(GHC_INCLUDE_DIRS))
- compiler_CPP_OPTS += ${GhcCppOpts}
-+libffi_include_flags := $(shell pkg-config --cflags-only-I libffi)
-+compiler/ghci/LibFFI_HSC2HS_OPTS += $(addprefix --cflag=,$(libffi_include_flags))
-
- $(PRIMOPS_TXT) compiler/parser/Parser.y: %: %.pp compiler/stage1/$(PLATFORM_H)
- $(CPP) $(RAWCPP_FLAGS) -P $(compiler_CPP_OPTS) -x c $< | grep -v '^#pragma GCC' > $@
diff --git a/dev-lang/ghc/files/ghc-7.6.2-integer-simple-div-mod.patch b/dev-lang/ghc/files/ghc-7.6.2-integer-simple-div-mod.patch
deleted file mode 100644
index 0dc5391678f2..000000000000
--- a/dev-lang/ghc/files/ghc-7.6.2-integer-simple-div-mod.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-commit de13417726b90b0945aaaf0b9cfbaf8ab975d8b5
-Author: Gabor Greif <ggreif@gmail.com>
-Date: Tue Jul 24 14:31:36 2012 +0200
-
- track integer-gmp and add 'divInteger', 'modInteger'
-
-diff --git a/libraries/integer-simple/GHC/Integer.hs b/libraries/integer-simple/GHC/Integer.hs
-index c9b50a7..4122d38 100644
---- a/libraries/integer-simple/GHC/Integer.hs
-+++ b/libraries/integer-simple/GHC/Integer.hs
-@@ -4,7 +4,7 @@
- -----------------------------------------------------------------------------
- -- |
- -- Module : GHC.Integer
---- Copyright : (c) Ian Lynagh 2007-2008
-+-- Copyright : (c) Ian Lynagh 2007-2012
- -- License : BSD3
- --
- -- Maintainer : igloo@earth.li
-@@ -27,6 +27,7 @@ module GHC.Integer (
- plusInteger, minusInteger, timesInteger, negateInteger,
- eqInteger, neqInteger, absInteger, signumInteger,
- leInteger, gtInteger, ltInteger, geInteger, compareInteger,
-+ divInteger, modInteger,
- divModInteger, quotRemInteger, quotInteger, remInteger,
- encodeFloatInteger, decodeFloatInteger, floatFromInteger,
- encodeDoubleInteger, decodeDoubleInteger, doubleFromInteger,
-diff --git a/libraries/integer-simple/GHC/Integer/Type.hs b/libraries/integer-simple/GHC/Integer/Type.hs
-index c3d812c..67ed19c 100644
---- a/libraries/integer-simple/GHC/Integer/Type.hs
-+++ b/libraries/integer-simple/GHC/Integer/Type.hs
-@@ -7,7 +7,7 @@
- -----------------------------------------------------------------------------
- -- |
- -- Module : GHC.Integer.Type
---- Copyright : (c) Ian Lynagh 2007-2008
-+-- Copyright : (c) Ian Lynagh 2007-2012
- -- License : BSD3
- --
- -- Maintainer : igloo@earth.li
-@@ -370,6 +370,16 @@ n `divModInteger` d =
- then (# q `minusInteger` oneInteger, r `plusInteger` d #)
- else (# q, r #)
-
-+{-# NOINLINE divInteger #-}
-+divInteger :: Integer -> Integer -> Integer
-+n `divInteger` d = quotient
-+ where (# quotient, _ #) = n `divModInteger` d
-+
-+{-# NOINLINE modInteger #-}
-+modInteger :: Integer -> Integer -> Integer
-+n `modInteger` d = modulus
-+ where (# _, modulus #) = n `divModInteger` d
-+
- {-# NOINLINE quotRemInteger #-}
- quotRemInteger :: Integer -> Integer -> (# Integer, Integer #)
- Naught `quotRemInteger` (!_) = (# Naught, Naught #)
diff --git a/dev-lang/ghc/files/ghc-7.6.3-trac-3333-weak-syms.patch b/dev-lang/ghc/files/ghc-7.6.3-trac-3333-weak-syms.patch
deleted file mode 100644
index c3184a68c1e7..000000000000
--- a/dev-lang/ghc/files/ghc-7.6.3-trac-3333-weak-syms.patch
+++ /dev/null
@@ -1,387 +0,0 @@
-The patch set adds support for weak symbols to ghci.
-
-For gentoo it fixes nonworking ghci / template haskell
-for package base.
-
-Steps to reproduce:
- 1. CFLAGS=-Os emerge ghc
- 2. ghci -package base
- Loading package base ... linking ... ghc: /usr/lib64/ghc-7.6.3/base-4.6.0.1/HSbase-4.6.0.1.o: unknown symbol `stat'
-
-When built with -O2 weak 'stat' resolved to '__xstat' and we don't see any errors.
-But on olwer optimization levels 'stat' remains.
-
-Patches-by: akio
-Gentoo-bug: http://bugs.gentoo.org/452442
-Upstream-bug: http://ghc.haskell.org/trac/ghc/ticket/3333
-
-From 500d57d3a18412c78cab5abc4d91f1564edc964d Mon Sep 17 00:00:00 2001
-From: Takano Akio <aljee@hyper.cx>
-Date: Sat, 29 Dec 2012 11:47:22 +0900
-Subject: [PATCH 1/3] Linker.c: remove stablehash, which is no longer used
-
----
- includes/rts/Linker.h | 3 ---
- rts/Linker.c | 31 ++-----------------------------
- 2 files changed, 2 insertions(+), 32 deletions(-)
-
-diff --git a/includes/rts/Linker.h b/includes/rts/Linker.h
-index e900e85..d20ebc2 100644
---- a/includes/rts/Linker.h
-+++ b/includes/rts/Linker.h
-@@ -23,9 +23,6 @@ typedef char pathchar;
- /* initialize the object linker */
- void initLinker( void );
-
--/* insert a stable symbol in the hash table */
--void insertStableSymbol(pathchar* obj_name, char* key, StgPtr data);
--
- /* insert a symbol in the hash table */
- void insertSymbol(pathchar* obj_name, char* key, void* data);
-
-diff --git a/rts/Linker.c b/rts/Linker.c
-index fa1de89..513fe3f 100644
---- a/rts/Linker.c
-+++ b/rts/Linker.c
-@@ -30,1 +30,0 @@
--#include "Stable.h"
-@@ -150,9 +149,6 @@ int dynamicByDefault = 0;
- /* Hash table mapping symbol names to Symbol */
- static /*Str*/HashTable *symhash;
-
--/* Hash table mapping symbol names to StgStablePtr */
--static /*Str*/HashTable *stablehash;
--
- /* List of currently loaded objects */
- ObjectCode *objects = NULL; /* initially empty */
-
-@@ -1126,1 +1126,0 @@ typedef struct _RtsSymbolVal {
-- SymI_HasProto(insertStableSymbol) \
-@@ -1488,7 +1483,6 @@ initLinker( void )
- #if defined(THREADED_RTS) && (defined(OBJFORMAT_ELF) || defined(OBJFORMAT_MACHO))
- initMutex(&dl_mutex);
- #endif
-- stablehash = allocStrHashTable();
- symhash = allocStrHashTable();
-
- /* populate the symbol table with stuff from the RTS */
-@@ -1817,17 +1811,6 @@ error:
- }
-
- /* -----------------------------------------------------------------------------
-- * insert a stable symbol in the hash table
-- */
--
--void
--insertStableSymbol(pathchar* obj_name, char* key, StgPtr p)
--{
-- ghciInsertStrHashTable(obj_name, stablehash, key, getStablePtr(p));
--}
--
--
--/* -----------------------------------------------------------------------------
- * insert a symbol in the hash table
- */
- void
-@@ -4749,8 +4732,6 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC,
- #ifdef i386_HOST_ARCH
- Elf_Addr value;
- #endif
-- StgStablePtr stablePtr;
-- StgPtr stableVal;
- #ifdef arm_HOST_ARCH
- int is_target_thm=0, T=0;
- #endif
-@@ -4773,16 +4754,8 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC,
-
- } else {
- symbol = strtab + sym.st_name;
-- stablePtr = (StgStablePtr)lookupHashTable(stablehash, (StgWord)symbol);
-- if (NULL == stablePtr) {
-- /* No, so look up the name in our global table. */
-- S_tmp = lookupSymbol( symbol );
-- S = (Elf_Addr)S_tmp;
-- } else {
-- stableVal = deRefStablePtr( stablePtr );
-- S_tmp = stableVal;
-- S = (Elf_Addr)S_tmp;
-- }
-+ S_tmp = lookupSymbol( symbol );
-+ S = (Elf_Addr)S_tmp;
- }
- if (!S) {
- errorBelch("%s: unknown symbol `%s'", oc->fileName, symbol);
---
-1.7.9.5
-
-From 2e5e0f7a90dd390adc5ae5fb2a3bc6e879aa42d6 Mon Sep 17 00:00:00 2001
-From: Takano Akio <aljee@hyper.cx>
-Date: Sat, 29 Dec 2012 11:59:34 +0900
-Subject: [PATCH 2/3] ghci: add support for ELF weak symbols
-
----
- rts/Linker.c | 102 ++++++++++++++++++++++++++++++++++++++++++++--------------
- 1 file changed, 78 insertions(+), 24 deletions(-)
-
-diff --git a/rts/Linker.c b/rts/Linker.c
-index 513fe3f..5105085 100644
---- a/rts/Linker.c
-+++ b/rts/Linker.c
-@@ -146,7 +146,13 @@ int dynamicByDefault = 1;
- int dynamicByDefault = 0;
- #endif
-
--/* Hash table mapping symbol names to Symbol */
-+typedef struct _RtsSymbolInfo {
-+ void *value;
-+ const ObjectCode *owner;
-+ HsBool weak;
-+} RtsSymbolInfo;
-+
-+/* Hash table mapping symbol names to RtsSymbolInfo */
- static /*Str*/HashTable *symhash;
-
- /* List of currently loaded objects */
-@@ -1415,15 +1421,31 @@ static RtsSymbolVal rtsSyms[] = {
- * Insert symbols into hash tables, checking for duplicates.
- */
-
--static void ghciInsertStrHashTable ( pathchar* obj_name,
-- HashTable *table,
-- char* key,
-- void *data
-- )
-+static void ghciInsertSymbolTable(
-+ pathchar* obj_name,
-+ HashTable *table,
-+ char* key,
-+ void *data,
-+ HsBool weak,
-+ ObjectCode *owner)
- {
-- if (lookupHashTable(table, (StgWord)key) == NULL)
-+ RtsSymbolInfo *pinfo = lookupStrHashTable(table, key);
-+ if (!pinfo) /* new entry */
-+ {
-+ pinfo = stgMallocBytes(sizeof (*pinfo), "ghciInsertToSymbolTable");
-+ pinfo->value = data;
-+ pinfo->owner = owner;
-+ pinfo->weak = weak;
-+ insertStrHashTable(table, key, pinfo);
-+ return;
-+ } else if ((!pinfo->weak || pinfo->value) && weak) {
-+ return; /* duplicate weak symbol, throw it away */
-+ } else if (pinfo->weak) /* weak symbol is in the table */
- {
-- insertStrHashTable(table, (StgWord)key, data);
-+ /* override the weak definition with the non-weak one */
-+ pinfo->value = data;
-+ pinfo->owner = owner;
-+ pinfo->weak = HS_BOOL_FALSE;
- return;
- }
- debugBelch(
-@@ -1444,6 +1466,32 @@ static void ghciInsertStrHashTable ( pathchar* obj_name,
- );
- stg_exit(1);
- }
-+
-+static HsBool ghciLookupSymbolTable(HashTable *table,
-+ const char *key, void **result)
-+{
-+ RtsSymbolInfo *pinfo = lookupStrHashTable(table, key);
-+ if (!pinfo) {
-+ *result = NULL;
-+ return HS_BOOL_FALSE;
-+ }
-+ if (pinfo->weak)
-+ IF_DEBUG(linker, debugBelch("lookup: promoting %s\n", key));
-+ /* Once it's looked up, it can no longer be overridden */
-+ pinfo->weak = HS_BOOL_FALSE;
-+
-+ *result = pinfo->value;
-+ return HS_BOOL_TRUE;
-+}
-+
-+static void ghciRemoveSymbolTable(HashTable *table, const char *key,
-+ ObjectCode *owner)
-+{
-+ RtsSymbolInfo *pinfo = lookupStrHashTable(table, key);
-+ if (!pinfo || owner != pinfo->owner) return;
-+ removeStrHashTable(table, key, NULL);
-+ stgFree(pinfo);
-+}
- /* -----------------------------------------------------------------------------
- * initialize the object linker
- */
-@@ -1487,8 +1535,8 @@ initLinker( void )
-
- /* populate the symbol table with stuff from the RTS */
- for (sym = rtsSyms; sym->lbl != NULL; sym++) {
-- ghciInsertStrHashTable(WSTR("(GHCi built-in symbols)"),
-- symhash, sym->lbl, sym->addr);
-+ ghciInsertSymbolTable(WSTR("(GHCi built-in symbols)"),
-+ symhash, sym->lbl, sym->addr, HS_BOOL_FALSE, NULL);
- IF_DEBUG(linker, debugBelch("initLinker: inserting rts symbol %s, %p\n", sym->lbl, sym->addr));
- }
- # if defined(OBJFORMAT_MACHO) && defined(powerpc_HOST_ARCH)
-@@ -1816,7 +1864,7 @@ error:
- void
- insertSymbol(pathchar* obj_name, char* key, void* data)
- {
-- ghciInsertStrHashTable(obj_name, symhash, key, data);
-+ ghciInsertSymbolTable(obj_name, symhash, key, data, HS_BOOL_FALSE, NULL);
- }
-
- /* -----------------------------------------------------------------------------
-@@ -1829,9 +1877,8 @@ lookupSymbol( char *lbl )
- IF_DEBUG(linker, debugBelch("lookupSymbol: looking up %s\n", lbl));
- initLinker() ;
- ASSERT(symhash != NULL);
-- val = lookupStrHashTable(symhash, lbl);
-
-- if (val == NULL) {
-+ if (!ghciLookupSymbolTable(symhash, lbl, &val)) {
- IF_DEBUG(linker, debugBelch("lookupSymbol: symbol not found\n"));
- # if defined(OBJFORMAT_ELF)
- return internal_dlsym(dl_prog_handle, lbl);
-@@ -1903,7 +1950,7 @@ void ghci_enquire ( char* addr )
- if (sym == NULL) continue;
- a = NULL;
- if (a == NULL) {
-- a = lookupStrHashTable(symhash, sym);
-+ ghciLookupSymbolTable(symhash, sym, (void **)&a);
- }
- if (a == NULL) {
- // debugBelch("ghci_enquire: can't find %s\n", sym);
-@@ -2715,7 +2762,7 @@ unloadObj( pathchar *path )
- int i;
- for (i = 0; i < oc->n_symbols; i++) {
- if (oc->symbols[i] != NULL) {
-- removeStrHashTable(symhash, oc->symbols[i], NULL);
-+ ghciRemoveSymbolTable(symhash, oc->symbols[i], oc);
- }
- }
- }
-@@ -3802,7 +3849,8 @@ ocGetNames_PEi386 ( ObjectCode* oc )
- ASSERT(i >= 0 && i < oc->n_symbols);
- /* cstring_from_COFF_symbol_name always succeeds. */
- oc->symbols[i] = (char*)sname;
-- ghciInsertStrHashTable(oc->fileName, symhash, (char*)sname, addr);
-+ ghciInsertSymbolTable(oc->fileName, symhash, (char*)sname, addr,
-+ HS_BOOL_FALSE, oc);
- } else {
- # if 0
- debugBelch(
-@@ -4595,6 +4643,7 @@ ocGetNames_ELF ( ObjectCode* oc )
- for (j = 0; j < nent; j++) {
-
- char isLocal = FALSE; /* avoids uninit-var warning */
-+ HsBool isWeak = HS_BOOL_FALSE;
- char* ad = NULL;
- char* nm = strtab + stab[j].st_name;
- int secno = stab[j].st_shndx;
-@@ -4615,6 +4664,7 @@ ocGetNames_ELF ( ObjectCode* oc )
- else
- if ( ( ELF_ST_BIND(stab[j].st_info)==STB_GLOBAL
- || ELF_ST_BIND(stab[j].st_info)==STB_LOCAL
-+ || ELF_ST_BIND(stab[j].st_info)==STB_WEAK
- )
- /* and not an undefined symbol */
- && stab[j].st_shndx != SHN_UNDEF
-@@ -4638,7 +4688,8 @@ ocGetNames_ELF ( ObjectCode* oc )
- ad = ehdrC + shdr[ secno ].sh_offset + stab[j].st_value;
- if (ELF_ST_BIND(stab[j].st_info)==STB_LOCAL) {
- isLocal = TRUE;
-- } else {
-+ isWeak = FALSE;
-+ } else { /* STB_GLOBAL or STB_WEAK */
- #ifdef ELF_FUNCTION_DESC
- /* dlsym() and the initialisation table both give us function
- * descriptors, so to be consistent we store function descriptors
-@@ -4649,6 +4700,7 @@ ocGetNames_ELF ( ObjectCode* oc )
- IF_DEBUG(linker,debugBelch( "addOTabName(GLOB): %10p %s %s\n",
- ad, oc->fileName, nm ));
- isLocal = FALSE;
-+ isWeak = (ELF_ST_BIND(stab[j].st_info)==STB_WEAK);
- }
- }
-
-@@ -4661,7 +4713,7 @@ ocGetNames_ELF ( ObjectCode* oc )
- if (isLocal) {
- /* Ignore entirely. */
- } else {
-- ghciInsertStrHashTable(oc->fileName, symhash, nm, ad);
-+ ghciInsertSymbolTable(oc->fileName, symhash, nm, ad, isWeak, oc);
- }
- } else {
- /* Skip. */
-@@ -6306,11 +6358,13 @@ ocGetNames_MachO(ObjectCode* oc)
- else
- {
- IF_DEBUG(linker, debugBelch("ocGetNames_MachO: inserting %s\n", nm));
-- ghciInsertStrHashTable(oc->fileName, symhash, nm,
-+ ghciInsertSymbolTable(oc->fileName, symhash, nm,
- image
- + sections[nlist[i].n_sect-1].offset
- - sections[nlist[i].n_sect-1].addr
-- + nlist[i].n_value);
-+ + nlist[i].n_value,
-+ HS_BOOL_FALSE,
-+ oc);
- oc->symbols[curSymbol++] = nm;
- }
- }
-@@ -6341,8 +6395,8 @@ ocGetNames_MachO(ObjectCode* oc)
- nlist[i].n_value = commonCounter;
-
- IF_DEBUG(linker, debugBelch("ocGetNames_MachO: inserting common symbol: %s\n", nm));
-- ghciInsertStrHashTable(oc->fileName, symhash, nm,
-- (void*)commonCounter);
-+ ghciInsertSymbolTable(oc->fileName, symhash, nm,
-+ (void*)commonCounter, HS_BOOL_FALSE, oc);
- oc->symbols[curSymbol++] = nm;
-
- commonCounter += sz;
-@@ -6466,7 +6520,7 @@ machoInitSymbolsWithoutUnderscore(void)
-
- #undef SymI_NeedsProto
- #define SymI_NeedsProto(x) \
-- ghciInsertStrHashTable("(GHCi built-in symbols)", symhash, #x, *p++);
-+ ghciInsertSymbolTable("(GHCi built-in symbols)", symhash, #x, *p++, HS_BOOL_FALSE, NULL);
-
- RTS_MACHO_NOUNDERLINE_SYMBOLS
-
---
-1.7.9.5
-
-From 916d7713b34b529ae7ec24eaa836a4eaca7724fc Mon Sep 17 00:00:00 2001
-From: Takano Akio <aljee@hyper.cx>
-Date: Sun, 6 Jan 2013 17:51:19 +0900
-Subject: [PATCH 3/3] Linker.c: add dso_handle to the symbol table
-
----
- rts/Linker.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/rts/Linker.c b/rts/Linker.c
-index 5105085..0b2bf63 100644
---- a/rts/Linker.c
-+++ b/rts/Linker.c
-@@ -1542,6 +1542,13 @@ initLinker( void )
- # if defined(OBJFORMAT_MACHO) && defined(powerpc_HOST_ARCH)
- machoInitSymbolsWithoutUnderscore();
- # endif
-+ /* GCC defines a special symbol __dso_handle which is resolved to NULL if
-+ referenced from a statically linked module. We need to mimic this, but
-+ we cannot use NULL because we use it to mean nonexistent symbols. So we
-+ use an arbitrary (hopefully unique) address here.
-+ */
-+ ghciInsertSymbolTable(WSTR("(GHCi special symbols)"),
-+ symhash, "__dso_handle", (void *)0x12345687, HS_BOOL_FALSE, NULL);
-
- # if defined(OBJFORMAT_ELF) || defined(OBJFORMAT_MACHO)
- # if defined(RTLD_DEFAULT)
---
-1.7.9.5
-
diff --git a/dev-lang/ghc/files/ghc-7.8.3-cc-lang.patch b/dev-lang/ghc/files/ghc-7.8.3-cc-lang.patch
deleted file mode 100644
index 032dc9a67624..000000000000
--- a/dev-lang/ghc/files/ghc-7.8.3-cc-lang.patch
+++ /dev/null
@@ -1,129 +0,0 @@
-commit 4d4d07704ee78221607a18b8118294b0aea1bac4
-Author: Sergei Trofimovich <slyfox@gentoo.org>
-Date: Tue Sep 2 00:06:56 2014 +0300
-
- systools: fix gcc version detecton on non-english locale
-
- Summary:
- ghc runs 'gcc -v' to check if we run under vanilla gcc
- or disaguised clang by checking for string
-
- "gcc version <something>"
-
- But this check does not always work as gcc has that string
- localized via gettext mechanism:
-
- (some gcc's locale strings)
- be.po-msgstr "версія gcc %s\n"
- da.po-msgstr "GCC version %s\n"
- de.po-msgstr "gcc-Version %s %s\n"
- el.po-msgstr "έκδοση gcc %s\n"
- ...
-
- To ping gcc to English locale we now override environment
- variable with 'LANGUAGE=en' value.
-
- Fixes Issue #8825
-
- Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-
- Test Plan: validate
-
- Reviewers: austin
-
- Reviewed By: austin
-
- Subscribers: simonmar, ezyang, carter
-
- Differential Revision: https://phabricator.haskell.org/D185
-
- GHC Trac Issues: #8825
-
-diff --git a/compiler/main/SysTools.lhs b/compiler/main/SysTools.lhs
-index 72fa19b..67926f5 100644
---- a/compiler/main/SysTools.lhs
-+++ b/compiler/main/SysTools.lhs
-@@ -492,6 +492,51 @@ readCreateProcess proc = do
-
- return (ex, output)
-
-+readProcessEnvWithExitCode
-+ :: String -- ^ program path
-+ -> [String] -- ^ program args
-+ -> [(String, String)] -- ^ environment to override
-+ -> IO (ExitCode, String, String) -- ^ (exit_code, stdout, stderr)
-+readProcessEnvWithExitCode prog args env_update = do
-+ current_env <- getEnvironment
-+ let new_env = env_update ++ [ (k, v)
-+ | let overriden_keys = map fst env_update
-+ , (k, v) <- current_env
-+ , k `notElem` overriden_keys
-+ ]
-+ p = proc prog args
-+
-+ (_stdin, Just stdoh, Just stdeh, pid) <-
-+ createProcess p{ std_out = CreatePipe
-+ , std_err = CreatePipe
-+ , env = Just new_env
-+ }
-+
-+ outMVar <- newEmptyMVar
-+ errMVar <- newEmptyMVar
-+
-+ _ <- forkIO $ do
-+ stdo <- hGetContents stdoh
-+ _ <- evaluate (length stdo)
-+ putMVar outMVar stdo
-+
-+ _ <- forkIO $ do
-+ stde <- hGetContents stdeh
-+ _ <- evaluate (length stde)
-+ putMVar errMVar stde
-+
-+ out <- takeMVar outMVar
-+ hClose stdoh
-+ err <- takeMVar errMVar
-+ hClose stdeh
-+
-+ ex <- waitForProcess pid
-+
-+ return (ex, out, err)
-+
-+-- Don't let gcc localize version info string, #8825
-+en_locale_env :: [(String, String)]
-+en_locale_env = [("LANGUAGE", "en")]
-
- -- If the -B<dir> option is set, add <dir> to PATH. This works around
- -- a bug in gcc on Windows Vista where it can't find its auxiliary
-@@ -746,8 +791,9 @@ getLinkerInfo' dflags = do
- _ -> do
- -- In practice, we use the compiler as the linker here. Pass
- -- -Wl,--version to get linker version info.
-- (exitc, stdo, stde) <- readProcessWithExitCode pgm
-- ["-Wl,--version"] ""
-+ (exitc, stdo, stde) <- readProcessEnvWithExitCode pgm
-+ ["-Wl,--version"]
-+ en_locale_env
- -- Split the output by lines to make certain kinds
- -- of processing easier. In particular, 'clang' and 'gcc'
- -- have slightly different outputs for '-Wl,--version', but
-@@ -802,7 +848,8 @@ getCompilerInfo' dflags = do
-
- -- Process the executable call
- info <- catchIO (do
-- (exitc, stdo, stde) <- readProcessWithExitCode pgm ["-v"] ""
-+ (exitc, stdo, stde) <-
-+ readProcessEnvWithExitCode pgm ["-v"] en_locale_env
- -- Split the output by lines to make certain kinds
- -- of processing easier.
- parseCompilerInfo (lines stdo) (lines stde) exitc
-@@ -952,7 +999,8 @@ readElfSection _dflags section exe = do
- prog = "readelf"
- args = [Option "-p", Option section, FileOption "" exe]
- --
-- r <- readProcessWithExitCode prog (filter notNull (map showOpt args)) ""
-+ r <- readProcessEnvWithExitCode prog (filter notNull (map showOpt args))
-+ en_locale_env
- case r of
- (ExitSuccess, out, _err) -> return (doFilter (lines out))
- _ -> return Nothing
diff --git a/dev-lang/ghc/files/ghc-7.8.3-deRefStablePtr.patch b/dev-lang/ghc/files/ghc-7.8.3-deRefStablePtr.patch
deleted file mode 100644
index 8deec21edc5c..000000000000
--- a/dev-lang/ghc/files/ghc-7.8.3-deRefStablePtr.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-commit 104a66a461f4f89b8e5ad9c829923bb7ca8ceddb
-Author: Sergei Trofimovich <slyfox@gentoo.org>
-Date: Sat Aug 23 13:11:23 2014 +0300
-
- rts/Linker.c: declare 'deRefStablePtr' as an exported 'rts' symbol
-
- $ inplace/bin/ghc-stage2 -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-db -rtsopts -optc-fno-builtin -fno-ghci-history \
- testsuite/tests/ffi/should_run/T4038.hs --interactive -v0 -ignore-dot-ghci +RTS -I0.1 -RTS
-
- *Main> main
- <interactive>: /tmp/ghc16668_0/ghc16668_5.o: unknown symbol `deRefStablePtr'
-
- The reference to 'deRefStablePtr' is generated by 'compiler/deSugar/DsForeign.lhs':
- the_cfun
- = case maybe_target of
- Nothing -> text "(StgClosure*)deRefStablePtr(the_stableptr)"
- Just hs_fn -> char '&' <> ppr hs_fn <> text "_closure"
-
- Patch fixes all broken tests using 'import wrapper':
- TEST="ffi013 ffi010 ffi011 ffi005 ffi020 ffi006 ffi019 fed001 T1679 T4038"
-
- Tests manifested as broken only in DYNAMIC_GHC_PROGRAMS=NO builds,
- where GHCi's custom linker is used instead of system's linker.
-
- Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-
-diff --git a/rts/Linker.c b/rts/Linker.c
-index e97580d..b24be58 100644
---- a/rts/Linker.c
-+++ b/rts/Linker.c
-@@ -1092,6 +1092,7 @@ typedef struct _RtsSymbolVal {
- SymI_HasProto(__word_encodeFloat) \
- SymI_HasProto(stg_atomicallyzh) \
- SymI_HasProto(barf) \
-+ SymI_HasProto(deRefStablePtr) \
- SymI_HasProto(debugBelch) \
- SymI_HasProto(errorBelch) \
- SymI_HasProto(sysErrorBelch) \
diff --git a/dev-lang/ghc/files/ghc-7.8.3-ia64-prim.patch b/dev-lang/ghc/files/ghc-7.8.3-ia64-prim.patch
deleted file mode 100644
index 9026ecfdf4b1..000000000000
--- a/dev-lang/ghc/files/ghc-7.8.3-ia64-prim.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-commit e2a8801b9779949010f30db6f6ef66f3c3a70776
-Author: Sergei Trofimovich <slyfox@gentoo.org>
-Date: Thu Sep 4 17:50:45 2014 +0300
-
- pprC: declare extern cmm primitives as functions, not data
-
- Summary:
- The commit fixes incorrect code generation of
- integer-gmp package on ia64 due to C prototype mismatch.
- Before patch prototype was
- StgWord poizh[];
- After patch it became
- StgFunPtr poizh();
-
- Long story:
-
- Consider the following simple example:
-
- {-# LANGUAGE MagicHash, GHCForeignImportPrim, UnliftedFFITypes #-}
- module M where
- import GHC.Prim -- Int#
- foreign import prim "poizh" poi# :: Int# -> Int#
-
- Before the patch Unregisterised build generated the
- following 'poizh' reference:
- EI_(poizh); /* StgWord poizh[]; */
- FN_(M_poizh_entry) {
- // ...
- JMP_((W_)&poizh);
- }
-
- After the patch it looks this way:
- EF_(poizh); /* StgFunPtr poizh(); */
- FN_(M_poizh_entry) {
- // ...
- JMP_((W_)&poizh);
- }
-
- On ia64 it leads to different relocation types being generated:
- incorrect one:
- addl r14 = @ltoffx(poizh#)
- ld8.mov r14 = [r14], poizh#
- correct one:
- addl r14 = @ltoff(@fptr(poizh#)), gp
- ld8 r14 = [r14]
-
- '@fptr(poizh#)' basically instructs assembler to creates
- another obect consisting of real address to 'poizh' instructions
- and module address. That '@fptr' object is used as a function "address".
- This object is different for every module referencing 'poizh' symbol.
-
- All indirect function calls expect '@fptr' object. That way
- call site can read real destination address and set destination
- module address in 'gp' register.
-
- Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-
-diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs
-index 02ad026..0f2c0ae 100644
---- a/compiler/cmm/CLabel.hs
-+++ b/compiler/cmm/CLabel.hs
-@@ -813,6 +813,7 @@ labelType (CmmLabel _ _ CmmClosure) = GcPtrLabel
- labelType (CmmLabel _ _ CmmCode) = CodeLabel
- labelType (CmmLabel _ _ CmmInfo) = DataLabel
- labelType (CmmLabel _ _ CmmEntry) = CodeLabel
-+labelType (CmmLabel _ _ CmmPrimCall) = CodeLabel
- labelType (CmmLabel _ _ CmmRetInfo) = DataLabel
- labelType (CmmLabel _ _ CmmRet) = CodeLabel
- labelType (RtsLabel (RtsSelectorInfoTable _ _)) = DataLabel
diff --git a/dev-lang/ghc/files/ghc-7.8.3-pic-asm.patch b/dev-lang/ghc/files/ghc-7.8.3-pic-asm.patch
deleted file mode 100644
index 10c41d5b29f6..000000000000
--- a/dev-lang/ghc/files/ghc-7.8.3-pic-asm.patch
+++ /dev/null
@@ -1,107 +0,0 @@
-commit a93ab43ab5f40cadbedea2f6342b93c245e91434
-Author: Sergei Trofimovich <slyfox@gentoo.org>
-Date: Wed Aug 27 22:19:52 2014 +0300
-
- driver: pass '-fPIC' option to assembler as well
-
- Summary:
- Before the patch '-fPIC' was passed only to C compiler,
- but not to assembler itself.
-
- It led to runtime crash in GHC_DYNAMIC_PROGRAMS=YES mode
- on sparc32.
-
- Technical details are in 'Note [-fPIC for assembler]'.
-
- Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-
- Test Plan: validate on sparc
-
- Reviewers: simonmar, austin, kgardas
-
- Reviewed By: austin
-
- Subscribers: simonmar, ezyang, carter
-
- Differential Revision: https://phabricator.haskell.org/D177
-
-diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
-index 183f435..5a18e6e 100644
---- a/compiler/main/DriverPipeline.hs
-+++ b/compiler/main/DriverPipeline.hs
-@@ -1199,6 +1199,7 @@ runPhase (RealPhase (As with_cpp)) input_fn dflags
-
- as_prog <- whichAsProg
- let cmdline_include_paths = includePaths dflags
-+ let pic_c_flags = picCCOpts dflags
-
- next_phase <- maybeMergeStub
- output_fn <- phaseOutputFilename next_phase
-@@ -1212,6 +1213,9 @@ runPhase (RealPhase (As with_cpp)) input_fn dflags
- = liftIO $ as_prog dflags
- ([ SysTools.Option ("-I" ++ p) | p <- cmdline_include_paths ]
-
-+ -- See Note [-fPIC for assembler]
-+ ++ map SysTools.Option pic_c_flags
-+
- -- We only support SparcV9 and better because V8 lacks an atomic CAS
- -- instruction so we have to make sure that the assembler accepts the
- -- instruction set. Note that the user can still override this
-@@ -1253,6 +1257,8 @@ runPhase (RealPhase SplitAs) _input_fn dflags
- osuf = objectSuf dflags
- split_odir = base_o ++ "_" ++ osuf ++ "_split"
-
-+ let pic_c_flags = picCCOpts dflags
-+
- -- this also creates the hierarchy
- liftIO $ createDirectoryIfMissing True split_odir
-
-@@ -1286,6 +1292,9 @@ runPhase (RealPhase SplitAs) _input_fn dflags
- then [SysTools.Option "-mcpu=v9"]
- else []) ++
-
-+ -- See Note [-fPIC for assembler]
-+ map SysTools.Option pic_c_flags ++
-+
- [ SysTools.Option "-c"
- , SysTools.Option "-o"
- , SysTools.FileOption "" (split_obj n)
-@@ -2203,3 +2212,38 @@ haveRtsOptsFlags dflags =
- isJust (rtsOpts dflags) || case rtsOptsEnabled dflags of
- RtsOptsSafeOnly -> False
- _ -> True
-+
-+-- Note [-fPIC for assembler]
-+-- When compiling .c source file GHC's driver pipeline basically
-+-- does the following two things:
-+-- 1. ${CC} -S 'PIC_CFLAGS' source.c
-+-- 2. ${CC} -x assembler -c 'PIC_CFLAGS' source.S
-+--
-+-- Why do we need to pass 'PIC_CFLAGS' both to C compiler and assembler?
-+-- Because on some architectures (at least sparc32) assembler also choses
-+-- relocation type!
-+-- Consider the following C module:
-+--
-+-- /* pic-sample.c */
-+-- int v;
-+-- void set_v (int n) { v = n; }
-+-- int get_v (void) { return v; }
-+--
-+-- $ gcc -S -fPIC pic-sample.c
-+-- $ gcc -c pic-sample.s -o pic-sample.no-pic.o # incorrect binary
-+-- $ gcc -c -fPIC pic-sample.s -o pic-sample.pic.o # correct binary
-+--
-+-- $ objdump -r -d pic-sample.pic.o > pic-sample.pic.o.od
-+-- $ objdump -r -d pic-sample.no-pic.o > pic-sample.no-pic.o.od
-+-- $ diff -u pic-sample.pic.o.od pic-sample.no-pic.o.od
-+--
-+-- Most of architectures won't show any difference in this test, but on sparc32
-+-- the following assembly snippet:
-+--
-+-- sethi %hi(_GLOBAL_OFFSET_TABLE_-8), %l7
-+--
-+-- generates two kinds or relocations, only 'R_SPARC_PC22' is correct:
-+--
-+-- 3c: 2f 00 00 00 sethi %hi(0), %l7
-+-- - 3c: R_SPARC_PC22 _GLOBAL_OFFSET_TABLE_-0x8
-+-- + 3c: R_SPARC_HI22 _GLOBAL_OFFSET_TABLE_-0x8
diff --git a/dev-lang/ghc/files/ghc-7.8.3-unreg-lit.patch b/dev-lang/ghc/files/ghc-7.8.3-unreg-lit.patch
deleted file mode 100644
index 632696d6fde7..000000000000
--- a/dev-lang/ghc/files/ghc-7.8.3-unreg-lit.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-commit a6ea05e21e175407dc9e45f18c56c1d727fd0f26
-Author: Sergei Trofimovich <slyfox@gentoo.org>
-Date: Fri Aug 22 23:24:32 2014 +0300
-
- UNREG: fix emission of large Integer literals in C codegen
-
- Summary:
- On amd64/UNREG build there is many failing tests trying
- to deal with 'Integer' types.
-
- Looking at 'overflow1' test I've observed invalid C code generated by
- GHC.
-
- Cmm code
- CInt a = -1; (a == -1)
- yields 'False' with optimisations enabled via the following C code:
- StgWord64 a = (StgWord32)0xFFFFffffFFFFffffu; (a == 0xFFFFffffFFFFffffu)
-
- The patch fixes it by shrinking emitted literals to required sizes:
- StgWord64 a = (StgWord32)0xFFFFffffu; (a == 0xFFFFffffu)
-
- Thanks to Reid Barton for tracking down and fixing the issue.
-
- Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-
- Test Plan: validate on UNREG build (amd64)
-
- Reviewers: simonmar, rwbarton, austin
-
- Subscribers: simonmar, ezyang, carter
-
- Differential Revision: https://phabricator.haskell.org/D173
-
-diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs
-index 93a5d06..8605988 100644
---- a/compiler/cmm/PprC.hs
-+++ b/compiler/cmm/PprC.hs
-@@ -1221,8 +1221,9 @@ commafy xs = hsep $ punctuate comma xs
- pprHexVal :: Integer -> Width -> SDoc
- pprHexVal 0 _ = ptext (sLit "0x0")
- pprHexVal w rep
-- | w < 0 = parens (char '-' <> ptext (sLit "0x") <> go (-w) <> repsuffix rep)
-- | otherwise = ptext (sLit "0x") <> go w <> repsuffix rep
-+ | w < 0 = parens (char '-' <>
-+ ptext (sLit "0x") <> intToDoc (-w) <> repsuffix rep)
-+ | otherwise = ptext (sLit "0x") <> intToDoc w <> repsuffix rep
- where
- -- type suffix for literals:
- -- Integer literals are unsigned in Cmm/C. We explicitly cast to
-@@ -1237,10 +1238,33 @@ pprHexVal w rep
- else panic "pprHexVal: Can't find a 64-bit type"
- repsuffix _ = char 'U'
-
-+ intToDoc :: Integer -> SDoc
-+ intToDoc i = go (truncInt i)
-+
-+ -- We need to truncate value as Cmm backend does not drop
-+ -- redundant bits to ease handling of negative values.
-+ -- Thus the following Cmm code on 64-bit arch, like amd64:
-+ -- CInt v;
-+ -- v = {something};
-+ -- if (v == %lobits32(-1)) { ...
-+ -- leads to the following C code:
-+ -- StgWord64 v = (StgWord32)({something});
-+ -- if (v == 0xFFFFffffFFFFffffU) { ...
-+ -- Such code is incorrect as it promotes both operands to StgWord64
-+ -- and the whole condition is always false.
-+ truncInt :: Integer -> Integer
-+ truncInt i =
-+ case rep of
-+ W8 -> i `rem` (2^(8 :: Int))
-+ W16 -> i `rem` (2^(16 :: Int))
-+ W32 -> i `rem` (2^(32 :: Int))
-+ W64 -> i `rem` (2^(64 :: Int))
-+ _ -> panic ("pprHexVal/truncInt: C backend can't encode "
-+ ++ show rep ++ " literals")
-+
- go 0 = empty
- go w' = go q <> dig
- where
- (q,r) = w' `quotRem` 16
- dig | r < 10 = char (chr (fromInteger r + ord '0'))
- | otherwise = char (chr (fromInteger r - 10 + ord 'a'))
--
diff --git a/dev-lang/ghc/files/terminfo-0.3.2.5-tinfo.patch b/dev-lang/ghc/files/terminfo-0.3.2.5-tinfo.patch
deleted file mode 100644
index ca10da2e03ae..000000000000
--- a/dev-lang/ghc/files/terminfo-0.3.2.5-tinfo.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-http://bugs.gentoo.org/454216
-
-Mon Jan 7 16:34:47 FET 2013 Judah Jacobson <judah.jacobson@gmail.com>
- * Search for terminfo in libtinfo; fixes GHC #7281.
-
- Patch from Paul Johnson.
-diff -rN -u old-terminfo/configure.ac new-terminfo/configure.ac
---- old-terminfo/configure.ac 2013-02-14 00:16:11.816111434 +0300
-+++ new-terminfo/configure.ac 2013-02-14 00:16:11.819111434 +0300
-@@ -39,10 +39,11 @@
- TERMINFO_INCLUDES="$CursesIncludes term.h"
- fi
-
--AC_CHECK_LIB(ncursesw, setupterm, HaveLibCurses=YES; LibCurses=ncursesw,
-- [AC_CHECK_LIB(ncurses, setupterm, HaveLibCurses=YES; LibCurses=ncurses,
-- [AC_CHECK_LIB(curses, setupterm, HaveLibCurses=YES; LibCurses=curses,
-- HaveLibCurses=NO; LibCurses=not-installed)])])
-+AC_CHECK_LIB(tinfo, setupterm, HaveLibCurses=YES; LibCurses=tinfo,
-+ [AC_CHECK_LIB(ncursesw, setupterm, HaveLibCurses=YES; LibCurses=ncursesw,
-+ [AC_CHECK_LIB(ncurses, setupterm, HaveLibCurses=YES; LibCurses=ncurses,
-+ [AC_CHECK_LIB(curses, setupterm, HaveLibCurses=YES; LibCurses=curses,
-+ HaveLibCurses=NO; LibCurses=not-installed)])])])
-
- if test "x$HaveLibCurses" = "xNO" ; then
- AC_MSG_FAILURE([curses library not found, so this package cannot be built])
diff --git a/dev-lang/ghc/ghc-7.10.2-r1.ebuild b/dev-lang/ghc/ghc-7.10.2-r1.ebuild
deleted file mode 100644
index 13af9a4d9d02..000000000000
--- a/dev-lang/ghc/ghc-7.10.2-r1.ebuild
+++ /dev/null
@@ -1,662 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-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="http://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-# sorted!
-#arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-arm.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PVR}-amd64-noncurses.tbz2 )"
-#arch_binaries="$arch_binaries ia64? ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
-#arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
-#arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PVR}-x86-noncurses.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/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.1.20150630 # uncomment only for -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-#SRC_URI="!binary? ( http://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.bz2 )"
-# Upstream tarball was repackaged and inplace-updated. CDN cached old version for
-# many users
-SRC_URI="!binary? ( http://dev.gentoo.org/~slyfox/distfiles/${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.5.0"
- "hoopl 3.10.1.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:=[unicode]
- !ghcmakebinary? ( virtual/libffi:= )
- !kernel_Darwin? ( >=sys-devel/gcc-2.95.3:* )
- kernel_linux? ( >=sys-devel/binutils-2.17:* )
- kernel_SunOS? ( >=sys-devel/binutils-2.17:* )
-"
-# gentoo binaries are built against ncurses-5
-RDEPEND+="
- binary? (
- || (
- sys-libs/ncurses:0/5
- sys-libs/ncurses:5/5
- )
- )
-"
-
-# force dependency on >=gmp-5, even if >=gmp-4.1 would be enough. this is due to
-# that we want the binaries to use the latest versioun available, and not to be
-# built against gmp-4
-
-# similar for glibc. we have bootstrapped binaries against glibc-2.17
-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? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) )"
-
-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
-}
-
-# $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+=" mirror://hackage/package/${pn}/${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}"
- 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:
- # http://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
- # http://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"
-
- if use prefix; then
- # and insert LD_LIBRARY_PATH entry to EPREFIX dir tree
- # TODO: add the same for darwin's CHOST and it's DYLD_
- local new_ldpath='LD_LIBRARY_PATH="'${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir)'${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"\nexport LD_LIBRARY_PATH'
- sed -i -e '2i'"$new_ldpath" \
- "${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/bin/hsc2hs" \
- || die "Adding LD_LIBRARY_PATH for wrappers failed"
- 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/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 x86-macos && unpack ghc-7.4.1-i386-apple-darwin.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.1-T10590-dequeue.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=$(pkg-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
- 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}"
- 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)/${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/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
- newbashcomp utils/completion/ghc.bash ghc
- 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'"
- ewarn "to rebuild all ghc-based Haskell libraries."
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- fi
-}
-
-pkg_prerm() {
- 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-7.10.2.ebuild b/dev-lang/ghc/ghc-7.10.2.ebuild
deleted file mode 100644
index 7b04d8389d98..000000000000
--- a/dev-lang/ghc/ghc-7.10.2.ebuild
+++ /dev/null
@@ -1,652 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-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="http://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-# sorted!
-#arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-arm.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PV}-amd64.tbz2 )"
-#arch_binaries="$arch_binaries ia64? ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
-#arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
-#arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PV}-x86.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/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.1.20150630 # uncomment only for -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-#SRC_URI="!binary? ( http://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.bz2 )"
-# Upstream tarball was repackaged and inplace-updated. CDN cached old version for
-# many users
-SRC_URI="!binary? ( https://dev.gentoo.org/~slyfox/distfiles/${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.5.0"
- "hoopl 3.10.1.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:=[unicode]
- !ghcmakebinary? ( virtual/libffi:= )
- !kernel_Darwin? ( >=sys-devel/gcc-2.95.3:* )
- kernel_linux? ( >=sys-devel/binutils-2.17:* )
- kernel_SunOS? ( >=sys-devel/binutils-2.17:* )
-"
-# gentoo binaries are built against ncurses-5
-RDEPEND+="
- binary? (
- || (
- sys-libs/ncurses:0/5
- sys-libs/ncurses:5/5
- )
- )
-"
-
-# force dependency on >=gmp-5, even if >=gmp-4.1 would be enough. this is due to
-# that we want the binaries to use the latest versioun available, and not to be
-# built against gmp-4
-
-# similar for glibc. we have bootstrapped binaries against glibc-2.17
-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? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) )"
-
-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
-}
-
-# $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+=" mirror://hackage/package/${pn}/${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}"
- 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:
- # http://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
- # http://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"
-
- if use prefix; then
- # and insert LD_LIBRARY_PATH entry to EPREFIX dir tree
- # TODO: add the same for darwin's CHOST and it's DYLD_
- local new_ldpath='LD_LIBRARY_PATH="'${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir)'${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"\nexport LD_LIBRARY_PATH'
- sed -i -e '2i'"$new_ldpath" \
- "${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/bin/hsc2hs" \
- || die "Adding LD_LIBRARY_PATH for wrappers failed"
- 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/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 x86-macos && unpack ghc-7.4.1-i386-apple-darwin.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.1-T10590-dequeue.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
-
- elog "Final mk/build.mk:"
- cat mk/build.mk || die
-
- 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=$(pkg-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}"
- 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)/${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/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
- newbashcomp utils/completion/ghc.bash ghc
- 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'"
- ewarn "to rebuild all ghc-based Haskell libraries."
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- fi
-}
-
-pkg_prerm() {
- 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-7.4.2.ebuild b/dev-lang/ghc/ghc-7.4.2.ebuild
deleted file mode 100644
index 366f1d473b1a..000000000000
--- a/dev-lang/ghc/ghc-7.4.2.ebuild
+++ /dev/null
@@ -1,640 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-# Brief explanation of the bootstrap logic:
-#
-# Previous ghc ebuilds have been split into two: ghc and ghc-bin,
-# where ghc-bin was primarily used for bootstrapping purposes.
-# From now on, these two ebuilds have been combined, with the
-# binary USE flag used to determine whether or not the pre-built
-# binary package should be emerged or whether ghc should be compiled
-# from source. If the latter, then the relevant ghc-bin for the
-# arch in question will be used in the working directory to compile
-# ghc from source.
-#
-# This solution has the advantage of allowing us to retain the one
-# ebuild for both packages, and thus phase out virtual/ghc.
-
-# Note to users of hardened gcc-3.x:
-#
-# If you emerge ghc with hardened gcc it should work fine (because we
-# turn off the hardened features that would otherwise break ghc).
-# However, emerging ghc while using a vanilla gcc and then switching to
-# hardened gcc (using gcc-config) will leave you with a broken ghc. To
-# fix it you would need to either switch back to vanilla gcc or re-emerge
-# ghc (or ghc-bin). Note that also if you are using hardened gcc-3.x and
-# you switch to gcc-4.x that this will also break ghc and you'll need to
-# re-emerge ghc (or ghc-bin). People using vanilla gcc can switch between
-# gcc-3.x and 4.x with no problems.
-
-EAPI="5"
-
-inherit base autotools bash-completion-r1 eutils flag-o-matic multilib toolchain-funcs ghc-package versionator pax-utils
-
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="http://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-# sorted!
-arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-arm.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PV}-amd64-stable-glibc.tbz2 )"
-arch_binaries="$arch_binaries ia64? ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64.tbz2 )"
-arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
-arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
-arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PV}-x86-stable-glibc.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/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
-}
-
-SRC_URI="!binary? ( http://www.haskell.org/ghc/dist/${PV}/${P}-src.tar.bz2 )"
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-LICENSE="BSD"
-SLOT="0/${PV}"
-# ghc on ia64 needs gcc to support -mcmodel=medium (or some dark hackery) to avoid TOC overflow
-KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
-IUSE="doc ghcbootstrap ghcmakebinary +gmp llvm"
-IUSE+=" binary" # don't forget about me later!
-IUSE+=" elibc_glibc" # system stuff
-
-RDEPEND="
- !kernel_Darwin? ( >=sys-devel/gcc-2.95.3 )
- kernel_linux? ( >=sys-devel/binutils-2.17 )
- kernel_SunOS? ( >=sys-devel/binutils-2.17 )
- >=dev-lang/perl-5.6.1
- >=dev-libs/gmp-5
- virtual/libffi
- !<dev-haskell/haddock-2.10.0
- sys-libs/ncurses[unicode]"
-# earlier versions than 2.4.2 of haddock only works with older ghc releases
-
-# force dependency on >=gmp-5, even if >=gmp-4.1 would be enough. this is due to
-# that we want the binaries to use the latest versioun available, and not to be
-# built against gmp-4
-
-# similar for glibc. we have bootstrapped binaries against glibc-2.14
-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? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.14 ) ) )"
-
-PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
-PDEPEND="
- ${PDEPEND}
- llvm? ( sys-devel/llvm )"
-
-# ia64 fails to return from STG GMP primitives (stage2 always SIGSEGVs)
-REQUIRED_USE="ia64? ( !gmp )"
-
-append-ghc-cflags() {
- local flag compile assemble link
- for flag in $*; do
- case ${flag} in
- compile) compile="yes";;
- assemble) assemble="yes";;
- link) link="yes";;
- *)
- [[ ${compile} ]] && GHC_FLAGS="${GHC_FLAGS} -optc${flag}" CFLAGS="${CFLAGS} ${flag}"
- [[ ${assemble} ]] && GHC_FLAGS="${GHC_FLAGS} -opta${flag}" CFLAGS="${CFLAGS} ${flag}"
- [[ ${link} ]] && GHC_FLAGS="${GHC_FLAGS} -optl${flag}" FILTERED_LDFLAGS="${FILTERED_LDFLAGS} ${flag}";;
- esac
- done
-}
-
-ghc_setup_cflags() {
- # 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=""
- 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};;
-
- # Debugging flags don't help either. You can't debug Haskell code
- # at the C source level and the mangler discards the debug info.
- -g*) ;;
-
- # Ignore all other flags, including all -f* flags
- esac
- done
-
- FILTERED_LDFLAGS=""
- for flag in ${LDFLAGS}; do
- case ${flag} in
- # Pass the canary. we don't quite respect LDFLAGS, but we have an excuse!
- "-Wl,--hash-style="*) append-ghc-cflags link ${flag};;
-
- # Ignore all other flags
- esac
- done
-
- # hardened-gcc needs to be disabled, because the mangler doesn't accept
- # its output.
- gcc-specs-pie && append-ghc-cflags compile link -nopie
- gcc-specs-ssp && append-ghc-cflags compile -fno-stack-protector
-
- # prevent from failind building unregisterised ghc:
- # http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
- use ppc64 && append-ghc-cflags 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
- # http://osdir.com/ml/gnu.binutils.bugs/2004-10/msg00050.html
- use ia64 && append-ghc-cflags compile -G0
-
- # Unfortunately driver/split/ghc-split.lprl is dumb
- # enough to preserve stack marking for each split object
- # and it flags stack marking violation:
- # * !WX --- --- usr/lib64/ghc-7.4.1/base-4.5.0.0/libHSbase-4.5.0.0.a:Fingerprint__1.o
- # * !WX --- --- usr/lib64/ghc-7.4.1/base-4.5.0.0/libHSbase-4.5.0.0.a:Fingerprint__2.o
- # * !WX --- --- usr/lib64/ghc-7.4.1/base-4.5.0.0/libHSbase-4.5.0.0.a:Fingerprint__3.o
- case $($(tc-getAS) -v 2>&1 </dev/null) in
- *"GNU Binutils"*) # GNU ld
- append-ghc-cflags compile assemble -Wa,--noexecstack
- ;;
- esac
-}
-
-# 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
-
- # backup original script to use it later after relocation
- local gp_back="${T}/ghc-pkg-${PV}-orig"
- cp "${WORKDIR}/usr/bin/ghc-pkg-${PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
-
- # Relocate from /usr to ${EPREFIX}/usr
- relocate_path "/usr" "${to}/usr" \
- "${WORKDIR}/usr/bin/ghc-${PV}" \
- "${WORKDIR}/usr/bin/ghci-${PV}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${PV}" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/$(get_libdir)/${P}/package.conf.d/"*
-
- # this one we will use to regenerate cache
- # so it shoult point to current tree location
- relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
-
- if use prefix; then
- # and insert LD_LIBRARY_PATH entry to EPREFIX dir tree
- # TODO: add the same for darwin's CHOST and it's DYLD_
- local new_ldpath='LD_LIBRARY_PATH="'${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir)'${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"\nexport LD_LIBRARY_PATH'
- sed -i -e '2i'"$new_ldpath" \
- "${WORKDIR}/usr/bin/ghc-${PV}" \
- "${WORKDIR}/usr/bin/ghci-${PV}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${PV}" \
- "$gp_back" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- || die "Adding LD_LIBRARY_PATH for wrappers failed"
- 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="*"
-
- if use ghcbootstrap; then
- ewarn "You requested ghc bootstrapping, this is usually only used"
- ewarn "by Gentoo developers to make binary .tbz2 packages for"
- ewarn "use with the ghc ebuild's USE=\"binary\" feature."
- use binary && \
- die "USE=\"ghcbootstrap binary\" is not a valid combination."
- [[ -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=${P}-src.tar.bz2 ;;
- 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_FLAGS.
- # See bug #313635.
- sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_FLAGS}|" \
- "${WORKDIR}/usr/bin/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)/${P}/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*)
- 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 x86-macos && unpack ghc-7.4.1-i386-apple-darwin.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_FLAGS}|" \
- "${S}/ghc/ghc.wrapper"
-
- cd "${S}" # otherwise epatch will break
-
- epatch "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
-
- epatch "${FILESDIR}"/${PN}-7.0.4-darwin8.patch
- # failed to apply. FIXME
- #epatch "${FILESDIR}"/${PN}-6.12.3-mach-o-relocation-limit.patch
-
- epatch "${FILESDIR}"/${PN}-7.4-rc2-macos-prefix-respect-gcc.patch
- epatch "${FILESDIR}"/${PN}-7.4.1-darwin-CHOST.patch
- epatch "${FILESDIR}"/${PN}-7.2.1-freebsd-CHOST.patch
-
- we_want_libffi_workaround() {
- use ghcmakebinary && return 1
-
- # pick only registerised arches
- # https://bugs.gentoo.org/463814
- use amd64 && return 0
- use x86 && return 0
- return 1
- }
- # one mode external depend with unstable ABI be careful to stash it
- # avoid external libffi runtime when we build binaries
- we_want_libffi_workaround && epatch "${FILESDIR}"/${PN}-7.4.2-system-libffi.patch
-
- epatch "${FILESDIR}"/${PN}-7.4.1-ticket-7339-fix-unaligned-unreg.patch
-
- if use prefix; then
- # Make configure find docbook-xsl-stylesheets from Prefix
- sed -i -e '/^FP_DIR_DOCBOOK_XSL/s:\[.*\]:['"${EPREFIX}"'/usr/share/sgml/docbook/xsl-stylesheets/]:' utils/haddock/doc/configure.ac || die
- fi
-
- cd "${S}"/libraries/terminfo
- # bug #454216
- epatch "${FILESDIR}"/terminfo-0.3.2.5-tinfo.patch
-
- cd "${S}"
- # 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-${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+=${FILTERED_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
- 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
-
- # circumvent a very strange bug that seems related with ghc producing
- # too much output while being filtered through tee (e.g. due to
- # portage logging) reported as bug #111183
- echo "SRC_HC_OPTS+=-w" >> mk/build.mk
-
- # some arches do not support ELF parsing for ghci module loading
- # PPC64: never worked (should be easy to implement)
- # alpha: never worked
- # arm: unimplemented or never worked
- if use alpha || use ppc64 || use arm; then
- echo "GhcWithInterpreter=NO" >> mk/build.mk
- fi
-
- # we have to tell it to build unregisterised on some arches
- # ppc64: EvilMangler currently does not understand some TOCs
- # ia64: EvilMangler bitrot
- if use alpha || use ia64 || use ppc64; then
- echo "GhcUnregisterised=YES" >> mk/build.mk
- echo "GhcWithNativeCodeGen=NO" >> mk/build.mk
- echo "SplitObjs=NO" >> mk/build.mk
- echo "GhcRTSWays := debug" >> mk/build.mk
- echo "GhcNotThreaded=YES" >> mk/build.mk
- fi
-
- # arm: no EvilMangler support, no NCG support
- if use arm; then
- echo "GhcUnregisterised=YES" >> mk/build.mk
- echo "GhcWithNativeCodeGen=NO" >> mk/build.mk
- fi
-
- # Have "ld -r --relax" problem with split-objs on sparc:
- if use sparc; then
- echo "SplitObjs=NO" >> mk/build.mk
- fi
-
- if ! use llvm; then
- echo "GhcWithLlvmCodeGen=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
-
- # Since GHC 6.12.2 the GHC wrappers store which GCC version GHC was
- # compiled with, by saving the path to it. The purpose is to make sure
- # that GHC will use the very same gcc version when it compiles haskell
- # sources, as the extra-gcc-opts files contains extra gcc options which
- # match only this GCC version.
- # However, this is not required in Gentoo, as only modern GCCs are used
- # (>4).
- # Instead, this causes trouble when for example ccache is used during
- # compilation, but we don't want the wrappers to point to ccache.
- # Due to the above, we simply set GCC to be "gcc". When compiling ghc it
- # might point to ccache, once installed it will point to the users
- # regular gcc.
-
- econf --with-gcc=gcc || die "econf failed"
- fi # ! use binary
-}
-
-src_compile() {
- if ! use binary; then
- limit_jobs() {
- if [[ -n ${I_DEMAND_MY_CORES_LOADED} ]]; then
- ewarn "You have requested parallel build which is known to break."
- ewarn "Please report all breakages upstream."
- return
- fi
- echo $@
- }
- # ghc massively parallel make: #409631, #409873
- # but let users screw it by setting 'I_DEMAND_MY_CORES_LOADED'
- emake $(limit_jobs -j1) 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
- local insttarget="install"
-
- # We only built 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}/README" "${S}/ANNOUNCE" "${S}/LICENSE" "${S}/VERSION"
- fi
-
- emake -j1 ${insttarget} \
- DESTDIR="${D}" \
- || die "make ${insttarget} failed"
-
- # remove wrapper and linker
- rm -f "${ED}"/usr/bin/haddock*
-
- # ghci uses mmap with rwx protection at it implements dynamic
- # linking on it's own (bug #299709)
- # so mark resulting binary
- pax-mark -m "${ED}/usr/$(get_libdir)/${P}/ghc"
-
- dobashcomp "${FILESDIR}/ghc-bash-completion"
-
- fi
-
- # path to the package.cache
- local package_confdir="${ED}/usr/$(get_libdir)/${P}/package.conf.d"
- PKGCACHE="${package_confdir}"/package.cache
-
- 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)/${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 ${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)/${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.6.3-r1.ebuild b/dev-lang/ghc/ghc-7.6.3-r1.ebuild
deleted file mode 100644
index c5c2e89c41d5..000000000000
--- a/dev-lang/ghc/ghc-7.6.3-r1.ebuild
+++ /dev/null
@@ -1,829 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-# Brief explanation of the bootstrap logic:
-#
-# Previous ghc ebuilds have been split into two: ghc and ghc-bin,
-# where ghc-bin was primarily used for bootstrapping purposes.
-# From now on, these two ebuilds have been combined, with the
-# binary USE flag used to determine whether or not the pre-built
-# binary package should be emerged or whether ghc should be compiled
-# from source. If the latter, then the relevant ghc-bin for the
-# arch in question will be used in the working directory to compile
-# ghc from source.
-#
-# This solution has the advantage of allowing us to retain the one
-# ebuild for both packages, and thus phase out virtual/ghc.
-
-# Note to users of hardened gcc-3.x:
-#
-# If you emerge ghc with hardened gcc it should work fine (because we
-# turn off the hardened features that would otherwise break ghc).
-# However, emerging ghc while using a vanilla gcc and then switching to
-# hardened gcc (using gcc-config) will leave you with a broken ghc. To
-# fix it you would need to either switch back to vanilla gcc or re-emerge
-# ghc (or ghc-bin). Note that also if you are using hardened gcc-3.x and
-# you switch to gcc-4.x that this will also break ghc and you'll need to
-# re-emerge ghc (or ghc-bin). People using vanilla gcc can switch between
-# gcc-3.x and 4.x with no problems.
-
-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 multiprocessing pax-utils toolchain-funcs versionator
-
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="http://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-# sorted!
-arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-r1-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-arm.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PV}-amd64.tbz2 )"
-arch_binaries="$arch_binaries ia64? ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-r1-ia64.tbz2 )"
-arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-r1-ppc.tbz2 )"
-arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-r1-ppc64.tbz2 )"
-arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-r1-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PV}-x86.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/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
-}
-
-SRC_URI="!binary? ( http://www.haskell.org/ghc/dist/${PV}/${P}-src.tar.bz2 )"
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-LICENSE="BSD"
-SLOT="0/${PV}"
-KEYWORDS="~alpha amd64 ~ia64 ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
-IUSE="doc ghcbootstrap ghcmakebinary +gmp llvm"
-IUSE+=" binary" # don't forget about me later!
-IUSE+=" elibc_glibc" # system stuff
-
-RDEPEND="
- !kernel_Darwin? ( >=sys-devel/gcc-2.95.3 )
- kernel_linux? ( >=sys-devel/binutils-2.17 )
- kernel_SunOS? ( >=sys-devel/binutils-2.17 )
- >=dev-lang/perl-5.6.1
- >=dev-libs/gmp-5
- virtual/libffi
- !<dev-haskell/haddock-2.4.2
- sys-libs/ncurses[unicode]"
-# earlier versions than 2.4.2 of haddock only works with older ghc releases
-
-# force dependency on >=gmp-5, even if >=gmp-4.1 would be enough. this is due to
-# that we want the binaries to use the latest versioun available, and not to be
-# built against gmp-4
-
-# similar for glibc. we have bootstrapped binaries against glibc-2.14
-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? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.15 ) ) )"
-
-PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
-PDEPEND="
- ${PDEPEND}
- llvm? ( sys-devel/llvm )"
-
-# ia64 fails to return from STG GMP primitives (stage2 always SIGSEGVs)
-REQUIRED_USE="ia64? ( !gmp )"
-
-# haskell libraries built with cabal in configure mode, #515354
-QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-append-ghc-cflags() {
- local flag compile assemble link
- for flag in $*; do
- case ${flag} in
- compile) compile="yes";;
- assemble) assemble="yes";;
- link) link="yes";;
- *)
- [[ ${compile} ]] && GHC_FLAGS="${GHC_FLAGS} -optc${flag}" CFLAGS="${CFLAGS} ${flag}"
- [[ ${assemble} ]] && GHC_FLAGS="${GHC_FLAGS} -opta${flag}" CFLAGS="${CFLAGS} ${flag}"
- [[ ${link} ]] && GHC_FLAGS="${GHC_FLAGS} -optl${flag}" FILTERED_LDFLAGS="${FILTERED_LDFLAGS} ${flag}";;
- 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=""
- 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
-
- FILTERED_LDFLAGS=""
- for flag in ${LDFLAGS}; do
- case ${flag} in
- # Pass the canary. we don't quite respect LDFLAGS, but we have an excuse!
- "-Wl,--hash-style="*) append-ghc-cflags link ${flag};;
-
- # Ignore all other flags
- esac
- done
-
- # hardened-gcc needs to be disabled, because the mangler doesn't accept
- # its output.
- gcc-specs-pie && append-ghc-cflags compile link -nopie
- gcc-specs-ssp && append-ghc-cflags compile -fno-stack-protector
-
- # prevent from failind building unregisterised ghc:
- # http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
- use ppc64 && append-ghc-cflags 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
- # http://osdir.com/ml/gnu.binutils.bugs/2004-10/msg00050.html
- use ia64 && append-ghc-cflags compile -G0 -Os
-
- # Unfortunately driver/split/ghc-split.lprl is dumb
- # enough to preserve stack marking for each split object
- # and it flags stack marking violation:
- # * !WX --- --- usr/lib64/ghc-7.4.1/base-4.5.0.0/libHSbase-4.5.0.0.a:Fingerprint__1.o
- # * !WX --- --- usr/lib64/ghc-7.4.1/base-4.5.0.0/libHSbase-4.5.0.0.a:Fingerprint__2.o
- # * !WX --- --- usr/lib64/ghc-7.4.1/base-4.5.0.0/libHSbase-4.5.0.0.a:Fingerprint__3.o
- case $($(tc-getAS) -v 2>&1 </dev/null) in
- *"GNU Binutils"*) # GNU ld
- append-ghc-cflags compile assemble -Wa,--noexecstack
- ;;
- esac
-}
-
-# 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-${PV}-orig"
- cp "${WORKDIR}/usr/bin/ghc-pkg-${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-${PV}" \
- "${WORKDIR}/usr/bin/ghci-${PV}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${PV}" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/bin/runghc-${PV}" \
- "$gp_back" \
- "${WORKDIR}/usr/$(get_libdir)/${P}/package.conf.d/"*
- fi
-
- # Relocate from /usr to ${EPREFIX}/usr
- relocate_path "/usr" "${to}/usr" \
- "${WORKDIR}/usr/bin/ghc-${PV}" \
- "${WORKDIR}/usr/bin/ghci-${PV}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${PV}" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/bin/runghc-${PV}" \
- "${WORKDIR}/usr/$(get_libdir)/${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
- # and insert LD_LIBRARY_PATH entry to EPREFIX dir tree
- # TODO: add the same for darwin's CHOST and it's DYLD_
- local new_ldpath='LD_LIBRARY_PATH="'${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir)'${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"\nexport LD_LIBRARY_PATH'
- sed -i -e '2i'"$new_ldpath" \
- "${WORKDIR}/usr/bin/ghc-${PV}" \
- "${WORKDIR}/usr/bin/ghci-${PV}" \
- "${WORKDIR}/usr/bin/ghc-pkg-${PV}" \
- "${WORKDIR}/usr/bin/hsc2hs" \
- "${WORKDIR}/usr/bin/runghc-${PV}" \
- "$gp_back" \
- || die "Adding LD_LIBRARY_PATH for wrappers failed"
- 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="*"
-
- if use ghcbootstrap; then
- ewarn "You requested ghc bootstrapping, this is usually only used"
- ewarn "by Gentoo developers to make binary .tbz2 packages for"
- ewarn "use with the ghc ebuild's USE=\"binary\" feature."
- use binary && \
- die "USE=\"ghcbootstrap binary\" is not a valid combination."
- [[ -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=${P}-src.tar.bz2 ;;
- 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_FLAGS.
- # See bug #313635.
- sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_FLAGS}|" \
- "${WORKDIR}/usr/bin/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)/${P}/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 x86-macos && unpack ghc-7.4.1-i386-apple-darwin.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_FLAGS}|" \
- "${S}/ghc/ghc.wrapper"
-
- cd "${S}" # otherwise epatch will break
-
- epatch "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
-
- # epatch "${FILESDIR}"/${PN}-7.0.4-darwin8.patch
- # failed to apply. FIXME
- #epatch "${FILESDIR}"/${PN}-6.12.3-mach-o-relocation-limit.patch
-
- # epatch "${FILESDIR}"/${PN}-7.4-rc2-macos-prefix-respect-gcc.patch
- # epatch "${FILESDIR}"/${PN}-7.2.1-freebsd-CHOST.patch
-
- we_want_libffi_workaround() {
- use ghcmakebinary && return 1
-
- # pick only registerised arches
- # https://bugs.gentoo.org/463814
- use amd64 && return 0
- use x86 && return 0
- return 1
- }
- # one mode external depend with unstable ABI be careful to stash it
- # avoid external libffi runtime when we build binaries
- we_want_libffi_workaround && epatch "${FILESDIR}"/${PN}-7.5.20120505-system-libffi.patch
-
- epatch "${FILESDIR}"/${PN}-7.4.1-ticket-7339-fix-unaligned-unreg.patch
- epatch "${FILESDIR}"/${PN}-7.6.2-integer-simple-div-mod.patch
- # ghc-7.8 changed linker code and likely fixed it
- epatch "${FILESDIR}"/${PN}-7.6.3-trac-3333-weak-syms.patch
- # bug 518734
- epatch "${FILESDIR}"/${PN}-7.6.3-preserve-inplace-xattr.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() {
- GHC_PV=${PV} # overrided in live ebuilds
-
- if ! use binary; then
- # initialize build.mk
- echo '# Gentoo changes' > mk/build.mk
-
- # Put docs into the right place, ie /usr/share/doc/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+=${FILTERED_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
- if is_crosscompile; then
- # TODO this is a workaround for this build error with the live ebuild with haddock:
- # make[1]: *** No rule to make target `compiler/stage2/build/Module.hi',
- # needed by `utils/haddock/dist/build/Main.o'. Stop.
- echo "HADDOCK_DOCS = NO" >> mk/build.mk
- else
- echo "HADDOCK_DOCS = YES" >> mk/build.mk
- fi
- 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
-
- # circumvent a very strange bug that seems related with ghc producing
- # too much output while being filtered through tee (e.g. due to
- # portage logging) reported as bug #111183
- echo "SRC_HC_OPTS+=-w" >> mk/build.mk
-
- # some arches do not support ELF parsing for ghci module loading
- # PPC64: never worked (should be easy to implement)
- # alpha: never worked
- # arm: http://hackage.haskell.org/trac/ghc/changeset/27302c9094909e04eb73f200d52d5e9370c34a8a
- if use alpha || use ppc64; then
- echo "GhcWithInterpreter=NO" >> mk/build.mk
- fi
-
- # we have to tell it to build unregisterised on some arches
- # ppc64: EvilMangler currently does not understand some TOCs
- # ia64: EvilMangler bitrot
- # set GHC_IS_UNREG if you like to build slow unregisterised
- # host compiler. Handy if you plan to user resulting
- # host compiler as a booting compiler for crosscompiler
- # which can work only in unregisterised mode.
- if use alpha || use ia64 || use ppc64 || [[ -n ${GHC_IS_UNREG} ]]; then
- echo "GhcUnregisterised=YES" >> mk/build.mk
- echo "GhcWithNativeCodeGen=NO" >> mk/build.mk
- echo "SplitObjs=NO" >> mk/build.mk
- echo "GhcRTSWays := debug" >> mk/build.mk
- echo "GhcNotThreaded=YES" >> mk/build.mk
- fi
-
- # arm: no EvilMangler support, no NCG support
- if use arm; then
- echo "GhcUnregisterised=YES" >> mk/build.mk
- echo "GhcWithNativeCodeGen=NO" >> mk/build.mk
- fi
-
- # Have "ld -r --relax" problem with split-objs on sparc:
- if use sparc; then
- echo "SplitObjs=NO" >> mk/build.mk
- fi
-
- if ! use llvm; then
- echo "GhcWithLlvmCodeGen=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
-
- # Since GHC 6.12.2 the GHC wrappers store which GCC version GHC was
- # compiled with, by saving the path to it. The purpose is to make sure
- # that GHC will use the very same gcc version when it compiles haskell
- # sources, as the extra-gcc-opts files contains extra gcc options which
- # match only this GCC version.
- # However, this is not required in Gentoo, as only modern GCCs are used
- # (>4).
- # Instead, this causes trouble when for example ccache is used during
- # compilation, but we don't want the wrappers to point to ccache.
- # Due to the above, we simply set GCC to be "gcc". When compiling ghc it
- # might point to ccache, once installed it will point to the users
- # regular gcc.
-
- local econf_args=()
-
- is_crosscompile || econf_args+=--with-gcc=${CHOST}-gcc
-
- econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot \
- || die "econf failed"
-
- [[ ${PV} == *9999* ]] && GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
- GHC_TPF="$(grep 'S\[\"TargetPlatformFull\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
- fi # ! use binary
-}
-
-src_compile() {
- if ! use binary; then
- limit_jobs() {
- local user_jobs=$(makeopts_jobs)
- local max_nonbreaking_jobs=$1
-
- [[ ${user_jobs} -le ${max_nonbreaking_jobs} ]] && return
-
- if [[ -n ${I_DEMAND_MY_CORES_LOADED} ]]; then
- ewarn "You have requested parallel build which is known to break."
- ewarn "Please report all breakages upstream."
- return
- else
- ewarn "Limiting MAKEOPTS -j${user_jobs} -> -j${max_nonbreaking_jobs} (bug #456386)"
- user_jobs=${max_nonbreaking_jobs}
- fi
- echo -j${user_jobs}
- }
- # ghc massively parallel make: #409631, #409873
- # but let users screw it by setting 'I_DEMAND_MY_CORES_LOADED'
- # 4 parallel jobs usually does not break
-
- # 1. build compiler binary first
- emake $(limit_jobs 4) ghc/stage2/build/tmp/ghc-stage2 V=1
- # 2. pax-mark (bug #516430)
- pax-mark -m ghc/stage2/build/tmp/ghc-stage2
- # 3. and then all the rest
- emake $(limit_jobs 4) all V=1
-
- if is_crosscompile; then
- # runghc does not work for a stage1 compiler, we can build it anyway
- # so it will print the error message: not built for interactive use
- pushd "${S}/utils/runghc" || die "Could not cd to utils/runghc"
- if [ ! -f Setup.hs ]; then
- echo 'import Distribution.Simple; main = defaultMainWithHooks defaultUserHooks' \
- > Setup.hs || die "failed to create default Setup.hs"
- fi
- ghc -o setup --make Setup.hs || die "setup build failed"
- ./setup configure || die "runghc configure failed"
- sed -e "s@VERSION@\"${GHC_PV}\"@" -i runghc.hs
- ./setup build || die "runghc build failed"
- popd
- fi
- fi # ! use binary
-}
-
-add-c_nonshared-to-ghci-libs() {
- local ghci_lib
- local nonshared_dir=${T}/libc_nonshared_objects
-
- is_crosscompile && return
- use elibc_glibc || return
- use prefix && return
-
- # we expect 'libc.a' bits be self-sufficient
- if gcc-specs-pie; then
- use x86 && return # but on x86 pie means linker support: #486140
- fi
-
- get-nonshared-objects() {
- # ns - 'nonshared'
- local ns_objects=" "
- local ns_sym
- local ns_srco
- local ns_dsto
-
- # extract
- mkdir "${nonshared_dir}" || die
- pushd "${nonshared_dir}" >/dev/null || die
- $(tc-getAR) x "${ROOT}"/usr/$(get_libdir)/libc.a
- popd >/dev/null || die
-
- # they are mostly contents of /usr/$(get_libdir)/libc_nonstahed.a
- # but 'c_nonstahed' contains PIC variants of symbols.
- # ghci uses non-PIC ones
- for ns_sym in \
- stat fstat lstat mknod \
- stat64 fstat64 lstat64 \
- fstatat fstatat64 mknodat
- do
- ns_srco=${nonshared_dir}/${ns_sym}.o
- ns_dsto=${nonshared_dir}/${ns_sym}_weakened.o
- [[ -f ${ns_srco} ]] || continue
- # here we do The Magic:
- # 1. --keep-global-symbol= hides everything to adoid double definition
- # of stuff like __stat, __fstat and
- # 2. --weaken converts exported symbols to weak symbols to be available
- # for redefinition
- $(tc-getOBJCOPY) \
- --weaken --keep-global-symbol=${ns_sym} \
- "${ns_srco}" "${ns_dsto}" || die
-
- ns_objects+=" ${ns_dsto}"
- done
-
- echo "${ns_objects}"
- }
- # bug #452442: when building libraries for ghci
- # ghc basically glues them together:
- # $ ld -r -o result foo.o bar.o ...
- # that way some symbols defined in libc_nonshared.a
- # do not get included into final HS*.o files
- # We piggyback on one of early loaded wired-in library
- # loaded before 'base'.
- while read ghci_lib
- do
- einfo "relinking '${ghci_lib}' with c_includes"
- mv "${ghci_lib}" "${ghci_lib}".unrelinked.o || die
- $(tc-getLD) -r -o "${ghci_lib}" \
- "${ghci_lib}".unrelinked.o \
- $(get-nonshared-objects) || die
- rm -r "${nonshared_dir}" || die
- rm "${ghci_lib}".unrelinked.o || die
- done < <(find "${ED}"/usr/$(get_libdir)/${P}/ -name 'HSghc-prim*.o')
-}
-
-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
- local insttarget="install"
-
- # We only built 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}/README" "${S}/ANNOUNCE" "${S}/LICENSE" "${S}/VERSION"
- fi
-
- emake -j1 ${insttarget} \
- DESTDIR="${D}" \
- || die "make ${insttarget} failed"
-
- # remove wrapper and link
- rm -f "${ED}"/usr/bin/haddock*
-
- add-c_nonshared-to-ghci-libs
-
- if [[ ! -f "${S}/VERSION" ]]; then
- echo "${GHC_PV}" > "${S}/VERSION" \
- || die "Could not create file ${S}/VERSION"
- fi
- dobashcomp "${FILESDIR}/ghc-bash-completion"
-
- fi
-
- # path to the package.cache
- local package_confdir="${ED}/usr/$(get_libdir)/${PN}-${GHC_PV}/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)/${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
- if is_crosscompile; then
- ewarn
- ewarn "\e[1;31m************************************************************************\e[0m"
- ewarn
- ewarn "GHC built as a cross compiler. The interpreter, ghci and runghc, do"
- ewarn "not work for a cross compiler."
- ewarn "For the ghci error: \"<command line>: not built for interactive use\" see:"
- ewarn "http://www.haskell.org/haskellwiki/GHC:FAQ#When_I_try_to_start_ghci_.28probably_one_I_compiled_myself.29_it_says_ghc-5.02:_not_built_for_interactive_use"
- 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 ${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)/${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.3.ebuild b/dev-lang/ghc/ghc-7.8.3.ebuild
deleted file mode 100644
index 30b7aa5a54a3..000000000000
--- a/dev-lang/ghc/ghc-7.8.3.ebuild
+++ /dev/null
@@ -1,624 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-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="http://www.haskell.org/ghc/"
-
-# we don't have any binaries yet
-arch_binaries=""
-
-# sorted!
-#arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
-#arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-arm.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PV}-amd64.tbz2 )"
-#arch_binaries="$arch_binaries ia64? ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
-#arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
-#arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PV}-x86.tbz2 )"
-
-# various ports:
-#arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/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.0.20140228 # uncomment only for -rc ebuilds
-GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
-
-SRC_URI="!binary? ( http://www.haskell.org/ghc/dist/${PV/_rc/-rc}/${GHC_P}-src.tar.xz )"
-S="${WORKDIR}"/${GHC_P}
-
-[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
-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:=[unicode]
- !ghcmakebinary? ( virtual/libffi:= )
- !kernel_Darwin? ( >=sys-devel/gcc-2.95.3 )
- kernel_linux? ( >=sys-devel/binutils-2.17 )
- kernel_SunOS? ( >=sys-devel/binutils-2.17 )
-"
-# gentoo binaries are built against ncurses-5
-RDEPEND+="
- binary? (
- || (
- sys-libs/ncurses:0/5
- sys-libs/ncurses:5/5
- )
- )
-"
-
-# force dependency on >=gmp-5, even if >=gmp-4.1 would be enough. this is due to
-# that we want the binaries to use the latest versioun available, and not to be
-# built against gmp-4
-
-# similar for glibc. we have bootstrapped binaries against glibc-2.17
-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? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) )"
-
-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:
- # http://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
- # http://osdir.com/ml/gnu.binutils.bugs/2004-10/msg00050.html
- use ia64 && append-ghc-cflags persistent compile -G0 -Os
-}
-
-# 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
- # and insert LD_LIBRARY_PATH entry to EPREFIX dir tree
- # TODO: add the same for darwin's CHOST and it's DYLD_
- local new_ldpath='LD_LIBRARY_PATH="'${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir)'${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"\nexport LD_LIBRARY_PATH'
- sed -i -e '2i'"$new_ldpath" \
- "${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/bin/hsc2hs" \
- || die "Adding LD_LIBRARY_PATH for wrappers failed"
- 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="*"
-
- 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 x86-macos && unpack ghc-7.4.1-i386-apple-darwin.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
- epatch "${FILESDIR}"/${PN}-7.8.3-unreg-lit.patch
-
- # upstream backports
- epatch "${FILESDIR}"/${PN}-7.8.3-linker-warn.patch
- epatch "${FILESDIR}"/${PN}-7.8.3-deRefStablePtr.patch
- epatch "${FILESDIR}"/${PN}-7.8.3-pic-asm.patch
- epatch "${FILESDIR}"/${PN}-7.8.3-pic-sparc.patch
- epatch "${FILESDIR}"/${PN}-7.8.3-cc-lang.patch
- epatch "${FILESDIR}"/${PN}-7.8.3-ia64-prim.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=$(pkg-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
- dobashcomp "${FILESDIR}/ghc-bash-completion"
-
- 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/metadata.xml b/dev-lang/ghc/metadata.xml
index a654b9b864fe..521a174394e8 100644
--- a/dev-lang/ghc/metadata.xml
+++ b/dev-lang/ghc/metadata.xml
@@ -9,6 +9,5 @@
<flag name="binary">Install the binary version directly, rather than using it to build the source version.</flag>
<flag name="ghcbootstrap">Bootstrap from an existing GHC installation.</flag>
<flag name="ghcmakebinary">Build with less runtime depends (bundle libffi for building bootstrap binaries).</flag>
- <flag name="llvm">Enable llvm code generator for ghc (-fllvm).</flag>
</use>
</pkgmetadata>