summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2011-08-01 20:24:32 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2011-08-01 20:24:32 +0000
commit388d2d12a36d49a904028f2a8269cc0d5157ca74 (patch)
tree7a757b33a7230f6d3387c211de380e1b197a5e89 /dev-haskell/binary
parentVersion bump. (diff)
downloadgentoo-2-388d2d12a36d49a904028f2a8269cc0d5157ca74.tar.gz
gentoo-2-388d2d12a36d49a904028f2a8269cc0d5157ca74.tar.bz2
gentoo-2-388d2d12a36d49a904028f2a8269cc0d5157ca74.zip
Added build fix for ghc-7.
(Portage version: 2.1.10.7/cvs/Linux x86_64)
Diffstat (limited to 'dev-haskell/binary')
-rw-r--r--dev-haskell/binary/ChangeLog6
-rw-r--r--dev-haskell/binary/binary-0.5.0.2.ebuild14
-rw-r--r--dev-haskell/binary/files/binary-0.5.0.2-ghc-7.patch34
3 files changed, 50 insertions, 4 deletions
diff --git a/dev-haskell/binary/ChangeLog b/dev-haskell/binary/ChangeLog
index e8cc8b63201a..ecc56e20544d 100644
--- a/dev-haskell/binary/ChangeLog
+++ b/dev-haskell/binary/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-haskell/binary
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-haskell/binary/ChangeLog,v 1.13 2011/04/10 18:51:44 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-haskell/binary/ChangeLog,v 1.14 2011/08/01 20:24:32 slyfox Exp $
+
+ 01 Aug 2011; Sergei Trofimovich <slyfox@gentoo.org> binary-0.5.0.2.ebuild,
+ +files/binary-0.5.0.2-ghc-7.patch:
+ Added build fix for ghc-7.
10 Apr 2011; Fabian Groffen <grobian@gentoo.org> binary-0.5.0.2.ebuild:
Marked ~x86-macos
diff --git a/dev-haskell/binary/binary-0.5.0.2.ebuild b/dev-haskell/binary/binary-0.5.0.2.ebuild
index fd11f89b8538..1a5596298d05 100644
--- a/dev-haskell/binary/binary-0.5.0.2.ebuild
+++ b/dev-haskell/binary/binary-0.5.0.2.ebuild
@@ -1,8 +1,12 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-haskell/binary/binary-0.5.0.2.ebuild,v 1.11 2011/04/10 18:51:44 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-haskell/binary/binary-0.5.0.2.ebuild,v 1.12 2011/08/01 20:24:32 slyfox Exp $
-CABAL_FEATURES="lib profile haddock"
+# ebuild generated by hackport 0.2.13
+
+EAPI="3"
+
+CABAL_FEATURES="lib profile haddock hscolour"
inherit haskell-cabal
DESCRIPTION="Binary serialisation for Haskell values using lazy ByteStrings"
@@ -14,6 +18,10 @@ SLOT="0"
KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86 ~x86-fbsd ~ppc-macos ~x86-macos"
IUSE=""
-RDEPEND=">=dev-lang/ghc-6.6.1"
+RDEPEND=">=dev-lang/ghc-6.8.2"
DEPEND="${RDEPEND}
>=dev-haskell/cabal-1.2"
+
+PATCHES=("${FILESDIR}/binary-0.5.0.2-ghc-7.patch")
+
+CABAL_CORE_LIB_GHC_PV="7.2.0.20110728"
diff --git a/dev-haskell/binary/files/binary-0.5.0.2-ghc-7.patch b/dev-haskell/binary/files/binary-0.5.0.2-ghc-7.patch
new file mode 100644
index 000000000000..94d3f5d7e021
--- /dev/null
+++ b/dev-haskell/binary/files/binary-0.5.0.2-ghc-7.patch
@@ -0,0 +1,34 @@
+Patch was taken from binary fork of ghc-7 branch
+Fri Jul 30 15:29:36 EEST 2010 simonpj@microsoft.com
+ * Add type signature on local binding
+diff -rN -u old-binary/src/Data/Binary/Get.hs new-binary/src/Data/Binary/Get.hs
+--- old-binary/src/Data/Binary/Get.hs 2010-10-31 18:08:10.633817506 +0200
++++ new-binary/src/Data/Binary/Get.hs 2010-10-31 18:08:10.641817506 +0200
+@@ -370,16 +370,17 @@
+ return (xs, ys))
+
+ where
+- first r 0 xs@(L.Chunk _ _) = writeSTRef r xs >> return L.Empty
+- first r _ L.Empty = writeSTRef r L.Empty >> return L.Empty
+-
+- first r n (L.Chunk x xs)
+- | n < l = do writeSTRef r (L.Chunk (B.drop (fromIntegral n) x) xs)
+- return $ L.Chunk (B.take (fromIntegral n) x) L.Empty
+- | otherwise = do writeSTRef r (L.drop (n - l) xs)
+- liftM (L.Chunk x) $ unsafeInterleaveST (first r (n - l) xs)
+-
+- where l = fromIntegral (B.length x)
++ first :: STRef s L.ByteString -> Int64 -> L.ByteString -> ST s L.ByteString
++ first r 0 xs@(L.Chunk _ _) = writeSTRef r xs >> return L.Empty
++ first r _ L.Empty = writeSTRef r L.Empty >> return L.Empty
++
++ first r n (L.Chunk x xs)
++ | n < l = do writeSTRef r (L.Chunk (B.drop (fromIntegral n) x) xs)
++ return $ L.Chunk (B.take (fromIntegral n) x) L.Empty
++ | otherwise = do writeSTRef r (L.drop (n - l) xs)
++ liftM (L.Chunk x) $ unsafeInterleaveST (first r (n - l) xs)
++ where
++ l = fromIntegral (B.length x)
+ #else
+ splitAtST i (B.LPS ps) = runST (
+ do r <- newSTRef undefined