commit:     6a173d5b4c4cf300b9b59da60f2bbc1ca112edb9
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 30 14:56:16 2025 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Nov 30 14:56:16 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a173d5b

dev-libs/link-grammar: add 5.13.0

Signed-off-by: David Seifert <soap <AT> gentoo.org>

 dev-libs/link-grammar/Manifest                   |   1 +
 dev-libs/link-grammar/link-grammar-5.13.0.ebuild | 117 +++++++++++++++++++++++
 2 files changed, 118 insertions(+)

diff --git a/dev-libs/link-grammar/Manifest b/dev-libs/link-grammar/Manifest
index 3a171948fca8..f99c2808f3cf 100644
--- a/dev-libs/link-grammar/Manifest
+++ b/dev-libs/link-grammar/Manifest
@@ -1 +1,2 @@
 DIST link-grammar-5.12.5.tar.gz 4727809 BLAKE2B 
76654a94bb1222761bc9107f2e129d6c7606e4cc0fa03b4564705714c8ac35f9562c28d66924b24143c8bbd6365f77714ad233f163f8f83de1da73ac66213f07
 SHA512 
2637d6b571ae027d8813da188a555a8b91afa0a216921842b43e4cf6aa4d799ea5342fe17081c13346c6bbecc46032765b6f5d978b53cee570e329b6b141094b
+DIST link-grammar-5.13.0.tar.gz 4748154 BLAKE2B 
956f8a80c4c6a992d88b8c34491889bfae38c2ef359ed2f7523ca4a339cefdf9e384c9f1b0be6972aedd8ddfd0d189ebc40f567e10ccbb5516fe6a66bf567371
 SHA512 
921c2fc3d5f5b8520d5ad0925e3212599ffd51e51c848cc7b9503579ca89bc0dbf9be2f15c3236028dc7f592099391033694a1b0fac83083d82d72b1dec1b1a3

diff --git a/dev-libs/link-grammar/link-grammar-5.13.0.ebuild 
b/dev-libs/link-grammar/link-grammar-5.13.0.ebuild
new file mode 100644
index 000000000000..4fc424213857
--- /dev/null
+++ b/dev-libs/link-grammar/link-grammar-5.13.0.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..14} )
+
+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 ~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
+       sys-devel/flex
+       virtual/pkgconfig"
+
+QA_CONFIG_IMPL_DECL_SKIP=(
+       # _AC_UNDECLARED_BUILTIN false positive
+       strchr
+       typeof
+)
+
+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)
+               # requires flex, since reflex support is flaky, #890158
+               LEX="flex"
+       )
+
+       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
+}

Reply via email to