summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhololeap <hololeap@protonmail.com>2023-10-02 23:04:27 -0600
committerSam James <sam@gentoo.org>2023-10-23 04:08:52 +0100
commitb4ec681da7e66c0b684b448225611b899f308b76 (patch)
treed9b03f70a6fa3f00f896b73748b0dca3acecb6ad /dev-haskell/parser-combinators
parentdev-haskell/megaparsec-tests: new package, add 9.2.2 (diff)
downloadgentoo-b4ec681da7e66c0b684b448225611b899f308b76.tar.gz
gentoo-b4ec681da7e66c0b684b448225611b899f308b76.tar.bz2
gentoo-b4ec681da7e66c0b684b448225611b899f308b76.zip
dev-haskell/parser-combinators: new package, add 1.3.0
Signed-off-by: hololeap <hololeap@protonmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-haskell/parser-combinators')
-rw-r--r--dev-haskell/parser-combinators/Manifest2
-rw-r--r--dev-haskell/parser-combinators/metadata.xml12
-rw-r--r--dev-haskell/parser-combinators/parser-combinators-1.3.0.ebuild74
3 files changed, 88 insertions, 0 deletions
diff --git a/dev-haskell/parser-combinators/Manifest b/dev-haskell/parser-combinators/Manifest
new file mode 100644
index 000000000000..465db364cdf3
--- /dev/null
+++ b/dev-haskell/parser-combinators/Manifest
@@ -0,0 +1,2 @@
+DIST parser-combinators-1.3.0.tar.gz 11699 BLAKE2B 0a24e95c52627a3219cc8e89ed49ebc12e759a487e7daf333f3ab788837576aef88d295f585aecd0831866319ee0445369cc3cd26255d6ef85d602f44d7767fa SHA512 f7a4581d229b788e841d844003e058a6c63827c5cadeb6fe8f1b94e2a920b11d3b08a8a7a412fa95e1b75bca24f6957f88162f8d1af5bb174ca7f91ef47c0b71
+DIST parser-combinators-tests-1.3.0.tar.gz 6860 BLAKE2B ececd5d8a47501a90e68ba77da679aed2c00da225c234f8afeebd43bf4cb821c988cd5612e8411e70179b39f0fcf8c15fcd93accd81e42ce1b8999d0cd8c7bdf SHA512 ac863afcbe81ea83c20cbab3229c5321860d1d45b4b04031db1a8cc493239096aef80d24148fe3cd5a18dfc811d806855386736be94e32cecabab3ae656d5389
diff --git a/dev-haskell/parser-combinators/metadata.xml b/dev-haskell/parser-combinators/metadata.xml
new file mode 100644
index 000000000000..d9090efa8693
--- /dev/null
+++ b/dev-haskell/parser-combinators/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>haskell@gentoo.org</email>
+ <name>Gentoo Haskell</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="hackage">parser-combinators</remote-id>
+ <remote-id type="github">mrkkrp/parser-combinators</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-haskell/parser-combinators/parser-combinators-1.3.0.ebuild b/dev-haskell/parser-combinators/parser-combinators-1.3.0.ebuild
new file mode 100644
index 000000000000..8c34b94aff0f
--- /dev/null
+++ b/dev-haskell/parser-combinators/parser-combinators-1.3.0.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# ebuild generated by hackport 0.7.1.1.9999
+#hackport: flags: -dev
+
+CABAL_FEATURES="lib profile haddock hoogle hscolour"
+inherit haskell-cabal
+
+TEST_PN="${PN}-tests"
+TEST_P="${TEST_PN}-${PV}"
+
+DESCRIPTION="Lightweight package providing commonly useful parser combinators"
+HOMEPAGE="https://github.com/mrkkrp/parser-combinators"
+SRC_URI+=" test? ( https://hackage.haskell.org/package/${TEST_P}/${TEST_P}.tar.gz )"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86"
+IUSE="test"
+RESTRICT+=" !test? ( test )"
+
+RDEPEND=">=dev-lang/ghc-8.6.3:=
+"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-2.4.0.1
+ test? (
+ >=dev-haskell/hspec-2.0 <dev-haskell/hspec-3.0
+ >=dev-haskell/hspec-expectations-0.8 <dev-haskell/hspec-expectations-0.9
+ >=dev-haskell/hspec-megaparsec-2.0 <dev-haskell/hspec-megaparsec-3.0
+ >=dev-haskell/megaparsec-8.0 <dev-haskell/megaparsec-10.0
+ >=dev-haskell/megaparsec-tests-8.0 <dev-haskell/megaparsec-tests-10.0
+ >=dev-haskell/quickcheck-2.7 <dev-haskell/quickcheck-2.15
+ )
+"
+
+pkg_pretend() {
+ if use test; then
+ ewarn "The \"test\" USE flag for this package creates cycles within the"
+ ewarn "dependency graph. This may give you problems during 'haskell-updater' runs."
+ ewarn "It is recommended to leave it disabled unless explicitly testing the package."
+ fi
+}
+
+src_configure() {
+ haskell-cabal_src_configure \
+ --flag=-dev
+}
+
+src_test() {
+ if use test; then
+ cabal-register-inplace || die
+ local pkg_db="${S}/dist/package.conf.inplace"
+
+ local old_S="${S}"
+ export S="${WORKDIR}/${TEST_P}"
+ pushd "${S}" > /dev/null || die
+
+ export CABAL_TEST_SUITE=yes
+ export CABAL_USE_HADDOCK=''
+ haskell-cabal_src_configure \
+ --package-db="${pkg_db}" \
+ --flag=-dev
+
+ haskell-cabal_src_compile
+
+ SKIP_REGISTER_INPLACE=yes haskell-cabal_src_test
+
+ popd > /dev/null || die
+ export S="${old_S}"
+ fi
+}