summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhololeap <hololeap@protonmail.com>2023-10-02 23:05:57 -0600
committerSam James <sam@gentoo.org>2023-10-23 04:09:12 +0100
commit60caf4abdaa3b304487a7d6c363fa9daa4c2a776 (patch)
tree6fc2b5629091e80be907c34f927c4928640e181a /dev-haskell/alex
parentdev-haskell/aeson: add 2.1.2.1 (diff)
downloadgentoo-60caf4abdaa3b304487a7d6c363fa9daa4c2a776.tar.gz
gentoo-60caf4abdaa3b304487a7d6c363fa9daa4c2a776.tar.bz2
gentoo-60caf4abdaa3b304487a7d6c363fa9daa4c2a776.zip
dev-haskell/alex: add 3.2.7.2
Signed-off-by: hololeap <hololeap@protonmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-haskell/alex')
-rw-r--r--dev-haskell/alex/Manifest2
-rw-r--r--dev-haskell/alex/alex-3.2.7.2.ebuild76
-rw-r--r--dev-haskell/alex/files/alex-3.2.7.2-fix-docs.patch46
-rw-r--r--dev-haskell/alex/metadata.xml4
4 files changed, 128 insertions, 0 deletions
diff --git a/dev-haskell/alex/Manifest b/dev-haskell/alex/Manifest
index dcdb4731bb94..7171c96ded47 100644
--- a/dev-haskell/alex/Manifest
+++ b/dev-haskell/alex/Manifest
@@ -1 +1,3 @@
+DIST alex-13732056ff8d287f2ee0c4ecb968efe04516c890.tar.gz 103395 BLAKE2B 1254655ec480fe648238df6864d9623f0128bcdbcfca22f5b63e85b24183ece5e21ae8dc5e1a26c5f511233c420a33dc19a6fcbc2824ae56043ba75fc38e5d49 SHA512 5c7e9e0633ea4536fb4be981c123d42bc3ac035732ad5cb88d9f9b38199d13f7ef211f4e2f1fc475490019461bb56eafb702c3b4c61417dd1cc6c555c1a436d2
DIST alex-3.2.7.1.tar.gz 108229 BLAKE2B 1c1c3488c6e0f559003de5edc1250afdd09098eb4da3414d8c461d03ee5f08b94f80e6f6d32366f6d8d0563a068ee8b2a1c9cb7b78bbbf0a1dcf3767ea448ffd SHA512 f8ff12de874b905449fdda0d704f9e4ac30fa3e60e965f82d7bb2d6e3974cf926f85134d32878c48faf0ec4a002ea7240cf6696e1cbcad25a0eebb9d1850cc07
+DIST alex-3.2.7.2.tar.gz 85450 BLAKE2B fcb752b24b475e5502b686dec717f613c7fbda8eeb3583f4807e419960479ddaea0e578e7ab81974e480ad9ecf59d8a0bf94341da72d247221e9d2905206641f SHA512 925c652883a12c3d271b212d1a83df15e98b3c8b5a70aecc91786db601101f9544722a04969bc4d84265910c1994cfb79fc6d50aa01a04604c4bb11735513a58
diff --git a/dev-haskell/alex/alex-3.2.7.2.ebuild b/dev-haskell/alex/alex-3.2.7.2.ebuild
new file mode 100644
index 000000000000..0b2e45036a1b
--- /dev/null
+++ b/dev-haskell/alex/alex-3.2.7.2.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# ebuild generated by hackport 0.8.2.0.9999
+#hackport: flags: +small_base
+
+CABAL_FEATURES="test-suite"
+inherit haskell-cabal
+
+DESCRIPTION="Alex is a tool for generating lexical analysers in Haskell"
+HOMEPAGE="https://www.haskell.org/alex/"
+
+GIT_REPO="https://github.com/haskell/${PN}"
+GIT_COMMIT="13732056ff8d287f2ee0c4ecb968efe04516c890"
+GIT_P="${PN}-${GIT_COMMIT}"
+GIT_S="${WORKDIR}/${GIT_P}"
+SRC_URI+=" doc? (
+ ${GIT_REPO}/archive/${GIT_COMMIT}.tar.gz -> ${GIT_P}.tar.gz
+)"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86"
+IUSE="doc"
+
+RDEPEND=">=dev-lang/ghc-8.8.1:=
+"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-3.0.0.0
+ doc? (
+ dev-python/sphinx
+ dev-python/sphinx-rtd-theme
+ )
+"
+src_prepare() {
+ if use doc; then
+ cp -a "${GIT_S}/doc/" "${S}" || die
+ eapply "${FILESDIR}/${PN}-3.2.7.2-fix-docs.patch"
+ fi
+
+ haskell-cabal_src_prepare
+}
+
+src_configure() {
+ # make sure we don't accidentally use those
+ # installed in system
+ haskell-cabal_src_configure \
+ --with-alex=false \
+ --with-happy=false \
+ --flag=small_base
+}
+
+src_compile() {
+ haskell-cabal_src_compile
+
+ if use doc; then
+ emake -C "${S}/doc/" -j1
+ fi
+}
+
+src_test() {
+ # 1. workaround Setup.hs deadlock: https://github.com/haskell/cabal/issues/2398
+ # 2. use freshly built ALEX= binary and datadir path
+ alex_datadir="${S}"/data \
+ emake -k -C tests all ALEX="${S}"/dist/build/alex/alex
+}
+
+src_install() {
+ haskell-cabal_src_install
+
+ if use doc; then
+ dodoc -r "${S}/doc/_build/html"
+ fi
+}
diff --git a/dev-haskell/alex/files/alex-3.2.7.2-fix-docs.patch b/dev-haskell/alex/files/alex-3.2.7.2-fix-docs.patch
new file mode 100644
index 000000000000..2ed25658754d
--- /dev/null
+++ b/dev-haskell/alex/files/alex-3.2.7.2-fix-docs.patch
@@ -0,0 +1,46 @@
+From e461c3b0935a05a169aa22a1b113c08f8989eea6 Mon Sep 17 00:00:00 2001
+From: hololeap <hololeap@users.noreply.github.com>
+Date: Sat, 8 Apr 2023 12:18:36 -0600
+Subject: [PATCH 1/1] Fix documentation
+
+contributing.rst refers to a non-existant 'bug-fixes' doc
+
+conf.py refers to non-existant '_static' directory
+
+Signed-off-by: hololeap <hololeap@users.noreply.github.com>
+---
+ doc/conf.py | 2 +-
+ doc/contributing.rst | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/doc/conf.py b/doc/conf.py
+index ea3862d..718b0e6 100644
+--- a/doc/conf.py
++++ b/doc/conf.py
+@@ -49,7 +49,7 @@ html_theme = 'sphinx_rtd_theme'
+ # Add any paths that contain custom static files (such as style sheets) here,
+ # relative to this directory. They are copied after the builtin static files,
+ # so a file named "default.css" will overwrite the builtin "default.css".
+-html_static_path = ['_static']
++#html_static_path = ['_static']
+
+ # The name of the Pygments (syntax highlighting) style to use.
+ pygments_style = 'sphinx'
+diff --git a/doc/contributing.rst b/doc/contributing.rst
+index 6df2865..e889b90 100644
+--- a/doc/contributing.rst
++++ b/doc/contributing.rst
+@@ -8,8 +8,8 @@ Contributing to Alex
+ Source Code Repository
+ ----------------------
+
+-Alex is hosted on `GitHub <https://github.com/haskell/alex>`__.
+-As previously discussed in `bug-reports`_, we use the built-in `GitHub issue tracker <https://github.com/haskell/alex/issues>`__ for Alex.
++Alex is hosted on `GitHub <https://github.com/haskell/alex>`__,
++and we use the built-in `GitHub issue tracker <https://github.com/haskell/alex/issues>`__ for Alex.
+ We also use `GitHub pull requests <https://github.com/haskell/alex/pulls>`__ for managing changes;
+ feel free to submit them!
+
+--
+2.39.2
+
diff --git a/dev-haskell/alex/metadata.xml b/dev-haskell/alex/metadata.xml
index 937381521944..fc9c458f8018 100644
--- a/dev-haskell/alex/metadata.xml
+++ b/dev-haskell/alex/metadata.xml
@@ -5,4 +5,8 @@
<email>haskell@gentoo.org</email>
<name>Gentoo Haskell</name>
</maintainer>
+ <upstream>
+ <remote-id type="hackage">alex</remote-id>
+ <remote-id type="github">haskell/alex</remote-id>
+ </upstream>
</pkgmetadata>