summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2024-05-11 18:21:39 +0200
committerDavid Seifert <soap@gentoo.org>2024-05-11 18:21:39 +0200
commitf160b69ebca634ac7e4a0416919bd9d4b3e3aa10 (patch)
treec87cbd1b316899ace9e82d13b57901f8d2f60942
parentdev-cpp/catch: add 3.6.0 (diff)
downloadgentoo-f160b69ebca634ac7e4a0416919bd9d4b3e3aa10.tar.gz
gentoo-f160b69ebca634ac7e4a0416919bd9d4b3e3aa10.tar.bz2
gentoo-f160b69ebca634ac7e4a0416919bd9d4b3e3aa10.zip
dev-libs/link-grammar: add 5.12.4
Closes: https://bugs.gentoo.org/929425 Signed-off-by: David Seifert <soap@gentoo.org>
-rw-r--r--dev-libs/link-grammar/Manifest1
-rw-r--r--dev-libs/link-grammar/link-grammar-5.12.4.ebuild113
2 files changed, 114 insertions, 0 deletions
diff --git a/dev-libs/link-grammar/Manifest b/dev-libs/link-grammar/Manifest
index 19aff333d5ec..eff4c9094f3c 100644
--- a/dev-libs/link-grammar/Manifest
+++ b/dev-libs/link-grammar/Manifest
@@ -1 +1,2 @@
DIST link-grammar-5.12.3.tar.gz 4704751 BLAKE2B a7f0fe39c51ed26ea764d583b38b21cfce6e596c6cd94db6ba47b3606a2b6cd9e56bd6fedeb104dbb345baedae3e144af96999739dda9daa9a9e5886bd98d2f4 SHA512 e0fdb78ec03042119011afea005a62829317fd0bc20afcd94e3f234c9c5252ed9c57d717b75368ac4a63dd8493bd86f551870299925f3b9b95b11915f48d8abe
+DIST link-grammar-5.12.4.tar.gz 4720724 BLAKE2B 6573895298128165d7f840a13aad124418dbd1b9c70436dbe2bd65b3fd1883777e72da13f5196031696edb7cdc6c9d86acd5fdd4d1aa8fb295a136b2ba0568cf SHA512 fd5318c21202c17902de996882fd8630c7e95622b8ebe6877a334df22ff678a6040e0519bdabfa1138aaefdf3a7c20cbfe9e65bdce4dfe568729c9ba5a2d6fe5
diff --git a/dev-libs/link-grammar/link-grammar-5.12.4.ebuild b/dev-libs/link-grammar/link-grammar-5.12.4.ebuild
new file mode 100644
index 000000000000..b6ed517ee9e9
--- /dev/null
+++ b/dev-libs/link-grammar/link-grammar-5.12.4.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+
+inherit autotools python-r1 out-of-source
+
+DESCRIPTION="A Syntactic English parser"
+HOMEPAGE="https://www.abisource.com/projects/link-grammar/ https://www.link.cs.cmu.edu/link/"
+SRC_URI="https://www.gnucash.org/link-grammar/downloads/${PV}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0/5"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE="aspell +hunspell python"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+# XXX: sqlite is automagic
+# Does not build with >=sci-mathematics/minisat-2, bug #593662
+RDEPEND="
+ dev-db/sqlite:3
+ dev-libs/libpcre2:=
+ aspell? ( app-text/aspell )
+ hunspell? ( app-text/hunspell )
+ python? ( ${PYTHON_DEPS} )"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ dev-lang/swig:0
+ dev-build/autoconf-archive
+ virtual/pkgconfig"
+
+QA_CONFIG_IMPL_DECL_SKIP=(
+ # _AC_UNDECLARED_BUILTIN false positive
+ strchr
+)
+
+pkg_setup() {
+ if use aspell && use hunspell; then
+ ewarn "You have enabled 'aspell' and 'hunspell' support, but both cannot coexist,"
+ ewarn "only hunspell will be built. Press Ctrl+C and set only 'aspell' USE flag if"
+ ewarn "you want aspell support."
+ fi
+}
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+my_src_configure() {
+ local myconf=(
+ --disable-maintainer-mode
+ --disable-editline
+ # java is hopelessly broken, invokes maven at build time (bug #806157)
+ --disable-java-bindings
+ --disable-perl-bindings
+ --disable-sat-solver
+ --with-regexlib=pcre2
+ $(use_enable aspell)
+ $(use_enable hunspell)
+ $(usev hunspell --with-hunspell-dictdir="${EPREFIX}"/usr/share/myspell)
+ )
+
+ econf \
+ --disable-python-bindings \
+ "${myconf[@]}"
+
+ if use python; then
+ python_configure() {
+ econf \
+ --enable-python-bindings \
+ "${myconf[@]}"
+ }
+ python_foreach_impl run_in_build_dir python_configure
+ fi
+}
+
+my_src_compile() {
+ local -x MAIN_BUILD_DIR="${BUILD_DIR}"
+ default
+
+ if use python; then
+ python_compile() {
+ emake -C bindings/python \
+ VPATH="${S}:${MAIN_BUILD_DIR}" \
+ _clinkgrammar_la_DEPENDENCIES="${MAIN_BUILD_DIR}"/link-grammar/liblink-grammar.la \
+ _clinkgrammar_la_LIBADD="${MAIN_BUILD_DIR}"/link-grammar/liblink-grammar.la
+ }
+ python_foreach_impl run_in_build_dir python_compile
+ fi
+}
+
+my_src_install() {
+ local -x MAIN_BUILD_DIR="${BUILD_DIR}"
+ default
+
+ if use python; then
+ python_install() {
+ emake -C bindings/python \
+ VPATH="${S}:${MAIN_BUILD_DIR}" \
+ _clinkgrammar_la_DEPENDENCIES="${MAIN_BUILD_DIR}"/link-grammar/liblink-grammar.la \
+ _clinkgrammar_la_LIBADD="${MAIN_BUILD_DIR}"/link-grammar/liblink-grammar.la \
+ DESTDIR="${D}" \
+ install
+ }
+ python_foreach_impl run_in_build_dir python_install
+ fi
+
+ # no static archives
+ find "${ED}" -name '*.la' -delete || die
+}