summaryrefslogtreecommitdiff
path: root/devel/darcs
diff options
context:
space:
mode:
authorkristerw <kristerw@pkgsrc.org>2007-03-24 17:58:04 +0000
committerkristerw <kristerw@pkgsrc.org>2007-03-24 17:58:04 +0000
commit7c7ee35590cc976e9867add2c6b84d4f1d59cdae (patch)
treee318e25acf7e005ac0d19b21aff04185e3493e25 /devel/darcs
parente05ef3d8ed2607e2e68f6ea727425dc0f6ac8b0f (diff)
downloadpkgsrc-7c7ee35590cc976e9867add2c6b84d4f1d59cdae.tar.gz
Make darcs compile when using GHC 6.6.
Bump PKGREVISION.
Diffstat (limited to 'devel/darcs')
-rw-r--r--devel/darcs/Makefile4
-rw-r--r--devel/darcs/distinfo4
-rw-r--r--devel/darcs/patches/patch-ab56
-rw-r--r--devel/darcs/patches/patch-ac150
4 files changed, 211 insertions, 3 deletions
diff --git a/devel/darcs/Makefile b/devel/darcs/Makefile
index df44321f8b9..5193d07f086 100644
--- a/devel/darcs/Makefile
+++ b/devel/darcs/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.17 2007/02/17 20:59:48 wiz Exp $
+# $NetBSD: Makefile,v 1.18 2007/03/24 17:58:04 kristerw Exp $
DISTNAME= darcs-1.0.8
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= devel scm
MASTER_SITES= http://www.darcs.net/
diff --git a/devel/darcs/distinfo b/devel/darcs/distinfo
index ab8243b6c8a..668f0768afd 100644
--- a/devel/darcs/distinfo
+++ b/devel/darcs/distinfo
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.7 2006/10/17 21:43:38 agc Exp $
+$NetBSD: distinfo,v 1.8 2007/03/24 17:58:04 kristerw Exp $
SHA1 (darcs-1.0.8.tar.gz) = f69fb2f5deb3c5281b2eaed9fcb8aa3fe55829dd
RMD160 (darcs-1.0.8.tar.gz) = a95309f7dc79b29d7e4f237627aa300a84aa5331
Size (darcs-1.0.8.tar.gz) = 1010010 bytes
SHA1 (patch-aa) = dc0d9e08eb8397a6252aa49c0457ec2e948e1ff7
+SHA1 (patch-ab) = 7057e2d8cd53cd5f6114569559fa83d0e85ce23e
+SHA1 (patch-ac) = 53606a8e342a12f79d880b600a3d30cb9ce7fde7
diff --git a/devel/darcs/patches/patch-ab b/devel/darcs/patches/patch-ab
new file mode 100644
index 00000000000..47c17832bcf
--- /dev/null
+++ b/devel/darcs/patches/patch-ab
@@ -0,0 +1,56 @@
+$NetBSD: patch-ab,v 1.1 2007/03/24 17:58:04 kristerw Exp $
+
+Patch needed for GHC 6.6.
+
+--- Lcs.lhs.orig 2006-06-16 20:59:28.000000000 +0200
++++ Lcs.lhs 2007-02-25 22:12:31.000000000 +0100
+@@ -358,7 +358,8 @@
+ -- | goto next unchanged line, return the given line if unchanged
+ nextUnchanged :: BSTArray s -> Int -> ST s Int
+ nextUnchanged c i = do
+- if i == (aLen c) + 1 then return i
++ len <- aLenM c
++ if i == len + 1 then return i
+ else do b <- readArray c i
+ if b then nextUnchanged c (i+1)
+ else return i
+@@ -367,7 +368,8 @@
+ -- behind the last line
+ skipOneUnChanged :: BSTArray s -> Int -> ST s Int
+ skipOneUnChanged c i = do
+- if i == (aLen c) + 1 then return i
++ len <- aLenM c
++ if i == len + 1 then return i
+ else do b <- readArray c i
+ if not b then return (i+1)
+ else skipOneUnChanged c (i+1)
+@@ -381,8 +383,9 @@
+
+ -- | goto next changed line, return the given line if changed
+ nextChanged :: BSTArray s -> Int -> ST s (Maybe Int)
+-nextChanged c i =
+- if i <= aLen c
++nextChanged c i = do
++ len <- aLenM c
++ if i <= len
+ then do b <- readArray c i
+ if not b then nextChanged c (i+1)
+ else return $ Just i
+@@ -430,8 +433,17 @@
+ initP :: [PackedString] -> PArray
+ initP a = listArray (0, length a) (nilPS:a)
+
++#if __GLASGOW_HASKELL__ > 604
++aLen :: (IArray a e) => a Int e -> Int
++aLen a = snd $ bounds a
++aLenM :: (MArray a e m) => a Int e -> m Int
++aLenM a = getBounds a >>= return . snd
++#else
+ aLen :: HasBounds a => a Int e -> Int
+ aLen a = snd $ bounds a
++aLenM :: (HasBounds a, Monad m) => a Int e -> m Int
++aLenM = return . snd . bounds
++#endif
+ \end{code}
+
+ \begin{code}
diff --git a/devel/darcs/patches/patch-ac b/devel/darcs/patches/patch-ac
new file mode 100644
index 00000000000..0a1a5780edc
--- /dev/null
+++ b/devel/darcs/patches/patch-ac
@@ -0,0 +1,150 @@
+$NetBSD: patch-ac,v 1.1 2007/03/24 17:58:04 kristerw Exp $
+
+Patch needed for GHC 6.6.
+
+--- configure.orig 2006-06-16 20:59:33.000000000 +0200
++++ configure 2007-03-24 18:37:35.000000000 +0100
+@@ -3188,7 +3188,7 @@
+ rm -f Main.hi Main.o
+
+ check_module_save_GHCFLAGS=$GHCFLAGS
+- GHCFLAGS="$GHCFLAGS -package text"
++ GHCFLAGS="$GHCFLAGS -package regex-compat"
+
+
+ cat << \EOF > conftest.hs
+@@ -3205,8 +3205,8 @@
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } && test -s conftest
+ then
+- echo "$as_me:$LINENO: result: in package text" >&5
+-echo "${ECHO_T}in package text" >&6
++ echo "$as_me:$LINENO: result: in package regex-compat" >&5
++echo "${ECHO_T}in package regex-compat" >&6
+
+ else
+ echo "configure: failed program was:" >&5
+@@ -3215,8 +3215,8 @@
+ rm -f Main.hi Main.o
+
+ GHCFLAGS=$check_module_save_GHCFLAGS
+- echo "$as_me:$LINENO: result: no; and neither in package text" >&5
+-echo "${ECHO_T}no; and neither in package text" >&6
++ echo "$as_me:$LINENO: result: no; and neither in package regex-compat" >&5
++echo "${ECHO_T}no; and neither in package regex-compat" >&6
+
+ fi
+
+@@ -3305,7 +3305,7 @@
+ cat << \EOF > conftest.hs
+ -- #line 3306 "configure"
+ import Control.Monad.Error
+-main = seq (putStr undefined) (putStr "Hello world.\n")
++main = seq (strMsg "foo" :: String) (putStr "Hello world.\n")
+
+ EOF
+ rm -f Main.hi Main.o
+@@ -3332,7 +3332,7 @@
+ cat << \EOF > conftest.hs
+ -- #line 3333 "configure"
+ import Control.Monad.Error
+-main = seq (putStr undefined) (putStr "Hello world.\n")
++main = seq (strMsg "foo" :: String) (putStr "Hello world.\n")
+
+ EOF
+ rm -f Main.hi Main.o
+@@ -3372,7 +3372,7 @@
+ cat << \EOF > conftest.hs
+ -- #line 3373 "configure"
+ import Control.Monad.Error
+-main = seq (putStr undefined) (putStr "Hello world.\n")
++main = seq (strMsg "foo" :: String) (putStr "Hello world.\n")
+
+ EOF
+ rm -f Main.hi Main.o
+@@ -3399,7 +3399,7 @@
+ cat << \EOF > conftest.hs
+ -- #line 3400 "configure"
+ import Control.Monad.Error
+-main = seq (putStr undefined) (putStr "Hello world.\n")
++main = seq (strMsg "foo" :: String) (putStr "Hello world.\n")
+
+ EOF
+ rm -f Main.hi Main.o
+@@ -3504,6 +3504,76 @@
+
+
+
++echo "$as_me:$LINENO: checking for module Text.Html" >&5
++echo $ECHO_N "checking for module Text.Html... $ECHO_C" >&6
++
++
++cat << \EOF > conftest.hs
++-- #line 3516 "configure"
++import Text.Html
++main = seq (text "foo") (putStr "Hello world.\n")
++
++EOF
++rm -f Main.hi Main.o
++if { ac_try='$GHC $GHCFLAGS -o conftest conftest.hs'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } && test -s conftest
++then
++ echo "$as_me:$LINENO: result: yes" >&5
++echo "${ECHO_T}yes" >&6
++
++else
++ echo "configure: failed program was:" >&5
++ cat conftest.hs >&5
++ echo "end of failed program." >&5
++ rm -f Main.hi Main.o
++
++ check_module_save_GHCFLAGS=$GHCFLAGS
++ GHCFLAGS="$GHCFLAGS -package html"
++
++
++cat << \EOF > conftest.hs
++-- #line 3543 "configure"
++import Text.Html
++main = seq (text "foo") (putStr "Hello world.\n")
++
++EOF
++rm -f Main.hi Main.o
++if { ac_try='$GHC $GHCFLAGS -o conftest conftest.hs'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } && test -s conftest
++then
++ echo "$as_me:$LINENO: result: in package html" >&5
++echo "${ECHO_T}in package html" >&6
++
++else
++ echo "configure: failed program was:" >&5
++ cat conftest.hs >&5
++ echo "end of failed program." >&5
++ rm -f Main.hi Main.o
++
++ GHCFLAGS=$check_module_save_GHCFLAGS
++ echo "$as_me:$LINENO: result: no; and neither in package html" >&5
++echo "${ECHO_T}no; and neither in package html" >&6
++
++fi
++
++
++
++fi
++
++
++
++
++
++
++
+ cat << \EOF >> Workaround.hs.prefix
+ getCurrentDirectory,
+ EOF