ChangeLog

# ChangeLog for dev-lang/ghc-bin
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc-bin/ChangeLog,v 1.74 2007/12/13 15:59:54 dcoutts Exp $

13 Dec 2007; Duncan Coutts ghc-bin-6.2.2-r1.ebuild,
ghc-bin-6.4.2.ebuild, ghc-bin-6.4.2-r1.ebuild:
Stop providing virtual/ghc. Nothing in portage has depended on it for some
time.

10 Jul 2007; Duncan Coutts -ghc-bin-6.4.1.ebuild,
-ghc-bin-6.4.1-r1.ebuild:
Remove ghc-bin-6.4.1 and -r1. Now that we have 6.4.2, we don't need an older
version on the 6.4.x branch.

10 Jul 2007; Duncan Coutts ghc-bin-6.4.2.ebuild:
Add a binary for ia64, so mark ~ia64.
All supported arches now have a binary for 6.4.2 so we can drop 6.4.1.

06 Jul 2007; Duncan Coutts -ghc-bin-6.6.ebuild:
The ghc-bin ebuild will not be continued. Its function has been merged into
the ghc ebuild as of 6.6. There will be no new versions of this ebuild.

02 Jul 2007; Piotr JaroszyƄski
ghc-bin-6.2.2-r1.ebuild, ghc-bin-6.4.1.ebuild, ghc-bin-6.4.1-r1.ebuild,
ghc-bin-6.4.2.ebuild, ghc-bin-6.4.2-r1.ebuild, ghc-bin-6.6.ebuild:
(QA) RESTRICT clean up.

12 Apr 2007; Lennart Kolmodin ghc-bin-6.2.2-r1.ebuild,
ghc-bin-6.4.1.ebuild, ghc-bin-6.4.1-r1.ebuild, ghc-bin-6.4.2.ebuild,
ghc-bin-6.4.2-r1.ebuild, ghc-bin-6.6.ebuild:
Fixes bug #173884, patch by Andres Loeh .

05 Apr 2007; Chris Parrott ghc-bin-6.6.ebuild:
added ~sparc and ~ppc keywords for new builds

04 Apr 2007; Chris Parrott ghc-bin-6.6.ebuild:
adding ~alpha to ghc-bin-6.6

*ghc-bin-6.4.2-r1 (29 Mar 2007)

29 Mar 2007; Markus Rothe +ghc-bin-6.4.2-r1.ebuild:
Added new revision with a new binary tarball of ghc to fix gcc 4 issues on
ppc64; bug #145466

*ghc-bin-6.6 (16 Mar 2007)

16 Mar 2007; Lennart Kolmodin +ghc-bin-6.6.ebuild:
Version bump to 6.6

28 Aug 2006; Jeroen Roovers ghc-bin-6.4.2.ebuild:
Stable for HPPA (bug #140369).

25 Aug 2006; Gustavo Zacarias ghc-bin-6.4.2.ebuild:
Adding a self-built 6.4.2 for hppa and keywording

21 Aug 2006; Daniel Gryniewicz ghc-bin-6.4.2.ebuild:
Marked stable on amd64 for bug #140369

17 Aug 2006; Gustavo Zacarias ghc-bin-6.4.2.ebuild:
Stable on sparc

16 Aug 2006; Joshua Jackson ghc-bin-6.4.2.ebuild:
stable x86; for ghc as well

23 Jul 2006; Tobias Scherbaum
ghc-bin-6.4.2.ebuild:
ppc stable, bug #140369

20 Jul 2006; Markus Rothe ghc-bin-6.4.2.ebuild:
Stable on ppc64; bug #140369

19 Jul 2006; Duncan Coutts Manifest:
Fix digests. bug #141030

17 Jul 2006; Chris Parrott ghc-bin-6.4.2.ebuild:
added ~alpha to ghc-bin-6.4.2

23 May 2006; Chris Parrott ghc-bin-6.4.2.ebuild:
Added binaries for pcp and ppc64.

22 May 2006; Duncan Coutts ghc-bin-6.4.2.ebuild:
Added binaries for x86, amd64 and sparc.

21 May 2006; Markus Rothe ghc-bin-6.4.1.ebuild:
Stable on ppc64

19 May 2006; Chris Parrott ghc-bin-6.4.1-r1.ebuild,
ghc-bin-6.4.2.ebuild:
Added comments to ebuild, warning hardened gcc users that ghc
will break when switching from vanilla gcc to hardened gcc
unless the user reemerges ghc after making the switch.

18 May 2006; Duncan Coutts ghc-bin-6.4.1-r1.ebuild,
ghc-bin-6.4.2.ebuild:
Generate a ghc wrapper script with the correct GHC_CFLAGS at install time.
Tidy up the unpack/compile/install phases. Add all the arches that are in
the KEYWORDS in 6.4.1 to the KEYWORDS in 6.4.1-r1.

*ghc-bin-6.4.2 (03 May 2006)

03 May 2006; Duncan Coutts +ghc-bin-6.4.2.ebuild:
New version. Initially with a binary for x86-fbsd.

27 Mar 2006; Duncan Coutts -ghc-bin-6.4.ebuild:
Remove 6.4 since 6.4.1 has been about for ages and is now stable on most arches

*ghc-bin-6.4.1-r1 (26 Mar 2006)

26 Mar 2006; Duncan Coutts +ghc-bin-6.4.1-r1.ebuild:
Added ia64 binary. Currently the new rev bump is only for ia64.
Removed hacks that were needed to support older binary builds.

23 Mar 2006; Chris White ghc-bin-6.4.1.ebuild:
Marked ghc-bin-6.4.1 amd64/x86 stable for bug #126134.

21 Mar 2006; Gustavo Zacarias ghc-bin-6.4.1.ebuild:
Stable on sparc wrt #126134

20 Mar 2006; ghc-bin-6.4.1.ebuild:
Stable on ppc. Bug #126134

13 Mar 2006; Duncan Coutts +files/ghc-updater,
ghc-bin-6.4.1.ebuild:
Re-register packages on reinstall. Include an updated ghc-updater script and
print a message after installation suggesting users run it if they have
upgraded ghc-bin or switched from ghc.

13 Mar 2006; Jeroen Roovers ghc-bin-6.4.1.ebuild:
Marked ~hppa (bug #125389).

11 Mar 2006; Duncan Coutts ghc-bin-6.4.1.ebuild:
Fix paths in hsc2hs and ghcprof wrapper scripts.

11 Mar 2006; Duncan Coutts ghc-bin-6.4.1.ebuild:
Relocate paths only in the scripts that need relocating. Use /bin/bash
rather than /bin/sh for the driver scripts. Add a fix to set the CFLAGS
in the ghc driver script correctly. Other minor tidy-ups.

01 Mar 2006; Markus Rothe ghc-bin-6.4.1.ebuild:
Added ~ppc64; bug #88362

24 Feb 2006; ghc-bin-6.4.1.ebuild:
Path fix for arches which use lib64 such as amd64 and ppc64.
(Thanks to cparrott for diagnosing the problem, see also bug #88362)

18 Feb 2006; Luca Barbato ghc-bin-6.4.1.ebuild:
Added ppc binary

17 Feb 2006; ghc-bin-6.4.1.ebuild:
Added ~amd64.

10 Feb 2006; -ghc-bin-5.04.3.ebuild:
Remove the last of the versions in the ancient ghc-5.x series.

10 Feb 2006; ghc-bin-6.4.1.ebuild:
Marked ~alpha with permission of ferdy.
(porting effort and binary build thanks to ferdy)

09 Feb 2006; Luca Barbato ghc-bin-6.2.2-r1.ebuild:
Marked ppc

*ghc-bin-6.4.1 (12 Dec 2005)

12 Dec 2005; +ghc-bin-6.4.1.ebuild:
Added a first x86 and sparc binary for ghc-6.4.1. Hopefully amd64, ppc and
ppc64 will follow.

01 Sep 2005; Gustavo Zacarias
ghc-bin-6.2.2-r1.ebuild:
Stable on sparc

31 Aug 2005; Gustavo Zacarias ghc-bin-6.4.ebuild:
Version 6.4 for ppc this time

31 Aug 2005; Gustavo Zacarias
ghc-bin-6.2.2-r1.ebuild:
Built package for ppc to fix #70617 and #98984

17 Aug 2005; Andres Loeh -ghc-bin-6.0.ebuild,
-ghc-bin-6.2.ebuild, -ghc-bin-6.2.1.ebuild, -ghc-bin-6.2.2.ebuild,
ghc-bin-6.2.2-r1.ebuild:
Marked 6.2.2-r1 stable on x86, and removed old versions.

08 Aug 2005; Markus Rothe ghc-bin-6.4.ebuild:
Updated binary package for ppc64

26 Jul 2005; ghc-bin-6.2.2-r1.ebuild,
ghc-bin-6.4.ebuild:
Added new binary packages that are built against readline-5. Also Added
a missing dependency on >=dev-libs/gmp-4.1.

*ghc-bin-6.2.2-r1 (20 May 2005)

20 May 2005; +ghc-bin-6.2.2-r1.ebuild:
Add a new ghc-bin-6.2.2-r1 ebuild based on the ghc-bin-6.4 "portage tbz2
style" Initially this only covers ~sparc but we'll extend it later to the
other arches.

09 May 2005; Markus Rothe ghc-bin-6.4.ebuild:
Created binary and added ~ppc64 to KEYWORDS - bug #68930

*ghc-bin-6.4 (02 May 2005)

02 May 2005; Andres Loeh +ghc-bin-6.4.ebuild:
Added a first x86 binary for ghc-6.4. More arches to follow. The binary
version of ghc-6.4 will remain masked as long as dev-lang/ghc-6.4 is masked.

19 Feb 2005; Jason Wever ghc-bin-6.0.ebuild,
ghc-bin-6.2.1.ebuild:
Masked on SPARC.

10 Dec 2004; Chris White ghc-bin-6.2.2.ebuild:
Added arch? based SRC_URI, as ghc-bin will (hopefully) be getting more arches.

03 Nov 2004; Andres Loeh ghc-bin-6.2.1.ebuild:
ghc-pkg was not installed properly for amd64 (#56997)

19 Oct 2004; Andres Loeh ghc-bin-6.2.1.ebuild:
Fix amd64 version to properly install environment file.

*ghc-bin-6.2.2 (18 Oct 2004)

18 Oct 2004; Andres Loeh ghc-bin-6.2.2.ebuild:
Version bump for x86.

*ghc-bin-6.2.1 (17 Oct 2004)

17 Oct 2004; Dylan Carlson +ghc-bin-6.2.1.ebuild:
Version bump for amd64 only (~amd64). Closes #58588.

01 Jul 2004; Jeremy Huddleston
ghc-bin-5.04.3.ebuild, ghc-bin-6.0.ebuild, ghc-bin-6.2.ebuild:
virtual/glibc -> virtual/libc

*ghc-bin-5.04.3 (31 Mar 2004)

31 Mar 2004; Andres Loeh ghc-bin-5.04.3.ebuild:
Re-added ghc-bin-5.04.3 because of ppc.

31 Mar 2004; Andres Loeh ghc-bin-5.04.2-r1.ebuild,
ghc-bin-5.04.2.ebuild, ghc-bin-5.04.3.ebuild, ghc-bin-6.2.ebuild:
Marked 6.2 stable on x86. Removed 5 series.

23 Mar 2004; Matthieu Sozeau ghc-bin-5.04.3.ebuild:
Add ppc keyword.

*ghc-bin-6.2 (17 Dec 2003)

17 Dec 2003; Andres Loeh ghc-bin-6.2.ebuild:
Version bump.

21 Jul 2003; Andres Loeh ghc-bin-5.04.3.ebuild:
ghc 5.04.3 is apparently not available for sparc as binary, changed KEYWORDS
accordingly; added the sparc tarballs to the digests for 5.04.2, 5.04.2-r1,
hopefully fixing bug #24750

02 Jul 2003; Andres Loeh ghc-bin-5.04.3.ebuild,
ghc-bin-6.0.ebuild:
Marked 5.04.3 stable. Fixed installation of documentation (now to
/usr/share/doc/... The hsc2hs wrapper script no longer contains illegal paths.

*ghc-bin-6.0 (12 Jun 2003)

12 Jun 2003; Andres Loeh ghc-bin-6.0.ebuild:
Version bump.

*ghc-bin-5.04.3 (09 May 2003)

09 May 2003; Andres Loeh ghc-bin-5.04.2-r1.ebuild,
ghc-bin-5.04.3.ebuild:
Installs to /opt/ghc/bin now (bug #20185). Updated to version 5.04.3.
Both updates are marked unstable for now.

*ghc-bin-5.04.2-r1 (09 May 2003)

11 Jul 2003; Daniel Ahlberg :
Added missing changelog entry.

*ghc-bin-5.04.2 (21 Mar 2003)

21 Mar 2003; George Shapovalov ghc-bin-5.04.2.ebuild :
created virtual/ghc, added PROVIDE=virtual/ghc to the ebuild to make dev-lang/ghc bootstrap correctly
and without unnecessary steps (#10155)

11 Feb 2003; George Shapovalov ChangeLog, ghc-bin-5.04.2.ebuild :
modified ebuild to add sparc support (sparc people, please test!)
fixups to wrapper scripts

14 Dec 2002; George Shapovalov ChangeLog, ghc-bin-5.04.2.ebuild, files/digest-ghc-bin-5.04.2 :
initial release
Glasgow Haskell Compiler - binary package, prebuilt for i386

ghc has been quite a mess as well as a long and resurce-hungry compile.
This is a first step towards sorting things out. This is the binary installation of ghc, currently
for x86 only. It can be used to bootstrap ghc build from source. In fact it is *necessary* to use this
binary version to bootstrap ghc on >=gcc-3.2 systems. The old 4.08 ->5.04 way of bootstrapping fails
with gcc-3.2.

Manifest

AUX 10ghc 40 RMD160 1c9e367fa4ea2fa2d3a046986b066b157964390a SHA1 33486a4907e8140f4d919813df4ef4e6203d6b20 SHA256 86c80e876343456b1a1407365bfc2a441bf4c6ca23d3549d67bd800abd617e2f
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
DIST ghc-bin-6.4.2-alpha.tbz2 30930863 RMD160 f53968b2b9329dd4ffb15dfb64c3e7748e7fcfc2 SHA1 2915deac0a915d9c317d8781a3179041daa235c9 SHA256 8668d6b4d28a6567fb17665d41784c61576cabf6d80cf47c8b66d1f3f4178a3b
DIST ghc-bin-6.4.2-amd64.tbz2 18554509 RMD160 f4b9ee0041d2a005a1d2d98290dc89eb120c5939 SHA1 d134942591fdfb17bd1b8e010220ea1086e85aca SHA256 8466a5f017a09d5bee2bd4f28cb0fa690cd2bf0f6c9fedd892624c7f1096d214
DIST ghc-bin-6.4.2-hppa.tbz2 33914952 RMD160 c20d9a783abcfdda1a69b63e941c9f5c1fd587a0 SHA1 99a83e7c3bf5a6e7dec450ddd8a565d39803921d SHA256 6c036e313b4d67ab4940e62a3719589c5e94591ac8fe96ed595796876dd4bd88
DIST ghc-bin-6.4.2-ia64.tbz2 28944776 RMD160 85f9a3f09e9f319cea0c8a253fdb03885ff7f13e SHA1 8124cb8b39c6e11c8373dfb0289c337617bc8f11 SHA256 7ac02b0277bbbc92aea4de150404ebf5b12445db197b08573446cad901638f12
DIST ghc-bin-6.4.2-ppc.tbz2 22994932 RMD160 3ee3b26a1b98ceb085a2ca12e9e9e791c245ba86 SHA1 747ee3f204389c68e7c66d20ce2d535e2992ab20 SHA256 1239845ddaafe0bbfe8e24a13a6a7a7ba4462f313227e28d47beb644e876979c
DIST ghc-bin-6.4.2-ppc64.tbz2 28817831 RMD160 98f4e0800233d0b75c519be26b77fd2455fa167d SHA1 d216e5c03d7cce7e3a109b754cde6c85596c4d68 SHA256 788a4c4e5730afd921bfe2c84c894b4190422a5d9e6d18d135de92976446d40a
DIST ghc-bin-6.4.2-r1-ppc64.tbz2 28803955 RMD160 0bba1bbfae87722e2abab57fc7ad3e01b6e2be26 SHA1 2f874c2fe2ddb49a174779c5f4b3d3bd3ccb731f SHA256 2502afb688468ea8f54ff076da8c0d33bd2508fb22996a9ae3e4a78fd9c2bc92
DIST ghc-bin-6.4.2-sparc.tbz2 22175545 RMD160 fa8fa8d85a167db895ea74b9ce40590ceae503ab SHA1 0dd7de97eaadf548d152300a131629371648a8aa SHA256 c95edaff53778edcfd275e41f70cadc2fd7e83c058b5d09e2a44081ae1c29d30
DIST ghc-bin-6.4.2-x86-fbsd.tbz2 19091807 RMD160 6071878b02b87066f8937b671d6414330a41a841 SHA1 9f3a66fcfe872980d073e5f6cb309dcee1a7d2cb SHA256 f2a397d233a491ab65ab43223e7657f7fc47311413e168bcd6a735e705c1acf3
DIST ghc-bin-6.4.2-x86.tbz2 19367589 RMD160 5d3ad1b92c3785db1090799ee6da6182a4771248 SHA1 71876713bbe4cbd335ac50118c9c50219e02d2a5 SHA256 9628c3d3ca3c095c5c423cffb0d0daf801e518f6d6ace17c032c6ca6d5e3e24c
EBUILD ghc-bin-6.2.2-r1.ebuild 991 RMD160 43d3bb1915e248980a6e3a4e04df6ea0fdf8356e SHA1 37f610017cb73fff65c2c2b0f51ffc4138a93175 SHA256 a549d1b69dc3faeed8d4642639fa25891c1e38a67e227cd4de66a89b0085369b
EBUILD ghc-bin-6.4.2-r1.ebuild 4269 RMD160 775ac5af02fc2df4f62165830566ad9fffab4bcb SHA1 aaf5992e93cf658167326d598f5196d9d5df19ea SHA256 fd0b865c88b09c23032ebd7be4dbbb5ff84af42b59f5b2467d625d0b6c835f86
EBUILD ghc-bin-6.4.2.ebuild 4685 RMD160 a181fe78bff105d1efbc859569dbcd75c1c3e39d SHA1 9aa524ea95feea162980dcdb894ac2368d8f1e82 SHA256 6d6ade2ab26e2e48d423290e3152d6020420ead59c7a69f330fff66459cee596
MISC ChangeLog 11662 RMD160 ad5ed4bdc142b23366cf55a37871fd1fae91a1c4 SHA1 b7e1e4506662c332a328d8cd47df877518314d60 SHA256 85dd9aa95b90d574fc3c287fa8b8cf90fbca2a83b8000f5d1cd44a1baff07798
MISC metadata.xml 223 RMD160 7783e6057effb8b8f0b79cffe8b557b32c633839 SHA1 7b962c77f2e38479a9d1621ec8d307ca9f761753 SHA256 1d00c8be162a6cb87b3de440b3e63e10b39c12d56e8fbfe592e75aed872b2508

files

ghc-bin-6.2.2-r1.ebuild

# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc-bin/ghc-bin-6.2.2-r1.ebuild,v 1.9 2007/12/13 15:59:54 dcoutts Exp $

IUSE="" # use the non-binary version if you want to have more choice

DESCRIPTION="Glasgow Haskell Compiler"
# list all arches for proper digest building:
SRC_URI="x86? ( mirror://gentoo/${P}-r1-x86.tbz2 )
ppc? ( mirror://gentoo/${P}-r1-ppc.tbz2 )
sparc? ( mirror://gentoo/${P}-r1-sparc.tbz2 )"
HOMEPAGE="http://www.haskell.org/ghc/"

LICENSE="as-is"
KEYWORDS="-alpha -amd64 ppc sparc x86"
SLOT="0"

RESTRICT="strip" # already stripped

LOC="/opt/ghc"

DEPEND=""
RDEPEND=">=dev-lang/perl-5.6.1
>=sys-devel/gcc-2.95.3
>=dev-libs/gmp-4.1
=sys-libs/readline-5*"

S="${WORKDIR}"

src_compile() {
sed -i "s|/usr|${LOC}|g" usr/bin/* usr/lib/ghc-${PV}/package.conf
mkdir -p ./${LOC}
mv usr/* ./${LOC}
}

src_install () {
mv * ${D}

doenvd "${FILESDIR}/10ghc"
}

ghc-bin-6.4.2-r1.ebuild

# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc-bin/ghc-bin-6.4.2-r1.ebuild,v 1.4 2007/12/13 15:59:54 dcoutts Exp $

# Note to users of hardened gcc-3.x:
#
# If you emerge ghc-bin with hardened gcc it should work fine (because
# we turn off the hardened features that would otherwise break ghc).
# However, emerging ghc-bin 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-bin (or ghc). 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-bin (or ghc). People using vanilla gcc can switch between
# gcc-3.x and 4.x with no problems.

inherit base multilib flag-o-matic toolchain-funcs ghc-package

DESCRIPTION="Glasgow Haskell Compiler"
HOMEPAGE="http://www.haskell.org/ghc/"
# list all arches for proper digest building:
SRC_URI="ppc64? ( mirror://gentoo/${P}-r1-ppc64.tbz2 )"

LICENSE="as-is"
KEYWORDS="ppc64"
SLOT="0"
IUSE="" # use the non-binary version if you want to have more choice

RESTRICT="strip" # already stripped

LOC="/opt/ghc"

DEPEND=""
RDEPEND=">=dev-lang/perl-5.6.1
>=sys-devel/gcc-2.95.3
>=dev-libs/gmp-4.1
=sys-libs/readline-5*"

S="${WORKDIR}"

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/bash'
echo "GHCBIN=\"${LOC}/$(get_libdir)/ghc-$1/ghc-$1\";"
echo "TOPDIROPT=\"-B${LOC}/$(get_libdir)/ghc-$1\";"
echo "GHC_CFLAGS=\"${GHC_CFLAGS}\";"
echo '# Mini-driver for GHC'
echo 'exec $GHCBIN $TOPDIROPT $GHC_CFLAGS ${1+"$@"}'
}

src_unpack() {
base_src_unpack

# Setup the ghc wrapper script
ghc_setup_cflags
ghc_setup_wrapper ${PV} > "${S}/usr/bin/ghc-${PV}"

# Relocate from /usr to /opt/ghc
sed -i -e "s|/usr|${LOC}|g" \
"${S}/usr/bin/ghci-${PV}" \
"${S}/usr/bin/ghc-pkg-${PV}" \
"${S}/usr/bin/hsc2hs" \
"${S}/usr/$(get_libdir)/ghc-${PV}/package.conf"

sed -i -e "s|/usr/$(get_libdir)|${LOC}/$(get_libdir)|" \
"${S}/usr/bin/ghcprof"
}

src_compile() {
true
}

src_install () {
mkdir "${D}/opt"
mv "${S}/usr" "${D}/opt/ghc"

doenvd "${FILESDIR}/10ghc"
}

pkg_postinst () {
ghc-reregister
ewarn "IMPORTANT:"
ewarn "If you have upgraded from another version of ghc-bin or"
ewarn "if you have switched from ghc to ghc-bin, please run:"
ewarn " /opt/ghc/sbin/ghc-updater"
ewarn "to re-merge all ghc-based Haskell libraries."
}

ghc-bin-6.4.2.ebuild

# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc-bin/ghc-bin-6.4.2.ebuild,v 1.17 2007/12/13 15:59:54 dcoutts Exp $

# Note to users of hardened gcc-3.x:
#
# If you emerge ghc-bin with hardened gcc it should work fine (because
# we turn off the hardened features that would otherwise break ghc).
# However, emerging ghc-bin 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-bin (or ghc). 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-bin (or ghc). People using vanilla gcc can switch between
# gcc-3.x and 4.x with no problems.

inherit base multilib flag-o-matic toolchain-funcs ghc-package

DESCRIPTION="Glasgow Haskell Compiler"
HOMEPAGE="http://www.haskell.org/ghc/"
# list all arches for proper digest building:
SRC_URI="alpha? ( mirror://gentoo/${P}-alpha.tbz2 )
amd64? ( mirror://gentoo/${P}-amd64.tbz2 )
hppa? ( mirror://gentoo/${P}-hppa.tbz2 )
ia64? ( mirror://gentoo/${P}-ia64.tbz2 )
ppc? ( mirror://gentoo/${P}-ppc.tbz2 )
ppc64? ( mirror://gentoo/${P}-ppc64.tbz2 )
sparc? ( mirror://gentoo/${P}-sparc.tbz2 )
x86? ( mirror://gentoo/${P}-x86.tbz2 )
x86-fbsd? ( mirror://gentoo/${P}-x86-fbsd.tbz2 )"

LICENSE="as-is"
KEYWORDS="-* ~alpha amd64 hppa ~ia64 ppc ppc64 sparc x86 ~x86-fbsd"
SLOT="0"
IUSE="" # use the non-binary version if you want to have more choice

RESTRICT="strip" # already stripped

LOC="/opt/ghc"

DEPEND=""
RDEPEND=">=dev-lang/perl-5.6.1
>=sys-devel/gcc-2.95.3
>=dev-libs/gmp-4.1
=sys-libs/readline-5*"

S="${WORKDIR}"

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/bash'
echo "GHCBIN=\"${LOC}/$(get_libdir)/ghc-$1/ghc-$1\";"
echo "TOPDIROPT=\"-B${LOC}/$(get_libdir)/ghc-$1\";"
echo "GHC_CFLAGS=\"${GHC_CFLAGS}\";"
echo '# Mini-driver for GHC'
echo 'exec $GHCBIN $TOPDIROPT $GHC_CFLAGS ${1+"$@"}'
}

src_unpack() {
base_src_unpack

# Setup the ghc wrapper script
ghc_setup_cflags
ghc_setup_wrapper ${PV} > "${S}/usr/bin/ghc-${PV}"

# Relocate from /usr to /opt/ghc
sed -i -e "s|/usr|${LOC}|g" \
"${S}/usr/bin/ghci-${PV}" \
"${S}/usr/bin/ghc-pkg-${PV}" \
"${S}/usr/bin/hsc2hs" \
"${S}/usr/$(get_libdir)/ghc-${PV}/package.conf"

sed -i -e "s|/usr/$(get_libdir)|${LOC}/$(get_libdir)|" \
"${S}/usr/bin/ghcprof"
}

src_compile() {
true
}

src_install () {
mkdir "${D}/opt"
mv "${S}/usr" "${D}/opt/ghc"

doenvd "${FILESDIR}/10ghc"
}

pkg_postinst () {
ghc-reregister
ewarn "IMPORTANT:"
ewarn "If you have upgraded from another version of ghc-bin or"
ewarn "if you have switched from ghc to ghc-bin, please run:"
ewarn " /opt/ghc/sbin/ghc-updater"
ewarn "to re-merge all ghc-based Haskell libraries."
}

metadata.xml




haskell

haskell@gentoo.org