openbsd-ports/devel/hmake/patches/patch-src_hmake_PackageConfig_hs
kili aa043e1a02 Resurrect, but only for nhc98 (required for devel/cpphs on platforms
without ghc, as noticed by jasper@).

"Bring out your dead! Bring out your dead!" jasper@
2011-04-14 12:15:53 +00:00

24 lines
1.2 KiB
Plaintext

$OpenBSD: patch-src_hmake_PackageConfig_hs,v 1.3 2011/04/14 12:15:53 kili Exp $
--- src/hmake/PackageConfig.hs.orig Fri Apr 25 12:28:08 2008
+++ src/hmake/PackageConfig.hs Thu Apr 8 14:22:33 2010
@@ -55,7 +55,7 @@ packageDirs config@(CompilerConfig{ compilerStyle=Ghc
-- ghcpkg <- runAndReadStdout
-- ("echo `" ++ ghc ++ " --print-libdir`/bin/ghc-pkg")
-- pkgs <- runAndReadStdout (ghcpkg++" --list-packages")
- pkgs <- runAndReadStdout (ghcpkg++" -l")
+ pkgs <- runAndReadStdout (ghcpkg++" list")
let (ok,bad) = partition (\p-> elemBy versionMatch p (deComma pkgs))
packages
when (not (null bad))
@@ -63,8 +63,8 @@ packageDirs config@(CompilerConfig{ compilerStyle=Ghc
++concat (intersperse ", " bad)
++" not available (according to ghc-pkg)"))
idirs <- mapM (\p-> runAndReadStdout
- (ghcpkg++" --show-package="++p
- ++" --field=import_dirs"))
+ (ghcpkg++" field "++p
+ ++" import_dirs"))
ok
return (pkgDirs libdir idirs)
where