2015-12-28 10:04:29 +00:00
|
|
|
diff --git a/ghc-7.10.3.old/libraries/Cabal/Cabal/Cabal.cabal b/ghc-7.10.3/libraries/Cabal/Cabal/Cabal.cabal
|
2016-01-26 12:15:10 +00:00
|
|
|
index b498ca0..bf64bd5 100644
|
2015-12-28 10:04:29 +00:00
|
|
|
--- a/ghc-7.10.3.old/libraries/Cabal/Cabal/Cabal.cabal
|
|
|
|
+++ b/ghc-7.10.3/libraries/Cabal/Cabal/Cabal.cabal
|
|
|
|
@@ -1,5 +1,5 @@
|
|
|
|
name: Cabal
|
|
|
|
-version: 1.22.5.0
|
2016-01-26 12:15:10 +00:00
|
|
|
+version: 1.22.7.0
|
2015-12-28 10:04:29 +00:00
|
|
|
copyright: 2003-2006, Isaac Jones
|
|
|
|
2005-2011, Duncan Coutts
|
|
|
|
license: BSD3
|
2016-01-26 12:15:10 +00:00
|
|
|
@@ -19,7 +19,7 @@ description:
|
|
|
|
organizing, and cataloging Haskell libraries and tools.
|
|
|
|
category: Distribution
|
|
|
|
cabal-version: >=1.10
|
|
|
|
-build-type: Custom
|
|
|
|
+build-type: Simple
|
|
|
|
-- Even though we do use the default Setup.lhs it's vital to bootstrapping
|
|
|
|
-- that we build Setup.lhs using our own local Cabal source code.
|
|
|
|
|
2015-12-28 10:04:29 +00:00
|
|
|
@@ -145,7 +145,7 @@ library
|
|
|
|
if flag(bundled-binary-generic)
|
|
|
|
build-depends: binary >= 0.5 && < 0.7
|
|
|
|
else
|
|
|
|
- build-depends: binary >= 0.7 && < 0.8
|
|
|
|
+ build-depends: binary >= 0.7 && < 0.9
|
|
|
|
|
|
|
|
-- Needed for GHC.Generics before GHC 7.6
|
|
|
|
if impl(ghc < 7.6)
|
|
|
|
@@ -265,7 +265,7 @@ test-suite unit-tests
|
|
|
|
test-framework-hunit,
|
|
|
|
test-framework-quickcheck2,
|
|
|
|
HUnit,
|
|
|
|
- QuickCheck < 2.8,
|
|
|
|
+ QuickCheck < 2.9,
|
|
|
|
Cabal
|
|
|
|
ghc-options: -Wall
|
|
|
|
default-language: Haskell98
|
|
|
|
@@ -312,7 +312,7 @@ test-suite package-tests
|
|
|
|
test-framework-quickcheck2 >= 0.2.12,
|
|
|
|
test-framework-hunit,
|
|
|
|
HUnit,
|
|
|
|
- QuickCheck >= 2.1.0.1 && < 2.8,
|
|
|
|
+ QuickCheck >= 2.1.0.1 && < 2.9,
|
|
|
|
Cabal,
|
|
|
|
process,
|
|
|
|
directory,
|
|
|
|
diff --git a/ghc-7.10.3.old/libraries/Cabal/Cabal/Distribution/Simple/GHC.hs b/ghc-7.10.3/libraries/Cabal/Cabal/Distribution/Simple/GHC.hs
|
|
|
|
index 444c851..270e2c3 100644
|
|
|
|
--- a/ghc-7.10.3.old/libraries/Cabal/Cabal/Distribution/Simple/GHC.hs
|
|
|
|
+++ b/ghc-7.10.3/libraries/Cabal/Cabal/Distribution/Simple/GHC.hs
|
|
|
|
@@ -553,8 +553,10 @@ buildOrReplLib forRepl verbosity numJobs pkg_descr lbi lib clbi = do
|
|
|
|
-- TODO: problem here is we need the .c files built first, so we can load them
|
|
|
|
-- with ghci, but .c files can depend on .h files generated by ghc by ffi
|
|
|
|
-- exports.
|
|
|
|
- unless (null (libModules lib)) $
|
|
|
|
- ifReplLib (runGhcProg replOpts)
|
|
|
|
+
|
|
|
|
+ ifReplLib $ do
|
|
|
|
+ when (null (libModules lib)) $ warn verbosity "No exposed modules"
|
|
|
|
+ ifReplLib (runGhcProg replOpts)
|
|
|
|
|
|
|
|
-- link:
|
|
|
|
unless forRepl $ do
|
|
|
|
@@ -766,7 +768,9 @@ buildOrReplExe forRepl verbosity numJobs _pkg_descr lbi
|
|
|
|
ghcOptLinkLibPath = toNubListR $ extraLibDirs exeBi,
|
|
|
|
ghcOptLinkFrameworks = toNubListR $ PD.frameworks exeBi,
|
|
|
|
ghcOptInputFiles = toNubListR
|
|
|
|
- [exeDir </> x | x <- cObjs],
|
|
|
|
+ [exeDir </> x | x <- cObjs]
|
|
|
|
+ }
|
|
|
|
+ dynLinkerOpts = mempty {
|
|
|
|
ghcOptRPaths = rpaths
|
|
|
|
}
|
|
|
|
replOpts = baseOpts {
|
|
|
|
@@ -812,9 +816,9 @@ buildOrReplExe forRepl verbosity numJobs _pkg_descr lbi
|
|
|
|
| otherwise = doingTH && (withProfExe lbi || withDynExe lbi)
|
|
|
|
|
|
|
|
linkOpts = commonOpts `mappend`
|
|
|
|
- linkerOpts `mappend` mempty {
|
|
|
|
- ghcOptLinkNoHsMain = toFlag (not isHaskellMain)
|
|
|
|
- }
|
|
|
|
+ linkerOpts `mappend`
|
|
|
|
+ mempty { ghcOptLinkNoHsMain = toFlag (not isHaskellMain) } `mappend`
|
|
|
|
+ (if withDynExe lbi then dynLinkerOpts else mempty)
|
|
|
|
|
|
|
|
-- Build static/dynamic object files for TH, if needed.
|
|
|
|
when compileForTH $
|
2016-01-26 12:15:10 +00:00
|
|
|
diff --git a/ghc-7.10.3.old/libraries/Cabal/Cabal/Distribution/Simple/Haddock.hs b/ghc-7.10.3/libraries/Cabal/Cabal/Distribution/Simple/Haddock.hs
|
|
|
|
index 095d6b8..2d09292 100644
|
|
|
|
--- a/ghc-7.10.3.old/libraries/Cabal/Cabal/Distribution/Simple/Haddock.hs
|
|
|
|
+++ b/ghc-7.10.3/libraries/Cabal/Cabal/Distribution/Simple/Haddock.hs
|
|
|
|
@@ -84,14 +84,16 @@ import Language.Haskell.Extension
|
|
|
|
|
|
|
|
|
|
|
|
import Control.Monad ( when, forM_ )
|
|
|
|
+import Data.Char ( isSpace )
|
|
|
|
import Data.Either ( rights )
|
|
|
|
import Data.Monoid
|
|
|
|
+import Data.Foldable ( foldl' )
|
|
|
|
import Data.Maybe ( fromMaybe, listToMaybe )
|
|
|
|
|
|
|
|
import System.Directory (doesFileExist)
|
|
|
|
import System.FilePath ( (</>), (<.>)
|
|
|
|
, normalise, splitPath, joinPath, isAbsolute )
|
|
|
|
-import System.IO (hClose, hPutStrLn, hSetEncoding, utf8)
|
|
|
|
+import System.IO (hClose, hPutStr, hPutStrLn, hSetEncoding, utf8)
|
|
|
|
import Distribution.Version
|
|
|
|
|
|
|
|
-- ------------------------------------------------------------------------------
|
|
|
|
@@ -467,7 +469,7 @@ renderArgs :: Verbosity
|
|
|
|
-> IO a
|
|
|
|
renderArgs verbosity tmpFileOpts version comp args k = do
|
|
|
|
let haddockSupportsUTF8 = version >= Version [2,14,4] []
|
|
|
|
- haddockSupportsResponseFiles = version > Version [2,16,1] []
|
|
|
|
+ haddockSupportsResponseFiles = version > Version [2,16,2] []
|
|
|
|
createDirectoryIfMissingVerbose verbosity True outputDir
|
|
|
|
withTempFileEx tmpFileOpts outputDir "haddock-prologue.txt" $
|
|
|
|
\prologueFileName h -> do
|
|
|
|
@@ -482,7 +484,7 @@ renderArgs verbosity tmpFileOpts version comp args k = do
|
|
|
|
withTempFileEx tmpFileOpts outputDir "haddock-response.txt" $
|
|
|
|
\responseFileName hf -> do
|
|
|
|
when haddockSupportsUTF8 (hSetEncoding hf utf8)
|
|
|
|
- mapM_ (hPutStrLn hf) renderedArgs
|
|
|
|
+ hPutStr hf $ unlines $ map escapeArg renderedArgs
|
|
|
|
hClose hf
|
|
|
|
let respFile = "@" ++ responseFileName
|
|
|
|
k ([respFile], result)
|
|
|
|
@@ -500,6 +502,19 @@ renderArgs verbosity tmpFileOpts version comp args k = do
|
|
|
|
pkgstr = display $ packageName pkgid
|
|
|
|
pkgid = arg argPackageName
|
|
|
|
arg f = fromFlag $ f args
|
|
|
|
+ -- Support a gcc-like response file syntax. Each separate
|
|
|
|
+ -- argument and its possible parameter(s), will be separated in the
|
|
|
|
+ -- response file by an actual newline; all other whitespace,
|
|
|
|
+ -- single quotes, double quotes, and the character used for escaping
|
|
|
|
+ -- (backslash) are escaped. The called program will need to do a similar
|
|
|
|
+ -- inverse operation to de-escape and re-constitute the argument list.
|
|
|
|
+ escape cs c
|
|
|
|
+ | isSpace c
|
|
|
|
+ || '\\' == c
|
|
|
|
+ || '\'' == c
|
|
|
|
+ || '"' == c = c:'\\':cs -- n.b., our caller must reverse the result
|
|
|
|
+ | otherwise = c:cs
|
|
|
|
+ escapeArg = reverse . foldl' escape []
|
|
|
|
|
|
|
|
renderPureArgs :: Version -> Compiler -> HaddockArgs -> [String]
|
|
|
|
renderPureArgs version comp args = concat
|
2015-12-28 10:04:29 +00:00
|
|
|
diff --git a/ghc-7.10.3.old/libraries/Cabal/Cabal/Distribution/Version.hs b/ghc-7.10.3/libraries/Cabal/Cabal/Distribution/Version.hs
|
|
|
|
index 1123749..e5c2e28 100644
|
|
|
|
--- a/ghc-7.10.3.old/libraries/Cabal/Cabal/Distribution/Version.hs
|
|
|
|
+++ b/ghc-7.10.3/libraries/Cabal/Cabal/Distribution/Version.hs
|
|
|
|
@@ -3,7 +3,25 @@
|
|
|
|
#if __GLASGOW_HASKELL__ < 707
|
|
|
|
{-# LANGUAGE StandaloneDeriving #-}
|
|
|
|
#endif
|
|
|
|
+
|
|
|
|
+-- Hack approach to support bootstrapping
|
|
|
|
+-- Assume binary <0.8 when MIN_VERSION_binary macro is not available.
|
|
|
|
+-- Starting with GHC>=8.0, compiler will hopefully provide this macros too.
|
|
|
|
+-- https://ghc.haskell.org/trac/ghc/ticket/10970
|
|
|
|
+--
|
|
|
|
+-- Otherwise, one can specify -DMIN_VERSION_binary_0_8_0=1, when bootstrapping
|
|
|
|
+-- with binary >=0.8.0.0
|
|
|
|
+#ifdef MIN_VERSION_binary
|
|
|
|
+#define MIN_VERSION_binary_0_8_0 MIN_VERSION_binary(0,8,0)
|
|
|
|
+#else
|
|
|
|
+#ifndef MIN_VERSION_binary_0_8_0
|
|
|
|
+#define MIN_VERSION_binary_0_8_0 0
|
|
|
|
+#endif
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+#if !MIN_VERSION_binary_0_8_0
|
|
|
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
-- |
|
|
|
|
@@ -109,6 +127,7 @@ instance Binary VersionRange
|
|
|
|
deriving instance Data Version
|
|
|
|
#endif
|
|
|
|
|
|
|
|
+#if !(MIN_VERSION_binary_0_8_0)
|
|
|
|
-- Deriving this instance from Generic gives trouble on GHC 7.2 because the
|
|
|
|
-- Generic instance has to be standalone-derived. So, we hand-roll our own.
|
|
|
|
-- We can't use a generic Binary instance on later versions because we must
|
|
|
|
@@ -119,6 +138,7 @@ instance Binary Version where
|
|
|
|
tags <- get
|
|
|
|
return $ Version br tags
|
|
|
|
put (Version br tags) = put br >> put tags
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
{-# DEPRECATED AnyVersion "Use 'anyVersion', 'foldVersionRange' or 'asVersionIntervals'" #-}
|
|
|
|
{-# DEPRECATED ThisVersion "use 'thisVersion', 'foldVersionRange' or 'asVersionIntervals'" #-}
|
|
|
|
diff --git a/ghc-7.10.3.old/libraries/Cabal/Cabal/changelog b/ghc-7.10.3/libraries/Cabal/Cabal/changelog
|
2016-01-26 12:15:10 +00:00
|
|
|
index f5fb8ff..57b3450 100644
|
2015-12-28 10:04:29 +00:00
|
|
|
--- a/ghc-7.10.3.old/libraries/Cabal/Cabal/changelog
|
|
|
|
+++ b/ghc-7.10.3/libraries/Cabal/Cabal/changelog
|
2016-01-26 12:15:10 +00:00
|
|
|
@@ -1,3 +1,12 @@
|
|
|
|
+1.22.7.0 Ryan Thomas <ryan@ryant.org> January 2016
|
|
|
|
+ * Backport #3012 to the 1.22 branch
|
|
|
|
+ * Cabal.cabal: change build-type to Simple
|
|
|
|
+ * Add foldl' import
|
|
|
|
+ * The Cabal part for fully gcc-like response files
|
|
|
|
+
|
2015-12-28 10:04:29 +00:00
|
|
|
+1.22.6.0
|
|
|
|
+ * Relax upper bound to allow upcoming binary-0.8
|
|
|
|
+
|
|
|
|
1.22.5.0
|
|
|
|
* Don't recompile C sources unless needed (#2601). (Luke Iannini)
|
|
|
|
* Support Haddock response files.
|