diff options
author | Mark Wright <gienah@gentoo.org> | 2012-09-13 01:12:41 +0000 |
---|---|---|
committer | Mark Wright <gienah@gentoo.org> | 2012-09-13 01:12:41 +0000 |
commit | c1801eb5fc7ffbe59f7b6397297eaa580c938886 (patch) | |
tree | b32eca2af1b10a9cf95e94016c7e48fc39774c05 /dev-haskell/http | |
parent | patch missingh for ghc 7.6.1 (diff) | |
download | gentoo-2-c1801eb5fc7ffbe59f7b6397297eaa580c938886.tar.gz gentoo-2-c1801eb5fc7ffbe59f7b6397297eaa580c938886.tar.bz2 gentoo-2-c1801eb5fc7ffbe59f7b6397297eaa580c938886.zip |
patch http for ghc 7.6.1
(Portage version: 2.1.11.14/cvs/Linux x86_64)
Diffstat (limited to 'dev-haskell/http')
-rw-r--r-- | dev-haskell/http/ChangeLog | 6 | ||||
-rw-r--r-- | dev-haskell/http/files/http-4000.2.3-ghc-7.6.patch | 154 | ||||
-rw-r--r-- | dev-haskell/http/http-4000.2.3.ebuild | 6 |
3 files changed, 162 insertions, 4 deletions
diff --git a/dev-haskell/http/ChangeLog b/dev-haskell/http/ChangeLog index f9b27fd642bf..f25e6963f014 100644 --- a/dev-haskell/http/ChangeLog +++ b/dev-haskell/http/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-haskell/http # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-haskell/http/ChangeLog,v 1.23 2012/09/12 14:56:57 qnikst Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-haskell/http/ChangeLog,v 1.24 2012/09/13 01:12:41 gienah Exp $ + + 13 Sep 2012; Mark Wright <gienah@gentoo.org> + +files/http-4000.2.3-ghc-7.6.patch, http-4000.2.3.ebuild: + patch http for ghc 7.6.1 12 Sep 2012; Alexander Vershilov <qnikst@gentoo.org> http-4000.1.1.ebuild, http-4000.1.2.ebuild, http-4000.2.2.ebuild, http-4000.2.3.ebuild: diff --git a/dev-haskell/http/files/http-4000.2.3-ghc-7.6.patch b/dev-haskell/http/files/http-4000.2.3-ghc-7.6.patch new file mode 100644 index 000000000000..595d3990efe3 --- /dev/null +++ b/dev-haskell/http/files/http-4000.2.3-ghc-7.6.patch @@ -0,0 +1,154 @@ +--- HTTP-4000.2.3-orig/HTTP.cabal 2012-04-13 06:39:31.000000000 +1000 ++++ HTTP-4000.2.3/HTTP.cabal 2012-09-12 21:08:30.027554352 +1000 +@@ -77,7 +77,7 @@ + Network.HTTP.Utils + Paths_HTTP + GHC-options: -fwarn-missing-signatures -Wall +- Build-depends: base >= 2 && < 4.6, network, parsec ++ Build-depends: base >= 2 && < 5.0, network, parsec + Extensions: FlexibleInstances + if flag(old-base) + Build-depends: base < 3 +@@ -95,7 +95,7 @@ + Test-Suite test + type: exitcode-stdio-1.0 + +- build-tools: ghc >= 6.10 && < 7.6 ++ build-tools: ghc >= 6.10 && < 8.0 + + hs-source-dirs: test + main-is: httpTests.hs +@@ -103,7 +103,7 @@ + build-depends: HTTP, + HUnit, + httpd-shed, +- base >= 2 && < 4.6, ++ base >= 2 && < 5.0, + network, + split >= 0.1 && < 0.2, + test-framework, +--- HTTP-4000.2.3-orig/Network/HTTP/Base.hs 2012-04-13 06:39:31.000000000 +1000 ++++ HTTP-4000.2.3/Network/HTTP/Base.hs 2012-09-12 21:44:26.218546007 +1000 +@@ -1,3 +1,4 @@ ++{-# LANGUAGE ScopedTypeVariables #-} + ----------------------------------------------------------------------------- + -- | + -- Module : Network.HTTP.Base +@@ -105,6 +106,7 @@ + , parseURIReference + ) + ++import Control.Exception ( catch ) + import Control.Monad ( guard ) + import Control.Monad.Error () + import Data.Char ( digitToInt, intToDigit, toLower, isDigit, +@@ -886,10 +888,10 @@ + -- | @catchIO a h@ handles IO action exceptions throughout codebase; version-specific + -- tweaks better go here. + catchIO :: IO a -> (IOException -> IO a) -> IO a +-catchIO a h = Prelude.catch a h ++catchIO a h = Control.Exception.catch a h + + catchIO_ :: IO a -> IO a -> IO a +-catchIO_ a h = Prelude.catch a (const h) ++catchIO_ a h = Control.Exception.catch a (\(_ :: IOException) -> h) + + responseParseError :: String -> String -> Result a + responseParseError loc v = failWith (ErrorParse (loc ++ ' ':v)) +--- HTTP-4000.2.3-orig/Network/TCP.hs 2012-04-13 06:39:31.000000000 +1000 ++++ HTTP-4000.2.3/Network/TCP.hs 2012-09-12 21:51:35.633839689 +1000 +@@ -1,3 +1,4 @@ ++{-# LANGUAGE ScopedTypeVariables #-} + {-# LANGUAGE TypeSynonymInstances #-} + ----------------------------------------------------------------------------- + -- | +@@ -57,6 +58,7 @@ + + import Data.Char ( toLower ) + import Data.Word ( Word8 ) ++import qualified Control.Exception ( catch, IOException ) + import Control.Concurrent + import Control.Monad ( liftM, when ) + import System.IO ( Handle, hFlush, IOMode(..), hClose ) +@@ -302,7 +304,7 @@ + ConnClosed -> print "aa" >> return False + _ + | connEndPoint v == endPoint -> +- catch (getPeerName (connSock v) >> return True) (const $ return False) ++ Control.Exception.catch (getPeerName (connSock v) >> return True) (\(_:: Control.Exception.IOException) -> return False) + | otherwise -> return False + + isTCPConnectedTo :: HandleStream ty -> EndPoint -> IO Bool +@@ -312,7 +314,7 @@ + ConnClosed -> return False + _ + | connEndPoint v == endPoint -> +- catch (getPeerName (connSock v) >> return True) (const $ return False) ++ Control.Exception.catch (getPeerName (connSock v) >> return True) (\(_:: Control.Exception.IOException) -> return False) + | otherwise -> return False + + readBlockBS :: HStream a => HandleStream a -> Int -> IO (Result a) +@@ -364,18 +366,18 @@ + modifyMVar_ (getRef ref) (\ co -> return co{connInput=Just b}) + return (return a) + _ -> do +- Prelude.catch (buf_hGet (connBuffer conn) (connHandle conn) n >>= return.return) ++ Control.Exception.catch (buf_hGet (connBuffer conn) (connHandle conn) n >>= return.return) + (\ e -> + if isEOFError e + then do +- when (connCloseEOF conn) $ catch (closeQuick ref) (\ _ -> return ()) ++ when (connCloseEOF conn) $ Control.Exception.catch (closeQuick ref) (\ (_ :: Control.Exception.IOException) -> return ()) + return (return (buf_empty (connBuffer conn))) + else return (failMisc (show e))) + + bufferPutBlock :: BufferOp a -> Handle -> a -> IO (Result ()) + bufferPutBlock ops h b = +- Prelude.catch (buf_hPut ops h b >> hFlush h >> return (return ())) +- (\ e -> return (failMisc (show e))) ++ Control.Exception.catch (buf_hPut ops h b >> hFlush h >> return (return ())) ++ (\ (e :: Control.Exception.IOException) -> return (failMisc (show e))) + + bufferReadLine :: HStream a => HandleStream a -> IO (Result a) + bufferReadLine ref = onNonClosedDo ref $ \ conn -> do +@@ -385,13 +387,13 @@ + let (newl,b1) = buf_splitAt (connBuffer conn) 1 b0 + modifyMVar_ (getRef ref) (\ co -> return co{connInput=Just b1}) + return (return (buf_append (connBuffer conn) a newl)) +- _ -> Prelude.catch ++ _ -> Control.Exception.catch + (buf_hGetLine (connBuffer conn) (connHandle conn) >>= + return . return . appendNL (connBuffer conn)) + (\ e -> + if isEOFError e + then do +- when (connCloseEOF conn) $ catch (closeQuick ref) (\ _ -> return ()) ++ when (connCloseEOF conn) $ Control.Exception.catch (closeQuick ref) (\ (_ :: Control.Exception.IOException) -> return ()) + return (return (buf_empty (connBuffer conn))) + else return (failMisc (show e))) + where +--- HTTP-4000.2.3-orig/Network/StreamSocket.hs 2012-04-13 06:39:31.000000000 +1000 ++++ HTTP-4000.2.3/Network/StreamSocket.hs 2012-09-12 22:27:16.119222147 +1000 +@@ -1,3 +1,4 @@ ++{-# LANGUAGE ScopedTypeVariables #-} + {-# OPTIONS_GHC -fno-warn-orphans #-} + ----------------------------------------------------------------------------- + -- | +@@ -36,7 +37,7 @@ + import Network.HTTP.Base ( catchIO ) + import Control.Monad (liftM) + import Control.Exception as Exception (IOException) +-import System.IO.Error (catch, isEOFError) ++import System.IO.Error (isEOFError) + + -- | Exception handler for socket operations. + handleSocketError :: Socket -> IOException -> IO (Result a) +@@ -50,7 +51,7 @@ + myrecv :: Socket -> Int -> IO String + myrecv sock len = + let handler e = if isEOFError e then return [] else ioError e +- in System.IO.Error.catch (recv sock len) handler ++ in catchIO (recv sock len) handler + + instance Stream Socket where + readBlock sk n = readBlockSocket sk n diff --git a/dev-haskell/http/http-4000.2.3.ebuild b/dev-haskell/http/http-4000.2.3.ebuild index bda4350ea847..68df5a8a85af 100644 --- a/dev-haskell/http/http-4000.2.3.ebuild +++ b/dev-haskell/http/http-4000.2.3.ebuild @@ -1,8 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-haskell/http/http-4000.2.3.ebuild,v 1.3 2012/09/12 14:56:57 qnikst Exp $ - -# ebuild generated by hackport 0.2.13 +# $Header: /var/cvsroot/gentoo-x86/dev-haskell/http/http-4000.2.3.ebuild,v 1.4 2012/09/13 01:12:41 gienah Exp $ EAPI="4" @@ -40,6 +38,8 @@ DEPEND="${RDEPEND} S="${WORKDIR}/${MY_P}" +PATCHES=("${FILESDIR}/${PN}-4000.2.3-ghc-7.6.patch") + src_configure() { cabal_src_configure $(use test && use_enable test tests) #395351 } |