summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2013-02-09 18:34:07 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2013-02-09 18:34:07 +0000
commit0a7739990c3a9faa9313df7d2ac8213341a3a841 (patch)
treeb0a60f9a9c2bc82aa5373f5576b764a7175b0e9c /dev-lang/ghc
parentAdd hardened/linux/13.0 for amd64 and x86 for testing (diff)
downloadhistorical-0a7739990c3a9faa9313df7d2ac8213341a3a841.tar.gz
historical-0a7739990c3a9faa9313df7d2ac8213341a3a841.tar.bz2
historical-0a7739990c3a9faa9313df7d2ac8213341a3a841.zip
Bump up to 7.6.2. Removed old.
Package-Manager: portage-2.2.0_alpha153_p6/cvs/Linux x86_64 Manifest-Sign-Key: 0x611FF3AA
Diffstat (limited to 'dev-lang/ghc')
-rw-r--r--dev-lang/ghc/ChangeLog11
-rw-r--r--dev-lang/ghc/Manifest23
-rw-r--r--dev-lang/ghc/files/ghc-7.5.20120505-system-libffi.patch88
-rw-r--r--dev-lang/ghc/ghc-6.10.4-r1.ebuild375
-rw-r--r--dev-lang/ghc/ghc-6.12.3.ebuild426
-rw-r--r--dev-lang/ghc/ghc-7.6.2.ebuild688
6 files changed, 794 insertions, 817 deletions
diff --git a/dev-lang/ghc/ChangeLog b/dev-lang/ghc/ChangeLog
index f97e208a7279..155654f15891 100644
--- a/dev-lang/ghc/ChangeLog
+++ b/dev-lang/ghc/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-lang/ghc
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ChangeLog,v 1.229 2012/11/14 09:34:39 slyfox Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ChangeLog,v 1.230 2013/02/09 18:33:57 slyfox Exp $
+
+*ghc-7.6.2 (09 Feb 2013)
+
+ 09 Feb 2013; Sergei Trofimovich <slyfox@gentoo.org>
+ +files/ghc-7.5.20120505-system-libffi.patch, +ghc-7.6.2.ebuild,
+ -ghc-6.10.4-r1.ebuild, -ghc-6.12.3.ebuild:
+ Bump up to 7.6.2. Removed old.
*ghc-7.4.2 (14 Nov 2012)
diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index 792c1f831c96..394375b3b848 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -36,13 +36,13 @@ AUX ghc-7.4-rc2-macos-prefix-respect-gcc.patch 776 SHA256 7ffcbfc1822408cf8ed17f
AUX ghc-7.4.1-darwin-CHOST.patch 461 SHA256 0ab369e4f3dd0ffd15e9ea48a3b0e45350cae6831e58a82a1fbe0d745d0f7839 SHA512 ea8381354b703df86e91f73a0767078047876153748ec2a49c28ca102d3aac4ac39ee211c75e7eeffc16f60b31aee618ff6e581fb36a2e5151a179af154d78a1 WHIRLPOOL dbede3f9785947acfd46763f93a6f7672fbae971a23c5c7ae1935ff7e1576ac211399344a5aab442fb183a2c67e454f9c65dce9b0e572f3e57c54edaee0ffaf1
AUX ghc-7.4.1-ticket-7339-fix-unaligned-unreg.patch 1035 SHA256 2a3915285a013c2373c4462b94a4c0be08c3694014cc80f011a8b8f8e332afe6 SHA512 f510f413dc6039baa620c2ec7a74f3e3e0d2c5b93515f64ad1a483dc3fe88305d0e048713fe91a9bc435d368fbdec0f188cfb5abb9a0965ca4336105f8177c79 WHIRLPOOL 30a9ffea8e0d5affbea6c4fff562791c54fe7bbd2b7e3aac6934b6bf054c85f940b0dd4d6a8a2bb8d6396c44af81d07247ffb542f6b00e1be02df8bf84645a45
AUX ghc-7.4.2-system-libffi.patch 4348 SHA256 12c1c60401fcaed156aa67ff4a26fbcd9ea6089f75d5c6cf75fe90a6b640d028 SHA512 7999bdc8825d80713729931c6c6b183ddbc7e08f98fa381f0cbefc27777031dc2787f4ab2dbdc50d790beb1689ff74cc5626fcccef7bc43396e30296cf1d9820 WHIRLPOOL 6a2817edd83f1aac8aae11acadea32f24eb13948aea5f22de79cb9e1e217eb8e6a43ed778ff0c28e0d61c2006d6c8847098b1d975f23a112c0272feb856e5754
+AUX ghc-7.5.20120505-system-libffi.patch 3519 SHA256 817b7938720497dfa8706a058e50c34f09482989fcd042f9783c5d3c6b9d4dbd SHA512 fefa7c3de2912aab7f037a6ef1d3fc4e36cdc128f96079c12a22613efacc2474f805b10784f01cc81742df72d7041a6c24add2b107223d7680cbb83e26c7f1c7 WHIRLPOOL bdcc1fbf7d7ed93cee7b235eeab3e61da1468f573ff8bcf48aab8fb70df10e2c8376016c935e08135a43dc6ffe5d319b27ce34e58762c974a45859110fce94cc
AUX ghc-apply-gmp-hack 2585 SHA256 0d3c9e52be232734c916e9765fae770225ad6fb04c0948780867450401ff1eed SHA512 54d4a7ccb4a652e36b012bfa37696895755495a698449f77e854822f0be10d33803a7d049101c8835c8bcb587af3b5ab735e578e820feaa6a90bba0e21ad0a63 WHIRLPOOL 76d2d62886a1dcdb1da1ada62e48846f20b91dcdc2d1d7882107fc7662dd127a821f275eb909b93e4a3e0733c70afb70e41ae405da2eb39f57246f3dec01a914
AUX ghc-bash-completion 6496 SHA256 82a862bea2c9248e06fcf74d307de07b05a55f9eb95f412762bd02e53fece822 SHA512 ede79ccf23555f60f48297d29bd98e3ccfd67d2cf27462153e00beb930398cb497e34ba8316e91df44c577ed11fdbe5606f7c6a2777e35d5e783590e49ccfeb5 WHIRLPOOL 271dc4159ac500beb53981259e4b154b1f96e2909bb7cc43b7364f4fd4f86ce65df04611a46043c14079f699226195a002532fbb1e4ec01715e07e8469f9a7a4
DIST ghc-6.10.1-i386-apple-darwin.tar.bz2 97910484 SHA256 b806bf9c163314c3aac389df1cf5f30e31d3557baa0eabce9279f6ef58305d51 SHA512 63135f3b2c14bef9d7f4d2428b2fc018adc62bcfad7561ee7003b3e131462ff1c0d21712d8e9523e77c9458671a888de8bd62476eb83bd3b2e05d66282700672 WHIRLPOOL 696acd0c2d8046fe6c3b6d72bd938bc61b2604bea6ba595ab6aa660c476172a3caeb0e72e286f4838e7ddc1d3889dd45de1297209944ab465142e65fd1329b05
DIST ghc-6.10.1-powerpc-apple-darwin.tar.bz2 110038307 SHA256 06a0712a18d328e408b3057a83e31ee6695b5a203f1e492ca1964a7899834134 SHA512 ec4310bdb531d8db196ad73ac21d70864006004d1d32584f726bb8a9175ecff361c5a09c5c5a6124d9f2bff0e15606043f8558aad4bbfe8effd4e02af38b93cd WHIRLPOOL 1455a31f06ab086a2b0ab1614d8aa6f7814c15f8ba81043046a098d58d5f3df88f8b797bdc22f95d99d0f6fc31ea4d9f102e4647fa090801abf7ce4b42a29924
DIST ghc-6.10.4-i386-unknown-solaris2.tar.bz2 78409258 SHA256 f53bbffff5b469fb4a6cea6ce3965596240549529306c8a9cfbf0a9cf6296eea SHA512 f1ba4571c9bae6e10794cd48fed56d4226c86f00e72e3a07f42db5858bc80908c2068648422a90850e70221e23305b2eab55d66f1bcfc5db7924c06ecfe74623 WHIRLPOOL 5428812e8e58e0c345b922a28aea0a32dc7dafb0275883956f683f1e12a36f1c32630187581addb231d5eb3cf3bdc5aade03efb4f574beca999d18956697fbf8
DIST ghc-6.10.4-sparc-sun-solaris2.tar.bz2 87371847 SHA256 bc6fa54fcb66d3d5f14c4bb32bb932a9168040e3e7eb4ef410de7fc18ecd3a38 SHA512 fd6d6c119d4cbc082426c6dbe85b188e30471eb1ab5452238e22f79d941b96c7d5b7c2f951c1bad4ec7692d8f63d5afd97072b1a1e4246bdfa162dce5af92337 WHIRLPOOL aa6067bace184b29550cc9b677c495ca32bb2fbb98106ec347e1b99842580c4a91724d63984c793156f1db7667634c2f40655ce2da9aee105ac9dcee0271ed74
-DIST ghc-6.10.4-src.tar.bz2 8060565 SHA256 d66a8e52572f4ff819fe5c4e34c6dd1e84a7763e25c3fadcc222453c0bd8534d SHA512 8f5e448d4dc25cb665a30597a1a46c7bdada91ea19508caec110cc1c8508864e321ae6640c33bb6243d82e31f27c9f0f22012e7432e445806337dc1b534ee413 WHIRLPOOL f90fdc7f263de5e3b9a291f42b95144d7d6f33628194cccb02e8aa005b0f3e4696e51600bc3ce28d0d0c1bfae29e3f9f08622ab9043b286d0c944073b29be0e8
DIST ghc-6.12.3-src.tar.bz2 26592939 SHA256 6cbdbe415011f2c7d15e4d850758d8d393f70617b88cb3237d2c602bb60e5e68 SHA512 e6f021d92fbdb5ddd041811ffc41750a24bfd625cced89c4e13443d1d749dc5288d342f631713d11f0cccf68ad416957254e89f8c5d839133225af6b4042f791 WHIRLPOOL 364d31e44af60437317ba277e3ce83c00229c2a03d70472133c4cba78ac912b78394755bfca0e9ff184bf319f1ecb38e2ad0184eb930420eb6fec19f51293864
DIST ghc-7.0.3-i386-unknown-solaris2.tar.bz2 85219039 SHA256 d1e6fb322e8ea2f74b9826686f477a0838c0bf06a6128bfa0d05ff7c7afb1356
DIST ghc-7.0.4-src.tar.bz2 24205070 SHA256 1a9b78d9d66c9c21de6c0932e36bb87406a4856f1611bf83bd44539bdc6ed0ed SHA512 acc82a1c2f23cfb2841f5f236cf8721091a969ee21e10af63a3d690c341d4d66c6eb0b5419e78a24677e32f16c03253691f89dce6392bfa775af902aa4682085 WHIRLPOOL 1d2dfc68e94012496b84f08b629b47c392150fea43670694a4659fce6f8e9b8b474ea46d4f69fe568fd6cffd1d0b6109e5e832be1251ec100a18db183ab4bdbe
@@ -50,13 +50,7 @@ DIST ghc-7.4.1-i386-apple-darwin.tar.bz2 154932146 SHA256 0dc5a8eec085e816c234e3
DIST ghc-7.4.1-src.tar.bz2 25272609 SHA256 721c09a49e519b7459b67b451b5103252ba3833906a7a24c3a3679ff94669a79 SHA512 2d92deb2e9373f816b97acafd9239efc35bad1d912dbe57fc2744b35cb0e156b031b2b039d8699ee1554179ace15a94b03b62b1395d0a87703aa524750b818a3 WHIRLPOOL 6bd5aa1e3aa9381ba0bc8689a357971aee79af4e4a40e1c6d061eec4738110d9d5d9b31e0fa57131acb868f319b921134edf953b6dd743c3d6ffa7f56a1fb92b
DIST ghc-7.4.1-x86_64-apple-darwin.tar.bz2 148037332 SHA256 52eb17e513f9eb2e221b2183ebe6e8aa4358275128ea416788d2deb7e0a751bd
DIST ghc-7.4.2-src.tar.bz2 25836446 SHA256 f2ee1289a33cc70539287129841acc7eaf16112bb60c59b5a6ee91887bfd836d SHA512 5a3d06a36702fa7e337b482c9de92ce1f84a68f18d8560bcc11f3617d6d46f93167fee27e786de6483a9ef0eab3b1ac6909a71dd53908d36156df4e465075050 WHIRLPOOL 61865eed2bf92728e7c4c4a0c48be44081bf728cfd824760d643e2fad838d96c19e173052d3aac073e0795b5efa3720ba5ddf13cca1ec7952b7524bbe1f204bc
-DIST ghc-bin-6.10.4-alpha.tbz2 84499083 SHA256 cfe28ea83e000f1ba0853b78dd27b35fa5d823c4cb94699f901aec5e2705c315 SHA512 a109554bac735ba8cae263f5eb95b17f4345d9730a7e53e22e60d57c646b56d8d903c08646bb092f23625a732a8d04cd2ea1219026fb2206c1135f7325e83d1d WHIRLPOOL f78aa0a90553c9881d894943aa792ed3d21ca5a67edbb27c1266679421c63ddb66bdca129dd734c91b59f790500441fba7c7ca6551367e588e179e1416b38543
-DIST ghc-bin-6.10.4-amd64.tbz2 51566179 SHA256 2ced87862603a44a59744459a8231f587c0f225f70eb4861ad2db5098c2433a1
-DIST ghc-bin-6.10.4-ia64.tbz2 86508052 SHA256 2e8f03eec65329abb15c3d3351d8d4f896ac6c7fc8a8b3815807c3bd0329292e SHA512 dbd76d64cd038f6d52cbaa0fd0a7ec06bee03333315fd5de901f5b9902d02825e214a9071b5ca8d4caa6fb22f27d89d4d59f81e4a60e0be8f3b88217384f66f6 WHIRLPOOL 96647a13738c591edd4ac3eb7520ec105e451a40ec3f50312268b2a23ad3ea3712eb5e7d7530435dced2dc4afefbf283aa4c9d549acfee8ecf089002cb91c998
-DIST ghc-bin-6.10.4-ppc.tbz2 63982893 SHA256 8aec35a2fbb2897ba7fdb3901b65a7d67cb9409526e747f62e31eaea770f0357 SHA512 42209b7517dfe21acd99f4534f7933369ec972c34a8ed8d0e9e025cbb60f1e306f9f17fe33e9d17a212927524c04c682fffd0621403d2bb8b6e342cc945ff5e1 WHIRLPOOL 4346123eccf004dff592ddf2c64818720f6e896a0e81d38d46793c3e878fc15ab6ac51a45e6283dc28687046c1495bd3dfb237e37ba5c59d0880a28320e24722
-DIST ghc-bin-6.10.4-ppc64.tbz2 67637446 SHA256 1ef7d4daf50cc0998651d498d029a5455fb6c410c0abb6a2b23b118ae69e9c54 SHA512 8fb5fed3f52f96a42099315a52530045a75424d27bc1e11f09fe34554b9401597099f86c0401589b8bfa5d6e9433a95fa8c82af3fd3d2da49e0c6e11d1a816ae WHIRLPOOL 7bfc03420398bc6ce9acb843af30379e14da1a790d00612d653131701a061c5518adb8991401b424c1da616b9e77b805312d6ba678d16e1d07f46152c90f8bac
-DIST ghc-bin-6.10.4-sparc.tbz2 65780774 SHA256 6ee4d05fb68e622bac960355d928881a2ddd7ce82a10763333e0a8daa93f6d89 SHA512 75ebd3795058912352203fe8e479ab6119da116e16adcd33631e7507ca704fdc0b589f6b9561cc9eaecf0796815b26718ab8bb7f8ada14f7c1e5728a9aec0c0b WHIRLPOOL 7d5fbf53a7e9a945e51f02f23bfda50bbac3a1bb7c7fb6216d626d3819286c04228fbb8b69cdd305b0ffbe275f1d1f87526f6ce5d6a0b96d7e429a688b150858
-DIST ghc-bin-6.10.4-x86.tbz2 52621494 SHA256 c71589dc7f9866f11a919170dc5e116f50908ac443aff19742c38692e030e98d SHA512 930a008ac002d2cac682502b2300bd201aadd83ffab0aa165258d2344630c2a34d6d91f6ad1138ec89e79327edd783351f22a3f64bcc991c1a2f91136730d357 WHIRLPOOL fa0612492fe84b0d3755295eb0501e6565a6a96191607c58e99beef2d4b8359a1e1ebe3d7da85ff71fc5e0ce5b9d0bede1c20c205f720a78e9656e086f481845
+DIST ghc-7.6.2-src.tar.bz2 110778081 SHA256 d5f45184abeacf7e9c6b4f63c7101a5c1d7b4fe9007901159e2287ecf38de533 SHA512 2e6e54f509e564f3713ea15dfefb16a84a467f8044c692ad2647c05b641e1ccb4125b9b63bbf711be1054d7ef56612186d2b9cd88ba4127fe01eec225152e4cf WHIRLPOOL 78724187c0f7579c3f39f257620d3046711f20fe07c540b6b70cf1b0b87bb8476d2382835895b5770865faaac291de05be88e2708fd0c1956ad7bc132d558b9c
DIST ghc-bin-6.12.3-alpha-haddock.tbz2 106307940 SHA256 22951ccbaa2e77f811c634fa95492451f28f8b79e5cfe0297890ce1dd9d525ab SHA512 47b124cb2b745ffa6471dd75b9b922170cd275d837093f320116a842cc2ed4e6f215128fe7269bbe5f85b34239fe46bac697d7210c2f5df97b67c5629ea30c94 WHIRLPOOL 2f26c8c046e779ed63f86fdfcf2cb4815f5f0ea08b0c6c98668909a7a3bcca3c6fa2dac390d3bd066e197093227086cbe4bd5c35044a23d344e591b5d5a1cfc1
DIST ghc-bin-6.12.3-amd64.tbz2 82390661 SHA256 6a1c9978c4ad19bb98f70b900afa799f16cfd3e159bb6d51437c264e35f4d6cc SHA512 ae883f94621fcf0ffe8b57954e403db6812769bbeee92e031be49fc9cc2087c7700bb6a36c6fdd170936c2fea9024d2400db04db94c530841ab6662be34227e8 WHIRLPOOL ffbb50018216af9cc84d2cc04a39646dd47f70e1451bbaf700495864edddbbf729c61c3a020dde472e27236b19151b3373fd1b1735da5d3d9f68c63d9e3ea4ed
DIST ghc-bin-6.12.3-ia64-haddock.tbz2 113756002 SHA256 135c60f870badec5e10add87061d0d9c85276e182ae448ab52c6f9f7ebe6eb2e SHA512 0e789ff5af719106e9eac030c477109a928f04facfd9b7da0c55a25465cd5c92c409d08838f75206939943df6c028e302854da368eefe17fd704c88bc5e83fe4 WHIRLPOOL 7e6ad1b44f28724c4cbf8c618aa04202e61dddaf2f50a71de42161d32b78573fc530aeffb1cb4b550e2141690515487fd99e8c5e01d5c79775ffb771ee5cefe9
@@ -84,19 +78,20 @@ DIST ghc-bin-7.4.2-ppc.tbz2 89396808 SHA256 ebf6083a1f3256a978a9408cffa2562e837b
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
-EBUILD ghc-6.10.4-r1.ebuild 13015 SHA256 63be2b4343c65f3b12699355b0bf28fccc1518eedd77ccaa902fe3207ee1d16c SHA512 ebe68b4146a0ec2996cd702be045e33db29c8c6a2362253b4e494f3326919662dcbfbaba7adc0fed4b5871fc1e2ec2b41611384d6316ab44e95900dadcb76651 WHIRLPOOL de57ec071224132de7a7c970b7ebd4d94a9262389d2ad2809c50e55515db2dcd605a35fe7742818ee07e0b9d2c6d5968db17693e0809e961cfbe5f7b482afd02
+DIST ghc-bin-7.6.2-amd64.tbz2 94464851 SHA256 82ba625dc5ff58db6e085155b2c1d708c490ac6ac84dba85763b74ec1cabda13 SHA512 b6ef3ed764a3a325dc2cbcfb5fa2f416d240ca70f33791bc6535b2d3416cfa281ad6c343b72c8ffd59be92cfcc3c5dcddb1a7c6d57128ab16b89d341880b022f WHIRLPOOL a5412e0df5105e1c1de0af71a5bb0671d27c869bd74a271b07bf4a8985c30f8e6aff69aa89e7801b2c49623f4cb0b9ec34ad3eb96af5d9bc2de106652b7bf4a0
+DIST ghc-bin-7.6.2-x86.tbz2 93746314 SHA256 d5d50ae425cfa2cb7e476e0829fae61623fc6d728413ffa27cb7ecfc925633f1 SHA512 cd56331b8855539671e1b9463960413c84665da3aa7d6e7fcd1cf4425f003582f524d3385c97e7fe9707989712bf487cd7cc75a1096918abd057cc6021badde5 WHIRLPOOL d5dffb0e970c16f168d5d6b5057b42afa8704a156a5521eca01aa522248cd9cdb8fa29e0ae5c368e11fbd87c39b89569c4ccbde7d8ba1660801cf593f328266c
EBUILD ghc-6.12.3-r2.ebuild 20570 SHA256 d1bac3b88691bc27eefde9a04580a97e76e41d11b30c32b7f0dc92de4a367613 SHA512 0946a8205db0f1f139bff75ea52b77b3e1c9ce2dc42b5a49c042a653853c401543f1d829397ed7c59a957e9919feec7b171c92aaa166ee109fa8540c53a42aea WHIRLPOOL 96f57ace2e729748827d411c4fb1a7b6638bb04e1797a4c14d548ba731b7dea7ab959daaf5f03a6a5dc9ce304fd597266b6ea5522a518c2e661fa96a9c4e6ef3
-EBUILD ghc-6.12.3.ebuild 15067 SHA256 85d10ae535a35d5b2a78852f380fe1dd66a06572f605ffbd472c47ff402ec102 SHA512 d927d60053e8e9f8de6c35c9fae491d58709619628adda070c8e1abc3c074231de9897aa382586be2c9626fce6dbe565ef5fcb0c9617eebdc89f8a0e296dd85e WHIRLPOOL 94f5516da8d67a0a1019e5c2b129a3934da359d8d9e5115987a0d390d7cbf6b7b6c32a3f1ee65002a18d9d7b0775d9d3f369e1348fda36e84f1650e2bb3cd1bc
EBUILD ghc-7.0.4.ebuild 20030 SHA256 d9f8198f0c214bcd6b5c75380b401d73d8b153b772c36aa18cbc0b6a4898a507 SHA512 d4a9717c45bd6f7b009ee82508c677e06c8a99c3be16cca136518e6ec77aa9a95f4a13f833aab629995b7185ac5a20066849d1284a639ab3d79934e406f48e7e WHIRLPOOL b2d7e20da2e94463b69e8183a28e4f96d928757ed07cfe2cfd432d46353744c70e27f789307f58d8e62610950d8f89041aea782c6e2c63a70be144267be46bd2
EBUILD ghc-7.4.1-r1.ebuild 21255 SHA256 bd888b9945bed390b0c672dca385360df9326d8424386a68d658b6b8a69dbc33 SHA512 d3eefc00306e704dc5ee306edd2a411413ac80873ab76224d22d17953e97c90cd3ca1b42dae30042fdf9de4a70ea112cf7110f03e616b88b520ae96ee3969797 WHIRLPOOL ec21fd8b4f53f7edc6911bade955c57f01adbce6ba714453712c27bb1babd750c5427618022e78948f9407b651de3843f08378d915b44bdfc1828946bcf54f30
EBUILD ghc-7.4.1.ebuild 20450 SHA256 8a0a3b104ddbb23c2de1128b60f194108739330d35bafc4c8349f62113a759c9 SHA512 cc9d7089457d89f405e35fd11dc991d8d3f8494b8bbb871bbbddab32c0bee2f12eb5f679b494053947228fd11d07c41a0d876f33eab4d7138feb4626b0293b1a WHIRLPOOL bff6571901c923e161667aaf9c63f027e33967372e4d86711774c33dfcb26adf0f75a9995a9dd20ce0996bf984ed43c4825a395a65cba7a615aadce86bbaa5da
EBUILD ghc-7.4.2.ebuild 21431 SHA256 719ae08041c81c7cebba4fb088593948bfaff3bcd486481ab1985408d77f5df7 SHA512 3306c0e559ae3353df42baf7d70a644ca53bd6aa936c0d386ee363fd1e25d9ef1e6dca9a7b15ed62d24b33e45d8b50ddece0989b5fe2431e2fffcf5483c63246 WHIRLPOOL 93de5498eea72ad096deeda107238e50e356e2d0fabc847ba07522130c658ed7eec03f4cfd406e36030d149b867681d0ba22c4dadfd5be36ebd7c042ad5db35e
-MISC ChangeLog 42142 SHA256 b34dbada55a203a950fbfd87b05ee6f95d5f31d2c3ed30a0000cabfa77f5af95 SHA512 daa2cb4e5f845ab4e40716540240a47432d9784702bf520c8afdedb7dc0bca4ccb10ff2b51157728028f6343d6acb67e28697cda8950c501d861f22dc34cd9a1 WHIRLPOOL 9f0494b85636521dae9f0fbc5ddcfee1fc0d047d00c1ebb0f2bc5d536944a5df1496abad107c261040f2f2bdd018a50f9976ac209ae39841e44ff0e6c5bf100d
+EBUILD ghc-7.6.2.ebuild 24711 SHA256 86631efa318acc219d9f69b325fc2f0860a1b58d918b3e097c8884648e13fc26 SHA512 bc647dd674874f72d6034b0186f7d314e80c41084f2409fbaa461bad41e27b91600bf7c19cadc46488b8f5c717954b5dd6b0c31c81f71c0452bb39fc5b1919a5 WHIRLPOOL 3319910f82ba6ccd28243cc8862ea8cdb6fa3cbd92dd8954701f9c3c395b87b01a6ae3da75fe2da38d61057bbdfce8ad78c30ffb2a08662cec93238dbfacb78e
+MISC ChangeLog 42367 SHA256 a73f44796c3871250658a4706d2a0f4cab246e515295cb76489af4e0d9d7e990 SHA512 4be3d8f2ff1c50edcbf6c69b84c82717dec3bc79ab2692f565220a7c5c4095d94701c7b6c400b995f31a31c67df6fcb76e1777601df0211fa6679d21856908ab WHIRLPOOL b79f8db6d15571ab9cd103ba1997e68104931737ca35d171f3746b0413a3a75e8ff0454752b32134f6f3085dfa93fd19fd4702f0cde6ebfdcf1f54525ac1db1c
MISC metadata.xml 626 SHA256 ef2d6b7e65453f0a6df403c25925250c8308741aa82b5991cfe18f5c1d8ab406 SHA512 9647b53b295e2f586c46450c068e3d0b5ebf2790b091121df7e177e7155f8ef4124df1fedc805465c24d9d32703398e1761de407b5bc494ba05fb76de2c7069a WHIRLPOOL 55afff88759648d2c47293046ddc2a10f92e2986bfb2d83d31046b824c6bab432038fe3298d29be434bfd1f13b368e5cc9b99eebc295443d53400e0eca4070b7
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
-iEUEAREIAAYFAlCjZbcACgkQcaHudmEf86omBQCYsrgx8U1su3coQFWDlBJpw6y8
-pACeNdDnrLcFxJU5nFFJPLH64tqfJCc=
-=eBjx
+iEYEAREIAAYFAlEWlngACgkQcaHudmEf86oOMwCfXxjFJcjpvPYFEDV6+hhFZm1X
+nGEAnAziUL5uiQ+ehaj5IriwmE2H9+ih
+=etno
-----END PGP SIGNATURE-----
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
new file mode 100644
index 000000000000..f3b0c71c5454
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-7.5.20120505-system-libffi.patch
@@ -0,0 +1,88 @@
+--- 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/ghc-6.10.4-r1.ebuild b/dev-lang/ghc/ghc-6.10.4-r1.ebuild
deleted file mode 100644
index a34dc420a49b..000000000000
--- a/dev-lang/ghc/ghc-6.10.4-r1.ebuild
+++ /dev/null
@@ -1,375 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.10.4-r1.ebuild,v 1.13 2012/04/13 19:01:18 slyfox Exp $
-
-# 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.
-
-inherit base autotools bash-completion eutils flag-o-matic multilib toolchain-funcs ghc-package versionator pax-utils
-
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="http://www.haskell.org/ghc/"
-
-# discover if this is a snapshot release
-IS_SNAPSHOT="$(get_version_component_range 4)" # non-empty if snapshot
-EXTRA_SRC_URI="${PV}"
-[[ "${IS_SNAPSHOT}" ]] && EXTRA_SRC_URI="stable/dist"
-
-arch_binaries=""
-
-arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~ivanm/ghc-bin-${PV}-alpha.tbz2 )"
-arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~ivanm/ghc-bin-${PV}-x86.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( http://haskell.org/~kolmodin/ghc-bin-${PV}-amd64.tbz2 )"
-arch_binaries="$arch_binaries ia64? ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64.tbz2 )"
-arch_binaries="$arch_binaries sparc? ( http://haskell.org/~duncan/ghc/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
-arch_binaries="$arch_binaries ppc? ( mirror://gentoo/ghc-bin-${PV}-ppc.tbz2 )"
-
-SRC_URI="!binary? ( http://haskell.org/ghc/dist/${EXTRA_SRC_URI}/${P}-src.tar.bz2 )
- !ghcbootstrap? ( $arch_binaries )"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
-IUSE="binary doc ghcbootstrap"
-
-RDEPEND="
- !dev-lang/ghc-bin
- >=sys-devel/gcc-2.95.3
- >=sys-devel/binutils-2.17
- >=dev-lang/perl-5.6.1
- >=dev-libs/gmp-4.1
- !<dev-haskell/haddock-2.4.2"
-# earlier versions than 2.4.2 of haddock only works with older ghc releases
-
-DEPEND="${RDEPEND}
- ghcbootstrap? ( doc? ( ~app-text/docbook-xml-dtd-4.2
- app-text/docbook-xsl-stylesheets
- >=dev-libs/libxslt-1.1.2 ) )"
-# In the ghcbootstrap case we rely on the developer having
-# >=ghc-5.04.3 on their $PATH already
-
-PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-0.9* )"
-
-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_CFLAGS="${GHC_CFLAGS} -optc${flag}"
- [[ ${assemble} ]] && GHC_CFLAGS="${GHC_CFLAGS} -opta${flag}"
- [[ ${link} ]] && GHC_CFLAGS="${GHC_CFLAGS} -optl${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
-
- GHC_CFLAGS=""
- 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
-
- # 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
-
- # We also add -Wa,--noexecstack to get ghc to generate .o files with
- # non-exectable stack. This it a hack until ghc does it itself properly.
- append-ghc-cflags assemble "-Wa,--noexecstack"
-}
-
-pkg_setup() {
- 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."
- fi
-}
-
-src_unpack() {
- # Create the ${S} dir if we're using the binary version
- use binary && mkdir "${S}"
-
- base_src_unpack
- source "${FILESDIR}/ghc-apply-gmp-hack" "$(get_libdir)"
-
- ghc_setup_cflags
-
- if ! use ghcbootstrap; then
- # Modify the wrapper script from the binary tarball to use GHC_CFLAGS.
- # See bug #313635.
- sed -i -e "s|wrapped|wrapped ${GHC_CFLAGS}|" \
- "${WORKDIR}/usr/bin/ghc-${PV}"
-
- # allow hardened users use vanilla biary 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
-
- # Move unpacked files to the expected place
- mv "${WORKDIR}/usr" "${S}"
- else
- if ! use ghcbootstrap; then
- # Relocate from /usr to ${WORKDIR}/usr
- sed -i -e "s|/usr|${WORKDIR}/usr|g" \
- "${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" \
- || die "Relocating ghc from /usr to workdir failed"
- fi
-
- # Hack to prevent haddock being installed, remove when ./configure
- # supports something better to not build docs or haddock.
- sed -i -e 's/DO_NOT_INSTALL =/DO_NOT_INSTALL = haddock/' \
- "${S}/utils/Makefile"
-
- # Modify the ghc driver script to use GHC_CFLAGS
- sed -i -e "s|wrapped|wrapped ${GHC_CFLAGS}|" \
- "${S}/ghc/ghc.wrapper"
-
- cd "${S}"
-
- # disable cabal built binary stripping (solves bug #299492)
- # as installPackage strips them by default
- epatch "${FILESDIR}/ghc-6.10.4-disable-strip.patch"
-
- # patch aclocal.m4 and configure.ac to work with >=autoconf-2.64
- epatch "${FILESDIR}/${P}-autoconf.patch"
-
- # >=autoconf-2.66 compatibility
- epatch "${FILESDIR}/ghc-6.12.3-autoconf-2.66-4252.patch"
-
- # fix configure.ac to detect libm need
- # http://bugs.gentoo.org/show_bug.cgi?id=293208
- # http://hackage.haskell.org/trac/ghc/ticket/3730
- epatch "${FILESDIR}/ghc-6.10.4-libm-detection.patch"
-
- # -r and --relax are incompatible
- epatch "${FILESDIR}/ghc-6.10.4-ia64-fixed-relax.patch"
-
- # prevent from wiping upper address bits used in cache lookup
- epatch "${FILESDIR}/ghc-6.10.4-ia64-storage-manager-fix.patch"
-
- # as we have changed the build system
- eautoreconf
- fi
-}
-
-src_compile() {
- 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 = /usr/share/doc/${P}" >> mk/build.mk
- echo "htmldir = /usr/share/doc/${P}" >> mk/build.mk
-
- # We also need to use the GHC_CFLAGS flags when building ghc itself
- echo "SRC_HC_OPTS+=${GHC_CFLAGS}" >> mk/build.mk
- echo "SRC_CC_OPTS+=${CFLAGS} -Wa,--noexecstack" >> 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 XMLDocWays="html" >> mk/build.mk
- echo HADDOCK_DOCS=YES >> mk/build.mk
- else
- echo XMLDocWays="" >> 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
- 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
- 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
-
- # Have "ld -r --relax" problem with split-objs on sparc:
- if use sparc; then
- echo "SplitObjs=NO" >> 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
-
- econf || die "econf failed"
-
- # LC_ALL needs to workaround ghc's ParseCmm failure on some (es) locales
- # bug #202212 / http://hackage.haskell.org/trac/ghc/ticket/4207
- LC_ALL=C emake -j1 all || die "make failed"
-
- fi # ! use binary
-}
-
-src_install() {
- if use binary; then
- mv "${S}/usr" "${D}"
-
- # Remove the docs if not requested
- if ! use doc; then
- rm -rf "${D}/usr/share/doc/${P}/*/" \
- "${D}/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; then
- if use ghcbootstrap; then
- insttarget="${insttarget} install-docs"
- else
- mkdir -p "${D}/usr/share/doc"
- mv "${WORKDIR}/usr/share/doc/${P}" "${D}/usr/share/doc" \
- || die "failed to copy docs"
- fi
- fi
-
- emake -j1 ${insttarget} \
- DESTDIR="${D}" \
- || die "make ${insttarget} failed"
-
- # ghci uses mmap with rwx protection at it implements dynamic
- # linking on it's own (bug #299709)
- # so mark resulting binary
- pax-mark -m "${D}/usr/$(get_libdir)/${P}/ghc"
-
- dodoc "${S}/README" "${S}/ANNOUNCE" "${S}/LICENSE" "${S}/VERSION"
-
- dobashcompletion "${FILESDIR}/ghc-bash-completion"
-
- cp -p "${D}/usr/$(get_libdir)/${P}/package.conf"{,.shipped} \
- || die "failed to copy package.conf"
- fi
-}
-
-pkg_postinst() {
- # 'ghc-pkg check' fails in ghc 6.10.2, with the error message:
- # There are problems in package rts-1.0:
- # include-dirs: PAPI_INCLUDE_DIR doesn't exist or isn't a directory
- # Upstream suggests this solution to fix it:
- export PATH="/usr/bin:${PATH}"
- $(ghc-getghcpkg) describe rts | sed 's/PAPI_INCLUDE_DIR//' | $(ghc-getghcpkg) update -
-
- ghc-reregister
-
- ewarn "IMPORTANT:"
- ewarn "If you have upgraded from another version of ghc,"
- ewarn "once app-admin/haskell-updater has installed please run:"
- ewarn " /usr/sbin/haskell-updater --upgrade"
- ewarn "to re-build all ghc-based Haskell libraries."
-
- bash-completion_pkg_postinst
-}
-
-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 (potentially) modified package.conf with a copy of the
- # original one, so that it will be removed during uninstall.
-
- PKG="${ROOT}/usr/$(get_libdir)/${P}/package.conf"
-
- cp -p "${PKG}"{.shipped,}
-
- [[ -f ${PKG}.old ]] && rm "${PKG}.old"
-}
diff --git a/dev-lang/ghc/ghc-6.12.3.ebuild b/dev-lang/ghc/ghc-6.12.3.ebuild
deleted file mode 100644
index c959d816d6fd..000000000000
--- a/dev-lang/ghc/ghc-6.12.3.ebuild
+++ /dev/null
@@ -1,426 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.12.3.ebuild,v 1.23 2012/04/13 19:01:18 slyfox Exp $
-
-# 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.
-
-inherit base autotools bash-completion eutils flag-o-matic multilib toolchain-funcs ghc-package versionator pax-utils
-
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="http://www.haskell.org/ghc/"
-
-arch_binaries=""
-
-arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha-haddock.tbz2 )"
-arch_binaries="$arch_binaries x86? ( mirror://gentoo/ghc-bin-${PV}-x86.tbz2 )"
-arch_binaries="$arch_binaries amd64? ( mirror://gentoo/ghc-bin-${PV}-amd64.tbz2 )"
-arch_binaries="$arch_binaries ia64? ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64-haddock.tbz2 )"
-arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
-arch_binaries="$arch_binaries ppc64? ( mirror://gentoo/ghc-bin-${PV}-ppc64.tbz2 )"
-arch_binaries="$arch_binaries ppc? ( mirror://gentoo/ghc-bin-${PV}-ppc.tbz2 )"
-
-# various ports:
-arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/ghc-bin-${PV}-x86-fbsd.tbz2 )"
-
-SRC_URI="!binary? ( http://darcs.haskell.org/download/dist/${PV}/${P}-src.tar.bz2 )
- !ghcbootstrap? ( $arch_binaries )"
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86 ~x86-fbsd"
-IUSE="binary doc ghcbootstrap"
-
-RDEPEND="
- !dev-lang/ghc-bin
- >=sys-devel/gcc-2.95.3
- >=sys-devel/binutils-2.17
- >=dev-lang/perl-5.6.1
- >=dev-libs/gmp-4.1
- !<dev-haskell/haddock-2.4.2"
-# earlier versions than 2.4.2 of haddock only works with older ghc releases
-
-DEPEND="${RDEPEND}
- ghcbootstrap? ( doc? ( ~app-text/docbook-xml-dtd-4.2
- app-text/docbook-xsl-stylesheets
- >=dev-libs/libxslt-1.1.2 ) )"
-# In the ghcbootstrap case we rely on the developer having
-# >=ghc-5.04.3 on their $PATH already
-
-PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.1* )"
-
-# use undocumented feature STRIP_MASK to fix this issue:
-# http://hackage.haskell.org/trac/ghc/ticket/3580
-STRIP_MASK="*/HSffi.o"
-
-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_CFLAGS="${GHC_CFLAGS} -optc${flag}"
- [[ ${assemble} ]] && GHC_CFLAGS="${GHC_CFLAGS} -opta${flag}"
- [[ ${link} ]] && GHC_CFLAGS="${GHC_CFLAGS} -optl${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
-
- GHC_CFLAGS=""
- 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
-
- # 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
-}
-
-pkg_setup() {
- 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."
- fi
-}
-
-src_unpack() {
- # Create the ${S} dir if we're using the binary version
- use binary && mkdir "${S}"
-
- base_src_unpack
- source "${FILESDIR}/ghc-apply-gmp-hack" "$(get_libdir)"
-
- ghc_setup_cflags
-
- if ! use ghcbootstrap; then
- # Modify the wrapper script from the binary tarball to use GHC_CFLAGS.
- # See bug #313635.
- sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_CFLAGS}|" \
- "${WORKDIR}/usr/bin/ghc-${PV}"
-
- # allow hardened users use vanilla biary 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
-
- # Move unpacked files to the expected place
- mv "${WORKDIR}/usr" "${S}"
- else
- if ! use ghcbootstrap; then
- # Relocate from /usr to ${WORKDIR}/usr
- sed -i -e "s|/usr|${WORKDIR}/usr|g" \
- "${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/"* \
- || die "Relocating ghc from /usr to workdir failed"
-
- # regenerate the binary package cache
- "${WORKDIR}/usr/bin/ghc-pkg" recache
- fi
-
- sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_CFLAGS}|" \
- "${S}/ghc/ghc.wrapper"
-
- # 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 remove GCC from the wrappers, which forces
- # GHC to use GCC from the users path, like previous GHC versions did.
-
- # Remove path to gcc
- sed -i -e '/pgmgcc/d' \
- "${S}/rules/shell-wrapper.mk"
-
- # Remove usage of the path to gcc
- sed -i -e 's/-pgmc "$pgmgcc"//' \
- "${S}/ghc/ghc.wrapper"
-
- cd "${S}" # otherwise epatch will break
-
- epatch "${FILESDIR}/ghc-6.12.1-configure-CHOST.patch"
- epatch "${FILESDIR}/ghc-6.12.2-configure-CHOST-part2.patch"
- epatch "${FILESDIR}/ghc-6.12.3-configure-CHOST-freebsd.patch"
-
- # -r and --relax are incompatible
- epatch "${FILESDIR}/ghc-6.12.3-ia64-fixed-relax.patch"
-
- # prevent from wiping upper address bits used in cache lookup
- epatch "${FILESDIR}/ghc-6.12.3-ia64-storage-manager-fix.patch"
-
- # fixes build failure of adjustor code
- epatch "${FILESDIR}/ghc-6.12.3-alpha-use-libffi-for-foreign-import-wrapper.patch"
-
- # native adjustor (NA) code is broken: interactive darcs-2.4 coredumps on NA
- epatch "${FILESDIR}/ghc-6.12.3-ia64-use-libffi-for-foreign-import-wrapper.patch"
-
- # same with NA on ppc
- epatch "${FILESDIR}/ghc-6.12.3-ppc-use-libffi-for-foreign-import-wrapper.patch"
-
- # substitute outdated macros
- epatch "${FILESDIR}/ghc-6.12.3-autoconf-2.66-4252.patch"
-
- # export typechecker internals even if ghci is disabled
- # http://hackage.haskell.org/trac/ghc/ticket/3558
- epatch "${FILESDIR}/ghc-6.12.3-ghciless-haddock-3558.patch"
-
- # This patch unbreaks ghci on GRSEC kernels hardened with
- # TPE (Trusted Path Execution) protection.
- epatch "${FILESDIR}/ghc-6.12.3-libffi-incorrect-detection-of-selinux.patch"
-
- # as we have changed the build system
- eautoreconf
- fi
-}
-
-src_compile() {
- 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 = /usr/share/doc/${P}" >> mk/build.mk
- echo "htmldir = /usr/share/doc/${P}" >> mk/build.mk
-
- # We also need to use the GHC_CFLAGS flags when building ghc itself
- echo "SRC_HC_OPTS+=${GHC_CFLAGS}" >> mk/build.mk
- echo "SRC_CC_OPTS+=${CFLAGS} -Wa,--noexecstack" >> 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
-
- sed -e "s|utils/haddock_dist_INSTALL_SHELL_WRAPPER = YES|utils/haddock_dist_INSTALL_SHELL_WRAPPER = NO|" \
- -i utils/haddock/ghc.mk
-
- # 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
- 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
- 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
-
- # Have "ld -r --relax" problem with split-objs on sparc:
- if use sparc; then
- echo "SplitObjs=NO" >> 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
-
- econf || die "econf failed"
-
- # LC_ALL needs to workaround ghc's ParseCmm failure on some (es) locales
- # bug #202212 / http://hackage.haskell.org/trac/ghc/ticket/4207
- LC_ALL=C emake -j1 all || die "make failed"
-
- fi # ! use binary
-}
-
-src_install() {
- if use binary; then
- mv "${S}/usr" "${D}"
-
- # Remove the docs if not requested
- if ! use doc; then
- rm -rf "${D}/usr/share/doc/${P}/*/" \
- "${D}/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; then
- if ! use ghcbootstrap; then
- mkdir -p "${D}/usr/share/doc"
- mv "${WORKDIR}/usr/share/doc/${P}" "${D}/usr/share/doc" \
- || die "failed to copy docs"
- fi
- fi
-
- emake -j1 ${insttarget} \
- DESTDIR="${D}" \
- || die "make ${insttarget} failed"
-
- # ghci uses mmap with rwx protection at it implements dynamic
- # linking on it's own (bug #299709)
- # so mark resulting binary
- pax-mark -m "${D}/usr/$(get_libdir)/${P}/ghc"
-
- dodoc "${S}/README" "${S}/ANNOUNCE" "${S}/LICENSE" "${S}/VERSION"
-
- dobashcompletion "${FILESDIR}/ghc-bash-completion"
-
- fi
-
- # path to the package.cache
- PKGCACHE="${D}/usr/$(get_libdir)/${P}/package.conf.d/package.cache"
-
- # 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="${ROOT}/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
-
- bash-completion_pkg_postinst
-}
-
-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="${ROOT}/usr/$(get_libdir)/${P}/package.conf.d/package.cache"
- rm -rf "${PKGCACHE}"
-
- cp -p "${PKGCACHE}"{.shipped,}
-}
diff --git a/dev-lang/ghc/ghc-7.6.2.ebuild b/dev-lang/ghc/ghc-7.6.2.ebuild
new file mode 100644
index 000000000000..6a4e62e4963f
--- /dev/null
+++ b/dev-lang/ghc/ghc-7.6.2.ebuild
@@ -0,0 +1,688 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-7.6.2.ebuild,v 1.1 2013/02/09 18:33:57 slyfox Exp $
+
+# 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 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.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 ;;
+ #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="~amd64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="doc ghcbootstrap ghcmakebinary 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? ( >=dev-haskell/alex-2.3
+ >=dev-haskell/happy-1.18
+ 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 )"
+
+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
+
+ 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
+
+ # 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() {
+ 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}/ghc-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
+
+ # one mode external depend with unstable ABI be careful to stash it
+ # avoid external libffi runtime when we build binaries
+ use ghcmakebinary || epatch "${FILESDIR}"/${PN}-7.5.20120505-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 -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
+
+ # 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() {
+ # 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
+ # ^ above seems to be fixed.
+ emake all
+
+ 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
+}
+
+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"
+
+ 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,}
+}