You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-haskell/wxc/files/wxc-0.92.3.0-cabal-2.2.patch

33 lines
1.6 KiB

--- a/Setup.hs
+++ b/Setup.hs
@@ -22,2 +22,3 @@ import Distribution.Simple.Setup ( BuildFlags, ConfigFlags
import Distribution.Simple.Utils (installOrdinaryFile, rawSystemExitWithEnv, rawSystemStdInOut, die)
+import qualified Distribution.Simple.Utils as DSU
import Distribution.System (OS (..), Arch (..), buildOS, buildArch)
@@ -81,3 +82,9 @@ rawShellSystemStdInOut :: Verbosity -- Verbosity level
-> IO (String, String, ExitCode) -- (Command result, Errors, Command exit status)
+#if MIN_VERSION_Cabal(2,2,0)
+rawShellSystemStdInOut v f as = do
+ (~(DSU.IODataText so), se, c) <- rawSystemStdInOut v "sh" (f:as) Nothing Nothing Nothing DSU.IODataModeText
+ return (so, se, c)
+#else
rawShellSystemStdInOut v f as = rawSystemStdInOut v "sh" (f:as) Nothing Nothing Nothing False
+#endif
@@ -438,3 +445,7 @@ deMsysPaths bi = do
let cor ph = do
+#if MIN_VERSION_Cabal(2,2,0)
+ (~(DSU.IODataText r), e, c) <- rawSystemStdInOut normal "sh" ["-c", "cd " ++ ph ++ "; pwd -W"] Nothing Nothing Nothing DSU.IODataModeText
+#else
(r, e, c ) <- rawSystemStdInOut normal "sh" ["-c", "cd " ++ ph ++ "; pwd -W"] Nothing Nothing Nothing False
+#endif
unless (c == ExitSuccess) (putStrLn ("Error: failed to convert MSYS path to native path \n" ++ e) >> exitFailure)
@@ -504,3 +515,7 @@ sharedLibName ver basename =
where
+#if MIN_VERSION_Cabal(2,2,0)
+ full_ver = (concat . intersperse "." . map show . versionNumbers) ver
+#else
full_ver = (concat . intersperse "." . map show . versionBranch) ver
+#endif