From b75de0f2aeb35741c6c0566658b1b0cd3eeee0e1 Mon Sep 17 00:00:00 2001 From: Gabor Pali Date: Mon, 26 Jan 2015 02:43:21 +0000 Subject: [PATCH] - Fix darcs by updating to 2.8.5 [1] - Disallow building static binary with curl support enabled [2] Reported by: Walter C. Pelissero [1], Francisco de Borja Lopez Rio [2] Obtained from: FreeBSD Haskell --- devel/hs-darcs/Makefile | 8 +- devel/hs-darcs/distinfo | 4 +- devel/hs-darcs/files/patch-darcs.cabal | 136 ------------------ .../files/patch-src__Crypt__SHA256.hs | 10 -- .../files/patch-src__Darcs__Commands__Get.hs | 12 -- .../files/patch-src__Darcs__Global.hs | 26 ---- .../files/patch-src__Darcs__SignalHandler.hs | 23 --- 7 files changed, 8 insertions(+), 211 deletions(-) delete mode 100644 devel/hs-darcs/files/patch-darcs.cabal delete mode 100644 devel/hs-darcs/files/patch-src__Crypt__SHA256.hs delete mode 100644 devel/hs-darcs/files/patch-src__Darcs__Commands__Get.hs delete mode 100644 devel/hs-darcs/files/patch-src__Darcs__Global.hs delete mode 100644 devel/hs-darcs/files/patch-src__Darcs__SignalHandler.hs diff --git a/devel/hs-darcs/Makefile b/devel/hs-darcs/Makefile index 01f1462279fb..8f2c115a4297 100644 --- a/devel/hs-darcs/Makefile +++ b/devel/hs-darcs/Makefile @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= darcs -PORTVERSION= 2.8.4 -PORTREVISION= 8 +PORTVERSION= 2.8.5 CATEGORIES= devel haskell MAINTAINER= haskell@FreeBSD.org @@ -53,4 +52,9 @@ MMAP_FLAG_ENABLE= mmap MMAP_FLAG_CABAL= mmap>=0.5 .include "${.CURDIR}/../../lang/ghc/bsd.cabal.mk" + +.if ${PORT_OPTIONS:MSTATIC} && ${PORT_OPTIONS:MCURL} +BROKEN= enabling STATIC and CURL together will produce linker errors +.endif + .include diff --git a/devel/hs-darcs/distinfo b/devel/hs-darcs/distinfo index c2655e42837f..bee49c60c76e 100644 --- a/devel/hs-darcs/distinfo +++ b/devel/hs-darcs/distinfo @@ -1,2 +1,2 @@ -SHA256 (cabal/darcs-2.8.4.tar.gz) = 3fab4dbb2d5dd9f381d49f4730c12e1534b5c484b0dde9712614a7151f659f98 -SIZE (cabal/darcs-2.8.4.tar.gz) = 1301464 +SHA256 (cabal/darcs-2.8.5.tar.gz) = 064310ed589c89500e224ad5254ab88de815c349f14f9aef9513720eb857e399 +SIZE (cabal/darcs-2.8.5.tar.gz) = 1306525 diff --git a/devel/hs-darcs/files/patch-darcs.cabal b/devel/hs-darcs/files/patch-darcs.cabal deleted file mode 100644 index db24cf9a638f..000000000000 --- a/devel/hs-darcs/files/patch-darcs.cabal +++ /dev/null @@ -1,136 +0,0 @@ ---- ./darcs.cabal.orig 2013-02-06 07:07:21.000000000 +0100 -+++ ./darcs.cabal 2014-07-13 22:44:31.000000000 +0200 -@@ -147,7 +147,7 @@ - else - buildable: True - -- build-tools: ghc >= 6.10 && < 7.8 -+ build-tools: ghc >= 6.10 && < 7.10 - - hs-source-dirs: src - include-dirs: src -@@ -369,13 +369,13 @@ - cc-options: -DHAVE_SIGINFO_H - - if os(windows) -- build-depends: base >= 4 && < 4.7 -+ build-depends: base >= 4 && < 4.8 - else - if flag(force-char8-encoding) -- build-depends: base >= 4.5 && < 4.7 -+ build-depends: base >= 4.5 && < 4.8 - cpp-options: -DFORCE_CHAR8_ENCODING - else -- build-depends: base >= 4 && < 4.4 -+ build-depends: base >= 4 && < 4.8 - - build-depends: extensible-exceptions >= 0.1 && < 0.2, - regex-compat >= 0.95.1, -@@ -393,15 +393,15 @@ - build-depends: haskeline <= 0.6.4.6 - - if !os(windows) -- build-depends: unix >= 1.0 && < 2.7 -+ build-depends: unix >= 1.0 && < 2.8 - - build-depends: bytestring >= 0.9.0 && < 0.11, -- text >= 0.11.0.6 && < 0.12.0.0, -+ text >= 0.11.0.6 && < 1.2.0.0, - old-time >= 1.0 && < 1.2, - directory >= 1.0.0.0 && < 1.3.0.0, -- process >= 1.0.0.0 && < 1.2.0.0, -+ process >= 1.0.0.0 && < 1.3.0.0, - containers >= 0.1 && < 0.6, -- array >= 0.1 && < 0.5, -+ array >= 0.1 && < 0.6, - random == 1.0.* - - -@@ -486,7 +486,7 @@ - buildable: False - else - buildable: True -- build-tools: ghc >= 6.10 && < 7.8 -+ build-tools: ghc >= 6.10 && < 7.10 - - main-is: darcs.hs - hs-source-dirs: src -@@ -547,13 +547,13 @@ - cc-options: -DHAVE_SIGINFO_H - - if os(windows) -- build-depends: base >= 4 && < 4.7 -+ build-depends: base >= 4 && < 4.8 - else - if flag(force-char8-encoding) -- build-depends: base >= 4.5 && < 4.7 -+ build-depends: base >= 4.5 && < 4.8 - cpp-options: -DFORCE_CHAR8_ENCODING - else -- build-depends: base >= 4 && < 4.4 -+ build-depends: base >= 4 && < 4.8 - - build-depends: extensible-exceptions >= 0.1 && < 0.2, - regex-compat >= 0.95.1, -@@ -571,15 +571,15 @@ - build-depends: haskeline <= 0.6.4.6 - - if !os(windows) -- build-depends: unix >= 1.0 && < 2.7 -+ build-depends: unix >= 1.0 && < 2.8 - - build-depends: bytestring >= 0.9.0 && < 0.11, -- text >= 0.11.0.6 && < 0.12.0.0, -+ text >= 0.11.0.6 && < 1.2.0.0, - old-time >= 1.0 && < 1.2, - directory >= 1.0.0.0 && < 1.3.0.0, -- process >= 1.0.0.0 && < 1.2.0.0, -+ process >= 1.0.0.0 && < 1.3.0.0, - containers >= 0.1 && < 0.6, -- array >= 0.1 && < 0.5, -+ array >= 0.1 && < 0.6, - random == 1.0.* - - if flag(curl) -@@ -643,7 +643,7 @@ - Executable darcs-test - main-is: test.hs - -- build-tools: ghc >= 6.10 && < 7.8 -+ build-tools: ghc >= 6.10 && < 7.10 - - - if !flag(test) -@@ -756,25 +756,25 @@ - cc-options: -DHAVE_SIGINFO_H - - if os(windows) -- build-depends: base >= 4 && < 4.7 -+ build-depends: base >= 4 && < 4.8 - else - if flag(force-char8-encoding) -- build-depends: base >= 4.5 && < 4.7 -+ build-depends: base >= 4.5 && < 4.8 - cpp-options: -DFORCE_CHAR8_ENCODING - else -- build-depends: base >= 4 && < 4.4 -+ build-depends: base >= 4 && < 4.8 - - if !os(windows) -- build-depends: unix >= 1.0 && < 2.7 -+ build-depends: unix >= 1.0 && < 2.8 - - build-depends: bytestring >= 0.9.0 && < 0.11, - haskeline >= 0.6.3 && < 0.8, -- text >= 0.11.0.6 && < 0.12.0.0, -+ text >= 0.11.0.6 && < 1.2.0.0, - old-time >= 1.0 && < 1.2, - directory >= 1.0.0.0 && < 1.3.0.0, -- process >= 1.0.0.0 && < 1.2.0.0, -+ process >= 1.0.0.0 && < 1.3.0.0, - containers >= 0.1 && < 0.6, -- array >= 0.1 && < 0.5, -+ array >= 0.1 && < 0.6, - hashed-storage >= 0.5.6 && < 0.6, - vector >= 0.7, - tar >= 0.3 && < 0.5, diff --git a/devel/hs-darcs/files/patch-src__Crypt__SHA256.hs b/devel/hs-darcs/files/patch-src__Crypt__SHA256.hs deleted file mode 100644 index 4fbf130c4138..000000000000 --- a/devel/hs-darcs/files/patch-src__Crypt__SHA256.hs +++ /dev/null @@ -1,10 +0,0 @@ ---- ./src/Crypt/SHA256.hs.orig 2013-02-06 07:07:21.000000000 +0100 -+++ ./src/Crypt/SHA256.hs 2014-07-13 18:41:00.000000000 +0200 -@@ -20,6 +20,7 @@ - import Foreign.C.String ( withCString ) - import Data.ByteString.Unsafe (unsafeUseAsCStringLen) - import qualified Data.ByteString as B -+import System.IO.Unsafe - - sha256sum :: B.ByteString -> String - sha256sum p = unsafePerformIO $ diff --git a/devel/hs-darcs/files/patch-src__Darcs__Commands__Get.hs b/devel/hs-darcs/files/patch-src__Darcs__Commands__Get.hs deleted file mode 100644 index 0dfbd5e268af..000000000000 --- a/devel/hs-darcs/files/patch-src__Darcs__Commands__Get.hs +++ /dev/null @@ -1,12 +0,0 @@ ---- ./src/Darcs/Commands/Get.hs.orig 2013-02-06 07:07:21.000000000 +0100 -+++ ./src/Darcs/Commands/Get.hs 2014-07-13 22:39:00.000000000 +0200 -@@ -157,7 +157,8 @@ - copyRepo - withRepository opts ((RepoJob $ \repository -> goToChosenVersion repository opts) :: RepoJob ()) - putInfo opts $ text "Finished getting." -- where copyRepo = -+ where copyRepo :: IO () -+ copyRepo = - withRepository opts $ RepoJob $ \repository -> - if formatHas HashedInventory rfsource - then do diff --git a/devel/hs-darcs/files/patch-src__Darcs__Global.hs b/devel/hs-darcs/files/patch-src__Darcs__Global.hs deleted file mode 100644 index 75472fdfc142..000000000000 --- a/devel/hs-darcs/files/patch-src__Darcs__Global.hs +++ /dev/null @@ -1,26 +0,0 @@ ---- ./src/Darcs/Global.hs.orig 2013-02-06 07:07:21.000000000 +0100 -+++ ./src/Darcs/Global.hs 2014-07-13 18:40:00.000000000 +0200 -@@ -61,7 +61,7 @@ - import Control.Monad ( when ) - import Control.Concurrent.MVar - import Control.Exception.Extensible ( bracket_, catch, catchJust, SomeException -- , block, unblock -+ , mask_ - ) - import Data.IORef ( IORef, newIORef, readIORef, writeIORef ) - import Data.IORef ( modifyIORef ) -@@ -106,12 +106,12 @@ - exit - prog - where -- exit = block $ do -+ exit = mask_ $ do - Just actions <- swapMVar atexitActions Nothing - -- from now on atexit will not register new actions - mapM_ runAction actions - runAction action = -- catch (unblock action) $ \(exn :: SomeException) -> do -+ catch action $ \(exn :: SomeException) -> do - hPutStrLn stderr $ "Exception thrown by an atexit registered action:" - hPutStrLn stderr $ show exn - diff --git a/devel/hs-darcs/files/patch-src__Darcs__SignalHandler.hs b/devel/hs-darcs/files/patch-src__Darcs__SignalHandler.hs deleted file mode 100644 index e495bfad5fe5..000000000000 --- a/devel/hs-darcs/files/patch-src__Darcs__SignalHandler.hs +++ /dev/null @@ -1,23 +0,0 @@ ---- ./src/Darcs/SignalHandler.hs.orig 2013-02-06 07:07:21.000000000 +0100 -+++ ./src/Darcs/SignalHandler.hs 2014-07-13 18:39:00.000000000 +0200 -@@ -27,7 +27,7 @@ - import System.Exit ( exitWith, ExitCode ( ExitFailure ) ) - import Control.Concurrent ( ThreadId, myThreadId ) - import Control.Exception.Extensible -- ( catch, throw, throwTo, block, unblock, -+ ( catch, throw, throwTo, mask_, - Exception(..), SomeException(..), IOException ) - import System.Posix.Files ( getFdStatus, isNamedPipe ) - import System.Posix.IO ( stdOutput ) -@@ -128,8 +128,9 @@ - | otherwise = throw ioe - - withSignalsBlocked :: IO a -> IO a --withSignalsBlocked job = block (job >>= \r -> -- unblock(return r) `catchSignal` couldnt_do r) -+withSignalsBlocked job = do -+ r <- mask_ job -+ (return r) `catchSignal` couldnt_do r - where couldnt_do r s | s == sigINT = oops "interrupt" r - | s == sigHUP = oops "HUP" r - | s == sigABRT = oops "ABRT" r