dev-haskell/hpack: new package, a depend of dev-haskell/stack
authorSergei Trofimovich <slyfox@gentoo.org>
Sun, 28 May 2017 12:52:43 +0000 (13:52 +0100)
committerSergei Trofimovich <slyfox@gentoo.org>
Sun, 28 May 2017 17:52:58 +0000 (18:52 +0100)
An alternative format for Haskell packages

Package-Manager: Portage-2.3.6, Repoman-2.3.2

dev-haskell/hpack/Manifest [new file with mode: 0644]
dev-haskell/hpack/files/hpack-0.14.1-aeson-1.patch [new file with mode: 0644]
dev-haskell/hpack/hpack-0.14.1.ebuild [new file with mode: 0644]
dev-haskell/hpack/metadata.xml [new file with mode: 0644]

diff --git a/dev-haskell/hpack/Manifest b/dev-haskell/hpack/Manifest
new file mode 100644 (file)
index 0000000..7c0ced9
--- /dev/null
@@ -0,0 +1 @@
+DIST hpack-0.14.1.tar.gz 38373 SHA256 a930e8719c52f42826efab92f33252e3dfbf664296ce8075334b48e38bc51280 SHA512 5bd7b5335aef1a3d866c07937e457397c82235c99b578b6270b699895b9a5d39259eef324e6741af9a6e296bfe56587fc9888dc0fc2e4bd6fe99bbc74a7e0b04 WHIRLPOOL 5ae4e8e65009b5a576176590abd276bedd4a46a8c8adaeff7f14cc7752d17ee10b1f3c1530caab45ad7ac53ae1daf5d273717081da6edba875f1450064436ecd
diff --git a/dev-haskell/hpack/files/hpack-0.14.1-aeson-1.patch b/dev-haskell/hpack/files/hpack-0.14.1-aeson-1.patch
new file mode 100644 (file)
index 0000000..a4b3fd1
--- /dev/null
@@ -0,0 +1,24 @@
+diff --git a/src/Hpack/Config.hs b/src/Hpack/Config.hs
+index cb84f71..5566b8c 100644
+--- a/src/Hpack/Config.hs
++++ b/src/Hpack/Config.hs
+@@ -101,3 +101,9 @@ githubBaseUrl = "https://github.com/"
+ 
+-genericParseJSON_ :: forall a. (Generic a, GFromJSON (Rep a), HasTypeName a) => Value -> Parser a
++#if MIN_VERSION_aeson(1,0,0)
++#    define AESON_ARITY Zero
++#else
++#    define AESON_ARITY
++#endif
++
++genericParseJSON_ :: forall a. (Generic a, GFromJSON AESON_ARITY (Rep a), HasTypeName a) => Value -> Parser a
+ genericParseJSON_ = genericParseJSON defaultOptions {fieldLabelModifier = hyphenize name}
+diff --git a/test/Hpack/ConfigSpec.hs b/test/Hpack/ConfigSpec.hs
+index 320ba9a..d13d932 100644
+--- a/test/Hpack/ConfigSpec.hs
++++ b/test/Hpack/ConfigSpec.hs
+@@ -971,3 +971,3 @@ spec = do
+             |]
+-          readPackageConfig file `shouldReturn` Left (file ++ ": Error in $.executables.foo: failed to parse field executables: The key \"main\" was not found")
++          readPackageConfig file `shouldReturn` Left (file ++ ": Error in $.executables.foo: key \"main\" not present")
+ 
diff --git a/dev-haskell/hpack/hpack-0.14.1.ebuild b/dev-haskell/hpack/hpack-0.14.1.ebuild
new file mode 100644 (file)
index 0000000..7ae2c30
--- /dev/null
@@ -0,0 +1,39 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# ebuild generated by hackport 0.5.9999
+
+CABAL_FEATURES="bin lib profile haddock hoogle hscolour test-suite"
+inherit haskell-cabal
+
+DESCRIPTION="An alternative format for Haskell packages"
+HOMEPAGE="https://github.com/sol/hpack#readme"
+SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=dev-haskell/aeson-0.8:=[profile?]
+       >=dev-haskell/base-compat-0.8:=[profile?]
+       dev-haskell/glob:=[profile?]
+       dev-haskell/text:=[profile?]
+       dev-haskell/unordered-containers:=[profile?]
+       dev-haskell/yaml:=[profile?]
+       >=dev-lang/ghc-7.8.2:=
+"
+DEPEND="${RDEPEND}
+       >=dev-haskell/cabal-1.18.1.3
+       test? ( >=dev-haskell/aeson-0.10
+               dev-haskell/aeson-qq
+               >=dev-haskell/hspec-2 <dev-haskell/hspec-3
+               dev-haskell/interpolate
+               >=dev-haskell/mockery-0.3
+               dev-haskell/quickcheck
+               dev-haskell/temporary )
+"
+
+PATCHES=("${FILESDIR}"/${P}-aeson-1.patch)
diff --git a/dev-haskell/hpack/metadata.xml b/dev-haskell/hpack/metadata.xml
new file mode 100644 (file)
index 0000000..acec350
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <maintainer type="project">
+               <email>haskell@gentoo.org</email>
+               <name>Gentoo Haskell</name>
+       </maintainer>
+       <longdescription>
+               An alternative format for Haskell packages
+       </longdescription>
+</pkgmetadata>