Permalink
Browse files

dev-haskell/bitsyntax: bump up to 0.3.2

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
  • Loading branch information...
1 parent fc18662 commit 14010d7339078e8138826315071488adbfc2acab @trofi trofi committed Oct 28, 2012
@@ -1,9 +1,13 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: $
+# $Header: $
-CABAL_FEATURES="profile haddock lib"
-inherit haskell-cabal
+EAPI=5
+
+# ebuild generated by hackport 0.3.9999
+
+CABAL_FEATURES="lib profile haddock hoogle hscolour"
+inherit base haskell-cabal
MY_PN="BitSyntax"
MY_P="${MY_PN}-${PV}"
@@ -13,11 +17,15 @@ HOMEPAGE="http://www.imperialviolet.org/bitsyntax"
SRC_URI="mirror://hackage/packages/archive/${MY_PN}/${PV}/${MY_P}.tar.gz"
LICENSE="BSD"
-SLOT="0"
+SLOT="0/${PV}"
KEYWORDS="~amd64 ~x86"
IUSE=""
-DEPEND=">=dev-lang/ghc-6.4.2
- dev-haskell/quickcheck"
+RDEPEND="dev-haskell/quickcheck:=[profile?]
+ >=dev-lang/ghc-6.10.4:="
+DEPEND="${RDEPEND}
+ dev-haskell/cabal"
S="${WORKDIR}/${MY_P}"
+
+PATCHES=("${FILESDIR}"/${P}-qc-2.4.patch)
@@ -0,0 +1,35 @@
+diff --git a/BitSyntax.cabal b/BitSyntax.cabal
+index df2058b..7edde32 100644
+--- a/BitSyntax.cabal
++++ b/BitSyntax.cabal
+@@ -5,7 +5,7 @@ Author: Adam Langley
+ Homepage: http://www.imperialviolet.org/bitsyntax
+ Stability: experimental
+ Synopsis: A module to aid in the (de)serialisation of binary data
+-Build-Depends: base, haskell98, QuickCheck, template-haskell, bytestring
++Build-Depends: base, QuickCheck, template-haskell, bytestring
+ Build-Type: Simple
+ Exposed-modules: Data.BitSyntax
+ Extensions: ForeignFunctionInterface
+diff --git a/Data/BitSyntax.hs b/Data/BitSyntax.hs
+index 580feba..3dc487a 100644
+--- a/Data/BitSyntax.hs
++++ b/Data/BitSyntax.hs
+@@ -1,3 +1,4 @@
++{-# LANGUAGE CPP #-}
+ {-# OPTIONS_GHC -fth -ffi #-}
+ -- | This module contains fuctions and templates for building up and breaking
+ -- down packed bit structures. It's something like Erlang's bit-syntax (or,
+@@ -409,10 +410,12 @@ prop_bitPacking fields =
+ packed = bits $ PackBits fields'
+ postvalues = decodeBits (map (fromIntegral . fst) fields') packed
+
++#if ! MIN_VERSION_QuickCheck(2,4,1)
+ instance Arbitrary Word16 where
+ arbitrary = (arbitrary :: Gen Int) >>= return . fromIntegral
+ instance Arbitrary Word32 where
+ arbitrary = (arbitrary :: Gen Int) >>= return . fromIntegral
++#endif
+
+ -- | This only works on little-endian machines as it checks that the foreign
+ -- functions (htonl and htons) match the native ones

0 comments on commit 14010d7

Please sign in to comment.