From b1804a87a8bcf950a2fc12a2960bf68703f4b90a Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 28 May 2017 13:52:43 +0100 Subject: dev-haskell/hpack: new package, a depend of dev-haskell/stack An alternative format for Haskell packages Package-Manager: Portage-2.3.6, Repoman-2.3.2 --- dev-haskell/hpack/Manifest | 1 + dev-haskell/hpack/files/hpack-0.14.1-aeson-1.patch | 24 +++++++++++++ dev-haskell/hpack/hpack-0.14.1.ebuild | 39 ++++++++++++++++++++++ dev-haskell/hpack/metadata.xml | 11 ++++++ 4 files changed, 75 insertions(+) create mode 100644 dev-haskell/hpack/Manifest create mode 100644 dev-haskell/hpack/files/hpack-0.14.1-aeson-1.patch create mode 100644 dev-haskell/hpack/hpack-0.14.1.ebuild create mode 100644 dev-haskell/hpack/metadata.xml (limited to 'dev-haskell') diff --git a/dev-haskell/hpack/Manifest b/dev-haskell/hpack/Manifest new file mode 100644 index 000000000000..7c0ced9a5ffe --- /dev/null +++ b/dev-haskell/hpack/Manifest @@ -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 index 000000000000..a4b3fd1f4b6a --- /dev/null +++ b/dev-haskell/hpack/files/hpack-0.14.1-aeson-1.patch @@ -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 index 000000000000..7ae2c30ef742 --- /dev/null +++ b/dev-haskell/hpack/hpack-0.14.1.ebuild @@ -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/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 index 000000000000..acec350af770 --- /dev/null +++ b/dev-haskell/hpack/metadata.xml @@ -0,0 +1,11 @@ + + + + + haskell@gentoo.org + Gentoo Haskell + + + An alternative format for Haskell packages + + -- cgit v1.2.3-65-gdbad