summaryrefslogtreecommitdiff
path: root/dev-libs/link-grammar
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
commit3cf7c3ef441822c889356fd1812ebf2944a59851 (patch)
treec513fe68548b40365c1c2ebfe35c58ad431cdd77 /dev-libs/link-grammar
parent05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff)
gentoo resync : 25.08.2020
Diffstat (limited to 'dev-libs/link-grammar')
-rw-r--r--dev-libs/link-grammar/Manifest6
-rw-r--r--dev-libs/link-grammar/files/link-grammar-5.8.0-dont-inject-O3.patch23
-rw-r--r--dev-libs/link-grammar/files/link-grammar-5.8.0-out-of-source-build.patch33
-rw-r--r--dev-libs/link-grammar/link-grammar-5.3.11.ebuild33
-rw-r--r--dev-libs/link-grammar/link-grammar-5.8.0.ebuild125
5 files changed, 192 insertions, 28 deletions
diff --git a/dev-libs/link-grammar/Manifest b/dev-libs/link-grammar/Manifest
index da7f62b99876..0ba081fb8eff 100644
--- a/dev-libs/link-grammar/Manifest
+++ b/dev-libs/link-grammar/Manifest
@@ -1,4 +1,8 @@
AUX link-grammar-5.3.9-out-of-source-build.patch 2541 BLAKE2B 6b60a65bb39e628f8c555dce20410872a4dd56d27402e7bc939d49483053cf84199f3f5bab495c16f734b4b6662b467b0369cda4dc852a39568f27b68c0f14da SHA512 340a03c31ed94f53b00622bf7f925d8f47c658ec81843f0139deb5b38074f346ad4d65dc49653cccf1b7b49966c77029ab64e993d113e709e75ebb930448b8f6
+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
DIST link-grammar-5.3.11.tar.gz 3632617 BLAKE2B 07fe951743096a0d6b906c9b7174b58fcc54b0e2c54805d15731de783888327799fd77f64a2ae7f4e09327feb08d91cb95471e9c0c3c2fe00fca3553f40b1905 SHA512 09671d187deac3b9530dd63eb4497de9c2c9db32d79da06c677bdbccac015adef06813819692a92d15499c7cb347071c58b73c52505af154bdc8a8fcd409ddd2
-EBUILD link-grammar-5.3.11.ebuild 4011 BLAKE2B 78ca14fd13e3f30627309be911e679444ed1dc2201bbbba5cbe27dadc9971acbbab6b1201bc69376d9fc5d6b3421b34a1d53719ff123daf3c90f4e0cc8cabcbb SHA512 11b31114abb46d145c5aedd304bfc81180ac72aea11c45bdf2ef695ce148780c6a83d367f7f0fdff41639b78a422c387316f44766948b9976c205b9bd9ad73e5
+DIST link-grammar-5.8.0.tar.gz 3782125 BLAKE2B 8027e91212d3269b8e3ceaa5c837ad961cd2dfd92849d3989094ab771d97d30f4b228cfc1e32e9e843676aa439d790fb444823f7db69004538ad068c7bf28a45 SHA512 1262e2faf1de6f05a62f9d622f43c02253b4c241342df9b443a70ae04bd328d1fc49cd2f91c881e694f67215005833fec8b1fa9d395b1e547985b376c7415d2e
+EBUILD link-grammar-5.3.11.ebuild 3632 BLAKE2B d0e14eb500342a137661236b1c4ed9ab67623a854b994cabe70ed3c3cf6e15e6aa0035380461c99ae4cc665f0921e92bcb995c264dc4d2547a1bd37c5ffdeec6 SHA512 b0e9264782da3b7bfc6aea75870fc7c789591eca23c442f29051dec5f28e0b8d5100f971e6eba143be14dfb27d06042952b469af5f6337d3c89020eea3112d76
+EBUILD link-grammar-5.8.0.ebuild 3183 BLAKE2B 7b2e16795d6f2b2258ae36a6e150fd87ca7891f2f2a5c467889f8322ab6307e34fe8cd9753d592d685238a13ece7faaaf98b99528a6f79cf194a6db2bb6e3f30 SHA512 e268634bb5e09bcfbeff498f161d47ab7e7d40390609d5da9844f7b4afb1145ed134820c0e267822707ae0ba444a27f6e3f96750c0b38b3476866c0b37f3b6d7
MISC metadata.xml 963 BLAKE2B ebe0a68ad3a8fee0aa3d112f152e306d691b73e6969bf1fb7026edbdfb814fa1476c2e7d9e8ff9051e5920f9279acea871fab85da58ff8642ec819b5a4fbb57f SHA512 d53e9c7867629e8caf488cef531e258bb2cad3fcbe458e80024b0292fe90148656a77069c45f42e782ba473daafec5cf1fa93e9be00571ceefd21bf59b0ea5a2
diff --git a/dev-libs/link-grammar/files/link-grammar-5.8.0-dont-inject-O3.patch b/dev-libs/link-grammar/files/link-grammar-5.8.0-dont-inject-O3.patch
new file mode 100644
index 000000000000..2d97b7cc7627
--- /dev/null
+++ b/dev-libs/link-grammar/files/link-grammar-5.8.0-dont-inject-O3.patch
@@ -0,0 +1,23 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -137,8 +137,7 @@
+ AC_SUBST(HOST_OS)
+ # ====================================================================
+
+-CFLAGS="${CFLAGS} -O3"
+-CXXFLAGS="${CXXFLAGS} -O3 -Wall"
++CXXFLAGS="${CXXFLAGS} -Wall"
+
+ # The std=c11 flag provides the proper float-pt math decls working,
+ # e.g. fmax However, it also undefined _BSD_SOURCE, etc. which is
+@@ -908,10 +907,6 @@
+
+ AC_FUNC_STRERROR_R
+
+-AC_SUBST(CFLAGS)
+-AC_SUBST(CPPFLAGS)
+-AC_SUBST(CXXFLAGS)
+-
+ dnl Save the compilation definitions for an extended version printout
+ AC_OUTPUT_MAKE_DEFS()
+ LG_DEFS=`$ECHO "$DEFS" | $SED 's/\\\\//g'`
diff --git a/dev-libs/link-grammar/files/link-grammar-5.8.0-out-of-source-build.patch b/dev-libs/link-grammar/files/link-grammar-5.8.0-out-of-source-build.patch
new file mode 100644
index 000000000000..1616e933664e
--- /dev/null
+++ b/dev-libs/link-grammar/files/link-grammar-5.8.0-out-of-source-build.patch
@@ -0,0 +1,33 @@
+--- a/bindings/python/Makefile.am
++++ b/bindings/python/Makefile.am
+@@ -4,8 +4,8 @@
+ # Created by Linas Vepstas February 2014
+ #
+ #
+-SWIG_SOURCES = ../swig/link_grammar.i
+-SWIG_INCLUDES = ../../link-grammar/link-includes.h
++SWIG_SOURCES = $(top_srcdir)/bindings/swig/link_grammar.i
++SWIG_INCLUDES = $(top_srcdir)/link-grammar/link-includes.h
+ built_c_sources = lg_python_wrap.cc
+ built_py_sources = $(top_builddir)/bindings/python/clinkgrammar.py
+
+@@ -18,16 +18,16 @@
+
+ # Files that get installed in $pkgpythondir
+ pkgpython_PYTHON = \
+- linkgrammar.py \
++ $(srcdir)/linkgrammar.py \
+ $(top_builddir)/bindings/python/__init__.py \
+- $(top_builddir)/bindings/python/clinkgrammar.py
++ $(built_py_sources)
+
+ # Apparently, anaconda does not work without this!?
+ # This seems wrong and lame to me, but see issue #298
+ # https://github.com/opencog/link-grammar/issues/298
+ pkgpypathdir=$(pythondir)
+ pkgpypath_PYTHON = \
+- linkgrammar.pth
++ $(srcdir)/linkgrammar.pth
+
+ # The make uninstall target should remove directories we created.
+ uninstall-hook:
diff --git a/dev-libs/link-grammar/link-grammar-5.3.11.ebuild b/dev-libs/link-grammar/link-grammar-5.3.11.ebuild
index d8cf07fb2078..ddab5316ca13 100644
--- a/dev-libs/link-grammar/link-grammar-5.3.11.ebuild
+++ b/dev-libs/link-grammar/link-grammar-5.3.11.ebuild
@@ -90,17 +90,10 @@ src_configure() {
if use python ; then
prepare_python() {
- if python_is_python3; then
- ECONF_SOURCE="${S}" gnome2_src_configure \
- --disable-python-bindings \
- --enable-python3-bindings \
- ${myconf[@]}
- else
- ECONF_SOURCE="${S}" gnome2_src_configure \
- --enable-python-bindings \
- --disable-python3-bindings \
- ${myconf[@]}
- fi
+ ECONF_SOURCE="${S}" gnome2_src_configure \
+ --disable-python-bindings \
+ --enable-python3-bindings \
+ ${myconf[@]}
}
python_foreach_impl run_in_build_dir prepare_python
fi
@@ -112,14 +105,7 @@ src_compile() {
if use python ; then
compile_binding() {
- local pysuffix
- if python_is_python3; then
- pysuffix=3
- else
- pysuffix=
- fi
-
- emake -C bindings/python$pysuffix \
+ emake -C bindings/python3 \
VPATH="${S}:${NORMAL_BUILD_DIR}" \
_clinkgrammar_la_DEPENDENCIES="${NORMAL_BUILD_DIR}"/link-grammar/liblink-grammar.la \
_clinkgrammar_la_LIBADD="${NORMAL_BUILD_DIR}"/link-grammar/liblink-grammar.la
@@ -140,14 +126,7 @@ src_install() {
if use python ; then
install_binding() {
- local pysuffix
- if python_is_python3; then
- pysuffix=3
- else
- pysuffix=
- fi
-
- emake -C bindings/python$pysuffix \
+ emake -C bindings/python3 \
VPATH="${S}:${NORMAL_BUILD_DIR}" \
_clinkgrammar_la_DEPENDENCIES="${NORMAL_BUILD_DIR}"/link-grammar/liblink-grammar.la \
_clinkgrammar_la_LIBADD="${NORMAL_BUILD_DIR}"/link-grammar/liblink-grammar.la \
diff --git a/dev-libs/link-grammar/link-grammar-5.8.0.ebuild b/dev-libs/link-grammar/link-grammar-5.8.0.ebuild
new file mode 100644
index 000000000000..6434d2d8be23
--- /dev/null
+++ b/dev-libs/link-grammar/link-grammar-5.8.0.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6..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"
+KEYWORDS="~alpha ~amd64 ~arm ~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() {
+ use java && java-pkg-opt-2_src_prepare
+
+ # http://bugzilla.abisource.com/show_bug.cgi?id=13806
+ eapply "${FILESDIR}"/${PN}-5.8.0-out-of-source-build.patch
+ eapply "${FILESDIR}"/${PN}-5.8.0-dont-inject-O3.patch
+ eapply_user
+
+ 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
+}