dev-vcs/darcs: version bump (and it's minimal depends)
authorSergei Trofimovich <slyfox@gentoo.org>
Thu, 4 Aug 2011 21:04:18 +0000 (21:04 +0000)
committerSergei Trofimovich <slyfox@gentoo.org>
Thu, 4 Aug 2011 21:04:18 +0000 (21:04 +0000)
Package-Manager: portage-2.1.10.10/cvs/Linux x86_64

dev-vcs/darcs/ChangeLog
dev-vcs/darcs/Manifest
dev-vcs/darcs/darcs-2.5.2.ebuild [new file with mode: 0644]
dev-vcs/darcs/files/darcs-2.5.2-ghc-7.2.patch [new file with mode: 0644]
dev-vcs/darcs/files/darcs-2.5.2-relax-regex-libs-deps.patch [new file with mode: 0644]
dev-vcs/darcs/files/darcs-2.5.2-tests-ghc-7.2.patch [new file with mode: 0644]

index c55a4a1b133e08bb129fc20f7526a0cacd9a0b8b..9601e449bfd5a977f698322054e4c49c6ed6a5fd 100644 (file)
@@ -1,6 +1,15 @@
 # ChangeLog for dev-vcs/darcs
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-vcs/darcs/ChangeLog,v 1.21 2011/06/05 12:10:57 slyfox Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-vcs/darcs/ChangeLog,v 1.22 2011/08/04 21:04:18 slyfox Exp $
+
+*darcs-2.5.2 (04 Aug 2011)
+
+  04 Aug 2011; Sergei Trofimovich <slyfox@gentoo.org> +darcs-2.5.2.ebuild,
+  +files/darcs-2.5.2-ghc-7.2.patch,
+  +files/darcs-2.5.2-relax-regex-libs-deps.patch,
+  +files/darcs-2.5.2-tests-ghc-7.2.patch:
+  Version bump (ghc-7 support). Dropped ~alpha/~ia64/~ppc/~ppc64/~sparc
+  keywords until deps are keyworded.
 
   05 Jun 2011; Sergei Trofimovich <slyfox@gentoo.org> darcs-2.4.4-r1.ebuild:
   restored lost ~x86-freebsd ~amd64-linux ~x86-linux ~x86-solaris
index 675e948866d4edc97839e2ebdbf5d44b5207971f..348b159157b6b2353d422cdea6e0a4c438dcabe1 100644 (file)
@@ -4,14 +4,19 @@ Hash: SHA1
 AUX darcs-1.0.9-bashcomp.patch 510 RMD160 73888c758f4a2ac93b83229115d23599162c0b15 SHA1 1abf5c0477169eb0109a0dd7ecfb2c38dfee15ff SHA256 39a7e531f68ee4b71958d52557e6c6ace0c7717d546dcddccc4a5e7fb5daeff6
 AUX darcs-2.4.4-issue1770-curl_multi_perform-no-running-handles.patch 1617 RMD160 6cd0fdcae04518cb8d701f0db89ce7cad4a51c61 SHA1 10cd5b15ffcb9678e0fc8700b9059244a12bf06a SHA256 9716fad28813bae04e06c8a039c9e5cb094cbd0c4907855142e14c49334d387e
 AUX darcs-2.4.4-tests-emailformat.patch 1177 RMD160 fee2084eeb08f23e6b8ee771a369137e0cea8746 SHA1 8d74f367140e5300d663db7c77e0794419672a6b SHA256 6bd35d0c790d4fc583f650cccc433f5005036c06f4de3f139f685e5957b35835
+AUX darcs-2.5.2-ghc-7.2.patch 5084 RMD160 cf8f69a00c3924af192a15bcf3a845268b71d88e SHA1 6e5d64dfc748bbe47b831e75ca09686007702234 SHA256 7c5d189ba1377e881a500852cb823a10672ee3eac0b04fc6d6888f5f3fda3ba4
+AUX darcs-2.5.2-relax-regex-libs-deps.patch 2840 RMD160 48319d80de4e55709d238e69bf14b06388e640a2 SHA1 b32c417c352dc57d85a7d7be33ea2aa7793cd0a8 SHA256 fe32930704bbd411b0a65a6a378c7a9700257f165e8edad889b53ad227620b1a
+AUX darcs-2.5.2-tests-ghc-7.2.patch 708 RMD160 406b9caddc080596eee52276f0ae445cdc01a1e9 SHA1 edda5d6a60d10f4b669126a790f7817f6439a42f SHA256 f54f02114b5ca6477f750d0fb1712d79de61712e97480e54a94b35b6fa660104
 DIST darcs-2.4.4.tar.gz 1193126 RMD160 cec11127740f350d25de7d4f9c7d7df115ebed6a SHA1 96a1907d3b8fd5676074a860359484f251d36e2f SHA256 97cde35ae4b74488f8b98b487bc0498069eaa74fe035903394f3d4aff1da9f9e
+DIST darcs-2.5.2.tar.gz 1231903 RMD160 53e357fb802a72f4b787bf1ca4a6e95e118b08af SHA1 da43ebf64ca4f41b456d5b1fd2038ae0ec5a36da SHA256 8953f9d64f8013876466b8ad5474a212ee4e164f419ba4012b5dcc9e590fb386
 EBUILD darcs-2.4.4-r1.ebuild 4418 RMD160 69b28895a982cff4820a765f5d5482e6dd987404 SHA1 e2c064baaa766d083dce0f12a2eec11d9753af7c SHA256 b1446af2a49ce939769df9f9c623eb1d926c489f9f199834f9a8144035a2f896
-MISC ChangeLog 20700 RMD160 1b4b05b331e88099f177561af97fb135dd72e04e SHA1 5165f82554ca09e4263bca555eb4f9c6fe172f07 SHA256 5a208fef8b33243b364d43b2b334823c8da84c2c4498865fbbdca8b873c48b75
+EBUILD darcs-2.5.2.ebuild 3812 RMD160 661bea8197a90a4fb72fe18250c74115ae10c999 SHA1 8b7ffae31dfd4d96a1ba61d1b6f16a426f576133 SHA256 c5882f1d13b81a7dcefae495bbc062dd80d503931835224d94d95df2b1f563a4
+MISC ChangeLog 21041 RMD160 1b7b4956509bbebe1ae54bb29e00b152f252c88b SHA1 81f304724106788165ec28bb4063aeb3a109a426 SHA256 b70f6b40477432970ad9b30b5ba082f5e41cc5588566fe4a8bed05a9afd7821a
 MISC metadata.xml 223 RMD160 7783e6057effb8b8f0b79cffe8b557b32c633839 SHA1 7b962c77f2e38479a9d1621ec8d307ca9f761753 SHA256 1d00c8be162a6cb87b3de440b3e63e10b39c12d56e8fbfe592e75aed872b2508
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.17 (GNU/Linux)
 
-iEYEARECAAYFAk3rcwwACgkQcaHudmEf86r5qwCdGesPg7flU0aDd7tcih6J/MMn
-+BEAn1L18TspflmZMUQORkJjE0KMFPXn
-=Fid2
+iEYEARECAAYFAk47CiMACgkQcaHudmEf86oh5QCeOYyYlr9XQUU8rSJBotfnR5vt
+f8sAoIjZGVs3/Hw2qWpGMPeT1glcq2mv
+=8n6Q
 -----END PGP SIGNATURE-----
diff --git a/dev-vcs/darcs/darcs-2.5.2.ebuild b/dev-vcs/darcs/darcs-2.5.2.ebuild
new file mode 100644 (file)
index 0000000..2c76b74
--- /dev/null
@@ -0,0 +1,123 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-vcs/darcs/darcs-2.5.2.ebuild,v 1.1 2011/08/04 21:04:18 slyfox Exp $
+
+EAPI="3"
+CABAL_FEATURES="bin lib profile haddock hscolour"
+inherit haskell-cabal bash-completion
+
+DESCRIPTION="a distributed, interactive, smart revision control system"
+HOMEPAGE="http://darcs.net/"
+SRC_URI="http://hackage.haskell.org/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
+IUSE="doc test"
+
+RDEPEND="=dev-haskell/hashed-storage-0.5*
+               =dev-haskell/haskeline-0.6*
+               =dev-haskell/html-1.0*
+               <dev-haskell/http-4000.2
+               =dev-haskell/mmap-0.5*
+               <dev-haskell/mtl-2.1
+               >=dev-haskell/network-2.2
+               <dev-haskell/parsec-3.2
+               <dev-haskell/regex-compat-0.96
+               =dev-haskell/tar-0.3*
+               =dev-haskell/terminfo-0.3*
+               =dev-haskell/text-0.11*
+               <dev-haskell/zlib-0.6.0.0
+               >=dev-lang/ghc-6.10.1
+               net-misc/curl
+               virtual/mta"
+
+# darcs also has a library version; we thus need $DEPEND
+DEPEND="${RDEPEND}
+               >=dev-haskell/cabal-1.8
+               doc? ( virtual/latex-base
+                       || (    dev-tex/latex2html[png]
+                               dev-tex/latex2html[gif]
+                       )
+               )
+               test? ( dev-haskell/test-framework
+                               dev-haskell/test-framework-hunit
+                               dev-haskell/test-framework-quickcheck2
+               )
+               "
+
+src_prepare() {
+       cd "${S}/contrib"
+       epatch "${FILESDIR}/${PN}-1.0.9-bashcomp.patch"
+       cd ..
+
+       epatch "${FILESDIR}/${PN}-2.5.2-relax-regex-libs-deps.patch"
+       epatch "${FILESDIR}/${PN}-2.5.2-ghc-7.2.patch"
+       epatch "${FILESDIR}/${PN}-2.5.2-tests-ghc-7.2.patch"
+
+       # hlint tests tend to break on every newly released hlint
+       rm "${S}/tests/haskell_policy.sh"
+
+       # use a more recent API, and thus depend on a more recent package
+       sed -i -e "s/findBy/find/" "${S}/src/Darcs/Test/Patch/Info.hs" || die "sed s/findBy/find/ not necessary"
+}
+
+src_configure() {
+       # checking whether ghc supports -threaded flag
+       # Beware: http://www.haskell.org/ghc/docs/latest/html/users_guide/options-phases.html#options-linker
+       # contains: 'The ability to make a foreign call that does not block all other Haskell threads.'
+       # It might have interactivity impact.
+
+       threaded_flag=""
+       if $(ghc-getghc) --info | grep "Support SMP" | grep -q "YES"; then
+               threaded_flag="--flags=threaded"
+               einfo "$P will be built with threads support"
+       else
+               threaded_flag="--flags=-threaded"
+               einfo "$P will be built without threads support"
+       fi
+
+       # Use curl for net stuff to avoid strict version dep on HTTP and network
+       cabal_src_configure \
+               --flags=curl \
+               --flags=-http \
+               --flags=curl-pipelining \
+               --flags=color \
+               --flags=terminfo \
+               --flags=mmap \
+               $threaded_flag \
+               $(cabal_flag test)
+}
+
+src_test() {
+       # run cabal test from haskell-cabal
+       haskell-cabal_src_test || die "cabal test failed"
+
+       # run the unit tests (not part of cabal test for some reason...)
+       # breaks the cabal abstraction a bit...
+       "${S}/dist/build/unit/unit" || die "unit tests failed"
+}
+
+src_install() {
+       cabal_src_install
+       dobashcompletion "${S}/contrib/darcs_completion" "${PN}"
+
+       rm "${ED}/usr/bin/unit" 2> /dev/null
+
+       # fixup perms in such an an awkward way
+       mv "${ED}/usr/share/man/man1/darcs.1" "${S}/darcs.1" || die "darcs.1 not found"
+       doman "${S}/darcs.1" || die "failed to register darcs.1 as a manpage"
+
+       # if tests were enabled, make sure the unit test driver is deleted
+       rm -rf "${ED}/usr/bin/unit"
+}
+
+pkg_postinst() {
+       ghc-package_pkg_postinst
+       bash-completion_pkg_postinst
+
+       ewarn "NOTE: in order for the darcs send command to work properly,"
+       ewarn "you must properly configure your mail transport agent to relay"
+       ewarn "outgoing mail.  For example, if you are using ssmtp, please edit"
+       ewarn "${EPREFIX}/etc/ssmtp/ssmtp.conf with appropriate values for your site."
+}
diff --git a/dev-vcs/darcs/files/darcs-2.5.2-ghc-7.2.patch b/dev-vcs/darcs/files/darcs-2.5.2-ghc-7.2.patch
new file mode 100644 (file)
index 0000000..22dfea8
--- /dev/null
@@ -0,0 +1,142 @@
+diff --git a/Distribution/ShellHarness.hs b/Distribution/ShellHarness.hs
+index 78a8a9b..949b752 100644
+--- a/Distribution/ShellHarness.hs
++++ b/Distribution/ShellHarness.hs
+@@ -12,10 +12,9 @@ import System.Environment ( getEnv, getEnvironment )
+ import System.Exit ( ExitCode (..) )
+ import System.FilePath
+ import System.IO
+-import System( system )
+ import System.Process ( ProcessHandle,
+                         runInteractiveProcess, waitForProcess,
+-                        getProcessExitCode )
++                        getProcessExitCode, system )
+ import Data.Maybe
+ import Data.List ( isInfixOf, isPrefixOf, (\\), nubBy, isSuffixOf )
+ import Control.Concurrent
+diff --git a/darcs.cabal b/darcs.cabal
+index 887a27b..56e36fa 100644
+--- a/darcs.cabal
++++ b/darcs.cabal
+@@ -124,7 +124,7 @@ Executable          witnesses
+   else
+     buildable: True
+ 
+-    build-tools: ghc >= 6.10 && < 7.2
++    build-tools: ghc >= 6.10 && < 7.4
+ 
+     hs-source-dirs:   src
+     include-dirs:     src
+@@ -182,7 +182,7 @@ Executable          witnesses
+                      text == 0.11.*,
+                      old-time   == 1.0.*,
+                      directory  >= 1.0.0.0 && < 1.2.0.0,
+-                     process    == 1.0.*,
++                     process    >= 1.0 && < 1.2,
+                      containers >= 0.1 && < 0.5,
+                      array      >= 0.1 && < 0.4,
+                      random     == 1.0.*,
+@@ -192,7 +192,7 @@ Executable          witnesses
+                      test-framework             >= 0.2.2,
+                      test-framework-quickcheck2 >= 0.2.2
+     if !os(windows)
+-      build-depends: unix >= 1.0 && < 2.5
++      build-depends: unix >= 1.0 && < 2.6
+     if flag(http)
+         build-depends:    network >= 2.2 && < 2.4,
+                           HTTP    >= 3000.0 && < 4000.2
+@@ -208,7 +208,7 @@ Library
+   else
+     buildable: True
+ 
+-    build-tools: ghc >= 6.10 && < 7.2
++    build-tools: ghc >= 6.10 && < 7.4
+ 
+     hs-source-dirs:   src
+     include-dirs:     src
+@@ -385,14 +385,14 @@ Library
+                      tar          == 0.3.*
+ 
+     if !os(windows)
+-      build-depends: unix >= 1.0 && < 2.5
++      build-depends: unix >= 1.0 && < 2.6
+ 
+     build-depends: base >= 3,
+                    bytestring >= 0.9.0 && < 0.10,
+                    text == 0.11.*,
+                    old-time   == 1.0.*,
+                    directory  >= 1.0.0.0 && < 1.2.0.0,
+-                   process    == 1.0.*,
++                   process    >= 1.0 && < 1.2,
+                    containers >= 0.1 && < 0.5,
+                    array      >= 0.1 && < 0.4,
+                    random     == 1.0.*
+@@ -483,7 +483,7 @@ Executable          darcs
+                     src/umask.c
+                     src/Crypt/sha2.c
+ 
+-  build-tools: ghc >= 6.10 && < 7.2
++  build-tools: ghc >= 6.10 && < 7.4
+ 
+   -- We need optimizations, regardless of what Hackage says
+   -- Note: "if true" works around a cabal bug with order of flag composition
+@@ -533,14 +533,14 @@ Executable          darcs
+                    tar          == 0.3.*
+ 
+   if !os(windows)
+-    build-depends: unix >= 1.0 && < 2.5
++    build-depends: unix >= 1.0 && < 2.6
+ 
+   build-depends: base >= 3,
+                  bytestring >= 0.9.0 && < 0.10,
+                  text == 0.11.*,
+                    old-time   == 1.0.*,
+                    directory  >= 1.0.0.0 && < 1.2.0.0,
+-                   process    == 1.0.*,
++                   process    >= 1.0 && < 1.2,
+                    containers >= 0.1 && < 0.5,
+                    array      >= 0.1 && < 0.4,
+                    random     == 1.0.*
+@@ -615,7 +615,7 @@ Executable          unit
+   else
+     buildable: True
+ 
+-    build-tools: ghc >= 6.10 && < 7.2
++    build-tools: ghc >= 6.10 && < 7.4
+ 
+     build-depends:   base          < 5,
+                      extensible-exceptions >= 0.1 && < 0.2,
+@@ -678,7 +678,7 @@ Executable          unit
+       cc-options:     -DHAVE_SIGINFO_H
+ 
+     if !os(windows)
+-      build-depends: unix >= 1.0 && < 2.5
++      build-depends: unix >= 1.0 && < 2.6
+ 
+     build-depends: base >= 3,
+                    bytestring >= 0.9.0 && < 0.10,
+@@ -686,7 +686,7 @@ Executable          unit
+                    text == 0.11.*,
+                    old-time   == 1.0.*,
+                    directory  >= 1.0.0.0 && < 1.2.0.0,
+-                   process    == 1.0.*,
++                   process    >= 1.0 && < 1.2,
+                    containers >= 0.1 && < 0.5,
+                    array      >= 0.1 && < 0.4,
+                    hashed-storage >= 0.5.2 && < 0.6,
+diff --git a/src/Darcs/RepoPath.hs b/src/Darcs/RepoPath.hs
+index aa00156..8c5432b 100644
+--- a/src/Darcs/RepoPath.hs
++++ b/src/Darcs/RepoPath.hs
+@@ -60,11 +60,9 @@ import qualified Darcs.Patch.FileName as PatchFileName ( FileName, fp2fn, fn2fp
+ #include "impossible.h"
+ 
+ class FilePathOrURL a where
+- {-# INLINE toPath #-}
+  toPath :: a -> String
+ 
+ class FilePathOrURL a => FilePathLike a where
+- {-# INLINE toFilePath #-}
+  toFilePath :: a -> FilePath
+ 
+ -- | Paths which are relative to the local darcs repository and normalized.
diff --git a/dev-vcs/darcs/files/darcs-2.5.2-relax-regex-libs-deps.patch b/dev-vcs/darcs/files/darcs-2.5.2-relax-regex-libs-deps.patch
new file mode 100644 (file)
index 0000000..1b6a37d
--- /dev/null
@@ -0,0 +1,69 @@
+diff -rN -u old-darcs-2.5.2/darcs.cabal new-darcs-2.5.2/darcs.cabal
+--- old-darcs-2.5.2/darcs.cabal        2011-06-03 20:24:32.079482374 +0200
++++ new-darcs-2.5.2/darcs.cabal        2011-06-03 20:24:32.080482374 +0200
+@@ -166,11 +166,11 @@
+       cpp-options:    -DWIN32
+       c-sources:      src/win32/send_email.c
+       build-depends:  unix-compat >= 0.1.2,
+-                      regex-posix >= 0.94.4 && < 0.95
++                      regex-posix >= 0.94.4 && < 0.96
+ 
+     build-depends:   base          < 5,
+                      extensible-exceptions >= 0.1 && < 0.2,
+-                     regex-compat >= 0.71 && < 0.94,
++                     regex-compat >= 0.71 && < 0.96,
+                      mtl          >= 1.0 && < 2.1,
+                      parsec       >= 2.0 && < 3.2,
+                      html         == 1.0.*,
+@@ -368,14 +368,14 @@
+       cpp-options:    -DWIN32
+       c-sources:      src/win32/send_email.c
+       build-depends:  unix-compat >= 0.1.2,
+-                      regex-posix >= 0.94.4 && < 0.95
++                      regex-posix >= 0.94.4 && < 0.96
+ 
+     if os(solaris)
+       cc-options:     -DHAVE_SIGINFO_H
+ 
+     build-depends:   base          < 5,
+                      extensible-exceptions >= 0.1 && < 0.2,
+-                     regex-compat >= 0.71 && < 0.94,
++                     regex-compat >= 0.71 && < 0.96,
+                      mtl          >= 1.0 && < 2.1,
+                      parsec       >= 2.0 && < 3.2,
+                      html         == 1.0.*,
+@@ -516,14 +516,14 @@
+     cpp-options:    -DWIN32
+     c-sources:      src/win32/send_email.c
+     build-depends:  unix-compat >= 0.1.2,
+-                    regex-posix >= 0.94.4 && < 0.95
++                    regex-posix >= 0.94.4 && < 0.96
+ 
+   if os(solaris)
+     cc-options:     -DHAVE_SIGINFO_H
+ 
+   build-depends:   base          < 5,
+                    extensible-exceptions >= 0.1 && < 0.2,
+-                   regex-compat >= 0.71 && < 0.94,
++                   regex-compat >= 0.71 && < 0.96,
+                    mtl          >= 1.0 && < 2.1,
+                    parsec       >= 2.0 && < 3.2,
+                    html         == 1.0.*,
+@@ -619,7 +619,7 @@
+ 
+     build-depends:   base          < 5,
+                      extensible-exceptions >= 0.1 && < 0.2,
+-                     regex-compat >= 0.71 && < 0.94,
++                     regex-compat >= 0.71 && < 0.96,
+                      mtl          >= 1.0 && < 2.1,
+                      parsec       >= 2.0 && < 3.2,
+                      html         == 1.0.*,
+@@ -672,7 +672,7 @@
+       cpp-options:    -DWIN32
+       c-sources:      src/win32/send_email.c
+       build-depends:  unix-compat >= 0.1.2,
+-                      regex-posix >= 0.94.4 && < 0.95
++                      regex-posix >= 0.94.4 && < 0.96
+ 
+     if os(solaris)
+       cc-options:     -DHAVE_SIGINFO_H
diff --git a/dev-vcs/darcs/files/darcs-2.5.2-tests-ghc-7.2.patch b/dev-vcs/darcs/files/darcs-2.5.2-tests-ghc-7.2.patch
new file mode 100644 (file)
index 0000000..c43df9a
--- /dev/null
@@ -0,0 +1,26 @@
+diff --git a/tests/hspwd.hs b/tests/hspwd.hs
+index b93a7d5..f6fe2dd 100644
+--- a/tests/hspwd.hs
++++ b/tests/hspwd.hs
+@@ -1,5 +1,5 @@
+ module Main where
+ 
+-import Directory ( getCurrentDirectory )
++import System.Directory ( getCurrentDirectory )
+ 
+ main = getCurrentDirectory >>= putStr
+diff --git a/tests/trackdown-bisect-helper.hs b/tests/trackdown-bisect-helper.hs
+index 5c325c4..7fcb4a4 100644
+--- a/tests/trackdown-bisect-helper.hs
++++ b/tests/trackdown-bisect-helper.hs
+@@ -15,8 +15,9 @@ patches with the linear implementation.
+ 
+ 
+ import Control.Monad
++import System.Environment
+ import System.IO
+-import System
++import System.Process
+ import System.Random
+ import Data.List
+ import Control.Exception