darcs stable port information

Package: darcs
Version: 2.0.2
Revision: 2
Distribution: 10.4, 10.5
Architecture: i386, powerpc
Description: Advanced distributed revision control system
License: GPL
Maintainer: Corey Halpin
Depends: <<
libncurses5-shlibs,
readline5-shlibs,
libcurl4-shlibs,
gmp-shlibs (>= 4.1.4-1), libmpfr1-shlibs
<<
BuildDepends: <<
libncurses5,
readline5,
libcurl4, ghc-dev (>= 6.2),
tetex-base | system-tetex, latex2html, gmp
<<
Replaces: darcs-bash-completion
Conflicts: darcs-bash-completion
Recommends: bash-completion

Source: http://darcs.net/%n-%v.tar.gz
Source-MD5: f216b019dc9fc83cf920f715b1da375c

#Patch: %n.patch
ConfigureParams: --mandir=%p/share/man --sysconfdir=%p/etc

InstallScript: make install DESTDIR=%d

DocFiles: AUTHORS COPYING

DescDetail: <<
Darcs is a revision control system, along the lines of CVS and arch.
That means that it keeps track of various revisions and branches of
your project, allows for changes to propagate from one branch to
another. Darcs is intended to be an `advanced' revision control
system. Darcs has two particularly distinctive features which differ
from other revision control systems: 1) each copy of the source is a
fully functional branch, and 2) underlying darcs is a consistent and
powerful theory of patches.
<<

Homepage: http://abridgegame.org/darcs/

DescPort: <<
Previous versions by Vadim Zaliva and Lars Rosengreen
<<

darcs stable port .patch

diff -ru darcs-1.0.8/Lcs.lhs darcs-1.0.8-patched/Lcs.lhs
--- darcs-1.0.8/Lcs.lhs 2006-06-16 13:59:28.000000000 -0500
+++ darcs-1.0.8-patched/Lcs.lhs 2006-12-07 17:12:55.000000000 -0600
@@ -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 -ru darcs-1.0.8/configure.ac darcs-1.0.8-patched/configure.ac
--- darcs-1.0.8/configure.ac 2006-06-16 13:59:29.000000000 -0500
+++ darcs-1.0.8-patched/configure.ac 2006-12-07 17:12:39.000000000 -0600
@@ -110,6 +110,7 @@
dnl Look for Text.Regex

GHC_CHECK_MODULE(Text.Regex( mkRegex, matchRegex, Regex ), text, mkRegex undefined)
+GHC_CHECK_MODULE(Text.Regex( mkRegex, matchRegex, Regex ), regex-compat, mkRegex undefined)

dnl See if we need a package for QuickCheck

@@ -124,6 +125,10 @@

GHC_CHECK_MODULE(Text.ParserCombinators.Parsec, parsec, errorPos undefined)

+dnl Check if we need package html
+
+GHC_CHECK_MODULE(Text.Html, html, text "foo")
+
dnl Deal with systems on which getCurrentDirectory uses '\\' rather than '/':

WORKAROUND_getCurrentDirectory

darcs _unstable_ port .patch