diff options
author | Lennart Kolmodin <kolmodin@gentoo.org> | 2009-05-06 20:55:17 +0000 |
---|---|---|
committer | Lennart Kolmodin <kolmodin@gentoo.org> | 2009-05-06 20:55:17 +0000 |
commit | f22e68c8c066ff792ab86fba407343e938a50ee9 (patch) | |
tree | d0f3ce40198ca62ebfb36f9871eeb8a5614c4ce8 /dev-haskell/haddock | |
parent | amd64 stable, bug #264594 (diff) | |
download | historical-f22e68c8c066ff792ab86fba407343e938a50ee9.tar.gz historical-f22e68c8c066ff792ab86fba407343e938a50ee9.tar.bz2 historical-f22e68c8c066ff792ab86fba407343e938a50ee9.zip |
Fixes for dev-haskell/haddock
Package-Manager: portage-2.1.6.12/cvs/Linux x86_64
Diffstat (limited to 'dev-haskell/haddock')
-rw-r--r-- | dev-haskell/haddock/ChangeLog | 9 | ||||
-rw-r--r-- | dev-haskell/haddock/Manifest | 12 | ||||
-rw-r--r-- | dev-haskell/haddock/files/haddock-2.4.2-Setup.hs | 72 | ||||
-rw-r--r-- | dev-haskell/haddock/haddock-2.4.2.ebuild | 32 |
4 files changed, 114 insertions, 11 deletions
diff --git a/dev-haskell/haddock/ChangeLog b/dev-haskell/haddock/ChangeLog index 687151fd123f..f49f8127b768 100644 --- a/dev-haskell/haddock/ChangeLog +++ b/dev-haskell/haddock/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-haskell/haddock # Copyright 2000-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-haskell/haddock/ChangeLog,v 1.58 2009/04/26 16:05:27 kolmodin Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-haskell/haddock/ChangeLog,v 1.59 2009/05/06 20:55:17 kolmodin Exp $ + + 06 May 2009; Lennart Kolmodin <kolmodin@gentoo.org> + +files/haddock-2.4.2-Setup.hs, haddock-2.4.2.ebuild: + Hide dependency on filepath and bundle dependency on ghc-paths. + This is to make it easier to install/upgrade haddock when you've just + upgraded/installed ghc-6.10. + Relevant bug #268248. 26 Apr 2009; Lennart Kolmodin <kolmodin@gentoo.org> haddock-0.8.ebuild, haddock-0.9.ebuild: diff --git a/dev-haskell/haddock/Manifest b/dev-haskell/haddock/Manifest index 96a97ea389ff..e1679b5dd4f8 100644 --- a/dev-haskell/haddock/Manifest +++ b/dev-haskell/haddock/Manifest @@ -1,18 +1,20 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 +AUX haddock-2.4.2-Setup.hs 2888 RMD160 6c2a45c69cc4f36cd379a7e94e135b602429ac55 SHA1 4c67796d23bdc72fe829a5cc4a07a2da26ec3c74 SHA256 0b91b924c87a7cd1f430deb47a651af830959fcc7bdae5ee5da6e42a84bade6b +DIST ghc-paths-0.1.0.5.tar.gz 2304 RMD160 098804e5a48ce9381174245601b3896304464219 SHA1 f9a70a8564be268e4aa88436ea18fc84a1ce303a SHA256 ea9e97425894e3dbd7915e00e107e2e7fc07b6e8293fd2dd66a813f0673cba10 DIST haddock-0.8-src.tar.gz 162872 RMD160 80b7a582ea91fb36b97675d7ea8a027221a28b8e SHA1 e171d4446ac6fcef526cad4c688892fe587fe90e SHA256 d54078dd9dc75aa589cb05fbe1136c1fb41d4a346e30b71de948425ea7c05a55 DIST haddock-0.9.tar.gz 163380 RMD160 27685313184e70270d7e4f043c7d671b84acfb23 SHA1 f3c5299b657b170e7a44b66ebd60d3e0947a35aa SHA256 beefd4a6da577978e7a79cabba60970accc5cd48fbb04c424a6b36ace3a9f8d0 DIST haddock-2.4.2.tar.gz 103033 RMD160 18317b3ffd60f2b0925d635ce1ea2ab35825860c SHA1 cd1de409029bcabdf79b05b4c00c7702c836c765 SHA256 dbf0a7d0103a3ce6a91b2a3b96148c1b9c13ea7f8bd74260c21fe98df7839547 EBUILD haddock-0.8.ebuild 1691 RMD160 2275082d63a82cdf2e50b3b35ad3f4b8cc93adee SHA1 3feb6d51b114e201d48f185af86532ce859725fd SHA256 c311f887dff9e748689f969524d8e923735d1026282e95fbe5fe20c8dae2522e EBUILD haddock-0.9.ebuild 1160 RMD160 afbaecefe7e2e5259cb932b1057a254d6ac07ae1 SHA1 18d8b08c71a9de4be90cef743905a783221a37c7 SHA256 3a36527c9f8f772eeb65757e4574c344af79025599edf68cadde0eed6ec4203e -EBUILD haddock-2.4.2.ebuild 1252 RMD160 142dd034d1a7f2ab587e5c57ee78936ac0ee2680 SHA1 c6724bb63ca7b9f852e5b552b96bb90b4cff36d1 SHA256 62068dc37d138c0a9ce6e487f22082549c63ab2d07d84d6145238032fe34ef0e -MISC ChangeLog 7676 RMD160 98055f74874bacfced5cd70ea9ecf8447233a612 SHA1 cc22b4c483f3b0843db9598d3505e139bb4327fe SHA256 a96a3c16893aede000e48a0a43def1e3c95ec73d363602fd61e386a9f0130614 +EBUILD haddock-2.4.2.ebuild 2191 RMD160 7f7fccb16cd1bba1a2485c3785518d8ca63b65cb SHA1 e04cad00cbf7a6fd184adb5a749eaf657b781e41 SHA256 cd8cf3354c316ec63784d60785b115878412adaf4901ff8eaee0def2b829e356 +MISC ChangeLog 7979 RMD160 47643b82f2bff4e4988305f64f6596799c718682 SHA1 a4431ee3c0bd26c5d93b0d605b482e7b0507aa7d SHA256 18b08d57f3afd159dbc7c81ef12d1f318cf1a763473af78c7d37cb25d7445409 MISC metadata.xml 223 RMD160 7783e6057effb8b8f0b79cffe8b557b32c633839 SHA1 7b962c77f2e38479a9d1621ec8d307ca9f761753 SHA256 1d00c8be162a6cb87b3de440b3e63e10b39c12d56e8fbfe592e75aed872b2508 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (GNU/Linux) -iEYEARECAAYFAkn0hlAACgkQ1n/CYbXjntIgmQCeILeo25XMfvS6tz6h+ZBgE3E9 -NesAni3yGUoj1LVB7S2n+d60BvOX1DGb -=TjPd +iEYEARECAAYFAkoB+ToACgkQ1n/CYbXjntLo6QCgq9TwuGW8z0KU/GDPvRa4YIFv +gG0An043lQbFF7QgS9/UbAtxm0a1rWbv +=mkFS -----END PGP SIGNATURE----- diff --git a/dev-haskell/haddock/files/haddock-2.4.2-Setup.hs b/dev-haskell/haddock/files/haddock-2.4.2-Setup.hs new file mode 100644 index 000000000000..31ee04eb8168 --- /dev/null +++ b/dev-haskell/haddock/files/haddock-2.4.2-Setup.hs @@ -0,0 +1,72 @@ +{- +Setup.hs: based on code from ghc-paths of Simon Marlow +Fixed to not use the .buildinfo, and use -Dfoo flags for both libraries and executables +-} +import Distribution.Simple +import Distribution.Simple.Setup +import Distribution.PackageDescription +import Distribution.Simple.LocalBuildInfo +import Distribution.InstalledPackageInfo +import Distribution.Simple.Program +import Distribution.Simple.PackageIndex as Pkg + +import System.Exit +import System.IO +import Data.IORef +import Data.Char +import Data.Maybe + +main = defaultMainWithHooks simpleUserHooks { + confHook = myCustomConfHook + } + where + myCustomConfHook :: (Either GenericPackageDescription PackageDescription, HookedBuildInfo) + -> ConfigFlags + -> IO LocalBuildInfo + myCustomConfHook egpdpdhbi flags = do + -- get the default LBI + lbi <- confHook simpleUserHooks egpdpdhbi flags + let programs = withPrograms lbi + + libdir_ <- rawSystemProgramStdoutConf (fromFlag (configVerbosity flags)) + ghcProgram programs ["--print-libdir"] + let libdir = reverse $ dropWhile isSpace $ reverse libdir_ + + ghc_pkg = case lookupProgram ghcPkgProgram programs of + Just p -> programPath p + Nothing -> error "ghc-pkg was not found" + ghc = case lookupProgram ghcProgram programs of + Just p -> programPath p + Nothing -> error "ghc was not found" + + -- figure out docdir from base's haddock-html field + base_pkg = case searchByName (installedPkgs lbi) "base" of + None -> error "no base package" + Unambiguous (x:_) -> x + _ -> error "base ambiguous" + base_html = case haddockHTMLs base_pkg of + [] -> "" + (x:_) -> x + docdir = fromMaybe base_html $ + fmap reverse (stripPrefix (reverse "/libraries/base") + (reverse base_html)) + + let programs' = userSpecifyArgs "ghc" ["-DGHC_PATHS_GHC_PKG=" ++ show ghc_pkg, + "-DGHC_PATHS_GHC=" ++ show ghc, + "-DGHC_PATHS_LIBDIR=" ++ show libdir, + "-DGHC_PATHS_DOCDIR=" ++ show docdir + ] programs + -- returning our modified LBI that includes the -D definitions + return lbi { withPrograms = programs' } + +die :: String -> IO a +die msg = do + hFlush stdout + hPutStr stderr msg + exitWith (ExitFailure 1) + +stripPrefix :: Eq a => [a] -> [a] -> Maybe [a] +stripPrefix [] ys = Just ys +stripPrefix (x:xs) (y:ys) + | x == y = stripPrefix xs ys +stripPrefix _ _ = Nothing diff --git a/dev-haskell/haddock/haddock-2.4.2.ebuild b/dev-haskell/haddock/haddock-2.4.2.ebuild index 2b1ca28f7404..7d7a328616e2 100644 --- a/dev-haskell/haddock/haddock-2.4.2.ebuild +++ b/dev-haskell/haddock/haddock-2.4.2.ebuild @@ -1,23 +1,34 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-haskell/haddock/haddock-2.4.2.ebuild,v 1.2 2009/04/20 00:08:07 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-haskell/haddock/haddock-2.4.2.ebuild,v 1.3 2009/05/06 20:55:17 kolmodin Exp $ CABAL_FEATURES="bin lib" # don't enable profiling as the 'ghc' package is not built with profiling inherit haskell-cabal autotools +GHCPATHS_PN="ghc-paths" +GHCPATHS_PV="0.1.0.5" +GHCPATHS_P="${GHCPATHS_PN}-${GHCPATHS_PV}" + 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" +SRC_URI="http://hackage.haskell.org/packages/archive/${PN}/${PV}/${P}.tar.gz + http://hackage.haskell.org/packages/archive/${GHCPATHS_PN}/${GHCPATHS_PV}/${GHCPATHS_P}.tar.gz" LICENSE="BSD" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="doc" -RDEPEND="~dev-lang/ghc-6.10.2 - dev-haskell/filepath - dev-haskell/ghc-paths" +# haddock-2.4.2 also deps on the upgradeable package dev-haskell/filepath. +# however, it's included in >=ghc-6.10, so we use the core package without +# stating the dependency in DEPEND. + +# 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.10.2" DEPEND="${RDEPEND} >=dev-haskell/cabal-1.6 doc? ( ~app-text/docbook-xml-dtd-4.2 @@ -27,6 +38,17 @@ DEPEND="${RDEPEND} src_unpack() { unpack ${A} + # use ghc-paths directly, not as a library + sed -e "s|build-depends: ghc-paths|hs-source-dirs: ../${GHCPATHS_P}|" \ + -e "s|Simple|Custom|" \ + -i "${S}/${PN}.cabal" + + # ghc-paths has a custom Setup.hs, haddock has the default Setup.lhs. + # we use a somewhat modified ghc-paths Setup.hs that works better for our + # purposes. + rm "${S}/Setup.lhs" + cp "${FILESDIR}/${P}-Setup.hs" "${S}/Setup.hs" + if use doc; then cd "${S}/doc" eautoreconf |