summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Loeh <kosmikus@gentoo.org>2003-12-17 17:58:42 +0000
committerAndres Loeh <kosmikus@gentoo.org>2003-12-17 17:58:42 +0000
commit196070d41a3803e5f85875517f0fa045e13d0622 (patch)
treef25a3ddb6cf0bc7c566a2426a17f02ce15907757 /dev-lang/ghc
parentremoved some old versions; fixed 6.0.1 for haddock-0.6; added new ebuild for 6.2 (diff)
downloadgentoo-2-196070d41a3803e5f85875517f0fa045e13d0622.tar.gz
gentoo-2-196070d41a3803e5f85875517f0fa045e13d0622.tar.bz2
gentoo-2-196070d41a3803e5f85875517f0fa045e13d0622.zip
removed some old versions; fixed 6.0.1 for haddock-0.6; added new ebuild for 6.2
Diffstat (limited to 'dev-lang/ghc')
-rw-r--r--dev-lang/ghc/ChangeLog12
-rw-r--r--dev-lang/ghc/Manifest18
-rw-r--r--dev-lang/ghc/files/digest-ghc-5.02.33
-rw-r--r--dev-lang/ghc/files/digest-ghc-5.043
-rw-r--r--dev-lang/ghc/files/digest-ghc-5.04.21
-rw-r--r--dev-lang/ghc/files/digest-ghc-6.21
-rw-r--r--dev-lang/ghc/files/ghc-4.08.2-gentoo.patch.bz2bin640 -> 0 bytes
-rw-r--r--dev-lang/ghc/files/ghc-5.02.3-gentoo.patch.bz2bin14489 -> 0 bytes
-rw-r--r--dev-lang/ghc/files/ghc-5.04-gentoo.patch.bz2bin68891 -> 0 bytes
-rw-r--r--dev-lang/ghc/files/ghc-6.0.1.haddock.patch13
-rw-r--r--dev-lang/ghc/files/ghc-6.2.documentation.patch16
-rw-r--r--dev-lang/ghc/ghc-5.02.3.ebuild295
-rw-r--r--dev-lang/ghc/ghc-5.04.ebuild269
-rw-r--r--dev-lang/ghc/ghc-6.0.1.ebuild5
-rw-r--r--dev-lang/ghc/ghc-6.2.ebuild (renamed from dev-lang/ghc/ghc-5.04.2.ebuild)145
15 files changed, 120 insertions, 661 deletions
diff --git a/dev-lang/ghc/ChangeLog b/dev-lang/ghc/ChangeLog
index 4d32cd522e3c..17bee0b3269b 100644
--- a/dev-lang/ghc/ChangeLog
+++ b/dev-lang/ghc/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for dev-lang/ghc
# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ChangeLog,v 1.22 2003/11/11 19:42:36 pappy Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ChangeLog,v 1.23 2003/12/17 17:58:09 kosmikus Exp $
+
+*ghc-6.2 (17 Dec 2003)
+
+ 17 Dec 2003; Andres Loeh <kosmikus@gentoo.org> ghc-6.2.ebuild,
+ files/ghc-6.2.documentation.patch:
+ New GHC version 6.2.
+
+ 17 Dec 2003: Andres Loeh <kosmikus@gentoo.org> ghc-6.0.1.ebuild,
+ files/ghc-6.0.1.haddock.patch:
+ Added patch needed to compile documentation with haddock-0.6.
11 Nov 2003; Alexander Gabert <pappy@gentoo.org> ghc-5.04.3-r1.ebuild,
ghc-6.0.1.ebuild:
diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index e412ca58a9bb..3626d10655e8 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -1,26 +1,16 @@
MD5 53cadcab720c08f0d03fced644adc7ce ghc-5.04.3.ebuild 4536
-MD5 48fd50e9ca259cd92072ceb9cb27d6f5 ghc-5.04.3-r1.ebuild 7369
-MD5 6c6a8a53a1d8079dc9b280bd7481fc55 ghc-5.04.ebuild 6945
+MD5 70fd3ed422514576f84000daa3c1313b ghc-5.04.3-r1.ebuild 7365
MD5 e6cb655b6e491861cde72bf8695c53eb ghc-6.0.ebuild 4282
-MD5 4e310a2cb7f0093cd85d9a366f2337cc ghc-5.04.2.ebuild 4536
-MD5 42b857369c2e24507f00520e99fdaf5a ghc-5.02.3.ebuild 7646
-MD5 c3416ba4e4b5a9c2286e13c218e8854c ghc-6.2.ebuild 4740
-MD5 821256725488cd83282dd173ef75ea05 ghc-6.0.1.ebuild 4875
-MD5 6ef42efc2e1d14e1932e272208743d79 ghc-5.04.3-r1.ebuild.~1.7.~ 6845
-MD5 854e49c94227ac7f9a1b94a162e2abe3 ChangeLog 5457
+MD5 ca2f0047c9951098426376bc6157b9df ghc-6.2.ebuild 4788
+MD5 eb902d291c43516728dc3b4e00834029 ghc-6.0.1.ebuild 4878
+MD5 fcd91abb52a8aad327cd1bc9f32495be ChangeLog 5775
MD5 a769ecfcd1cdd2d40986627df7dfb249 metadata.xml 224
MD5 9da9270be8ac4d92d6a5c23fd519cc3c files/lndir.c 8050
-MD5 cc8947705ec2b2a685edb4eefddeebc2 files/ghc-5.02.3-gentoo.patch.bz2 14489
-MD5 1c126024044290a2f7e501c0f4415169 files/ghc-5.04-gentoo.patch.bz2 68891
MD5 9c184505ec441675c94d47a3110fa754 files/ghc-6.2.documentation.patch 721
MD5 d4a4184d5dcf525047332f9c68e522f7 files/ghc-5.04.3-r1.patch 2717
-MD5 b5a1b76b1e1f437dcf7b9aa4b1545f40 files/ghc-4.08.2-gentoo.patch.bz2 640
MD5 a20f2d9eabadd7ed4890784b905f857c files/digest-ghc-5.04.3-r1 68
MD5 d417c9e24a826959ad6d921247e43328 files/digest-ghc-6.0.1 67
-MD5 2891bd736d41f4aeea530385ef426d6d files/digest-ghc-5.02.3 207
-MD5 7bf7dff845836a99f4b08d8b230d916f files/digest-ghc-5.04.2 68
MD5 a20f2d9eabadd7ed4890784b905f857c files/digest-ghc-5.04.3 68
MD5 1b6997afc8940a5df3f780897d78ee0a files/digest-ghc-6.0 65
MD5 2e1bd1157c6d47093864b670d6b51a64 files/digest-ghc-6.2 65
MD5 9c15b50bf0b73b7d70a06fd47510a3ef files/ghc-6.0.1.haddock.patch 380
-MD5 199f2676b7f849997c3e45c0c604c4a5 files/digest-ghc-5.04 205
diff --git a/dev-lang/ghc/files/digest-ghc-5.02.3 b/dev-lang/ghc/files/digest-ghc-5.02.3
deleted file mode 100644
index 644249bee14f..000000000000
--- a/dev-lang/ghc/files/digest-ghc-5.02.3
+++ /dev/null
@@ -1,3 +0,0 @@
-MD5 c5199db1c12cc633970dfe920f50244d ghc-4.08.2-src.tar.bz2 2920865
-MD5 d25dd1062b09af699f8361fb35394587 ghc-4.08.2-x86-hc.tar.bz2 3901838
-MD5 b0f4a3865076b6153514c945c63ab300 ghc-5.02.3-src.tar.bz2 4016975
diff --git a/dev-lang/ghc/files/digest-ghc-5.04 b/dev-lang/ghc/files/digest-ghc-5.04
deleted file mode 100644
index 8fed72214c50..000000000000
--- a/dev-lang/ghc/files/digest-ghc-5.04
+++ /dev/null
@@ -1,3 +0,0 @@
-MD5 e2abcdfdc7bc6d6ec46c7f7a57fff819 ghc-5.04-src.tar.bz2 4774830
-MD5 c5199db1c12cc633970dfe920f50244d ghc-4.08.2-src.tar.bz2 2920865
-MD5 d25dd1062b09af699f8361fb35394587 ghc-4.08.2-x86-hc.tar.bz2 3901838
diff --git a/dev-lang/ghc/files/digest-ghc-5.04.2 b/dev-lang/ghc/files/digest-ghc-5.04.2
deleted file mode 100644
index 7f796fa81883..000000000000
--- a/dev-lang/ghc/files/digest-ghc-5.04.2
+++ /dev/null
@@ -1 +0,0 @@
-MD5 90e1a45e272b3f5fc1a42be6c4f959e2 ghc-5.04.2-src.tar.bz2 4737718
diff --git a/dev-lang/ghc/files/digest-ghc-6.2 b/dev-lang/ghc/files/digest-ghc-6.2
new file mode 100644
index 000000000000..a1a0bad1815c
--- /dev/null
+++ b/dev-lang/ghc/files/digest-ghc-6.2
@@ -0,0 +1 @@
+MD5 cc495e263f4384e1d6b38e851bf6eca0 ghc-6.2-src.tar.bz2 5356656
diff --git a/dev-lang/ghc/files/ghc-4.08.2-gentoo.patch.bz2 b/dev-lang/ghc/files/ghc-4.08.2-gentoo.patch.bz2
deleted file mode 100644
index 241ba288ca8f..000000000000
--- a/dev-lang/ghc/files/ghc-4.08.2-gentoo.patch.bz2
+++ /dev/null
Binary files differ
diff --git a/dev-lang/ghc/files/ghc-5.02.3-gentoo.patch.bz2 b/dev-lang/ghc/files/ghc-5.02.3-gentoo.patch.bz2
deleted file mode 100644
index 903d2789eb65..000000000000
--- a/dev-lang/ghc/files/ghc-5.02.3-gentoo.patch.bz2
+++ /dev/null
Binary files differ
diff --git a/dev-lang/ghc/files/ghc-5.04-gentoo.patch.bz2 b/dev-lang/ghc/files/ghc-5.04-gentoo.patch.bz2
deleted file mode 100644
index 5009d603c5aa..000000000000
--- a/dev-lang/ghc/files/ghc-5.04-gentoo.patch.bz2
+++ /dev/null
Binary files differ
diff --git a/dev-lang/ghc/files/ghc-6.0.1.haddock.patch b/dev-lang/ghc/files/ghc-6.0.1.haddock.patch
new file mode 100644
index 000000000000..8473ac313446
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-6.0.1.haddock.patch
@@ -0,0 +1,13 @@
+diff -Naur ghc-6.0.1.orig/libraries/base/Control/Monad.hs ghc-6.0.1/libraries/base/Control/Monad.hs
+--- ghc-6.0.1.orig/libraries/base/Control/Monad.hs 2003-12-16 13:35:44.000000000 +0100
++++ ghc-6.0.1/libraries/base/Control/Monad.hs 2003-12-16 13:36:59.000000000 +0100
+@@ -173,7 +173,9 @@
+
+
+ > foldM f a1 [x1, x2, ..., xm ]
++
+ ==
++
+ > do
+ > a2 <- f a1 x1
+ > a3 <- f a2 x2
diff --git a/dev-lang/ghc/files/ghc-6.2.documentation.patch b/dev-lang/ghc/files/ghc-6.2.documentation.patch
new file mode 100644
index 000000000000..e0d397a4f228
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-6.2.documentation.patch
@@ -0,0 +1,16 @@
+diff -Naur ghc-6.2.orig/mk/package.mk ghc-6.2/mk/package.mk
+--- ghc-6.2.orig/mk/package.mk 2003-12-17 16:26:11.000000000 +0100
++++ ghc-6.2/mk/package.mk 2003-12-17 16:27:21.000000000 +0100
+@@ -237,10 +237,10 @@
+ CLEAN_FILES += $(PACKAGE).haddock
+
+ %.raw-hs : %.lhs
+- $(GHC) $(HC_OPTS) -D__HADDOCK__ -E -cpp $< -o $<.tmp && sed -e 's/^#.*//' <$<.tmp >$@
++ $(HC) $(HC_OPTS) -D__HADDOCK__ -E -cpp $< -o $<.tmp && sed -e 's/^#.*//' <$<.tmp >$@
+
+ %.raw-hs : %.hs
+- $(GHC) $(HC_OPTS) -D__HADDOCK__ -E -cpp $< -o $<.tmp && sed -e 's/^#.*//' <$<.tmp >$@
++ $(HC) $(HC_OPTS) -D__HADDOCK__ -E -cpp $< -o $<.tmp && sed -e 's/^#.*//' <$<.tmp >$@
+
+ install-docs :: $(HTML_DOC)
+ @$(INSTALL_DIR) $(datadir)/html/libraries/$(PACKAGE)
diff --git a/dev-lang/ghc/ghc-5.02.3.ebuild b/dev-lang/ghc/ghc-5.02.3.ebuild
deleted file mode 100644
index 256fad10bc0f..000000000000
--- a/dev-lang/ghc/ghc-5.02.3.ebuild
+++ /dev/null
@@ -1,295 +0,0 @@
-# Copyright 1999-2003 Gentoo Technologies, Inc.
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-5.02.3.ebuild,v 1.14 2003/03/11 21:11:45 seemant Exp $
-
-IUSE="doc tetex opengl"
-
-
-# ebuild for Glorious Glasgow Haskell
-#
-# The build takes as many as three stages:
-#
-# - Stage 1 (may not be required):
-# If no GHC is found installed, we bootstrap an old one from HC files
-# - Stage 2 (may not be required):
-# If the (now) available GHC is of an earlier version than the one
-# we want, we build an extra intermediate one for bootstrapping the
-# final stage. This is necessary because GHCi will only build with
-# a matching version of GHC.
-# - Stage 3:
-# The full and final GHC is built, including HOpenGL (if using
-# opengl), GHCi, and user documentation (if using doc).
-#
-# Set the GHC environment variable to your GHC executable if it's not
-# in your PATH.
-#
-# USE variable summary:
-# opengl - Build HOpenGL (OpenGL binding for Haskell).
-# doc - Build extra documenation from DocBook sources, namely
-# the GHC User's Guide and the hslibs docs. In HTML format.
-# tetex - Build the above docs as PostScript as well.
-#
-# 2002-05-22 Sven Moritz Hallberg <pesco@gmx.de>
-
-inherit base
-
-
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="http://www.haskell.org/ghc/"
-
-LICENSE="as-is"
-SLOT="0"
-KEYWORDS="x86 sparc "
-
-# FIXME: Add USE support for parallel haskell (requires PVM)
-# Get PVM from ftp://ftp.netlib.org/pvm3/
-DEPEND=">=dev-lang/perl-5.6.1
- >=sys-devel/gcc-2.95.3
- >=sys-devel/make-3.79.1
- >=sys-apps/sed-3.02.80
- >=sys-devel/flex-2.5.4a
- doc? ( >=app-text/openjade-1.3.1
- >=app-text/sgml-common-0.6.3
- =app-text/docbook-sgml-dtd-3.1-r1
- >=app-text/docbook-dsssl-stylesheets-1.64
- tetex? ( >=app-text/tetex-1.0.7
- >=app-text/jadetex-3.12 ) )
- opengl? ( virtual/opengl
- virtual/glu
- virtual/glut )"
-
-RDEPEND=">=sys-devel/gcc-2.95.3
- >=dev-lang/perl-5.6.1
- opengl? ( virtual/opengl virtual/glu virtual/glut )"
-
-
-# Settings for the individual stages...
-
-STAGE1_PV="4.08.2"
-STAGE1_S="${WORKDIR}/ghc-${STAGE1_PV}"
-STAGE1_B="${WORKDIR}/stage1-build"
-STAGE1_D="${BUILDDIR}/stage1-image"
-
-# Stage 2 version is ${PV}
-# Stage 2 source is in ${S}
-STAGE2_B="${WORKDIR}/stage2-build"
-STAGE2_D="${BUILDDIR}/stage2-image"
-
-# Stage 3 version is ${PV}
-# Stage 3 source is in ${S}
-STAGE3_B="${WORKDIR}/stage3-build"
-# Stage 3 destination is ${D}
-
-
-# --- What to Build ---
-
-# Try to find an already-running GHC.
-if test -z "${GHC}"; then
- if which_ghc=`which ghc`; then
- GHC="${which_ghc}"
- fi
-fi
-# If none was found, we need to bootstrap from HC files.
-if test -z "${GHC}"; then
- echo It seems you do not have any version of GHC available yet.
- echo I will bootstrap from HC files.
- boot_from_hc=yes
-
- # This is the version of our "base GHC", that is, the one we will use
- # for the first build from Haskell source. It's the stage 1's
- # version if there is no outside GHC, or that one's version
- # otherwise (see else clause below).
- BASE_GHC_VERSION=${STAGE1_PV}
-else
- boot_from_hc=no
- BASE_GHC_VERSION=`"$GHC" --version | sed 's/^.*version //'`
-fi
-
-
-# If the base GHC already has the same version as the one we want
-# to build, stage 2 can be skipped.
-if test x${BASE_GHC_VERSION} = x${PV}; then
- need_stage2=no
-else
- need_stage2=yes
-fi
-
-
-# Determine which source files to download:
-# - We always need the source distribution for the final version.
-# - If bootstrap from HC files is required:
-# - We need the corresponding source distribution.
-# - We need a set of HC files suitable for our architecture.
-
-# List of platforms for which registerised HC files are available.
-HC_PLATS="x86"
-
-SRC_URI="http://www.haskell.org/ghc/dist/${PV}/ghc-${PV}-src.tar.bz2"
-if test x$boot_from_hc = xyes; then
- SRC_URI="$SRC_URI http://www.haskell.org/ghc/dist/${STAGE1_PV}/ghc-${STAGE1_PV}-src.tar.bz2"
-
- # First pick out the ARCH variable from
- # /etc/make.profile/make.defaults .
- arch=`source /etc/make.profile/make.defaults; echo -n $ARCH`
-
- # Try to pick the correct set of HC files for our architecture.
- use_unreg=yes
- for i in $HC_PLATS; do
- if test x$arch = x$i; then
- SRC_URI="$SRC_URI http://www.haskell.org/ghc/dist/${STAGE1_PV}/ghc-${STAGE1_PV}-$i-hc.tar.bz2"
- use_unreg=no
- break
- fi
- done
- if test x$use_unreg = xyes; then
- SRC_URI="$SRC_URI http://www.haskell.org/ghc/dist/${STAGE1_PV}/ghc-${STAGE1_PV}-unreg-hc.tar.bz2"
- fi
-fi
-
-
-# --- Function Entry Points ---
-
-src_unpack() {
- base_src_unpack
-
- if test x$boot_from_hc = xyes; then
- # Patch GHC 4's hc-build script to check for GNU Make's name.
- echo '>>> Patching stage 1 sources.'
- bzcat ${FILESDIR}/ghc-${STAGE1_PV}-gentoo.patch.bz2 | patch -d ${STAGE1_S} -p1 || die
- fi
-
- # Patch GHC 5's configure script to recognize --without-happy
- echo '>>> Patching stage 2/3 sources.'
- bzcat ${FILESDIR}/ghc-${PV}-gentoo.patch.bz2 | patch -d ${S} -p1 || die
-
- # Create our own lndir if none installed.
- local LNDIR
- if which lndir; then
- LNDIR=lndir
- else
- # Current directory should be $WORKDIR.
- echo "You don\'t seem to have lndir available, building my own"
- echo "version..."
- cp ${FILESDIR}/lndir.c . || die
- make lndir || die
- LNDIR=./lndir
- fi
-
- # Create build directories.
- if test x$boot_from_hc = xyes; then
- echo '>>> Creating stage 1 build dir'
- mkdir ${STAGE1_B} || die
- ${LNDIR} ${STAGE1_S} ${STAGE1_B} || die
- fi
- if test x$need_stage2 = xyes; then
- echo '>>> Creating stage 2 build dir'
- mkdir ${STAGE2_B} || die
- ${LNDIR} ${S} ${STAGE2_B} || die
- fi
- echo '>>> Creating stage 3 build dir'
- mkdir ${STAGE3_B} || die
- ${LNDIR} ${S} ${STAGE3_B} || die
-}
-
-src_compile() {
- if test x$boot_from_hc = xyes; then
- echo ">>> Bootstrapping GHC ${STAGE1_PV} from HC files"
- build_stage1 # bootstrap from HC files
- fi
- if test x$need_stage2 = xyes; then
- echo ">>> Bootstrapping intermediate GHC ${PV} using GHC ${BASE_GHC_VERSION}"
- build_stage2 # bootstrap intermediate GHC
- fi
- echo ">>> Building complete GHC ${PV} using GHC ${PV} itself"
- build_stage3 # final build
-}
-
-src_install() {
- pushd ${STAGE3_B} || die
- emake install \
- prefix="${D}/usr" \
- infodir="${D}/usr/share/info" \
- mandir="${D}/usr/share/man" || die
-
- # Documentation
- pushd ghc || die
-
- # Misc
- dodoc README ANNOUNCE LICENSE || die
-
- if use doc; then
- # HTML
- dohtml -r docs/set/set/* || die
- dosym set1.html /usr/share/doc/${PF}/html/index.html || die
-
- # PostScript
- if use tetex; then
- pushd docs/set || die
- docinto ps
- dodoc set.ps || die
- popd
- fi
- fi
-
- # End documentation
- popd
- popd
-}
-
-
-# --- Build Stages ---
-
-build_stage1() {
- pushd "${STAGE1_B}" || die
-
- GMAKE=emake distrib/hc-build \
- --prefix="${STAGE1_D}/usr" \
- --host="${CHOST}" || die
- emake install || die
- GHC=${STAGE1_D}/usr/bin/ghc
-
- popd
-}
-
-build_stage2() {
- pushd "${STAGE2_B}" || die
-
- ./configure \
- --host="${CHOST}" \
- --prefix="${STAGE2_D}/usr" \
- --with-ghc="${GHC}" \
- --without-happy || die
- # I experienced strange failures during the make process when
- # using emake (which sets -j 2 in my (default) config).
- # I hope this will fix that.
- make || die
- emake install || die
- GHC=${STAGE2_D}/usr/bin/ghc
-
- popd
-}
-
-build_stage3() {
- pushd "${STAGE3_B}" || die
-
- local myconf
- use opengl && myconf="--enable-hopengl"
- ./configure \
- --host="${CHOST}" \
- --prefix=/usr \
- --infodir=/usr/share/info \
- --mandir=/usr/share/man \
- --with-ghc="${GHC}" \
- --without-happy \
- ${myconf} || die
- make || die
-
- if use doc; then
- emake html || die
- if use tetex; then
- emake ps || die
- fi
- fi
-
- popd
-}
diff --git a/dev-lang/ghc/ghc-5.04.ebuild b/dev-lang/ghc/ghc-5.04.ebuild
deleted file mode 100644
index 6d7fded8f5d8..000000000000
--- a/dev-lang/ghc/ghc-5.04.ebuild
+++ /dev/null
@@ -1,269 +0,0 @@
-# Copyright 1999-2003 Gentoo Technologies, Inc.
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-5.04.ebuild,v 1.9 2003/09/11 01:08:23 msterret Exp $
-
-IUSE="opengl"
-
-
-# ebuild for Glorious Glasgow Haskell
-#
-# The build takes as many as three stages:
-#
-# - Stage 1 (may not be required):
-# If no GHC is found installed, we bootstrap an old one from HC files
-# - Stage 2 (may not be required):
-# If the (now) available GHC is of an earlier version than the one
-# we want, we build an extra intermediate one for bootstrapping the
-# final stage. This is necessary because GHCi will only build with
-# a matching version of GHC.
-# - Stage 3:
-# The full and final GHC is built, including HOpenGL (if using
-# opengl), and GHCi.
-#
-# Set the GHC environment variable to your GHC executable if it's not
-# in your PATH.
-#
-# USE variable summary:
-# opengl - Build HOpenGL (OpenGL binding for Haskell).
-#
-# 2002-05-22 Sven Moritz Hallberg <pesco@gmx.de>
-
-inherit base
-
-
-DESCRIPTION="The Glasgow Haskell Compiler"
-HOMEPAGE="http://www.haskell.org/ghc/"
-
-LICENSE="as-is"
-SLOT="0"
-KEYWORDS="x86 sparc "
-
-
-# FIXME: Add USE support for parallel haskell (requires PVM)
-# Get PVM from ftp://ftp.netlib.org/pvm3/
-DEPEND="virtual/glibc
- >=dev-lang/perl-5.6.1
- >=sys-devel/gcc-2.95.3
- >=sys-devel/make-3.79.1
- >=sys-apps/sed-3.02.80
- >=sys-devel/flex-2.5.4a
- >=dev-libs/gmp-4.1
- opengl? ( virtual/opengl
- virtual/glu
- virtual/glut )"
-
-RDEPEND="virtual/glibc
- >=sys-devel/gcc-2.95.3
- >=dev-lang/perl-5.6.1
- opengl? ( virtual/opengl virtual/glu virtual/glut )"
-
-
-# Settings for the individual stages...
-
-STAGE1_PV="4.08.2"
-STAGE1_S="${WORKDIR}/ghc-${STAGE1_PV}"
-STAGE1_B="${WORKDIR}/stage1-build"
-STAGE1_D="${BUILDDIR}/stage1-image"
-
-# Stage 2 version is ${PV}
-# Stage 2 source is in ${S}
-STAGE2_B="${WORKDIR}/stage2-build"
-STAGE2_D="${BUILDDIR}/stage2-image"
-
-# Stage 3 version is ${PV}
-# Stage 3 source is in ${S}
-STAGE3_B="${WORKDIR}/stage3-build"
-# Stage 3 destination is ${D}
-
-
-# --- What to Build ---
-
-# Try to find an already-running GHC.
-if test -z "${GHC}"; then
- if which_ghc=`which ghc`; then
- GHC="${which_ghc}"
- fi
-fi
-# If none was found, we need to bootstrap from HC files.
-if test -z "${GHC}"; then
- echo It seems you do not have any version of GHC available yet.
- echo I will bootstrap from HC files.
- boot_from_hc=yes
-
- # This is the version of our "base GHC", that is, the one we will use
- # for the first build from Haskell source. It's the stage 1's
- # version if there is no outside GHC, or that one's version
- # otherwise (see else clause below).
- BASE_GHC_VERSION=${STAGE1_PV}
-else
- boot_from_hc=no
- BASE_GHC_VERSION=`"$GHC" --version | sed 's/^.*version //'`
-fi
-
-
-# If the base GHC already has the same version as the one we want
-# to build, stage 2 can be skipped.
-if test x${BASE_GHC_VERSION} = x${PV}; then
- need_stage2=no
-else
- need_stage2=yes
-fi
-
-
-# Determine which source files to download:
-# - We always need the source distribution for the final version.
-# - If bootstrap from HC files is required:
-# - We need the corresponding source distribution.
-# - We need a set of HC files suitable for our architecture.
-
-# List of platforms for which registerised HC files are available.
-HC_PLATS="x86"
-
-SRC_URI="http://www.haskell.org/ghc/dist/${PV}/ghc-${PV}-src.tar.bz2"
-if test x$boot_from_hc = xyes; then
- SRC_URI="$SRC_URI http://www.haskell.org/ghc/dist/${STAGE1_PV}/ghc-${STAGE1_PV}-src.tar.bz2"
-
- # First pick out the ARCH variable from
- # /etc/make.profile/make.defaults .
- arch=`source /etc/make.profile/make.defaults; echo -n $ARCH`
-
- # Try to pick the correct set of HC files for our architecture.
- use_unreg=yes
- for i in $HC_PLATS; do
- if test x$arch = x$i; then
- SRC_URI="$SRC_URI http://www.haskell.org/ghc/dist/${STAGE1_PV}/ghc-${STAGE1_PV}-$i-hc.tar.bz2"
- use_unreg=no
- break
- fi
- done
- if test x$use_unreg = xyes; then
- SRC_URI="$SRC_URI http://www.haskell.org/ghc/dist/${STAGE1_PV}/ghc-${STAGE1_PV}-unreg-hc.tar.bz2"
- fi
-fi
-
-
-# --- Function Entry Points ---
-
-src_unpack() {
- base_src_unpack
-
- if test x$boot_from_hc = xyes; then
- # Patch GHC 4's hc-build script to check for GNU Make's name.
- echo '>>> Patching stage 1 sources.'
- bzcat ${FILESDIR}/ghc-${STAGE1_PV}-gentoo.patch.bz2 | patch -d ${STAGE1_S} -p1 || die
- fi
-
- # Patch GHC 5's configure script to recognize --without-happy
- echo '>>> Patching stage 2/3 sources.'
- bzcat ${FILESDIR}/ghc-${PV}-gentoo.patch.bz2 | patch -d ${S} -p1 || die
-
- # Create our own lndir if none installed.
- local LNDIR
- if which lndir; then
- LNDIR=lndir
- else
- # Current directory should be $WORKDIR.
- echo "You don\'t seem to have lndir available, building my own"
- echo "version..."
- cp ${FILESDIR}/lndir.c . || die
- make lndir || die
- LNDIR=./lndir
- fi
-
- # Create build directories.
- if test x$boot_from_hc = xyes; then
- echo '>>> Creating stage 1 build dir'
- mkdir ${STAGE1_B} || die
- ${LNDIR} ${STAGE1_S} ${STAGE1_B} || die
- fi
- if test x$need_stage2 = xyes; then
- echo '>>> Creating stage 2 build dir'
- mkdir ${STAGE2_B} || die
- ${LNDIR} ${S} ${STAGE2_B} || die
- fi
- echo '>>> Creating stage 3 build dir'
- mkdir ${STAGE3_B} || die
- ${LNDIR} ${S} ${STAGE3_B} || die
-}
-
-src_compile() {
- if test x$boot_from_hc = xyes; then
- echo ">>> Bootstrapping GHC ${STAGE1_PV} from HC files"
- build_stage1 # bootstrap from HC files
- fi
- if test x$need_stage2 = xyes; then
- echo ">>> Bootstrapping intermediate GHC ${PV} using GHC ${BASE_GHC_VERSION}"
- build_stage2 # bootstrap intermediate GHC
- fi
- echo ">>> Building complete GHC ${PV} using GHC ${PV} itself"
- build_stage3 # final build
-}
-
-src_install() {
- pushd ${STAGE3_B} || die
- make install \
- prefix="${D}/usr" \
- infodir="${D}/usr/share/info" \
- mandir="${D}/usr/share/man" || die
-
- # Documentation
- pushd ghc || die
-
- # Misc
- dodoc README ANNOUNCE LICENSE || die
-
- # End documentation
- popd
- popd
-}
-
-
-# --- Build Stages ---
-
-build_stage1() {
- pushd "${STAGE1_B}" || die
-
- GMAKE=make distrib/hc-build \
- --prefix="${STAGE1_D}/usr" \
- --host="${CHOST}" || die
- make install || die
- GHC=${STAGE1_D}/usr/bin/ghc
-
- popd
-}
-
-build_stage2() {
- pushd "${STAGE2_B}" || die
-
- ./configure \
- --host="${CHOST}" \
- --prefix="${STAGE2_D}/usr" \
- --with-ghc="${GHC}" \
- --without-happy || die
- # I experienced strange failures during the make process when
- # using emake (which sets -j 2 in my (default) config).
- # I hope this will fix that.
- make || die
- make install || die
- GHC=${STAGE2_D}/usr/bin/ghc
-
- popd
-}
-
-build_stage3() {
- pushd "${STAGE3_B}" || die
-
- local myconf
- use opengl && myconf="--enable-hopengl"
- ./configure \
- --host="${CHOST}" \
- --prefix=/usr \
- --infodir=/usr/share/info \
- --mandir=/usr/share/man \
- --with-ghc="${GHC}" \
- --without-happy \
- ${myconf} || die
- make || die
-
- popd
-}
diff --git a/dev-lang/ghc/ghc-6.0.1.ebuild b/dev-lang/ghc/ghc-6.0.1.ebuild
index 704f1f93450f..56136ee98697 100644
--- a/dev-lang/ghc/ghc-6.0.1.ebuild
+++ b/dev-lang/ghc/ghc-6.0.1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.0.1.ebuild,v 1.3 2003/11/11 19:42:36 pappy Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.0.1.ebuild,v 1.4 2003/12/17 17:58:09 kosmikus Exp $
#Some explanation of bootstrap logic:
#
@@ -70,6 +70,9 @@ GHCPATH="${PATH}:/opt/ghc/bin"
src_unpack() {
base_src_unpack
+ # haddock-0.6 cannot parse Control/Monad.hs
+ patch -p0 < ${FILESDIR}/ghc-6.0.1.haddock.patch
+
# fix libraries/OpenGL/Makefile
cd ${S}
pushd libraries/OpenGL
diff --git a/dev-lang/ghc/ghc-5.04.2.ebuild b/dev-lang/ghc/ghc-6.2.ebuild
index e3eb86bf7c63..6b34bfe5622e 100644
--- a/dev-lang/ghc/ghc-5.04.2.ebuild
+++ b/dev-lang/ghc/ghc-6.2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-5.04.2.ebuild,v 1.7 2003/04/06 06:42:25 george Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.2.ebuild,v 1.1 2003/12/17 17:58:09 kosmikus Exp $
#Some explanation of bootstrap logic:
#
@@ -25,7 +25,7 @@
inherit base
-IUSE="opengl"
+IUSE="doc tetex opengl"
DESCRIPTION="The Glasgow Haskell Compiler"
HOMEPAGE="http://www.haskell.org/ghc/"
@@ -34,12 +34,12 @@ SRC_URI="http://www.haskell.org/ghc/dist/${PV}/ghc-${PV}-src.tar.bz2"
LICENSE="as-is"
SLOT="0"
-KEYWORDS="x86 ~sparc -ppc -alpha"
+KEYWORDS="~x86 -ppc -alpha"
PROVIDE="virtual/ghc"
# FIXME: Add USE support for parallel haskell (requires PVM)
-# Get PVM from ftp://ftp.netlib.org/pvm3/
+# Get PVM from ftp://ftp.netlib.org/pvm3/
DEPEND="virtual/ghc
>=dev-lang/perl-5.6.1
>=sys-devel/gcc-2.95.3
@@ -47,6 +47,13 @@ DEPEND="virtual/ghc
>=sys-apps/sed-3.02.80
>=sys-devel/flex-2.5.4a
>=dev-libs/gmp-4.1
+ doc? ( >=app-text/openjade-1.3.1
+ >=app-text/sgml-common-0.6.3
+ =app-text/docbook-sgml-dtd-3.1-r1
+ >=app-text/docbook-dsssl-stylesheets-1.64
+ >=dev-haskell/haddock-0.4
+ tetex? ( >=app-text/tetex-1.0.7
+ >=app-text/jadetex-3.12 ) )
opengl? ( virtual/opengl
virtual/glu
virtual/glut )"
@@ -54,91 +61,76 @@ DEPEND="virtual/ghc
RDEPEND="virtual/glibc
>=sys-devel/gcc-2.95.3
>=dev-lang/perl-5.6.1
+ >=dev-libs/gmp-4.1
opengl? ( virtual/opengl virtual/glu virtual/glut )"
-
-#determine what version of ghc we have around:
-if test -z "${GHC}"; then
- GHC=`which ghc`
-fi
-
-BASE_GHC_VERSION=`"$GHC" --version | sed 's/^.*version //'`
-
-# If the base GHC version matches wanted one we can skip stage1
-if test x${BASE_GHC_VERSION} = x${PV}; then
- need_stage1=no
-else
- need_stage1=yes
-fi
-
-#some vars
-STAGE1_B="${WORKDIR}/stage1-build"
-STAGE2_B="${WORKDIR}/stage2-build"
-STAGE1_D="${BUILDDIR}/stage1-image"
+# extend path to /opt/ghc/bin to guarantee that ghc-bin is found
+GHCPATH="${PATH}:/opt/ghc/bin"
src_unpack() {
base_src_unpack
- # Create our own lndir if none installed.
- local LNDIR
- if which lndir; then
- LNDIR=lndir
- else
- # Current directory should be $WORKDIR.
- echo "You don\'t seem to have lndir available, building my own"
- echo "version..."
- cp ${FILESDIR}/lndir.c . || die
- make lndir || die
- LNDIR=./lndir
- fi
-
- # Create build directories.
- if test x$need_stage1 = xyes; then
- echo '>>> Creating stage 1 build dir'
- mkdir ${STAGE1_B} || die
- ${LNDIR} ${S} ${STAGE1_B} || die
- fi
- echo '>>> Creating stage 2 build dir'
- mkdir ${STAGE2_B} || die
- ${LNDIR} ${S} ${STAGE2_B} || die
-
+ # for documentation generation the new ghc should be used,
+ # not the old one ...
+ patch -p0 < ${FILESDIR}/ghc-6.2.documentation.patch
}
src_compile() {
local myconf
- use opengl && myconf="--enable-hopengl" || myconf="--disable-hopengl"
-
- if test x$need_stage1 = xyes; then
- echo ">>> Bootstrapping intermediate GHC ${PV} using GHC ${BASE_GHC_VERSION}"
-
- pushd "${STAGE1_B}" || die
- ./configure \
- -host="${CHOST}" \
- --prefix="${STAGE1_D}/usr" \
- --with-ghc="${GHC}" \
- --without-happy || die "intermediate stage configure failed"
- #parallel make causes trouble
- make || die "intermediate stage make failed"
- make install || die
- GHC=${STAGE1_D}/usr/bin/ghc
- popd
+ if [ `use opengl` ]; then
+ myconf="--enable-hopengl"
+ fi
+
+ # disable the automatic PIC building which is considered as Prologue Junk by the Haskell Compiler
+ # thanks to Peter Simons for finding this and giving notice on bugs.gentoo.org
+ if has_version "sys-devel/hardened-gcc"
+ then
+ echo "SRC_CC_OPTS+=-yet_exec -yno_propolice" >> mk/build.mk
+ echo "SRC_HC_OPTS+=-optc-yet_exec -optc-yno_propolice" >> mk/build.mk
+ echo "SRC_CC_OPTS+=-yet_exec -yno_propolice" >> mk/build.mk
+ echo "SRC_HC_OPTS+=-optc-yet_exec -optc-yno_propolice" >> mk/build.mk
+ fi
+
+ # unset SGML_CATALOG_FILES because documentation installation
+ # breaks otherwise ...
+ PATH="${GHCPATH}" SGML_CATALOG_FILES="" econf \
+ --enable-threaded-rts ${myconf} || die "econf failed"
+
+ # the build does not seem to work all that
+ # well with parallel make
+ make || die "make failed"
+
+ # if documentation has been requested, build documentation ...
+ if use doc; then
+ make html || die "make html failed"
+ if use tetex; then
+ make ps || die "make ps failed"
+ fi
fi
- pushd "${STAGE2_B}" || die
- econf --enable-threaded-rts --with-ghc="${GHC}" ${myconf}|| die "./configure failed"
- # the build does not seem to work all that
- # well with parallel make
- make || die
- popd
}
src_install () {
- pushd "${STAGE2_B}" || die
- make install \
- prefix="${D}/usr" \
- infodir="${D}/usr/share/info" \
- mandir="${D}/usr/share/man" || die
- popd
+ local mydoc
+
+ # determine what to do with documentation
+ if [ `use doc` ]; then
+ mydoc="html"
+ if [ `use tetex` ]; then
+ mydoc="${mydoc} ps"
+ fi
+ else
+ mydoc=""
+ # needed to prevent haddock from being called
+ echo NO_HADDOCK_DOCS=YES >> mk/build.mk
+ fi
+ echo SGMLDocWays="${mydoc}" >> mk/build.mk
+
+ make install install-docs \
+ prefix="${D}/usr" \
+ datadir="${D}/usr/share/doc/${PF}" \
+ infodir="${D}/usr/share/info" \
+ mandir="${D}/usr/share/man" || die
#need to remove ${D} from ghcprof script
cd ${D}/usr/bin
@@ -151,3 +143,8 @@ src_install () {
dodoc README ANNOUNCE LICENSE VERSION
}
+
+pkg_postinst () {
+ einfo "If you have dev-lang/ghc-bin installed, you might"
+ einfo "want to unmerge it again. It is no longer needed."
+}