Version bump of dev-lang/ghc to 6.6.
authorLennart Kolmodin <kolmodin@gentoo.org>
Wed, 7 Mar 2007 18:03:59 +0000 (18:03 +0000)
committerLennart Kolmodin <kolmodin@gentoo.org>
Wed, 7 Mar 2007 18:03:59 +0000 (18:03 +0000)
Package-Manager: portage-2.1.2-r5

dev-lang/ghc/ChangeLog
dev-lang/ghc/Manifest
dev-lang/ghc/files/digest-ghc-6.6 [new file with mode: 0644]
dev-lang/ghc/ghc-6.6.ebuild [new file with mode: 0644]

index f56b1d2c6ed9fc3b00c11b9080ca95ea966e32fe..98f2aec78705a304fdb016c899e3527fb825ceab 100644 (file)
@@ -1,6 +1,11 @@
 # ChangeLog for dev-lang/ghc
 # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ChangeLog,v 1.115 2007/01/06 18:18:56 kosmikus Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ChangeLog,v 1.116 2007/03/07 18:03:59 kolmodin Exp $
+
+*ghc-6.6 (07 Mar 2007)
+
+  07 Mar 2007; <kolmodin@gentoo.org> +ghc-6.6.ebuild:
+  Bump version. Big changes ahead... wrt ghc-extra-libs, etc
 
   06 Jan 2007; Andres Loeh <kosmikus@gentoo.org> ghc-6.2.2.ebuild,
   ghc-6.4.1-r2.ebuild, ghc-6.4.1-r3.ebuild, ghc-6.4.2.ebuild:
index b49a785ce2ac28e72e833e254aace4115d415e96..4e8f58bd9e24f39decae1aeb0d7ebfa958dede9a 100644 (file)
@@ -37,6 +37,7 @@ DIST ghc-6.2.2-src.tar.bz2 5406427 RMD160 7afa370c148f2b9c3d53d662da996f5d7c0528
 DIST ghc-6.4.1-src.tar.bz2 6826112 RMD160 b6167e3d197bd461f46f860a37fff749bf3aa076 SHA1 96a3e76249c52b88e870c1e919ced3481c571b94 SHA256 4079fa6fe4dc3b0577e1e60167569c02469d46fbd31fbff3a31406000c1ccb36
 DIST ghc-6.4.2-alut.patch.gz 6670 RMD160 e6ab2a114f44f6f176a98c9cd6ab1e336662a958 SHA1 879000d18b11d1edc1a32cf720ed24bbc20e8981 SHA256 e116b385df3bb5a5feb92ce92a92bdb0f24115361aedb1bddc9a7e6ce682d8b9
 DIST ghc-6.4.2-src.tar.bz2 6954958 RMD160 19943eb2673e663973e64739cdf23720b6f36d38 SHA1 60bcea323f851caa84d49c7731b86164d5cefa42 SHA256 d517e52e0204a077c54cda11b67bf9b6ac3daa47ac7bccf1561afc7c572e6be0
+DIST ghc-6.6-src.tar.bz2 4345587 RMD160 0d8d5cdde21e5ad86fba1023872be316316d14e7 SHA1 9876dbc46ef22684c2cc95e8dce49b2a1f47017e SHA256 79b2a29136d56c8120a526188297603304dc80d3093cda76fde939df7d4dcc7e
 DIST ghc-testsuite-6.4.2.tar.gz 1181389 RMD160 1eea6a19a9fca6b3d56a6f29b69289cb88af8173 SHA1 7ada60fe2abb9208d841787781d522d5a1110dc2 SHA256 1a864243e922c233049585fa3bf4a86a0ca3e7b3ffebf26245eb037f15dd4d12
 EBUILD ghc-6.2.2.ebuild 5579 RMD160 f1c6fd45e0c282ce9231204d583e0af3e5f72648 SHA1 c843c4c5d0eb0357c05e7ff28228f71a4e7bf44c SHA256 f8e8e7a942ed7d230bbdae9c4c3b6a41e260c68866f7904665d7209a98eb57d5
 MD5 6d10979e62eca72b6a8f348623870016 ghc-6.2.2.ebuild 5579
@@ -54,10 +55,14 @@ EBUILD ghc-6.4.2.ebuild 10776 RMD160 fd3c54d30c109c895dcc6e80a124ae40b674e625 SH
 MD5 0fd527b5b461fb3155c9e6a1ed0caed9 ghc-6.4.2.ebuild 10776
 RMD160 fd3c54d30c109c895dcc6e80a124ae40b674e625 ghc-6.4.2.ebuild 10776
 SHA256 3a4606c97e6b1b706fce282cfd23f559dee347b12218aa30a043537fcc698199 ghc-6.4.2.ebuild 10776
-MISC ChangeLog 20057 RMD160 3d67da59cf8b08591b0d23f6b9fa5cb36dbeac43 SHA1 21daeb4e26885da7894847d7eea6b900ea240fac SHA256 1ac8ea8704c79b9972f233d411cc07fa489b61e09a0e7cbb031b8a0c106169ed
-MD5 d09b80e9a7bc666ad8181b931fdd3120 ChangeLog 20057
-RMD160 3d67da59cf8b08591b0d23f6b9fa5cb36dbeac43 ChangeLog 20057
-SHA256 1ac8ea8704c79b9972f233d411cc07fa489b61e09a0e7cbb031b8a0c106169ed ChangeLog 20057
+EBUILD ghc-6.6.ebuild 9812 RMD160 b5f9b11bf5ba43fec8e0f5cec4c6c7416d91bdec SHA1 ccad7687b92e17716b6c6909d92b0686bacb93c9 SHA256 6e3389c5fc94f7ad17e13b2fdc256114243c829d789020a6b2852c34b7c905bc
+MD5 d52645475e54def8f4299c4b7646a1f8 ghc-6.6.ebuild 9812
+RMD160 b5f9b11bf5ba43fec8e0f5cec4c6c7416d91bdec ghc-6.6.ebuild 9812
+SHA256 6e3389c5fc94f7ad17e13b2fdc256114243c829d789020a6b2852c34b7c905bc ghc-6.6.ebuild 9812
+MISC ChangeLog 20197 RMD160 d6abc25256fd46e52268140461738708cb8df1d8 SHA1 058be03191f4a9bcb5d2817aa7b6d35696a9341a SHA256 194bf54a2c7d5130bb1f69a1464e095c27cac79aa409209cba9ad11708493817
+MD5 24b654c5911e986a7c555204c872b70b ChangeLog 20197
+RMD160 d6abc25256fd46e52268140461738708cb8df1d8 ChangeLog 20197
+SHA256 194bf54a2c7d5130bb1f69a1464e095c27cac79aa409209cba9ad11708493817 ChangeLog 20197
 MISC metadata.xml 223 RMD160 7783e6057effb8b8f0b79cffe8b557b32c633839 SHA1 7b962c77f2e38479a9d1621ec8d307ca9f761753 SHA256 1d00c8be162a6cb87b3de440b3e63e10b39c12d56e8fbfe592e75aed872b2508
 MD5 c694674dcbef799cd4fdb6914683ebff metadata.xml 223
 RMD160 7783e6057effb8b8f0b79cffe8b557b32c633839 metadata.xml 223
@@ -74,10 +79,13 @@ SHA256 a41a1e0c73f8f3696c3701a3bfa63cf735842fb627fab403eaf63a5a207a4d04 files/di
 MD5 e0d5838a93fd2efddbb7b3ad9bc2cf1b files/digest-ghc-6.4.2 753
 RMD160 0d029ce257de088bf011643c75a1eb52796d3802 files/digest-ghc-6.4.2 753
 SHA256 84f4b6adad832de57cc219499590df79b6be7ac5c96ec975e15aa37370269d40 files/digest-ghc-6.4.2 753
+MD5 2255c6442cd019753ca35bad1f71e78f files/digest-ghc-6.6 241
+RMD160 6d3e93d9851cfbf07c6e6df35e1b7adbf5c01903 files/digest-ghc-6.6 241
+SHA256 08a1beeb6d4f6f1f6c33e3db553861106f19cfc95d6c84ef410efdae2ae6bda6 files/digest-ghc-6.6 241
 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.5 (GNU/Linux)
+Version: GnuPG v1.4.6 (GNU/Linux)
 
-iD8DBQFFn+m8OKSBj1ObwosRAkdsAJ469Hxhcbw0VTxKCrMXn+EDbtW3MACgiTwl
-ZaLPKzLVXzVUxkh48EFnlnc=
-=zhpY
+iD8DBQFF7v6c1n/CYbXjntIRAqkAAJ9eG1iKs0y7LcmqIz4xWS38skBu+QCfU5BZ
+0fnful5qYICNsIQAtwdyrn4=
+=jdjn
 -----END PGP SIGNATURE-----
diff --git a/dev-lang/ghc/files/digest-ghc-6.6 b/dev-lang/ghc/files/digest-ghc-6.6
new file mode 100644 (file)
index 0000000..d1bf3b8
--- /dev/null
@@ -0,0 +1,3 @@
+MD5 2427a8d7d14f86e0878df6b54938acf7 ghc-6.6-src.tar.bz2 4345587
+RMD160 0d8d5cdde21e5ad86fba1023872be316316d14e7 ghc-6.6-src.tar.bz2 4345587
+SHA256 79b2a29136d56c8120a526188297603304dc80d3093cda76fde939df7d4dcc7e ghc-6.6-src.tar.bz2 4345587
diff --git a/dev-lang/ghc/ghc-6.6.ebuild b/dev-lang/ghc/ghc-6.6.ebuild
new file mode 100644 (file)
index 0000000..928d037
--- /dev/null
@@ -0,0 +1,299 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.6.ebuild,v 1.1 2007/03/07 18:03:59 kolmodin Exp $
+
+# Brief explanation of the bootstrap logic:
+#
+# ghc requires ghc-bin to bootstrap.
+# Therefore, 
+# (1) both ghc-bin and ghc provide virtual/ghc
+# (2) virtual/ghc *must* default to ghc-bin
+# (3) ghc depends on virtual/ghc
+#
+# This solution has the advantage that the binary distribution
+# can be removed once an forall after the first succesful install
+# of 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 eutils flag-o-matic toolchain-funcs ghc-package check-reqs
+
+DESCRIPTION="The Glasgow Haskell Compiler"
+HOMEPAGE="http://www.haskell.org/ghc/"
+
+# discover if this is a snapshot release
+IS_SNAPSHOT="${PV%%*pre*}" # zero if snapshot
+MY_PV="${PV/_pre/.}"
+MY_P="${PN}-${MY_PV}"
+EXTRA_SRC_URI="${MY_PV}"
+[[ -z "${IS_SNAPSHOT}" ]] && EXTRA_SRC_URI="current/dist"
+
+SRC_URI="http://haskell.org/ghc/dist/${EXTRA_SRC_URI}/${MY_P}-src.tar.bz2"
+#      "test? ( http://haskell.org/ghc/dist/${EXTRA_SRC_URI}/ghc-testsuite-${MY_PV}.tar.gz )"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="doc"
+
+S="${WORKDIR}/${MY_P}"
+
+PROVIDE="virtual/ghc"
+
+RDEPEND="
+       >=sys-devel/gcc-2.95.3
+       >=dev-lang/perl-5.6.1
+       >=dev-libs/gmp-4.1
+       >=sys-libs/readline-4.2"
+
+# ghc cannot usually be bootstrapped using later versions ...
+DEPEND="${RDEPEND}
+       <virtual/ghc-6.7
+       !>=virtual/ghc-6.7
+       doc? (  ~app-text/docbook-xml-dtd-4.2
+                       app-text/docbook-xsl-stylesheets
+                       >=dev-libs/libxslt-1.1.2
+                       >=dev-haskell/haddock-0.8 )"
+
+PDEPEND=">=dev-haskell/cabal-1.1.6.1"
+
+#pkg_setup() {
+       # Portage's resolution of virtuals fails on virtual/ghc in some Portage
+       # releases, the following function causes the build to fail with an
+       # informative error message in such a case.
+       #if ! has_version virtual/ghc; then
+       #       eerror "This ebuild needs a version of GHC to bootstrap from."
+       #       eerror "Please emerge dev-lang/ghc-bin to get a binary version."
+       #       eerror "You can either use the binary version directly or emerge"
+       #       eerror "dev-lang/ghc afterwards."
+       #       die "virtual/ghc version required to build"
+       #fi
+#}
+
+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"
+}
+
+ghc_setup_wrapper() {
+       echo '#!/bin/sh'
+       echo "GHCBIN=\"$(ghc-libdir)/ghc-$1\";"
+       echo "TOPDIROPT=\"-B$(ghc-libdir)\";"
+       echo "GHC_CFLAGS=\"${GHC_CFLAGS}\";"
+       echo '# Mini-driver for GHC'
+       echo 'exec $GHCBIN $TOPDIROPT $GHC_CFLAGS ${1+"$@"}'
+}
+
+src_unpack() {
+       base_src_unpack
+       ghc_setup_cflags
+
+       # Modify the ghc driver script to use GHC_CFLAGS
+       echo "SCRIPT_SUBST_VARS += GHC_CFLAGS" >> "${S}/driver/ghc/Makefile"
+       echo "GHC_CFLAGS = ${GHC_CFLAGS}"      >> "${S}/driver/ghc/Makefile"
+       sed -i -e 's|$TOPDIROPT|$TOPDIROPT $GHC_CFLAGS|' "${S}/driver/ghc/ghc.sh"
+
+       # If we're using the testsuite then move it to into the build tree
+#      use test && mv "${WORKDIR}/testsuite" "${S}/"
+
+       # This is a hack for ia64. We can persuade ghc to avoid mangler errors
+       # if we turn down the optimisations in one problematic module.
+       use ia64 && sed -i -e 's/OPTIONS_GHC/OPTIONS_GHC -O0 -optc-O/' \
+               "${S}/libraries/base/GHC/Float.lhs"
+
+       # Don't strip binaries on install. See QA warnings in bug #140369.
+       sed -i -e 's/SRC_INSTALL_BIN_OPTS       += -s//' ${S}/mk/config.mk.in
+
+       # Temporary patches that needs testing before being pushed upstream:
+       cd "${S}"
+       # Fix sparc split-objs linking problem
+       epatch "${FILESDIR}/ghc-6.5-norelax.patch"
+}
+
+src_compile() {
+       # initialize build.mk
+       echo '# Gentoo changes' > 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
+
+       # If you need to do a quick build then enable this bit and add debug to IUSE
+       #if use debug; then
+       #       echo "SRC_HC_OPTS     = -H32m -O -fasm" >> mk/build.mk
+       #       echo "GhcLibHcOpts    =" >> mk/build.mk
+       #       echo "GhcLibWays      =" >> mk/build.mk
+       #       echo "SplitObjs       = NO" >> mk/build.mk
+       #fi
+
+       # determine what to do with documentation
+       if use doc; then
+               echo XMLDocWays="html" >> mk/build.mk
+       else
+               echo XMLDocWays="" >> mk/build.mk
+               # needed to prevent haddock from being called
+               echo NO_HADDOCK_DOCS=YES >> 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+=-fno-warn-deprecations" >> mk/build.mk
+
+       # force the config variable ArSupportsInput to be unset;
+       # ar in binutils >= 2.14.90.0.8-r1 seems to be classified
+       # incorrectly by the configure script
+       echo "ArSupportsInput:=" >> mk/build.mk
+
+       # Some arches do support some ghc features even though they're off by default
+       use ia64 && echo "GhcWithInterpreter=YES" >> mk/build.mk
+
+       # The SplitObjs feature makes 'ar'/'ranlib' take loads of RAM:
+       CHECKREQS_MEMORY="200"
+       if ! check_reqs_conditional; then
+               elog "Turning off ghc's 'Split Objs' feature because this machine"
+               elog "does not have enough RAM for it. This will have the effect"
+               elog "of making binaries produced by ghc considerably larger."
+               echo "SplitObjs=NO" >> mk/build.mk
+       fi
+
+       GHC_CFLAGS="" ghc_setup_wrapper $(ghc-version) > "${T}/ghc.sh"
+       chmod +x "${T}/ghc.sh"
+
+       econf \
+               --with-ghc="${T}/ghc.sh" \
+               || die "econf failed"
+
+       emake all datadir="/usr/share/doc/${PF}" || die "make failed"
+       # the explicit datadir is required to make the haddock entries
+       # in the package.conf file point to the right place ...
+       # TODO: is this still required ?
+
+}
+
+src_install () {
+       local insttarget
+
+       insttarget="install"
+       use doc && insttarget="${insttarget} install-docs"
+
+       # the libdir0 setting is needed for amd64, and does not
+       # harm for other arches
+       #TODO: is this still required?
+       emake -j1 ${insttarget} \
+               prefix="${D}/usr" \
+               datadir="${D}/usr/share/doc/${PF}" \
+               infodir="${D}/usr/share/info" \
+               mandir="${D}/usr/share/man" \
+               libdir0="${D}/usr/$(get_libdir)" \
+               || die "make ${insttarget} failed"
+
+       #need to remove ${D} from ghcprof script
+       # TODO: does this actually work?
+       cd "${D}/usr/bin"
+       mv ghcprof ghcprof-orig
+       sed -e 's:$FPTOOLS_TOP_ABS:#$FPTOOLS_TOP_ABS:' ghcprof-orig > ghcprof
+       chmod a+x ghcprof
+       rm -f ghcprof-orig
+
+       cd "${S}"
+       dodoc README ANNOUNCE LICENSE VERSION
+
+       dosbin ${FILESDIR}/ghc-updater
+}
+
+pkg_postinst () {
+       ebegin "Hiding ghc's built-in cabal "
+       $(ghc-getghcpkg) hide Cabal > /dev/null
+       eend $?
+       ghc-reregister
+       elog "If you have dev-lang/ghc-bin installed, you might"
+       elog "want to unmerge it. It is no longer needed."
+       elog
+       ewarn "IMPORTANT:"
+       ewarn "If you have upgraded from another version of ghc or"
+       ewarn "if you have switched from ghc-bin to ghc, please run:"
+       ewarn " /usr/sbin/ghc-updater"
+       ewarn "to re-merge all ghc-based Haskell libraries."
+}
+
+#src_test() {
+#      if use test; then
+#              local summary
+#              summary="${T}/testsuite-summary.txt"
+#
+#              make -C "${S}/testsuite/" boot || die "Preparing the testsuite failed"
+#              make -C "${S}/testsuite/tests/ghc-regress" \
+#                              TEST_HC="${S}/ghc/compiler/stage2/ghc-inplace" \
+#                              EXTRA_RUNTEST_OPTS="--output-summary=${summary}"
+#
+#              if grep -q ' 0 unexpected failures' "${summary}"; then
+#                      einfo "All tests passed ok"
+#              else
+#                      ewarn "Some tests failed, for a summary see: ${summary}"
+#              fi
+#      else
+#              ewarn "Sadly, due to some portage limitations you need both"
+#              ewarn "USE=test and FEATURES=test to run the ghc testsuite"
+#      fi
+#}
+