summaryrefslogtreecommitdiff
path: root/dev-libs/link-grammar
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/link-grammar')
-rw-r--r--dev-libs/link-grammar/Manifest2
-rw-r--r--dev-libs/link-grammar/link-grammar-5.11.0.ebuild109
2 files changed, 111 insertions, 0 deletions
diff --git a/dev-libs/link-grammar/Manifest b/dev-libs/link-grammar/Manifest
index 06108d42309a..ab69973e3244 100644
--- a/dev-libs/link-grammar/Manifest
+++ b/dev-libs/link-grammar/Manifest
@@ -1,4 +1,6 @@
AUX link-grammar-5.8.1-lld.patch 531 BLAKE2B e7a64032d8e8394205d4529e270bee1ec121a6b29b6a779e885cae825678679e521b2f4eb2bec6b6b6c8f1c5f311337c7b2e205a5cb1966538741e72b7e7cb37 SHA512 03dd3164c7626d70019851189fd35d7ecfcbc112b594dafc0c3390f0d533b67611838cd9207a486139f4e4c8ac78f81da87d0c00a0238ad417c90942bcaa2c6b
DIST link-grammar-5.10.5.tar.gz 4637765 BLAKE2B d280a06492462725c9c62352b6bf4fb0a11a09b2b3049e41d9a078fa2ad37c8ef0f0e99e05039e355e81d127c168024068319a4fcf64caa840c00c165ed22f11 SHA512 09774f7ce01bc7ec9912162297c9b7be176e655b70981a147d53245c015f62581e7f45c005d0590d1a65e870e3c2ac4288517012fd9caa9887e4fd86d8e6aa05
+DIST link-grammar-5.11.0.tar.gz 4672430 BLAKE2B 35892e05805a83ebbd700611d19aaa9ad1ede4ba3baf60c85ef8e5abbc40134fcb71d9cb9f41518f663c60ad11aac7bd0b316c8c95a12631032f5ad79564d686 SHA512 6a24bc8d5c9f0dd63460c092fc46880503018e949aa277148f8f551d6cc9d929d3a981eeaba00afc6e618c1e4505438d0c7e9a57dfe7a8deb7d3a8f183c56636
EBUILD link-grammar-5.10.5-r1.ebuild 2833 BLAKE2B e5dbcd6c317488e8523045c4874ab5f9b7addf9ae51722803f0dcc79c260d8b92b39d2282382411a5a6c4f4b093a60f6d9c16b33b87b84141586b5b885d26f2d SHA512 dd98a24400a1d92a8fe88af76c3e2d92b44cc707f3881337729406f95526042a12fe0ad34497e39f5e2f2d75190cce0454cd81a5aed3177d673552b59c27c43c
+EBUILD link-grammar-5.11.0.ebuild 2786 BLAKE2B aba4bb5d25ff692040528e6d3c299fb3cbabd3857ae84a605a7e5ff9d29414253368f336b0a5eb49b751e254b28b2b0362672f0cf53bcb16ad37904cba6ffba1 SHA512 f6affa26a059080331f89664521b9d963a56d61a779d8ca2df96a04c814c5ee5768108fd66d2ad050975f144b2b35e7ac1c79abaa9242dd7c5b3c8f082e6934e
MISC metadata.xml 1069 BLAKE2B e657e7727730c54d4aee903c585378978a2adf7a3a6851e6995445afe64e966e48bc4bfab6e930449c288b3ffca3436b9fbe67e88f9e790739ff0c8a079a79e2 SHA512 ba898591c96b8d05601389837891f6cda7eece200c10e014e86e0189aeeb5a0d0c04327d348ce2d77fa3d72dbbe3eec5b96953ff6903bd9670f305886f869229
diff --git a/dev-libs/link-grammar/link-grammar-5.11.0.ebuild b/dev-libs/link-grammar/link-grammar-5.11.0.ebuild
new file mode 100644
index 000000000000..ed4f65314cd3
--- /dev/null
+++ b/dev-libs/link-grammar/link-grammar-5.11.0.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+
+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.abisource.com/downloads/${PN}/${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} )
+ !sci-mathematics/minisat"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ dev-lang/swig:0
+ sys-devel/autoconf-archive
+ virtual/pkgconfig"
+
+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
+ --enable-sat-solver=bundled
+ --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
+}