diff options
author | Lennart Kolmodin <kolmodin@gentoo.org> | 2009-05-10 21:03:06 +0000 |
---|---|---|
committer | Lennart Kolmodin <kolmodin@gentoo.org> | 2009-05-10 21:03:06 +0000 |
commit | 26b568b402401f806cd86dd8b5fb7d2327b76cf7 (patch) | |
tree | 439e3b5950a66b9f6ce13a90e70dc910bbc015c6 /dev-lang | |
parent | Fix building on hardened due to PIC/cpuid #269001 by Juergen Rose. (diff) | |
download | historical-26b568b402401f806cd86dd8b5fb7d2327b76cf7.tar.gz historical-26b568b402401f806cd86dd8b5fb7d2327b76cf7.tar.bz2 historical-26b568b402401f806cd86dd8b5fb7d2327b76cf7.zip |
Version bump ghc to 6.10.3, currently masked for testing.
Package-Manager: portage-2.1.6.13/cvs/Linux x86_64
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/ghc/ChangeLog | 7 | ||||
-rw-r--r-- | dev-lang/ghc/Manifest | 20 | ||||
-rw-r--r-- | dev-lang/ghc/ghc-6.10.3.ebuild | 308 | ||||
-rw-r--r-- | dev-lang/ghc/ghc-6.8.2.ebuild | 4 |
4 files changed, 333 insertions, 6 deletions
diff --git a/dev-lang/ghc/ChangeLog b/dev-lang/ghc/ChangeLog index 956697499a62..49cd609db7d0 100644 --- a/dev-lang/ghc/ChangeLog +++ b/dev-lang/ghc/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for dev-lang/ghc # Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ChangeLog,v 1.161 2009/04/19 15:11:46 kolmodin Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ChangeLog,v 1.162 2009/05/10 21:03:06 kolmodin Exp $ + +*ghc-6.10.3 (10 May 2009) + + 10 May 2009; Lennart Kolmodin <kolmodin@gentoo.org> +ghc-6.10.3.ebuild: + Version bump, ghc 6.10.3, masked for testing. 19 Apr 2009; Lennart Kolmodin <kolmodin@gentoo.org> ghc-6.10.2.ebuild: Minor QA. diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest index 9f958e12fa2c..e0ffc3c0263f 100644 --- a/dev-lang/ghc/Manifest +++ b/dev-lang/ghc/Manifest @@ -1,3 +1,6 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + AUX 10ghc 40 RMD160 1c9e367fa4ea2fa2d3a046986b066b157964390a SHA1 33486a4907e8140f4d919813df4ef4e6203d6b20 SHA256 86c80e876343456b1a1407365bfc2a441bf4c6ca23d3549d67bd800abd617e2f AUX depsort.py 1958 RMD160 4192ad9ed14064a9da42ce1faedcf28996094da3 SHA1 2c900abeb6cfcc4327f0e9418b5abd7761ce5879 SHA256 7406f639d17b8acab6a1db7e398e74379b44950d4821bc36901abd3455d63b3d AUX ghc-6.10.2-readline.patch 8612 RMD160 cf3c1539a55225439c7f16c698e622c5f6f0cd47 SHA1 82318ea6285fc9dd3ed31a023e0a349a4950473c SHA256 9be6fe23aed177c6dd16fcea4eb9ba39406ee365cb923b33d084dec451005464 @@ -8,6 +11,7 @@ AUX ghc-6.6-nothreadedrts.patch 665 RMD160 402c8eb78dc648e55d1d7e00c695b49abe0f2 AUX ghc-bash-completion 6496 RMD160 61574aab2f8ed4ae906df5ac291f528384b79b87 SHA1 a0d7c264cc8ff3d235511e151dc82f9e16691bac SHA256 82a862bea2c9248e06fcf74d307de07b05a55f9eb95f412762bd02e53fece822 AUX ghc-updater 9262 RMD160 10332a0dd2fd2f09e28b250fb74655e67305e2d7 SHA1 c297589995aa6c310bcf61db6fec1df57d5f0eb8 SHA256 e6277b2731c6be5159d28a450ccf9dfe701601f86552096ef8d8c5daedc5929a DIST ghc-6.10.2-src.tar.bz2 7987298 RMD160 a943a30c6ee91d4c4f92dd5d14e4fe80eb78567e SHA1 55a7bae8f9f114b3dddd19cba87479ddfb91c804 SHA256 d59447c16b92207db5c43004f4ff2ed1b261e00caa94ebef2485baadd17d7c60 +DIST ghc-6.10.3-src.tar.bz2 8059285 RMD160 90b01fefd474a64cf6b6b507f224abf6250745d3 SHA1 598bef94c99011a4f6791b8fbb7153ba7dffaf92 SHA256 82d104ab8b24f27c3566b5693316c779427794a137237b3df925c55e20905893 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 @@ -22,6 +26,8 @@ DIST ghc-6.6.1-src.tar.bz2 4339970 RMD160 6b82a74559425fe5fe1fa1b67a83433457bae0 DIST ghc-6.8.2-src.tar.bz2 7072545 RMD160 dc555c3137d9314a6ee6a0b7ad62c0ba16d9d52c SHA1 1f40b0ee2e51be1208fdb579ce4998181ec36a40 SHA256 2d10f973c35e8d7d9f62b53e26fef90177a9a15105cda4b917340ba7696a22d9 DIST ghc-bin-6.10.2-amd64.tbz2 52998594 RMD160 0871c4471b01e94c7fee4fd7a44e26cec4527734 SHA1 7f6e80b4cc5d6bf992494b33f9b104d9ffac0800 SHA256 27903f862c9e783a993fa328a0bb4e28c405415482f25ba39a20c702844dc554 DIST ghc-bin-6.10.2-x86.tbz2 53456281 RMD160 78134bc179638c8b9b88c849d6d714efcfe94d41 SHA1 54060864531274047d030d34288a26d5137a9b62 SHA256 ae9acc8294a747cad17134ffccf1b21a3c9f60a2fcfdc075a778f4b755132888 +DIST ghc-bin-6.10.3-amd64.tbz2 52224187 RMD160 a4cdb7cf8dc3df2a8c2e983ff8edc45ada2403a7 SHA1 9e8855bb64f77dd901ad3ba3502e78030f360c40 SHA256 237719cef511b02511150709ecaa7cc21ed677e788b98221241c2c57c32266e2 +DIST ghc-bin-6.10.3-x86.tbz2 52602522 RMD160 f93d88ac5cabe083249804cfbbe21a80aeb2b124 SHA1 5b8d0ea6479e95d1073794437bb109786277328e SHA256 fc131854e9f1a9f4a3a222b3ba615ae33f6b5d5ae1fec831470ed3fe662da589 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 @@ -49,7 +55,7 @@ DIST ghc-bin-6.6.1-x86.tbz2 26134077 RMD160 fcc31115073c2c0c4be75dce0253cb9bca5e DIST ghc-bin-6.8.2-alpha.tbz2 47983125 RMD160 4313112d5ab24f4120913bf8ffae46ffa37c1ee2 SHA1 7e2aa64d8e8494ba1e84be4549232253d302a205 SHA256 cd9c3b6a938b76dada2d34b33c0346b29dd645f0e7e597eda9c33d3aa7b2f756 DIST ghc-bin-6.8.2-amd64.tbz2 31838398 RMD160 6e35229a2d4506dfec6ae732199d5f1cd79c91ef SHA1 9283ba39b9443c91035d8bdbd93278af98bc279d SHA256 d4510773b96afc3b89e6820fd4d0de3ebad34bbee0c200542bd1ad917b97020e DIST ghc-bin-6.8.2-hppa.tbz2 63658207 RMD160 9753bcef20a805ab27b3f4eae9cacc4493d0d4d6 SHA1 7f7f57b36bf895c78e35e0ff350e8fe223f32d3b SHA256 979b75550cbb45283766a7185adeb83fd338d26b5af82f08ac8f3d1963f312f3 -DIST ghc-bin-6.8.2-ia64.tbz2 46889108 RMD160 e7320de4c96e6c34e218d8574f1ab985541bb46f SHA1 c386b1f57644e0d3aa5a871a0b47de0d16e3f51e SHA256 f928e0b974988d4f68f3beae6c78f94187bbe5a0ebda35ffc50a1a01a634c2ad +DIST ghc-bin-6.8.2-ia64.tbz2 42446713 RMD160 6857250c2fd67771b46bd3c7f71496ea92ba6f8a SHA1 6b1f42a84cc2e1fde4543da0dee9a74cce9adafb SHA256 a021c868e89d05fac06e0a1b4263a5e6e857b0ab81f8349a0c6336409f655ea4 DIST ghc-bin-6.8.2-sparc.tbz2 47563989 RMD160 7acbb0284ab02e501d28ef520c451b8022440b63 SHA1 5c76ce09b8a440396e94ce42b8ed7e92f988a748 SHA256 b9c391858ccc63137197445541966dd01427f549ef5d45e4359a588613821c4e DIST ghc-bin-6.8.2-x86.tbz2 30872949 RMD160 ce2f9f6fe88440ba3574d85c219e96210d35128a SHA1 17fa4fc07e12655d4599761986386c18c0ee23a1 SHA256 3c7e22dd18e622b6c9c802584cb5556b0afa7186f0df78d420d008b8c4f59fed DIST ghc-bundled-readline-5.2_p13-amd64.tbz2 976677 RMD160 f0543aa3f404d45aad4360cc07b777c3aaafc5fb SHA1 1737eae6fe00c4924577e6eb8fa5d2c7eb0b24ca SHA256 f67250899590a551278695bcb7f143c5a6423ea47e5e6966615072cc0f9b51f0 @@ -57,11 +63,19 @@ 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 DIST readline-1.0.1.0.tar.gz 52394 RMD160 6554e24718cc1469e4c19b3e9c7244b527252a7a SHA1 ffcb2569194037c28c6288dbcec75c169c7fa89c SHA256 07f2f039f32bf18838a4875d0f3caa3ed9436dd52b962b2061f0bb8a3316fa1d EBUILD ghc-6.10.2.ebuild 11776 RMD160 97c82f512663c2d19e2878b8ba4713a487775def SHA1 ae848ebf3fea760699195ceb5030343fa1117d6a SHA256 6dfe5599d96e81a76053560832ac679b0689c4b4c4d9544393da90312622b351 +EBUILD ghc-6.10.3.ebuild 10580 RMD160 a9483fd501319fda6f373934acc99431858e8de1 SHA1 cce068cdc500b0da08d4381acd992a52847681aa SHA256 f71ac0e5ead8bc620ddb13d5e4fd805e7bb85ee4734b578f14d22708bfbd1fc0 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 8957 RMD160 528b0c499a7e6482316c59cacd61e1a5c984bfd4 SHA1 4a0ab01193cfc938de6ea41f62d979330da001b4 SHA256 4f51fc9df8ae0d9506094e71c4d8576eade93a832110393587dcc15c34ca0053 -EBUILD ghc-6.8.2.ebuild 9336 RMD160 782353205f54e256d0d71307e8b4d670a4eb1102 SHA1 eed1952ca256d9968bcefaa6d6805870d1ce2562 SHA256 326debb87b5055a73cbff6e2f983bf6a6081393540cc8f8531a0dbada5e3d013 -MISC ChangeLog 27314 RMD160 1c3cfde223d81cd9248e9899f7c4d389b330f7bd SHA1 455eec6cf5e8f98e91835de670ca0279f5271d34 SHA256 b3add34a566f658e03e70308e42d41d4ccb57ba3529a32323c2ca7b604762d0f +EBUILD ghc-6.8.2.ebuild 9337 RMD160 2189c844bdde3d269a46f8a0aa85a0296fed34e3 SHA1 c8ca3868f7ba53f3c68014da7d68699fb22d2e57 SHA256 7c3eadc911b2e80379c466a675d81b073778e10e2571503cd9a529ce2af4b9ac +MISC ChangeLog 27464 RMD160 15645869fce37aa29c39a7484723a6cb75a4ce40 SHA1 6627da1fa104f9ff38931a5f7631d80b9f5791c9 SHA256 5caf09d1155624ad024936d65c7b319cf55bffbd20302f90827bd291ee906977 MISC metadata.xml 558 RMD160 a6e079bce4a2ff91763d7077e300720ca3d4db2a SHA1 0b52871b0f12c318bed9e7fe7dc994c974096647 SHA256 5e25a5d2ef0e322f55bfbb37955ce388e2ebbaee387b97847ceb844ea3b120fd +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.11 (GNU/Linux) + +iEYEARECAAYFAkoHQSkACgkQ1n/CYbXjntJQNACeK8coMf8KWsM8ibsfzA5VHGoq +3mwAoIxYs29tIQ3PJApD1AyRcTeYt5MA +=GWUv +-----END PGP SIGNATURE----- diff --git a/dev-lang/ghc/ghc-6.10.3.ebuild b/dev-lang/ghc/ghc-6.10.3.ebuild new file mode 100644 index 000000000000..af0c16202e0e --- /dev/null +++ b/dev-lang/ghc/ghc-6.10.3.ebuild @@ -0,0 +1,308 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.10.3.ebuild,v 1.1 2009/05/10 21:03:06 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/" + +# 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 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 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://haskell.org/ghc/dist/${EXTRA_SRC_URI}/${P}-src.tar.bz2 ) + !ghcbootstrap? ( $arch_binaries )" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~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" + +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 + +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 + filter-flags -fPIC + + 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 + + # 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 + ghc_setup_cflags + + 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" + + # 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 + + # The settings that give you the fastest complete GHC build are these: + if use ghcquickbuild; then + echo "SRC_HC_OPTS = -H64m -Onot -fasm" >> mk/build.mk + echo "GhcStage1HcOpts = -O -fasm" >> mk/build.mk + echo "GhcStage2HcOpts = -Onot -fasm" >> mk/build.mk + echo "GhcLibHcOpts = -Onot -fasm" >> mk/build.mk + echo "GhcLibWays =" >> mk/build.mk + echo "SplitObjs = NO" >> mk/build.mk + fi + # However, note that the libraries are built without optimisation, so + # this build isn't very useful. The resulting compiler will be very + # slow. On a 4-core x86 machine using MAKEOPTS="-j10", this build was + # timed at less than 8 minutes. + + # 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 + + # GHC build system knows to build unregisterised on alpha and hppa, + # but we have to tell it to build unregisterised on some arches + if use alpha || use hppa || use ppc64 || use sparc; 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 + + # 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 + 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" + + dodoc "${S}/README" "${S}/ANNOUNCE" "${S}/LICENSE" "${S}/VERSION" + + dosbin "${FILESDIR}/ghc-updater" + + 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, please run:" + ewarn " /usr/sbin/ghc-updater" + ewarn "to re-merge all ghc-based Haskell libraries." + + bash-completion_pkg_postinst +} + +pkg_prerm() { + # 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.8.2.ebuild b/dev-lang/ghc/ghc-6.8.2.ebuild index ba53764f88a4..6c416024e281 100644 --- a/dev-lang/ghc/ghc-6.8.2.ebuild +++ b/dev-lang/ghc/ghc-6.8.2.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2008 Gentoo Foundation +# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.8.2.ebuild,v 1.10 2008/10/04 10:15:33 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.8.2.ebuild,v 1.11 2009/05/10 21:03:06 kolmodin Exp $ # Brief explanation of the bootstrap logic: # |