diff options
Diffstat (limited to 'dev-libs/link-grammar')
-rw-r--r-- | dev-libs/link-grammar/Manifest | 3 | ||||
-rw-r--r-- | dev-libs/link-grammar/files/link-grammar-5.8.1-lld.patch | 13 | ||||
-rw-r--r-- | dev-libs/link-grammar/link-grammar-5.8.1.ebuild | 123 |
3 files changed, 139 insertions, 0 deletions
diff --git a/dev-libs/link-grammar/Manifest b/dev-libs/link-grammar/Manifest index a1ba60ea04ea..5f203284c7cb 100644 --- a/dev-libs/link-grammar/Manifest +++ b/dev-libs/link-grammar/Manifest @@ -1,5 +1,8 @@ AUX link-grammar-5.8.0-dont-inject-O3.patch 621 BLAKE2B becccc08314e45416ee96ec52a5b03b3cf5b1fc141a427a774c7d2b816cff985abba54a99b8bc308e9e75759045b335380a186031d647cc8df00582669615ebd SHA512 71e05d722d24a4647af9f879c14d74d2875ee5435f1b70acb8f962f9e7e602e044e8ed98e118e3ad9ebf725a9701a302ca1e5ea75aa8662326f29251c1317138 AUX link-grammar-5.8.0-out-of-source-build.patch 1189 BLAKE2B ba89966a0744b39f0f24fa3359a031041cae61f3ec26aaad42eb6e05cbc5c33e54f927c460b33f8d1d37b3987e149f1c88da1ebaab408d322954eefa755b38cb SHA512 e2f094f341bf943a57ce04f10f49a1aac8345ced88a63c54fdfceda946ab575ff088c597d61847d9a9bbebf10af9ad1c284239f29004fc7917deddcd79ddce69 +AUX link-grammar-5.8.1-lld.patch 531 BLAKE2B e7a64032d8e8394205d4529e270bee1ec121a6b29b6a779e885cae825678679e521b2f4eb2bec6b6b6c8f1c5f311337c7b2e205a5cb1966538741e72b7e7cb37 SHA512 03dd3164c7626d70019851189fd35d7ecfcbc112b594dafc0c3390f0d533b67611838cd9207a486139f4e4c8ac78f81da87d0c00a0238ad417c90942bcaa2c6b DIST link-grammar-5.8.0.tar.gz 3782125 BLAKE2B 8027e91212d3269b8e3ceaa5c837ad961cd2dfd92849d3989094ab771d97d30f4b228cfc1e32e9e843676aa439d790fb444823f7db69004538ad068c7bf28a45 SHA512 1262e2faf1de6f05a62f9d622f43c02253b4c241342df9b443a70ae04bd328d1fc49cd2f91c881e694f67215005833fec8b1fa9d395b1e547985b376c7415d2e +DIST link-grammar-5.8.1.tar.gz 3791847 BLAKE2B 8c89b95eaae87f0b576374c3f8c00529d61b62004718424d1ac1a41b694d8b56ba75d0a7068e1411376c260781f5adae8512976a6572e54f18d84abe98c1839e SHA512 0ef99d3ccb3d922a946f1f73b8b81cee9ece156886dab3367837e1e9f79944967da1391daf7f96ea5a95a0abdd346b642111a7939eb9aa079557c10b3efe8022 EBUILD link-grammar-5.8.0.ebuild 3187 BLAKE2B c571f8e5efd48157f76551eadef5de79f6d1092ee98299b4d0fd0d7059dd7971140445913dbab7236dcebef7e113a469eeba70b2a4d5c6d0b7a5c072f2235177 SHA512 2971f78f62d10407e12764b930c2f63ce25b2ff152ff9d8cf399163463461c029b83d14db4b5069b41e476509ccbb8c23dc5b0b0b354aa86f43c0471a24d0ebc +EBUILD link-grammar-5.8.1.ebuild 3055 BLAKE2B b029a010785009c0463a272e8fa70a0166e14419292a4ea8f0c09d4d1bac7bd75ed7122ade19c4615816650dc71a0296c4ff97d0f873f756f8b6f3f9f9c61505 SHA512 7d21f89272decc806e310f961d3e40edc5fa55398aca74f71a9d80b151e18e7a27ee4d243c0fe5aee81ae5662f24ce242ccf3b0254ed9675b57aec786932a2e6 MISC metadata.xml 963 BLAKE2B ebe0a68ad3a8fee0aa3d112f152e306d691b73e6969bf1fb7026edbdfb814fa1476c2e7d9e8ff9051e5920f9279acea871fab85da58ff8642ec819b5a4fbb57f SHA512 d53e9c7867629e8caf488cef531e258bb2cad3fcbe458e80024b0292fe90148656a77069c45f42e782ba473daafec5cf1fa93e9be00571ceefd21bf59b0ea5a2 diff --git a/dev-libs/link-grammar/files/link-grammar-5.8.1-lld.patch b/dev-libs/link-grammar/files/link-grammar-5.8.1-lld.patch new file mode 100644 index 000000000000..af48d251046b --- /dev/null +++ b/dev-libs/link-grammar/files/link-grammar-5.8.1-lld.patch @@ -0,0 +1,13 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -324,9 +324,7 @@ + dnl 1. Abort and notify if no zlib.h. 2. Adapt for non-standard location. + AC_MSG_NOTICE([The minisat2 headers include zlib.h]) + dnl The bundled library doesn't actually need -lz +- AX_CHECK_ZLIB([ZLIB_CPPFLAGS="-isystem $ZLIB_HOME/include"], +- [AC_MSG_NOTICE([No zlib library found - not building sat solver]) +- enable_sat_solver=no]) ++ PKG_CHECK_MODULES([ZLIB], [zlib], [ZLIB_CPPFLAGS="${ZLIB_CFLAGS}"]) + fi + + # If zlib not found, then don't continue with minisat. diff --git a/dev-libs/link-grammar/link-grammar-5.8.1.ebuild b/dev-libs/link-grammar/link-grammar-5.8.1.ebuild new file mode 100644 index 000000000000..2cdb1a11a0e9 --- /dev/null +++ b/dev-libs/link-grammar/link-grammar-5.8.1.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7..9} ) + +inherit autotools java-pkg-opt-2 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 ~sparc ~x86" +IUSE="aspell +hunspell java python" # pcre +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +# XXX: sqlite is automagic +# Does not build with >=sci-mathematics/minisat-2, bug #593662 +# add pcre support: pcre? ( dev-libs/libpcre ) +RDEPEND=" + dev-db/sqlite:3 + aspell? ( app-text/aspell ) + hunspell? ( app-text/hunspell ) + java? ( + >=virtual/jdk-1.6:* + dev-java/ant-core + ) + 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 + use java && java-pkg-opt-2_pkg_setup +} + +src_prepare() { + default + use java && java-pkg-opt-2_src_prepare + + eapply "${FILESDIR}"/${P}-lld.patch + + eautoreconf +} + +my_src_configure() { + local myconf=( + --disable-maintainer-mode + --disable-editline + --disable-perl-bindings + --disable-static + --enable-sat-solver=bundled + $(use_enable aspell) + $(use_enable hunspell) + $(usex hunspell --with-hunspell-dictdir="${EPREFIX}"/usr/share/myspell '') + $(use_enable java java-bindings) + # $(use_enable pcre regex-tokenizer) + # $(use_with pcre) + ) + + 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 +} + +pkg_preinst() { + use java && java-pkg-opt-2_pkg_preinst +} |