Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 222117 Details for
Bug 302489
dev-haskell/haddock-2.4.2 fails to build
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Alternate setup file
haddock-2.4.2-Setup.hs (text/plain), 2.79 KB, created by
Arnaud de Grandmaison
on 2010-03-04 22:05:47 UTC
(
hide
)
Description:
Alternate setup file
Filename:
MIME Type:
Creator:
Arnaud de Grandmaison
Created:
2010-03-04 22:05:47 UTC
Size:
2.79 KB
patch
obsolete
>{- >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 :: (GenericPackageDescription, 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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 302489
: 222117