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.12.3-alpha-use-libffi-for-foreign-import-wrapper.patch 2575 RMD160 53dd2e84868f8b66e4d8741b121177bf8e305924 SHA1 2b25421962df33044d8f0556756563ab7d5b1a9d SHA256 9b9748775ddcafa0171f1594c4f5e0c90269e4fd65837d9167b127238cec3d93
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
DIST ghc-6.6-users_guide.tar.gz 255475 RMD160 ecbdff8f0501780641408204fe60946cde392c95 SHA1 13c8e0e5922a8598a7b8c0eb05dbef9c8e1b661c SHA256 7242a6ccf3df6f141f4e493f9dd37def9d036239b819aa5a5d6f3a58489799ef
DIST ghc-6.6.1-src.tar.bz2 4339970 RMD160 6b82a74559425fe5fe1fa1b67a83433457bae0ad SHA1 cc1846b4ad607e270721371ce4043b1a017cd10e SHA256 489126ceeb2dbb6a85ef8d87d6792e61e1bc0d5882e4b33a7725410d796132c6
DIST ghc-6.8.2-src.tar.bz2 7072545 RMD160 dc555c3137d9314a6ee6a0b7ad62c0ba16d9d52c SHA1 1f40b0ee2e51be1208fdb579ce4998181ec36a40 SHA256 2d10f973c35e8d7d9f62b53e26fef90177a9a15105cda4b917340ba7696a22d9
+DIST ghc-bin-6.10.4-alpha.tbz2 84499083 RMD160 5f68a5592663d7c6abf3617ccab9aa35cbfc2d63 SHA1 88fb6020bf1fab2e0914c223087af94e926a1dda SHA256 cfe28ea83e000f1ba0853b78dd27b35fa5d823c4cb94699f901aec5e2705c315
DIST ghc-bin-6.10.4-amd64.tbz2 51566179 RMD160 68b261b4bbef89021a2c92e99c70db45ed85d9e7 SHA1 27e542cc49fa47566c59407fad1c9254d46a8d03 SHA256 2ced87862603a44a59744459a8231f587c0f225f70eb4861ad2db5098c2433a1
DIST ghc-bin-6.10.4-ppc.tbz2 63982893 RMD160 f1613a05c2d647229ab480c9ee964bbabd0971e5 SHA1 2342da36138a08c70a0bac3c8c66ea228123593e SHA256 8aec35a2fbb2897ba7fdb3901b65a7d67cb9409526e747f62e31eaea770f0357
DIST ghc-bin-6.10.4-ppc64.tbz2 67637446 RMD160 ff0bed846e91dcf094142fc6b75f29c9d8521424 SHA1 858406875ade2f1aad8b2ae731bf9ce3fa613f1c SHA256 1ef7d4daf50cc0998651d498d029a5455fb6c410c0abb6a2b23b118ae69e9c54
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-alpha.tbz2 106110912 RMD160 f16d9e157eea5491871c19d3b86a4047935a7936 SHA1 17e2b02cd83aa31c7bccbeacde17225e38f62c11 SHA256 e2c50259619b8139a13af38eb1a5803cb2385a916ca2102490d5ab0905db797c
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-bundled-readline-5.2_p13-amd64.tbz2 976677 RMD160 f0543aa3f404d45aad4360cc07b777c3aaafc5fb SHA1 1737eae6fe00c4924577e6eb8fa5d2c7eb0b24ca SHA256 f67250899590a551278695bcb7f143c5a6423ea47e5e6966615072cc0f9b51f0
DIST ghc-bundled-readline-5.2_p13-x86.tbz2 940742 RMD160 5f9470a99047f004bd0917c62253bff9b663c9a5 SHA1 f5463a8929d2ba792b91085f78d6763cb50ef14e SHA256 bb9766235ed0d6e3c2f3ffe1625ecbe8e4d2e0254f7060e845be3a404835cd2a
DIST ghc-testsuite-6.4.2.tar.gz 1181389 RMD160 1eea6a19a9fca6b3d56a6f29b69289cb88af8173 SHA1 7ada60fe2abb9208d841787781d522d5a1110dc2 SHA256 1a864243e922c233049585fa3bf4a86a0ca3e7b3ffebf26245eb037f15dd4d12
-EBUILD ghc-6.10.4-r1.ebuild 11969 RMD160 04931d573a984ebf4404a8306204de9c0ee5205b SHA1 38a0cf9acc3f6cab85a3369da3c6f4560f145bdd SHA256 6c5740afa76d6216318034341bbd279f20a2cf5994def75b6dc2d4e80ef2bed5
-EBUILD ghc-6.10.4.ebuild 10904 RMD160 b06e09b013b58f81a858d2c0a9002644c3bca91a SHA1 8efebdc5f6af3853e6e733fe6dc73392c21d41d7 SHA256 3c849a3e1eadd7565e8e40e220b09b7b16f2227810b9b3bc3abc92f6e7ecb67d
+EBUILD ghc-6.10.4-r1.ebuild 12077 RMD160 c33e1768736414640ed3016ffc5b16ba175580af SHA1 cbd9f0e47cf5a3fa90f8bbff576ff9431bae72e0 SHA256 b3e91259fc9ae2cc694abbb0fb8a02e1cd60cacd9b25333e34078de3ae7d9c2a
EBUILD ghc-6.12.1.ebuild 11580 RMD160 f46eb36df08807fd5fb3d2e57eafde0f426c39f2 SHA1 479a43cd181f40cff1419f946e61294a0830302b SHA256 263225b989efd251dd660eefbeff6ca34c1464dc30610d329e6218f68104b2c1
-EBUILD ghc-6.12.3.ebuild 12651 RMD160 90a35f631958361ddcace9c69102231442f708b3 SHA1 b297adb26fd5597c69f864ff9f2f43ddabdc960e SHA256 0d9317882a1221480414dcee83da3f251a936671777d0d530449b0d205577a13
+EBUILD ghc-6.12.3.ebuild 12896 RMD160 ee11bd65a5cb3c7515a09d6254769cb0819bb0f1 SHA1 bb35df198a705f67acfd29d253e9f32037419c01 SHA256 d25c2863259a328f54453d639fdfad724101cc98eee83e086cf283b533e6285e
EBUILD ghc-6.2.2.ebuild 10387 RMD160 3f30eb547a048ae8a911831d6b6ac04528f7bbcf SHA1 c08282a3a2e60cfb8f742fbb8607ae1819ca3be8 SHA256 201ce669c29ee075e24f03e9abd0510aa172e000e240fadcf89c096004789935
EBUILD ghc-6.4.2.ebuild 13488 RMD160 6aee6876535e79ac3cb3ab8ee3ed8718dd87eb14 SHA1 cff66990f5645f19f58c9dba239a723c1fa03cac SHA256 662fadc150d79ef9d666f76153278ce9a76ebef6f64b5d82a13a53d2c41c8ba5
EBUILD ghc-6.6.1.ebuild 12113 RMD160 e0913733eb047f13f78bdec1fa202a5c312c2526 SHA1 dd10dda46adae7dadefda6fe5140002d521688f1 SHA256 14e013e3348c8d962776b2ecab2ce6b4a2b1ff0cfbbb007811dfc529df30ca55
EBUILD ghc-6.6.ebuild 10758 RMD160 bbed00228fd200da1a2eab05b1ceafaaf3e50610 SHA1 d6766e84f761637444950ae0ffdfdba9e5aa6c65 SHA256 3939b0a97602cc8ff2227a6afb9aa785cfd11bbb64ec30849f20b0ba0cd2eb29
EBUILD ghc-6.8.2-r1.ebuild 8929 RMD160 850372ce4198549dd1b9e3cbc7c8d430ba2b1cb5 SHA1 aa4eaaeebe6195deebc9ddb8db7d69d9eac036d0 SHA256 5ea452a3773b3cacd87ff6a04aa547cec7a9654c57580b9c0de2430a27e479f5
EBUILD ghc-6.8.2.ebuild 8981 RMD160 85a32ec3ec9ebc1f2651c2a3aa86e374999dca87 SHA1 d01d8503d7668465b5f5d6151145297239e96c76 SHA256 57f147cd2177a1a279d406a0a93f4fac9c7b2c631fe91ab57b3903513de53da7
-MISC ChangeLog 31663 RMD160 82a9782fd1bcbb3c3ddd8d6dde8c17f170916993 SHA1 edfe692c001513b626b966f86bf8b407e574da5c SHA256 b868c3498623f1d92108284060adfba923fccf9b313dc2485b21438829b346c7
+MISC ChangeLog 32032 RMD160 12f3a812da570426bffaba7fdba66aeb9aab9bbf SHA1 dca0a57166a5b905f2ae5cde49742148afe53d6b SHA256 abe9760c3e01407c6ea76a91d19937947cd573027a3df2a3d21edc8011f12e9b
MISC metadata.xml 442 RMD160 9cfa0af9084477c8a70ecf0ac3fb3093ae0cd602 SHA1 be2833090f093ac1c8fc2f5c6f3f253bdbdd6b96 SHA256 2bacbdfcaea11289949a687626f59f99af8fda9ec495b2c349ce5898d9f0dcd4
--- /dev/null
+diff --git a/compiler/typecheck/TcForeign.lhs b/compiler/typecheck/TcForeign.lhs
+index 073ca25..75e42ef 100644
+--- a/compiler/typecheck/TcForeign.lhs
++++ b/compiler/typecheck/TcForeign.lhs
+@@ -30,10 +30,6 @@ import TcEnv
+ import ForeignCall
+ import ErrUtils
+ import Id
+-#if alpha_TARGET_ARCH
+-import Type
+-import SMRep
+-#endif
+ import Name
+ import TcType
+ import DynFlags
+@@ -113,7 +109,6 @@ tcCheckFIType sig_ty arg_tys res_ty idecl@(CImport cconv safety _ CWrapper) = do
+ [arg1_ty] -> do checkForeignArgs isFFIExternalTy arg1_tys
+ checkForeignRes nonIOok isFFIExportResultTy res1_ty
+ checkForeignRes mustBeIO isFFIDynResultTy res_ty
+- checkFEDArgs arg1_tys
+ where
+ (arg1_tys, res1_ty) = tcSplitFunTys arg1_ty
+ _ -> addErrTc (illegalForeignTyErr empty sig_ty)
+@@ -175,31 +170,6 @@ checkMissingAmpersand dflags arg_tys res_ty
+ = return ()
+ \end{code}
+
+-On an Alpha, with foreign export dynamic, due to a giant hack when
+-building adjustor thunks, we only allow 4 integer arguments with
+-foreign export dynamic (i.e., 32 bytes of arguments after padding each
+-argument to a quadword, excluding floating-point arguments).
+-
+-The check is needed for both via-C and native-code routes
+-
+-\begin{code}
+-#include "nativeGen/NCG.h"
+-
+-checkFEDArgs :: [Type] -> TcM ()
+-#if alpha_TARGET_ARCH
+-checkFEDArgs arg_tys
+- = check (integral_args <= 32) err
+- where
+- integral_args = sum [ (widthInBytes . argMachRep . primRepToCgRep) prim_rep
+- | prim_rep <- map typePrimRep arg_tys,
+- primRepHint prim_rep /= FloatHint ]
+- err = ptext (sLit "On Alpha, I can only handle 32 bytes of non-floating-point arguments to foreign export dynamic")
+-#else
+-checkFEDArgs _ = return ()
+-#endif
+-\end{code}
+-
+-
+ %************************************************************************
+ %* *
+ \subsection{Exports}
+diff --git a/mk/config.mk.in b/mk/config.mk.in
+index 7399de0..a9e875c 100644
+--- a/mk/config.mk.in
++++ b/mk/config.mk.in
+@@ -176,7 +176,7 @@ endif
+ # Whether to use libffi for adjustors (foreign import "wrapper") or
+ # not. If we have built-in support (rts/Adjustor.c) then we use that,
+ # otherwise we fall back on libffi, which is slightly slower.
+-ArchHasAdjustorSupport=$(strip $(if $(findstring $(HostArch_CPP),i386 x86_64 alpha powerpc ia64,),YES,NO))
++ArchHasAdjustorSupport=$(strip $(if $(findstring $(HostArch_CPP),i386 x86_64 powerpc ia64,),YES,NO))
+ ifeq "$(ArchHasAdjustorSupport)" "YES"
+ UseLibFFIForAdjustors=NO
+ else
+++ /dev/null
-# 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.10.4.ebuild,v 1.5 2010/07/01 20:27:50 jer 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 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 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 ~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
- 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
-
- # 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
- 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"
-
- # Highly useful when you need to pass your HC opts to bootstrap libs
- # Currently it is needed for ppc64 to build with broken compiler
- epatch "${FILESDIR}/ghc-6.10.4-propagate-hc-options-to-all-libraries.patch"
-
- # see ghc_setup_cflags()
- use ppc64 && epatch "${FILESDIR}/ghc-6.10.4-ppc64-always-minimal-toc.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
-
- # 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,
- # but we have to tell it to build unregisterised on some arches
- # ppc64: EvilMangler currently does not understand some TOCs
- if use alpha || 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
- 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"
-
- 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() {
- # 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"
-}