diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2011-08-03 13:14:54 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2011-08-03 13:14:54 +0000 |
commit | 97966563f0e772f1eeaa495e9e223151b117a624 (patch) | |
tree | 2ceb6a9b4ad0f29fe3c5c98224352c127a73e641 | |
parent | masked dev-lang/ghc[llvm] (diff) | |
download | gentoo-2-97966563f0e772f1eeaa495e9e223151b117a624.tar.gz gentoo-2-97966563f0e772f1eeaa495e9e223151b117a624.tar.bz2 gentoo-2-97966563f0e772f1eeaa495e9e223151b117a624.zip |
Version bump (ghc-7 compatible).
(Portage version: 2.1.10.10/cvs/Linux x86_64)
-rw-r--r-- | dev-haskell/haddock/ChangeLog | 7 | ||||
-rw-r--r-- | dev-haskell/haddock/haddock-2.9.2.ebuild | 74 |
2 files changed, 80 insertions, 1 deletions
diff --git a/dev-haskell/haddock/ChangeLog b/dev-haskell/haddock/ChangeLog index 623308ea81c8..5385d9590981 100644 --- a/dev-haskell/haddock/ChangeLog +++ b/dev-haskell/haddock/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for dev-haskell/haddock # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-haskell/haddock/ChangeLog,v 1.84 2011/06/05 12:20:59 slyfox Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-haskell/haddock/ChangeLog,v 1.85 2011/08/03 13:14:54 slyfox Exp $ + +*haddock-2.9.2 (03 Aug 2011) + + 03 Aug 2011; Sergei Trofimovich <slyfox@gentoo.org> +haddock-2.9.2.ebuild: + Version bump (ghc-7 compatible). 05 Jun 2011; Sergei Trofimovich <slyfox@gentoo.org> -haddock-0.8.ebuild, -haddock-0.9.ebuild, -haddock-2.4.1.ebuild: diff --git a/dev-haskell/haddock/haddock-2.9.2.ebuild b/dev-haskell/haddock/haddock-2.9.2.ebuild new file mode 100644 index 000000000000..4fe67d4d647f --- /dev/null +++ b/dev-haskell/haddock/haddock-2.9.2.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-haskell/haddock/haddock-2.9.2.ebuild,v 1.1 2011/08/03 13:14:54 slyfox Exp $ + +# ebuild generated by hackport 0.2.9 + +# haddock-2.8.{0,1} on hackage does not work with ghc-7. +# this ebuild uses a tarball of what's distributed with ghc-7. + +EAPI="3" + +CABAL_FEATURES="bin lib profile haddock hscolour" +inherit haskell-cabal pax-utils + +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" +# ia64 lost as we don't have ghc-7 there yet +# ppc64 needs to be rekeyworded due to xhtml not being keyworded +KEYWORDS="~alpha ~amd64 -ia64 ~ppc ~sparc ~x86 ~x86-fbsd" +IUSE="" + +RDEPEND="dev-haskell/ghc-paths + =dev-haskell/xhtml-3000.2* + >=dev-lang/ghc-7" +DEPEND="${RDEPEND} + >=dev-haskell/cabal-1.10" + +# although haddock depends on alex and happy to build from scratch, we don't +# want this ebuild to depend on those packages. +# we use haddock to build the documentation enabled by USE="doc". +# alex and happy only build executables, which does not require haddock. +# however, happy depends on mtl which can be build with USE="doc", which would +# create a circular dependency. +# haddock upstream solved this by bundling preprocessed files. +# unfortunately cabal has recently changed which directory it uses for these +# intermediate files and thus the solution does not work anymore. +# to fix this we move those preprocessed files back to the source tree. + +src_prepare() { + for f in Lex Parse; do + rm "src/Haddock/$f."* + mv "dist/build/haddock/haddock-tmp/Haddock/$f.hs" src/Haddock/ + done +} + +src_configure() { + # create a fake haddock executable. it'll set the right version to cabal + # configure, but will eventually get overwritten in src_compile by + # the real executable. + local exe="${S}/dist/build/haddock/haddock" + mkdir -p $(dirname "${exe}") + echo -e "#!/bin/sh\necho Haddock version ${PV}" > "${exe}" + chmod +x "${exe}" + + haskell-cabal_src_configure --with-haddock="${exe}" +} + +src_compile() { + # when building the (recursive..) haddock docs, change the datadir to the + # current directory, as we're using haddock inplace even if it's built to be + # installed into the system first. + haddock_datadir="${S}" haskell-cabal_src_compile +} + +src_install() { + cabal_src_install + # haddock uses GHC-api to process TH source. + # TH requires GHCi which needs mmap('rwx') (bug #299709) + pax-mark -m "${D}/usr/bin/${PN}" +} |