summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wright <gienah@gentoo.org>2012-11-25 06:24:06 +0000
committerMark Wright <gienah@gentoo.org>2012-11-25 06:24:06 +0000
commit01992d0c60760e90d390e39a6e910aa1d920f4b7 (patch)
tree0334f24909db6a9214df22a71877613d23e878e1 /dev-vcs/darcs
parentBuild system improvements (diff)
downloadgentoo-2-01992d0c60760e90d390e39a6e910aa1d920f4b7.tar.gz
gentoo-2-01992d0c60760e90d390e39a6e910aa1d920f4b7.tar.bz2
gentoo-2-01992d0c60760e90d390e39a6e910aa1d920f4b7.zip
Thanks to slyfox for patching darcs-2.8.3 for ghc 7.6.1
(Portage version: 2.1.11.31/cvs/Linux x86_64, signed Manifest commit with key 618E971F)
Diffstat (limited to 'dev-vcs/darcs')
-rw-r--r--dev-vcs/darcs/ChangeLog9
-rw-r--r--dev-vcs/darcs/darcs-2.8.3-r1.ebuild132
-rw-r--r--dev-vcs/darcs/files/darcs-2.8.1-tar-0.4.patch40
-rw-r--r--dev-vcs/darcs/files/darcs-2.8.3-ghc-7.6.patch.bz2bin0 -> 9380 bytes
-rw-r--r--dev-vcs/darcs/files/darcs-2.8.3-hack-for-haskeline-0.7-breaks-non-utf8.patch62
5 files changed, 242 insertions, 1 deletions
diff --git a/dev-vcs/darcs/ChangeLog b/dev-vcs/darcs/ChangeLog
index bc1ccba80cec..99f34b44ceea 100644
--- a/dev-vcs/darcs/ChangeLog
+++ b/dev-vcs/darcs/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-vcs/darcs
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-vcs/darcs/ChangeLog,v 1.36 2012/09/25 14:19:45 nativemad Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-vcs/darcs/ChangeLog,v 1.37 2012/11/25 06:24:06 gienah Exp $
+
+*darcs-2.8.3-r1 (25 Nov 2012)
+
+ 25 Nov 2012; Mark Wright <gienah@gentoo.org> +darcs-2.8.3-r1.ebuild,
+ +files/darcs-2.8.1-tar-0.4.patch, +files/darcs-2.8.3-ghc-7.6.patch.bz2,
+ +files/darcs-2.8.3-hack-for-haskeline-0.7-breaks-non-utf8.patch:
+ Thanks to slyfox for patching darcs-2.8.3 for ghc 7.6.1
25 Sep 2012; Andreas Schuerch <nativemad@gentoo.org> darcs-2.8.0.ebuild:
x86 stable, see bug 421351
diff --git a/dev-vcs/darcs/darcs-2.8.3-r1.ebuild b/dev-vcs/darcs/darcs-2.8.3-r1.ebuild
new file mode 100644
index 000000000000..bfac623fdca9
--- /dev/null
+++ b/dev-vcs/darcs/darcs-2.8.3-r1.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-vcs/darcs/darcs-2.8.3-r1.ebuild,v 1.1 2012/11/25 06:24:06 gienah Exp $
+
+EAPI=5
+
+# ebuild generated by hackport 0.3.9999
+
+CABAL_FEATURES="bin lib profile haddock hoogle hscolour"
+inherit haskell-cabal bash-completion-r1
+
+DESCRIPTION="a distributed, interactive, smart revision control system"
+HOMEPAGE="http://darcs.net/"
+SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0/${PV}"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
+IUSE="doc test"
+
+RDEPEND="=dev-haskell/extensible-exceptions-0.1*:=[profile?]
+ >=dev-haskell/hashed-storage-0.5.6:=[profile?]
+ <dev-haskell/hashed-storage-0.6:=[profile?]
+ >=dev-haskell/haskeline-0.6.3:=[profile?]
+ <dev-haskell/haskeline-0.8:=[profile?]
+ =dev-haskell/html-1.0*:=[profile?]
+ =dev-haskell/mmap-0.5*:=[profile?]
+ >=dev-haskell/mtl-1.0:=[profile?]
+ <dev-haskell/mtl-2.2:=[profile?]
+ >=dev-haskell/parsec-2.0:=[profile?]
+ <dev-haskell/parsec-3.2:=[profile?]
+ =dev-haskell/random-1.0*:=[profile?]
+ >=dev-haskell/regex-compat-0.95.1:=[profile?]
+ >=dev-haskell/tar-0.3:=[profile?]
+ <dev-haskell/tar-0.5:=[profile?]
+ =dev-haskell/terminfo-0.3*:=[profile?]
+ >=dev-haskell/text-0.11.0.6:=[profile?]
+ <dev-haskell/text-0.12.0.0:=[profile?]
+ >=dev-haskell/vector-0.7:=[profile?]
+ >=dev-haskell/zlib-0.5.1.0:=[profile?]
+ <dev-haskell/zlib-0.6.0.0:=[profile?]
+ >=dev-lang/ghc-6.10.4:=
+ net-misc/curl"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.8
+ doc? ( virtual/latex-base
+ || ( dev-tex/latex2html[png]
+ dev-tex/latex2html[gif]
+ )
+ )
+ test? ( >=dev-haskell/cmdlib-0.2.1[profile?]
+ <dev-haskell/cmdlib-0.4[profile?]
+ >=dev-haskell/shellish-0.1.3[profile?]
+ <dev-haskell/shellish-0.2[profile?]
+ dev-haskell/test-framework[profile?]
+ dev-haskell/test-framework-hunit[profile?]
+ dev-haskell/test-framework-quickcheck2[profile?]
+ )
+ "
+
+src_prepare() {
+ rm "${S}/tests/add_permissions.sh" || die "Could not rm add_permissions.sh"
+ rm "${S}/tests/send-output-v1.sh" || die "Could not rm send-output-v1.sh"
+ rm "${S}/tests/send-output-v2.sh" || die "Could not rm send-output-v2.sh"
+ rm "${S}/tests/utf8.sh" || die "Could not rm utf8.sh"
+ cabal_chdeps \
+ 'tar == 0.3.*' 'tar >= 0.3 && < 0.5' \
+ 'tar == 0.3.*' 'tar >= 0.3 && < 0.5' \
+ 'haskeline >= 0.6.3 && < 0.7' 'haskeline >= 0.6.3 && < 0.8'
+
+ epatch "${FILESDIR}/${PN}-2.8.1-tar-0.4.patch"
+ epatch "${FILESDIR}"/${P}-hack-for-haskeline-0.7-breaks-non-utf8.patch
+
+ # ghc-7.6
+ cabal_chdeps \
+ 'base >= 4.5 && < 4.6' 'base >= 4.5 && < 4.7' \
+ 'bytestring >= 0.9.0 && < 0.10' 'bytestring >= 0.9.0 && < 0.11' \
+ 'containers >= 0.1 && < 0.5' 'containers >= 0.1 && < 0.6' \
+ 'directory >= 1.0.0.0 && < 1.2.0.0' 'directory >= 1.0.0.0 && < 1.3.0.0' \
+ 'unix >= 1.0 && < 2.6' 'unix >= 1.0 && < 2.7' \
+ 'ghc >= 6.10 && < 7.6' 'ghc >= 6.10 && < 7.8'
+ epatch "${FILESDIR}"/${P}-ghc-7.6.patch.bz2
+}
+
+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=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"
+}
+
+src_install() {
+ cabal_src_install
+ newbashcomp "${S}/contrib/darcs_completion" "${PN}"
+
+ # 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"
+}
+
+pkg_postinst() {
+ ghc-package_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.8.1-tar-0.4.patch b/dev-vcs/darcs/files/darcs-2.8.1-tar-0.4.patch
new file mode 100644
index 000000000000..9bd2c26cd604
--- /dev/null
+++ b/dev-vcs/darcs/files/darcs-2.8.1-tar-0.4.patch
@@ -0,0 +1,40 @@
+diff --git a/src/Darcs/Repository.hs b/src/Darcs/Repository.hs
+index f68a77a..3c5af65 100644
+--- a/src/Darcs/Repository.hs
++++ b/src/Darcs/Repository.hs
+@@ -302,19 +302,35 @@ removeMetaFiles :: IO ()
+ removeMetaFiles = mapM_ (removeFile . (darcsdir </>)) .
+ filter ("meta-" `isPrefixOf`) =<< getDirectoryContents darcsdir
+
++#if MIN_VERSION_tar(0,4,0)
++unpackBasic :: Cache -> Tar.Entries Tar.FormatError -> IO ()
++#else
+ unpackBasic :: Cache -> Tar.Entries -> IO ()
++#endif
+ unpackBasic c x = do
+ withControlMVar $ \mv -> unpackTar c (basicMetaHandler c mv) x
+ removeMetaFiles
+
++#if MIN_VERSION_tar(0,4,0)
++unpackPatches :: Cache -> [String] -> Tar.Entries Tar.FormatError -> IO ()
++#else
+ unpackPatches :: Cache -> [String] -> Tar.Entries -> IO ()
++#endif
+ unpackPatches c ps x = do
+ withControlMVar $ \mv -> unpackTar c (patchesMetaHandler c ps mv) x
+ removeMetaFiles
+
++#if MIN_VERSION_tar(0,4,0)
++unpackTar :: Cache -> IO () -> Tar.Entries Tar.FormatError -> IO ()
++#else
+ unpackTar :: Cache -> IO () -> Tar.Entries -> IO ()
++#endif
+ unpackTar _ _ Tar.Done = return ()
++#if MIN_VERSION_tar(0,4,0)
++unpackTar _ _ (Tar.Fail e)= fail (show e)
++#else
+ unpackTar _ _ (Tar.Fail e)= fail e
++#endif
+ unpackTar c mh (Tar.Next x xs) = case Tar.entryContent x of
+ Tar.NormalFile x' _ -> do
+ let p = Tar.entryPath x
diff --git a/dev-vcs/darcs/files/darcs-2.8.3-ghc-7.6.patch.bz2 b/dev-vcs/darcs/files/darcs-2.8.3-ghc-7.6.patch.bz2
new file mode 100644
index 000000000000..81a53813a189
--- /dev/null
+++ b/dev-vcs/darcs/files/darcs-2.8.3-ghc-7.6.patch.bz2
Binary files differ
diff --git a/dev-vcs/darcs/files/darcs-2.8.3-hack-for-haskeline-0.7-breaks-non-utf8.patch b/dev-vcs/darcs/files/darcs-2.8.3-hack-for-haskeline-0.7-breaks-non-utf8.patch
new file mode 100644
index 000000000000..65eee6031e99
--- /dev/null
+++ b/dev-vcs/darcs/files/darcs-2.8.3-hack-for-haskeline-0.7-breaks-non-utf8.patch
@@ -0,0 +1,62 @@
+CAUTION: The patch is very incomplete!
+It will not work if your locale is not UTF-8.
+diff --git a/src/ByteStringUtils.hs b/src/ByteStringUtils.hs
+index 6394fea..6999312 100644
+--- a/src/ByteStringUtils.hs
++++ b/src/ByteStringUtils.hs
+@@ -71,7 +71,10 @@ import Control.Exception.Extensible ( catch, SomeException )
+ import System.IO
+ import System.IO.Unsafe ( unsafePerformIO )
+ import System.Console.Haskeline ( InputT, runInputTBehavior, defaultSettings, useFileHandle )
++
++#if ! MIN_VERSION_haskeline(0,7,0)
+ import System.Console.Haskeline.Encoding ( decode, encode )
++#endif
+
+ import Foreign.Storable ( peekElemOff, peek )
+ import Foreign.Marshal.Array ( advancePtr )
+@@ -526,6 +529,7 @@ unsafeRunInput = unsafePerformIO . runInputTBehavior (useFileHandle stdin) defau
+ isAscii :: B.ByteString -> Bool
+ isAscii = B.all (\w -> w < 128)
+
++#if ! MIN_VERSION_haskeline(0,7,0)
+ -- | Decode a ByteString to a String according to the current locale
+ -- unsafePerformIO in the locale function is ratified by the fact that GHC 6.12
+ -- and above also supply locale conversion with functions with a pure type.
+@@ -533,19 +537,30 @@ isAscii = B.all (\w -> w < 128)
+ decodeLocale :: B.ByteString -> String
+ decodeLocale = unsafeRunInput . decode
+
++-- | Encode a String to a ByteString according to the current locale
++encodeLocale :: String -> B.ByteString
++encodeLocale = unsafeRunInput . encode
++#else
++
++-- | Yes! I cheat here a lot and just assume you have UTF-8 locale.
++-- | haskeline-0.7 dropped encoding export.
++-- | All the blame should be directed to Sergei Trofimovich <slyfox@gentoo.org>
++
++decodeLocale :: B.ByteString -> String
++decodeLocale = unpackPSFromUTF8
++
++encodeLocale :: String -> B.ByteString
++encodeLocale = packStringToUTF8
++#endif
++
++
+ -- | Encode a String to a ByteString with latin1 (i.e., the values of the
+ -- characters become the values of the bytes; if a character value is greater
+ -- than 255, its byte becomes the character value modulo 256)
+ encodeLatin1 :: String -> B.ByteString
+ encodeLatin1 = B.pack . (map (fromIntegral . ord))
+
+--- | Encode a String to a ByteString according to the current locale
+-encodeLocale :: String -> B.ByteString
+-encodeLocale = unsafeRunInput . encode
+-
+ -- | Take a @String@ that represents byte values and re-decode it acording to
+ -- the current locale.
+ decodeString :: String -> String
+ decodeString = decodeLocale . encodeLatin1
+-
+-