diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-03-25 12:50:15 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-03-25 12:50:15 +0000 |
commit | 71d582d27eeece574ab3d904aa3fbe7742b0e895 (patch) | |
tree | a859a9d4a94b41c113fb5bdb5c4ffe261d884970 /dev-libs/link-grammar/link-grammar-5.12.3.ebuild | |
parent | 0b82ae29b3034efe3e7b7f533dbcb76168544c5e (diff) |
gentoo auto-resync : 25:03:2023 - 12:50:15
Diffstat (limited to 'dev-libs/link-grammar/link-grammar-5.12.3.ebuild')
-rw-r--r-- | dev-libs/link-grammar/link-grammar-5.12.3.ebuild | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/dev-libs/link-grammar/link-grammar-5.12.3.ebuild b/dev-libs/link-grammar/link-grammar-5.12.3.ebuild new file mode 100644 index 000000000000..8a81b91fda91 --- /dev/null +++ b/dev-libs/link-grammar/link-grammar-5.12.3.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..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 + --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 +} |