Commit 45d278c6 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Copy more of base's hacks into installPackage; *sigh*

parent 1abb3c63
...@@ -42,12 +42,24 @@ doit pref ghcpkg verbosity = ...@@ -42,12 +42,24 @@ doit pref ghcpkg verbosity =
pdFile <- defaultPackageDesc verbosity pdFile <- defaultPackageDesc verbosity
pd <- readPackageDescription verbosity pdFile pd <- readPackageDescription verbosity pdFile
lbi <- getPersistBuildConfig lbi <- getPersistBuildConfig
let -- XXX This is an almighty hack, shadowing the base Setup.hs hack let -- XXX These are almighty hacks, shadowing the base
-- Setup.hs hacks
extraExtraLibs = if pkgName (package pd) == "base"
then ["wsock32", "msvcrt", "kernel32",
"user32", "shell32"]
else []
lib' = case library pd of lib' = case library pd of
Just lib -> Just lib ->
lib { let ems = filter (("GHC.Prim" /=))
exposedModules = filter (("GHC.Prim" /=)) $ exposedModules lib
$ exposedModules lib lib_bi = libBuildInfo lib
lib_bi' = lib_bi {
extraLibs = extraExtraLibs
++ extraLibs lib_bi
}
in lib {
exposedModules = ems,
libBuildInfo = lib_bi'
} }
Nothing -> Nothing ->
error "Expected a library, but none found" error "Expected a library, but none found"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment