diff options
author | Lennart Kolmodin <kolmodin@gentoo.org> | 2010-06-16 19:18:04 +0000 |
---|---|---|
committer | Lennart Kolmodin <kolmodin@gentoo.org> | 2010-06-16 19:18:04 +0000 |
commit | a3298c8688bd1f94a6bd6bf548ea7de9b51c319e (patch) | |
tree | 4032edc8d6a49f5472f82490fd8c34cfe0458187 /dev-lang/ghc | |
parent | Version bump. Fixes bug 324119 (diff) | |
download | historical-a3298c8688bd1f94a6bd6bf548ea7de9b51c319e.tar.gz historical-a3298c8688bd1f94a6bd6bf548ea7de9b51c319e.tar.bz2 historical-a3298c8688bd1f94a6bd6bf548ea7de9b51c319e.zip |
Add dev-lang/ghc-6.12.3 (masked).
Package-Manager: portage-2.1.8.3/cvs/Linux x86_64
Diffstat (limited to 'dev-lang/ghc')
-rw-r--r-- | dev-lang/ghc/ChangeLog | 10 | ||||
-rw-r--r-- | dev-lang/ghc/Manifest | 16 | ||||
-rw-r--r-- | dev-lang/ghc/files/ghc-6.12.2-configure-CHOST-part2.patch | 42 | ||||
-rw-r--r-- | dev-lang/ghc/ghc-6.12.1.ebuild | 4 | ||||
-rw-r--r-- | dev-lang/ghc/ghc-6.12.3.ebuild | 372 |
5 files changed, 436 insertions, 8 deletions
diff --git a/dev-lang/ghc/ChangeLog b/dev-lang/ghc/ChangeLog index 37f9ccf4ca11..bba3e4b9d6c8 100644 --- a/dev-lang/ghc/ChangeLog +++ b/dev-lang/ghc/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for dev-lang/ghc # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ChangeLog,v 1.176 2010/06/12 20:34:32 kolmodin Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ChangeLog,v 1.177 2010/06/16 19:18:04 kolmodin Exp $ + +*ghc-6.12.3 (16 Jun 2010) + + 16 Jun 2010; Lennart Kolmodin <kolmodin@gentoo.org> ghc-6.12.1.ebuild, + +files/ghc-6.12.2-configure-CHOST-part2.patch, +ghc-6.12.3.ebuild: + Version bump to 6.12.3. + So far we've got binaries for amd64, ppc64 and x86. + Also changed so that the masked ghc 6.12.1 ebuild uses haskell-updater-1*. 12 Jun 2010; Lennart Kolmodin <kolmodin@gentoo.org> ghc-6.10.4-r1.ebuild: Edit the ghc-wrapper installed by USE=binary to include GHC_CFLAGS from diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest index 937d61e00a10..079772826409 100644 --- a/dev-lang/ghc/Manifest +++ b/dev-lang/ghc/Manifest @@ -9,6 +9,7 @@ AUX ghc-6.10.4-libm-detection.patch 1791 RMD160 37cf97b3477fbe3af11d558f0a5b8397 AUX ghc-6.10.4-ppc64-always-minimal-toc.patch 289 RMD160 a0d32897bf9984050e36ab917c8ec4a5d1e29649 SHA1 d9961d4ae8d14ab59fe50952fb7aa92b55cb5185 SHA256 4d06007ca8a0542e120a189d49c743c1982f5b098504e031327b51f912cd69ad AUX ghc-6.10.4-propagate-hc-options-to-all-libraries.patch 2976 RMD160 f8947d8952bca884bbe894d3a74b0b3dd86a281e SHA1 a8c18dfb970767fdf9150ac157e95a61b8b9d92e SHA256 d8d191dea237d2492202fbc528deaebe5df7a48201868a2b969a5865758cb4cb AUX ghc-6.12.1-configure-CHOST.patch 851 RMD160 b85347a79d52270e1077c5a6e6ad675dd9a9b24d SHA1 e271c878ad3a7a00078c01858923ab6b814b2474 SHA256 b4e1ebeea2fdd1e04f14140fe07d991ac583f221bc79f0eb175fb378ed12cd69 +AUX ghc-6.12.2-configure-CHOST-part2.patch 958 RMD160 cab606658d051c3b5f5751df2c383d00ba6b5ee7 SHA1 58a26fc518e4e4b587c1742c709bc59d24b871cc SHA256 696cf5693b714b2c19cd3f32d5e96677cf9ad828a3f151f0c16fbc16585227a4 AUX ghc-6.4.2-sparc32plus.patch 526 RMD160 970d062362284659c2570394c8f9328d8096ea8e SHA1 40d25c25a3cd6a228f3757b8e298fd8c72710544 SHA256 a05bd16c9308ec9f608aeabe0ea35e2dff6826f262108d1ccb16c4f93a2d3a44 AUX ghc-6.4.2-sparcmangler.patch 837 RMD160 7e3a2a94bb62c3c0da09f08096481cace2b1bb96 SHA1 5faccb311239c4c4d07a2c6dc507d51a18c2bc96 SHA256 3987724420c6d4b552c6fbb3b3ca10fca8aaa73573735aa3de824d3dc65f94af AUX ghc-6.5-norelax.patch 613 RMD160 71012d8615e164c72d0db75c8cc606ccf8e3ddd9 SHA1 4bab0e904d9950ba92e16b3932635e5a1c3edee1 SHA256 0da9630bbd28edee7538d857dbeefd6d4cdddafd198499e61513f2f4d44c2fc0 @@ -17,6 +18,7 @@ AUX ghc-bash-completion 6496 RMD160 61574aab2f8ed4ae906df5ac291f528384b79b87 SHA AUX ghc-updater 9262 RMD160 10332a0dd2fd2f09e28b250fb74655e67305e2d7 SHA1 c297589995aa6c310bcf61db6fec1df57d5f0eb8 SHA256 e6277b2731c6be5159d28a450ccf9dfe701601f86552096ef8d8c5daedc5929a DIST ghc-6.10.4-src.tar.bz2 8060565 RMD160 5f83baf2549f1f4bea140c6a80728c2a76f60ab6 SHA1 0566858b409066d98da70de5adb9a7030d0df5dc SHA256 d66a8e52572f4ff819fe5c4e34c6dd1e84a7763e25c3fadcc222453c0bd8534d DIST ghc-6.12.1-src.tar.bz2 22543105 RMD160 c5e067f739813421cb07ce6326b2cbe2e14fbdf6 SHA1 dc36df842c931917f322c7fd86e19a4711ba34ea SHA256 cdf99f9add677a925ee87a5b87e94eb595ed9b72034453c195ef9379bd26552a +DIST ghc-6.12.3-src.tar.bz2 26592939 RMD160 021619aec4c820009e77745657bfdf0d9705f3e7 SHA1 d811be2131d4403ea452aa94fe71edd1b6bd0a79 SHA256 6cbdbe415011f2c7d15e4d850758d8d393f70617b88cb3237d2c602bb60e5e68 DIST ghc-6.2.2-libraries.tar.gz 524182 RMD160 f4ce0df2040f91a5a56cc618e68f1aa2e4bf0185 SHA1 64af9e782f7eeae9f7f47445811f50cf3210f093 SHA256 ebcf8c1fd31c9a33ff64ca888f01e9911464469f59e5432c626b8c686c2d9142 DIST ghc-6.2.2-src.tar.bz2 5406427 RMD160 7afa370c148f2b9c3d53d662da996f5d7c05282d SHA1 9ca5bfed02210d3731a76fab5e25a8c690067fde SHA256 a0fe7eb8d447f25fbc616cdbce2bb4e03961a884c2c37969d1e23588b588a852 DIST ghc-6.2.2-users_guide.tar.gz 197576 RMD160 d17c2c89d03d911dfa0b449b47814d2e19dc6030 SHA1 7f7e79cb1a57812ac44f3e9881757cc278a8c14b SHA256 846df4bedf44f00a438a276c849289ce1b2d79f3fa53fb16d576517b2da1e509 @@ -39,6 +41,9 @@ DIST ghc-bin-6.12.1-ppc.tbz2 87629267 RMD160 a7058b24196bd82bae1517ea4a106638120 DIST ghc-bin-6.12.1-ppc64.tbz2 98031515 RMD160 a0d4beca79987709143c873ff0b7597593662cb2 SHA1 11408812c709411e66bf0ae91123385530338726 SHA256 6b96643d7781ea5aa1a9fcb2ae035a858eb0d714ce1228254b812787e9cef315 DIST ghc-bin-6.12.1-sparc.tbz2 78900078 RMD160 b77c66ace7146651cb54cd14f263a044584dd533 SHA1 dc15876da0c4ab8de5b293af4443b63b6d53cace SHA256 320b9335aa9c396cdd42281b20c10aa14dcbdcc822332427160a78f34db84689 DIST ghc-bin-6.12.1-x86.tbz2 82182666 RMD160 4ef08aa170283d86f0b63cd1626cec6d5f98de26 SHA1 abc2ba41ed4b6ddea794d35da11c4ea47defb36f SHA256 7ed1c64dd095bd09967155c2fea377e9baec38a26b7156c3d6257a45c58429ea +DIST ghc-bin-6.12.3-amd64.tbz2 82390661 RMD160 d1252e69ebab119a3c04c247b0665df5702ada6d SHA1 27b78fce6a21b4050a1f2cdcb4f005ab18750d7d SHA256 6a1c9978c4ad19bb98f70b900afa799f16cfd3e159bb6d51437c264e35f4d6cc +DIST ghc-bin-6.12.3-ppc64.tbz2 95781107 RMD160 b089772ef07a33db30084727a286a14e7a519f39 SHA1 2eab23cf6ee89cb188db0d77ae653ddceaf95ba0 SHA256 62c2424c97381be4e0e5f5bf1312a24ebe97c85a52d62bd9e35f991b6ec568f0 +DIST ghc-bin-6.12.3-x86.tbz2 82262946 RMD160 8256df61e6998d819c7d40d613037c5f313c948b SHA1 73dc4422bbabf5c0d8de4a6672db4b3fedd42f9c SHA256 0d74a18473d6303e8818a6bd1de87f6dfd86466e7d967d68707a6c255a96945d DIST ghc-bin-6.2.2-r1-ppc.tbz2 21018465 RMD160 4dda12e11ce31d395d1085e441171580832003f7 SHA1 0b0f3c5a77612a52317914730c0ecb15bd75d719 SHA256 453babea6a9c3d3382b9987f5e40d184dd3e591a7b1d1f6bd6d41984d94f4dd4 DIST ghc-bin-6.2.2-r1-sparc.tbz2 16189582 RMD160 0ba8ff87c91abcd43988c21df8537eec0932c6a3 SHA1 404333d666256164bf056f6144f0b21094719e1b SHA256 5d225e05e73cb85500b4a1860a4dd82adbb9edc4791d087341b4458e70022cc3 DIST ghc-bin-6.2.2-r1-x86.tbz2 14561932 RMD160 b8e6a08b269257689efdc95d698a9e2b86c6d3e3 SHA1 71da573a12385b69a872fb39edeb7b06f1db38b2 SHA256 24a4ea7fe9b8ba58f84e0d68012158e70972a1caacd482d6c84905bda4502f63 @@ -75,19 +80,20 @@ DIST ghc-bundled-readline-5.2_p13-x86.tbz2 940742 RMD160 5f9470a99047f004bd0917c DIST ghc-testsuite-6.4.2.tar.gz 1181389 RMD160 1eea6a19a9fca6b3d56a6f29b69289cb88af8173 SHA1 7ada60fe2abb9208d841787781d522d5a1110dc2 SHA256 1a864243e922c233049585fa3bf4a86a0ca3e7b3ffebf26245eb037f15dd4d12 EBUILD ghc-6.10.4-r1.ebuild 12080 RMD160 0db1c429f5ea776027b65f38ad7a5dd0ec86ddb1 SHA1 abe324c4c3b15fb2c88874269b9e0acb99f588da SHA256 8f6edcda42d9883f5bedfca8a0c7ad259669919e12c09c1778712421f54498ff EBUILD ghc-6.10.4.ebuild 11015 RMD160 f736ea1117fb62db038f1d4b3370ee36d803c32f SHA1 71f35920921887e010d7a83156a75f0c56372207 SHA256 2a97d8c63a6868c4756cad8d644ab96dd8a9fa6a233cfbcb59e83af0b6f9e601 -EBUILD ghc-6.12.1.ebuild 11691 RMD160 85030e422c89e5fd1e4bae9b89623ef223ae313f SHA1 2b82f5f61e9f72e3a0ddeefbd7bdcb32e2677012 SHA256 362d5021ff7c46f3545974b9e918557cf65fa1d307eb6d1d014cf92dba515c89 +EBUILD ghc-6.12.1.ebuild 11691 RMD160 f0e9f7a6d443edeee971359acf5da14f7e3ecf73 SHA1 007c1e3577b633e8315cadc7b9df60dfbfaf170a SHA256 2e8f914d1ad969c99edab9d221b9afc1910996e7277101f38727c0f1e8effb2e +EBUILD ghc-6.12.3.ebuild 12816 RMD160 3fbe5641fe6c2ce86719e106449de9ea52805e65 SHA1 0122d4e84720e4752a92a6024e40e471273d512e SHA256 14979a1fc697f83be35bf510917671134341a59af3bfb380370472c4829dc419 EBUILD ghc-6.2.2.ebuild 10387 RMD160 3f30eb547a048ae8a911831d6b6ac04528f7bbcf SHA1 c08282a3a2e60cfb8f742fbb8607ae1819ca3be8 SHA256 201ce669c29ee075e24f03e9abd0510aa172e000e240fadcf89c096004789935 EBUILD ghc-6.4.2.ebuild 13550 RMD160 54b1dc7fe619e62e168c42ef0135c6554c893834 SHA1 17e5ccc5479c5e387b45379960dd60d5ddbe8774 SHA256 650cc001ea76d20fe6d9deed696491a158ba1144cbb4930b501984c1bc8ab494 EBUILD ghc-6.6.1.ebuild 12238 RMD160 389782acd6d8ae37e6ffd72fb71667f3c1f04ccb SHA1 8c90cfaa9c7460e8ba9ead1650c76af24cdaa506 SHA256 1e673609fa84ecd8b89159760e7d80351d912e2acbcdb6b3dee1c58f160a5109 EBUILD ghc-6.6.ebuild 10777 RMD160 141e86d9cf0525a8aff69b9a70ab1522b078ec62 SHA1 c432175362c80acbea221137d50467c8f065985b SHA256 28e0f78ed977d31ee301c726fd0be830b161c8830e6344d55d4c51113c50acb1 EBUILD ghc-6.8.2-r1.ebuild 8952 RMD160 5c4832a7ca6dc41d217c0d5ebb677afd2ae5b174 SHA1 0b321957d4f9ddccf1614a6c5d901649125c6a8e SHA256 8699169558e85a23675058d9b70a0017c3207b6637db6f352b389e076cbe5baf EBUILD ghc-6.8.2.ebuild 9063 RMD160 d2842f4e26583fa1befecc0ad01a54983830a48a SHA1 8d52f906227815f0049d1403c302415bbd828c20 SHA256 c5ac2c32efce96ac677851ed85d6c0504a5bbbbaaba63ef383225795ab126bba -MISC ChangeLog 30717 RMD160 6ba3c87a87f8218f7b8ce0c0a5418b983316b38e SHA1 1c132cea9fa3c68c74c2892b2d6b5bbf1eadc0e6 SHA256 1c61401b1613482f0668dfc1d83c2e6abfdab149346fa2aa82584c0c41435d34 +MISC ChangeLog 31044 RMD160 666dee94686b3b7e03db36fb877a1be00384ce3f SHA1 cd6c0e5d4ed7c6d6e5e5f462bf6f309316bd5936 SHA256 0beffce6608ef4a9090d92c8b7cca450f4f4d274de66f59375166e5f76482efd MISC metadata.xml 442 RMD160 9cfa0af9084477c8a70ecf0ac3fb3093ae0cd602 SHA1 be2833090f093ac1c8fc2f5c6f3f253bdbdd6b96 SHA256 2bacbdfcaea11289949a687626f59f99af8fda9ec495b2c349ce5898d9f0dcd4 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) -iEYEARECAAYFAkwT71wACgkQ1n/CYbXjntKXDwCfcvxYm6GWvVorn6CAdV75+x4U -CLMAoI9U8e/z+TRFNlsevWmxC0ZAxwKN -=1GiG +iEYEARECAAYFAkwZI3YACgkQ1n/CYbXjntIvVgCgmlb1HvwJFGvZasERSDl+78jm +VGoAmwTPCUhDbjf1upkrPSlGdy3i75/u +=2Lz8 -----END PGP SIGNATURE----- diff --git a/dev-lang/ghc/files/ghc-6.12.2-configure-CHOST-part2.patch b/dev-lang/ghc/files/ghc-6.12.2-configure-CHOST-part2.patch new file mode 100644 index 000000000000..e444ccfb94e6 --- /dev/null +++ b/dev-lang/ghc/files/ghc-6.12.2-configure-CHOST-part2.patch @@ -0,0 +1,42 @@ +From b1b23479f676259230cc31e40cc94b60df90487e Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich <slyfox@inbox.ru> +Date: Thu, 22 Apr 2010 22:44:56 +0300 +Subject: [PATCH] aclocal.m4: mangle 'pc' to 'unknown', mangle i[3-6]86 to i386 + +Signed-off-by: Sergei Trofimovich <slyfox@community.haskell.org> +--- + aclocal.m4 | 11 +++++++++-- + 1 files changed, 9 insertions(+), 2 deletions(-) + +diff --git a/aclocal.m4 b/aclocal.m4 +index 031145d..f401860 100644 +--- a/aclocal.m4 ++++ b/aclocal.m4 +@@ -1279,7 +1279,7 @@ case "$1" in + hppa*) + $2="hppa" + ;; +- i386) ++[ i[3-6]86) ] #m4 bracket escape + $2="i386" + ;; + ia64) +@@ -1332,7 +1332,14 @@ case "$1" in + # -------------------------------- + # converts vendor from gnu to ghc naming, and assigns the result to $target_var + AC_DEFUN([GHC_CONVERT_VENDOR],[ +-$2="$1" ++case "$1" in ++ pc) ++ $2="unknown" ++ ;; ++ *) ++ $2="$1" ++ ;; ++ esac + ]) + + # GHC_CONVERT_OS(os, target_var) +-- +1.6.4.4 + diff --git a/dev-lang/ghc/ghc-6.12.1.ebuild b/dev-lang/ghc/ghc-6.12.1.ebuild index 8810ac2948d4..22eb24cd5a77 100644 --- a/dev-lang/ghc/ghc-6.12.1.ebuild +++ b/dev-lang/ghc/ghc-6.12.1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.12.1.ebuild,v 1.2 2010/05/31 18:18:44 josejx Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.12.1.ebuild,v 1.3 2010/06/16 19:18:04 kolmodin Exp $ # Brief explanation of the bootstrap logic: # @@ -76,7 +76,7 @@ DEPEND="${RDEPEND} # 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.0* )" +PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1* )" # use undocumented feature STRIP_MASK to fix this issue: # http://hackage.haskell.org/trac/ghc/ticket/3580 diff --git a/dev-lang/ghc/ghc-6.12.3.ebuild b/dev-lang/ghc/ghc-6.12.3.ebuild new file mode 100644 index 000000000000..13378c020b36 --- /dev/null +++ b/dev-lang/ghc/ghc-6.12.3.ebuild @@ -0,0 +1,372 @@ +# Copyright 1999-2010 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.1 2010/06/16 19:18:04 kolmodin 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 toolchain-funcs ghc-package versionator + +DESCRIPTION="The Glasgow Haskell Compiler" +HOMEPAGE="http://www.haskell.org/ghc/" + +arch_binaries="" + +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 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 alpha? ( mirror://gentoo/ghc-bin-${PV}-alpha.tbz2 )" +#arch_binaries="$arch_binaries amd64? ( mirror://gentoo/ghc-bin-${PV}-amd64.tbz2 )" +#arch_binaries="$arch_binaries hppa? ( mirror://gentoo/ghc-bin-${PV}-hppa.tbz2 )" +#arch_binaries="$arch_binaries ia64? ( mirror://gentoo/ghc-bin-${PV}-ia64.tbz2 )" +#arch_binaries="$arch_binaries sparc? ( mirror://gentoo/ghc-bin-${PV}-sparc.tbz2 )" +#arch_binaries="$arch_binaries x86? ( mirror://gentoo/ghc-bin-${PV}-x86.tbz2 )" + +SRC_URI="!binary? ( http://darcs.haskell.org/download/dist/${PV}/${P}-src.tar.bz2 ) + !ghcbootstrap? ( $arch_binaries )" +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~ppc64 ~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-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 +} + +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 + 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}" + 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" + + # as we have changed the build system with the readline patch + 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 + + 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 + + # GHC build system knows to build unregisterised on alpha and hppa, + # but we have to tell it to build unregisterised on some arches + # ppc64: EvilMangler currently does not understand some TOCs + if use alpha || use hppa || use ppc64; then + echo "GhcUnregisterised=YES" >> mk/build.mk + echo "GhcWithInterpreter=NO" >> 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" + + emake 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" + + 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 + ebeep 12 + 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,} +} |