diff options
author | Gabor Pali <pgj@FreeBSD.org> | 2013-06-04 18:53:40 +0000 |
---|---|---|
committer | Gabor Pali <pgj@FreeBSD.org> | 2013-06-04 18:53:40 +0000 |
commit | 109269205e521bb1d2d87678a391e5adefff88d6 (patch) | |
tree | 93f1f9278a9a48902904b7ff4a5ce711c10efe08 /graphics/hs-HGL | |
parent | ad7295cafd0e46ece6fcbf594ef39a767c296d0e (diff) | |
download | ports-109269205e521bb1d2d87678a391e5adefff88d6.tar.gz ports-109269205e521bb1d2d87678a391e5adefff88d6.zip |
Notes
Diffstat (limited to 'graphics/hs-HGL')
5 files changed, 86 insertions, 5 deletions
diff --git a/graphics/hs-HGL/Makefile b/graphics/hs-HGL/Makefile index ef3b5a33ffb0..69d7e67083ac 100644 --- a/graphics/hs-HGL/Makefile +++ b/graphics/hs-HGL/Makefile @@ -3,15 +3,14 @@ PORTNAME= HGL PORTVERSION= 3.2.0.2 -PORTREVISION= 9 +PORTREVISION= 10 CATEGORIES= graphics haskell MAINTAINER= haskell@FreeBSD.org -COMMENT= A simple Haskell graphics library based on X11 or Win32 +COMMENT= Simple Haskell graphics library based on X11 or Win32 LICENSE= BSD -CABAL_SETUP= Setup.hs USE_CABAL= X11 .include "${.CURDIR}/../../lang/ghc/bsd.cabal.mk" diff --git a/graphics/hs-HGL/files/patch-Graphics__HGL__Internals__Utilities.hs b/graphics/hs-HGL/files/patch-Graphics__HGL__Internals__Utilities.hs index 0b03fe9d5ceb..d09a4cb11689 100644 --- a/graphics/hs-HGL/files/patch-Graphics__HGL__Internals__Utilities.hs +++ b/graphics/hs-HGL/files/patch-Graphics__HGL__Internals__Utilities.hs @@ -1,11 +1,27 @@ --- ./Graphics/HGL/Internals/Utilities.hs.orig 2009-11-03 15:50:11.000000000 +0100 -+++ ./Graphics/HGL/Internals/Utilities.hs 2011-03-13 18:31:25.754332789 +0100 ++++ ./Graphics/HGL/Internals/Utilities.hs 2013-05-01 01:30:47.000000000 +0200 @@ -20,7 +20,7 @@ modMVar, modMVar_ ) where -import qualified Control.Exception as E (bracket, try, IOException, tryJust, ioErrors) -+import qualified Control.OldException as E (bracket, try, IOException, tryJust, ioErrors) ++import qualified Control.Exception as E (bracket, try, IOException, tryJust) import Control.Concurrent( MVar, takeMVar, putMVar ) bracket :: IO a -> (a -> IO b) -> (a -> IO c) -> IO c +@@ -32,15 +32,7 @@ + + type Exception = E.IOException + safeTry :: IO a -> IO (Either Exception a) +- +-#if __GLASGOW_HASKELL >= 610 +--- ghc-6.10 + safeTry = E.try +-#else +--- ghc 6.8 (and below?) +-safeTry = E.tryJust E.ioErrors +-#endif +- + + ---------------------------------------------------------------- + -- Utilities diff --git a/graphics/hs-HGL/files/patch-Graphics__HGL__Run.hs b/graphics/hs-HGL/files/patch-Graphics__HGL__Run.hs new file mode 100644 index 000000000000..5e29c6df339a --- /dev/null +++ b/graphics/hs-HGL/files/patch-Graphics__HGL__Run.hs @@ -0,0 +1,20 @@ +--- ./Graphics/HGL/Run.hs.orig 2009-11-03 15:50:11.000000000 +0100 ++++ ./Graphics/HGL/Run.hs 2013-05-01 01:51:50.000000000 +0200 +@@ -24,7 +24,7 @@ + import Graphics.HGL.Internals.Utilities (safeTry) + import Control.Concurrent (forkIO, yield) + import Data.IORef( newIORef, readIORef, writeIORef ) +-import System.IO.Error (try) ++import System.IO.Error (tryIOError) + #endif + + ---------------------------------------------------------------- +@@ -60,7 +60,7 @@ + beginGraphics + quit <- newIORef False + safeTry $ do +- forkIO (try m >> writeIORef quit True) ++ forkIO (tryIOError m >> writeIORef quit True) + yield + handleEvents (readIORef quit) + endGraphics diff --git a/graphics/hs-HGL/files/patch-Graphics__HGL__X11__Display.hs b/graphics/hs-HGL/files/patch-Graphics__HGL__X11__Display.hs new file mode 100644 index 000000000000..0951e6ec3eee --- /dev/null +++ b/graphics/hs-HGL/files/patch-Graphics__HGL__X11__Display.hs @@ -0,0 +1,26 @@ +--- ./Graphics/HGL/X11/Display.hs.orig 2009-11-03 15:50:11.000000000 +0100 ++++ ./Graphics/HGL/X11/Display.hs 2013-05-01 02:01:44.000000000 +0200 +@@ -14,12 +14,12 @@ + import Control.Monad (when) + import Data.Maybe (isJust) + import System.Environment (getEnv) +-import System.IO.Error (try) ++import System.IO.Error (tryIOError, catchIOError) + import System.IO.Unsafe (unsafePerformIO) + + getDisplayName :: IO String + getDisplayName = do +- disp <- try (getEnv "DISPLAY") ++ disp <- tryIOError (getEnv "DISPLAY") + return (either (const ":0.0") id disp) + + displayRef :: MVar (Maybe X.Display) +@@ -32,7 +32,7 @@ + openDisplay' + where + openDisplay' = do +- display <- X.openDisplay host `catch` \ err -> ++ display <- X.openDisplay host `catchIOError` \ err -> + ioError (userError ("Unable to open X display " ++ host)) + modMVar displayRef (const $ Just display) + return display diff --git a/graphics/hs-HGL/files/patch-Graphics__HGL__X11__Types.hs b/graphics/hs-HGL/files/patch-Graphics__HGL__X11__Types.hs new file mode 100644 index 000000000000..892c5fe75355 --- /dev/null +++ b/graphics/hs-HGL/files/patch-Graphics__HGL__X11__Types.hs @@ -0,0 +1,20 @@ +--- ./Graphics/HGL/X11/Types.hs.orig 2009-11-03 15:50:11.000000000 +0100 ++++ ./Graphics/HGL/X11/Types.hs 2013-05-01 01:53:35.000000000 +0200 +@@ -30,6 +30,7 @@ + import Control.Concurrent.MVar (MVar) + import Data.Bits + import Data.Word (Word8) ++import System.IO.Error + + ---------------------------------------------------------------- + -- Units +@@ -84,8 +85,7 @@ + (X.Color p _ _ _ _) <- + X.allocColor display color_map (X.Color 0 r g b xcolor_flags) + return p) +- `catch` \ err -> +- print err >> return 0 ++ `catchIOError` \err -> print err >> return 0 + -- ioError (userError ("Error: " ++ show err + -- ++ "\nUnable to allocate colo[u]r " ++ show (r,g,b) + -- ++ " - I'll bet you're running Netscape.")) |