[commit: ghc] wip/nfs-locking: Switch to new GMP library (0dc5fdf)

git at git.haskell.org git at git.haskell.org
Fri Oct 27 01:17:38 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/nfs-locking
Link       : http://ghc.haskell.org/trac/ghc/changeset/0dc5fdf1820c19dc3264d103d325c08c7d93902c/ghc

>---------------------------------------------------------------

commit 0dc5fdf1820c19dc3264d103d325c08c7d93902c
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Mon Feb 6 02:59:37 2017 +0100

    Switch to new GMP library
    
    See GHC ticket 7655


>---------------------------------------------------------------

0dc5fdf1820c19dc3264d103d325c08c7d93902c
 src/Rules/Gmp.hs | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/src/Rules/Gmp.hs b/src/Rules/Gmp.hs
index 1442118..a3e32d3 100644
--- a/src/Rules/Gmp.hs
+++ b/src/Rules/Gmp.hs
@@ -23,9 +23,6 @@ gmpLibrary = gmpBuildPath -/- ".libs/libgmp.a"
 gmpMakefile :: FilePath
 gmpMakefile = gmpBuildPath -/- "Makefile"
 
-gmpPatches :: [FilePath]
-gmpPatches = (gmpBase -/-) <$> ["gmpsrc.patch", "tarball/gmp-5.0.4.patch"]
-
 configureEnvironment :: Action [CmdOption]
 configureEnvironment = sequence [ builderEnvironment "CC" $ Cc CompileC Stage1
                                 , builderEnvironment "AR" Ar
@@ -77,21 +74,21 @@ gmpRules = do
         -- That's because the doc/ directory contents are under the GFDL,
         -- which causes problems for Debian.
         tarball <- unifyPath . getSingleton "Exactly one GMP tarball is expected"
-               <$> getDirectoryFiles "" [gmpBase -/- "tarball/gmp*.tar.bz2"]
+               <$> getDirectoryFiles "" [gmpBase -/- "gmp-tarballs/gmp*.tar.bz2"]
 
         withTempDir $ \dir -> do
             let tmp = unifyPath dir
             need [tarball]
             build $ Target gmpContext Tar [tarball] [tmp]
 
-            forM_ gmpPatches $ \src -> do
-                let patch = takeFileName src
-                copyFile src $ tmp -/- patch
-                applyPatch tmp patch
+            let patch     = gmpBase -/- "gmpsrc.patch"
+                patchName = takeFileName patch
+            copyFile patch $ tmp -/- patchName
+            applyPatch tmp patchName
 
             let name    = dropExtension . dropExtension $ takeFileName tarball
                 unpack  = fromMaybe . error $ "gmpRules: expected suffix "
-                    ++ "-nodoc-patched (found: " ++ name ++ ")."
-                libName = unpack $ stripSuffix "-nodoc-patched" name
+                    ++ "-nodoc (found: " ++ name ++ ")."
+                libName = unpack $ stripSuffix "-nodoc" name
 
             moveDirectory (tmp -/- libName) gmpBuildPath



More information about the ghc-commits mailing list