summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Kolmodin <kolmodin@gentoo.org>2010-01-26 19:59:01 +0000
committerLennart Kolmodin <kolmodin@gentoo.org>2010-01-26 19:59:01 +0000
commitcad5f14f787d353ea1ac63593d25fbf178e76b76 (patch)
treeb2b3da21f7582de8db0e5ebeaab421510e7a8e16 /dev-haskell/haddock
parentVersion bump dev-lang/ghc-6.12.1, currently hard masked. (diff)
downloadgentoo-2-cad5f14f787d353ea1ac63593d25fbf178e76b76.tar.gz
gentoo-2-cad5f14f787d353ea1ac63593d25fbf178e76b76.tar.bz2
gentoo-2-cad5f14f787d353ea1ac63593d25fbf178e76b76.zip
Version bump dev-haskell/haddock-2.6, the version used by ghc-6.12.1.
(Portage version: 2.1.6.13/cvs/Linux x86_64)
Diffstat (limited to 'dev-haskell/haddock')
-rw-r--r--dev-haskell/haddock/ChangeLog9
-rw-r--r--dev-haskell/haddock/files/ghc-paths-1.0.5.0-GHC-Paths.hs13
-rw-r--r--dev-haskell/haddock/haddock-2.6.0.ebuild78
3 files changed, 98 insertions, 2 deletions
diff --git a/dev-haskell/haddock/ChangeLog b/dev-haskell/haddock/ChangeLog
index 1320e0a394d1..6d345f956e1e 100644
--- a/dev-haskell/haddock/ChangeLog
+++ b/dev-haskell/haddock/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-haskell/haddock
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-haskell/haddock/ChangeLog,v 1.66 2009/10/31 13:14:49 kolmodin Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-haskell/haddock/ChangeLog,v 1.67 2010/01/26 19:59:00 kolmodin Exp $
+
+*haddock-2.6.0 (26 Jan 2010)
+
+ 26 Jan 2010; <kolmodin@gentoo.org> +haddock-2.6.0.ebuild:
+ Version bump the haddock version used by ghc 6.12.1.
31 Oct 2009; Lennart Kolmodin <kolmodin@gentoo.org> haddock-2.4.2.ebuild:
Add keywords tested in the overlay.
diff --git a/dev-haskell/haddock/files/ghc-paths-1.0.5.0-GHC-Paths.hs b/dev-haskell/haddock/files/ghc-paths-1.0.5.0-GHC-Paths.hs
new file mode 100644
index 000000000000..c87565d9cd4a
--- /dev/null
+++ b/dev-haskell/haddock/files/ghc-paths-1.0.5.0-GHC-Paths.hs
@@ -0,0 +1,13 @@
+{-# LANGUAGE CPP #-}
+
+module GHC.Paths (
+ ghc, ghc_pkg, libdir, docdir
+ ) where
+
+libdir, docdir, ghc, ghc_pkg :: FilePath
+
+libdir = GHC_PATHS_LIBDIR
+docdir = GHC_PATHS_DOCDIR
+
+ghc = GHC_PATHS_GHC
+ghc_pkg = GHC_PATHS_GHC_PKG
diff --git a/dev-haskell/haddock/haddock-2.6.0.ebuild b/dev-haskell/haddock/haddock-2.6.0.ebuild
new file mode 100644
index 000000000000..ce10c1eef607
--- /dev/null
+++ b/dev-haskell/haddock/haddock-2.6.0.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-haskell/haddock/haddock-2.6.0.ebuild,v 1.1 2010/01/26 19:59:00 kolmodin Exp $
+
+CABAL_FEATURES="bin lib"
+# don't enable profiling as the 'ghc' package is not built with profiling
+inherit haskell-cabal autotools
+
+DESCRIPTION="A documentation-generation tool for Haskell libraries"
+HOMEPAGE="http://www.haskell.org/haddock/"
+SRC_URI="http://hackage.haskell.org/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~sparc ~x86"
+IUSE="doc"
+
+# we bundle the dep on ghc-paths to reduce the dependencies on this critical
+# package. ghc-paths would like to be compiled with USE=doc, which pulls in
+# haddock, which requires ghc-paths, which pulls in haddock...
+
+RDEPEND=">=dev-lang/ghc-6.12"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.6
+ doc? ( ~app-text/docbook-xml-dtd-4.2
+ app-text/docbook-xsl-stylesheets
+ >=dev-libs/libxslt-1.1.2 )"
+
+src_unpack() {
+ unpack ${A}
+
+ # remove dependency on ghc-paths, we include it right into haddock instead
+ sed -e "s|build-depends: ghc-paths|build-depends:|" \
+ -i "${S}/${PN}.cabal"
+
+ # copy of slightly modified version of GHC.Paths
+ mkdir "${S}/src/GHC"
+ cp "${FILESDIR}/ghc-paths-1.0.5.0-GHC-Paths.hs" "${S}/src/GHC/Paths.hs"
+
+ # a few things we need to replace, and example values
+ # GHC_PATHS_LIBDIR /usr/lib64/ghc-6.12.0.20091010
+ # GHC_PATHS_DOCDIR /usr/share/doc/ghc-6.12.0.20091010/html
+ # GHC_PATHS_GHC_PKG /usr/bin/ghc-pkg
+ # GHC_PATHS_GHC /usr/bin/ghc (be careful: GHC_PATHS_GHC is a substring of GHC_PATHS_GHC_PKG)
+
+ # hardcode stuff above:
+ sed \
+ -e "s|GHC_PATHS_LIBDIR|\"$(ghc-libdir)\"|" \
+ -e "s|GHC_PATHS_DOCDIR|\"/usr/share/doc/ghc-$(ghc-version)/html\"|" \
+ -e "s|GHC_PATHS_GHC_PKG|\"$(ghc-getghcpkg)\"|" \
+ -e "s|GHC_PATHS_GHC|\"$(ghc-getghc)\"|" \
+ -i "${S}/src/GHC/Paths.hs"
+
+ if use doc; then
+ cd "${S}/doc"
+ eautoreconf
+ fi
+
+
+}
+
+src_compile () {
+ cabal_src_compile
+ if use doc; then
+ cd "${S}/doc"
+ ./configure --prefix="${D}/usr/" \
+ || die 'error configuring documentation.'
+ emake html || die 'error building documentation.'
+ fi
+}
+
+src_install () {
+ cabal_src_install
+ if use doc; then
+ dohtml -r "${S}/doc/haddock/"*
+ fi
+ dodoc CHANGES README
+}