rpms/darcs/devel darcs-ghc-6_8-compat.patch,NONE,1.1

Jeremy Hinegardner (jjh) fedora-extras-commits at redhat.com
Fri Nov 30 06:12:36 UTC 2007


Author: jjh

Update of /cvs/pkgs/rpms/darcs/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11799

Added Files:
	darcs-ghc-6_8-compat.patch 
Log Message:
add patches from darcs unstable branch to deal with ghc 6.8 compatibility in rawhide

darcs-ghc-6_8-compat.patch:

--- NEW FILE darcs-ghc-6_8-compat.patch ---
Thu Oct 18 07:57:14 MDT 2007  Ganesh Sittampalam <ganesh at earth.li>
  * configure hack to deal with openFd -> fdToHandle' renaming in GHC 6.8
Mon Oct 22 04:29:02 MDT 2007  Ganesh Sittampalam <ganesh at earth.li>
  * make_changelog requires Text.PrettyPrint which is in package pretty in GHC 6.8
Thu Oct 18 08:21:25 MDT 2007  Ganesh Sittampalam <ganesh at earth.li>
  * GHC 6.8 needs containers package
Sun Jun  3 15:37:06 MDT 2007  Tommy Pettersson <ptp at lysator.liu.se>
  tagged 1.0.9
diff -rN -u old-darcs-1.0.9/aclocal.m4 new-darcs-1.0.9/aclocal.m4
--- old-darcs-1.0.9/aclocal.m4	2007-11-29 22:43:01.000000000 -0700
+++ new-darcs-1.0.9/aclocal.m4	2007-11-29 22:43:02.000000000 -0700
@@ -447,9 +447,30 @@
 openFd :: Int -> Maybe FDType -> FilePath -> IOMode -> Bool -> Bool -> IO Handle
 openFd fd x y z a b = GHC.Handle.openFd fd x b y z a
         ]]),
+       AC_MSG_RESULT([NOT 'new' API])
+       AC_MSG_CHECKING([GHC.Handle.fdToHandle' API])
+       TRY_RUN_GHC([
+import GHC.Handle ( fdToHandle' )
+import IO ( IOMode(..) )
+
+main = fdToHandle' 1 Nothing False "stdout" WriteMode True
+       ],
+       AC_MSG_RESULT([okay])
+       IMPORT_WORKAROUND([import qualified GHC.Handle ( fdToHandle' )
+import System.IO ( Handle, IOMode )
+import System.Posix.Internals ( FDType )
+])
+       CODE_WORKAROUND([[
+{-
+Work around renaming of GHC.Handle.openFd and change in its API.
+-}
+openFd :: Int -> Maybe FDType -> FilePath -> IOMode -> Bool -> Bool -> IO Handle
+openFd fd x y z a b = GHC.Handle.fdToHandle' (fromIntegral fd) x b y z a
+        ]]),
        AC_MSG_RESULT([failed])
        AC_MSG_ERROR([Couldnt figure out how to call GHC.Handle.openFd!])
     )
   )
-])
+)])
+
 
diff -rN -u old-darcs-1.0.9/configure.ac new-darcs-1.0.9/configure.ac
--- old-darcs-1.0.9/configure.ac	2007-11-29 22:43:01.000000000 -0700
+++ new-darcs-1.0.9/configure.ac	2007-11-29 22:43:02.000000000 -0700
@@ -134,6 +134,17 @@
 GHC_CHECK_MODULE(Text.Html, html, text "foo",,
                  AC_MSG_ERROR(Cannot find Text.Html; try installing package html?))
 
+dnl Check if we need package containers
+
+GHC_CHECK_MODULE(Data.Map, containers, empty,,
+                 AC_MSG_ERROR(Cannot find Data.Map))
+
+dnl Check if we need package pretty (just for the utilities)
+
+GHC_CHECK_MODULE(Text.PrettyPrint, pretty, empty,,
+                 AC_MSG_ERROR(Cannot find Text.PrettyPrint))
+
+
 dnl Deal with systems on which getCurrentDirectory uses '\\' rather than '/':
 
 WORKAROUND_getCurrentDirectory





More information about the fedora-extras-commits mailing list