$OpenBSD: patch-src_hmake_MkConfig_hs,v 1.1 2010/04/22 21:54:16 kili Exp $
--- src/hmake/MkConfig.hs.orig	Fri Jul  7 18:01:16 2006
+++ src/hmake/MkConfig.hs	Thu Apr  8 14:19:26 2010
@@ -258,14 +258,14 @@ configure Ghc ghcpath = do
           ok <- doesFileExist ghcpkg0
           let ghcpkg = if ok then ghcpkg0 else dirname fullpath++"/ghc-pkg"
        -- pkgs <- runAndReadStdout (ghcpkg++" --list-packages")
-          pkgs <- runAndReadStdout (ghcpkg++" -l")
+          pkgs <- runAndReadStdout (ghcpkg++" list")
           let pkgsOK = filter (\p-> any (`isPrefixOf` p)
                                         ["std","base","haskell98"])
                               (deComma pkgs)
           idirs <- mapM (\p-> runAndReadStdout
-                                  (ghcpkg++" --show-package="
+                                  (ghcpkg++" field "
                                    ++deVersion (ghcsym>=604) p
-                                   ++" --field=import_dirs"))
+                                   ++" import_dirs"))
                         pkgsOK
           return config{ includePaths = pkgDirs libdir (nub idirs) }
         else do ioError (userError ("Can't find ghc includes at "++incdir1))
