diff options
author | Mark Wright <gienah@gentoo.org> | 2012-09-19 07:00:44 +0000 |
---|---|---|
committer | Mark Wright <gienah@gentoo.org> | 2012-09-19 07:00:44 +0000 |
commit | 60641f73a6e0d7da003a12ccf31431dbcf8dd917 (patch) | |
tree | 5222584c691c6ff686bdd5dd1e86e88b74e826aa /dev-haskell | |
parent | Unmask qt-creator 2.6 beta. (diff) | |
download | gentoo-2-60641f73a6e0d7da003a12ccf31431dbcf8dd917.tar.gz gentoo-2-60641f73a6e0d7da003a12ccf31431dbcf8dd917.tar.bz2 gentoo-2-60641f73a6e0d7da003a12ccf31431dbcf8dd917.zip |
Patch regex-posix-0.95.1 build for ghc 7.6.1
(Portage version: 2.1.11.18/cvs/Linux x86_64)
Diffstat (limited to 'dev-haskell')
4 files changed, 79 insertions, 5 deletions
diff --git a/dev-haskell/regex-posix/ChangeLog b/dev-haskell/regex-posix/ChangeLog index bd39b496d26f..3cbb319f733a 100644 --- a/dev-haskell/regex-posix/ChangeLog +++ b/dev-haskell/regex-posix/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for dev-haskell/regex-posix # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-haskell/regex-posix/ChangeLog,v 1.36 2012/09/12 16:03:55 qnikst Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-haskell/regex-posix/ChangeLog,v 1.37 2012/09/19 07:00:44 gienah Exp $ + + 19 Sep 2012; Mark Wright <gienah@gentoo.org> + +files/regex-posix-0.95.1-control-exception.patch, + +files/regex-posix-0.95.1-ghc-7.5.patch, regex-posix-0.95.1.ebuild: + Patch regex-posix-0.95.1 build for ghc 7.6.1 12 Sep 2012; Alexander Vershilov <qnikst@gentoo.org> regex-posix-0.71.ebuild, regex-posix-0.72.0.2.ebuild, regex-posix-0.72.0.3.ebuild, diff --git a/dev-haskell/regex-posix/files/regex-posix-0.95.1-control-exception.patch b/dev-haskell/regex-posix/files/regex-posix-0.95.1-control-exception.patch new file mode 100644 index 000000000000..dfdfa71522f5 --- /dev/null +++ b/dev-haskell/regex-posix/files/regex-posix-0.95.1-control-exception.patch @@ -0,0 +1,56 @@ +diff --git a/Text/Regex/Posix/Wrap.hsc b/Text/Regex/Posix/Wrap.hsc +index d27b756..a43bcc3 100644 +--- a/Text/Regex/Posix/Wrap.hsc ++++ b/Text/Regex/Posix/Wrap.hsc +@@ -102,7 +102,7 @@ module Text.Regex.Posix.Wrap( + -- string.h is needed for memset + + #include "myfree.h" +- ++ + #include "string.h" + + #ifndef _POSIX_C_SOURCE +@@ -131,10 +131,19 @@ import Foreign(Ptr, FunPtr, nullPtr, newForeignPtr, + addForeignPtrFinalizer, Storable(peekByteOff), allocaArray, + allocaBytes, withForeignPtr,ForeignPtr,plusPtr,peekElemOff) + import Foreign.Marshal.Alloc(mallocBytes) +-import Foreign.C(CSize,CInt,CChar) ++import Foreign.C(CChar) ++#if __GLASGOW_HASKELL__ >= 703 ++import Foreign.C(CSize(CSize),CInt(CInt)) ++#else ++import Foreign.C(CSize,CInt) ++#endif + import Foreign.C.String(peekCAString, CString) + import Text.Regex.Base.RegexLike(RegexOptions(..),RegexMaker(..),RegexContext(..),MatchArray) +-import qualified System.IO.Error as IOERROR(try) ++-- deprecated: import qualified System.IO.Error as IOERROR(try) ++import qualified Control.Exception(try,IOException) ++ ++try :: IO a -> IO (Either Control.Exception.IOException a) ++try = Control.Exception.try + + type CRegex = () -- dummy regex_t used below to read out nsub value + +@@ -349,8 +358,10 @@ foreign import ccall unsafe "&myregfree" + foreign import ccall unsafe "regcomp" + c_regcomp :: Ptr CRegex -> CString -> CompOption -> IO ReturnCode + ++{- NOT USED + foreign import ccall unsafe "®free" + c_regfree :: FunPtr (Ptr CRegex -> IO ()) ++-} + + foreign import ccall unsafe "regexec" + c_regexec :: Ptr CRegex -> CString -> CSize +@@ -460,7 +471,7 @@ wrapError errCode regex_ptr = do + ---------- + wrapCompile flags e pattern = do + nullTest pattern "wrapCompile pattern" $ do +- e_regex_ptr <- IOERROR.try $ mallocBytes (#const sizeof(regex_t)) -- ioError called if nullPtr ++ e_regex_ptr <- try $ mallocBytes (#const sizeof(regex_t)) -- ioError called if nullPtr + case e_regex_ptr of + Left ioerror -> return (Left (retOk,"Text.Regex.Posix.Wrap.wrapCompile: IOError from mallocBytes(regex_t) : "++show ioerror)) + Right raw_regex_ptr -> do + diff --git a/dev-haskell/regex-posix/files/regex-posix-0.95.1-ghc-7.5.patch b/dev-haskell/regex-posix/files/regex-posix-0.95.1-ghc-7.5.patch new file mode 100644 index 000000000000..e0de5a751637 --- /dev/null +++ b/dev-haskell/regex-posix/files/regex-posix-0.95.1-ghc-7.5.patch @@ -0,0 +1,12 @@ +--- regex-posix-0.95.1-orig/Text/Regex/Posix/Wrap.hsc 2011-05-10 01:55:41.000000000 +1000 ++++ regex-posix-0.95.1/Text/Regex/Posix/Wrap.hsc 2012-05-13 18:06:06.314466286 +1000 +@@ -133,6 +133,9 @@ + import Foreign.Marshal.Alloc(mallocBytes) + import Foreign.C(CSize,CInt,CChar) + import Foreign.C.String(peekCAString, CString) ++#if (__GLASGOW_HASKELL__>=705) ++import Foreign.C.Types(CInt(..), CSize(..)) ++#endif + import Text.Regex.Base.RegexLike(RegexOptions(..),RegexMaker(..),RegexContext(..),MatchArray) + import qualified System.IO.Error as IOERROR(try) + diff --git a/dev-haskell/regex-posix/regex-posix-0.95.1.ebuild b/dev-haskell/regex-posix/regex-posix-0.95.1.ebuild index 0e0386039847..b1c9a07d9829 100644 --- a/dev-haskell/regex-posix/regex-posix-0.95.1.ebuild +++ b/dev-haskell/regex-posix/regex-posix-0.95.1.ebuild @@ -1,13 +1,11 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-haskell/regex-posix/regex-posix-0.95.1.ebuild,v 1.8 2012/09/12 16:03:55 qnikst Exp $ - -# ebuild generated by hackport 0.2.13 +# $Header: /var/cvsroot/gentoo-x86/dev-haskell/regex-posix/regex-posix-0.95.1.ebuild,v 1.9 2012/09/19 07:00:44 gienah Exp $ EAPI=4 CABAL_FEATURES="lib profile haddock hscolour hoogle" -inherit haskell-cabal +inherit base haskell-cabal DESCRIPTION="Replaces/Enhances Text.Regex" HOMEPAGE="http://sourceforge.net/projects/lazy-regex" @@ -22,3 +20,6 @@ RDEPEND=">=dev-haskell/regex-base-0.93[profile?] >=dev-lang/ghc-6.8.2" DEPEND="${RDEPEND} >=dev-haskell/cabal-1.2" + +PATCHES=("${FILESDIR}/${PN}-0.95.1-control-exception.patch" + "${FILESDIR}/${PN}-0.95.1-ghc-7.5.patch") |