Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/link-grammar/
Date: Wed, 23 Jun 2021 21:33:38
Message-Id: 1624483975.2aa38c6d4e3af961d47d6c2f090d86cdded02930.soap@gentoo
1 commit: 2aa38c6d4e3af961d47d6c2f090d86cdded02930
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jun 23 21:32:55 2021 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 23 21:32:55 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2aa38c6d
7
8 dev-libs/link-grammar: add 5.9.1
9
10 Signed-off-by: David Seifert <soap <AT> gentoo.org>
11
12 dev-libs/link-grammar/Manifest | 1 +
13 dev-libs/link-grammar/link-grammar-5.9.1.ebuild | 123 ++++++++++++++++++++++++
14 2 files changed, 124 insertions(+)
15
16 diff --git a/dev-libs/link-grammar/Manifest b/dev-libs/link-grammar/Manifest
17 index 2101dd3b0ce..b873ef15a70 100644
18 --- a/dev-libs/link-grammar/Manifest
19 +++ b/dev-libs/link-grammar/Manifest
20 @@ -1,2 +1,3 @@
21 DIST link-grammar-5.8.0.tar.gz 3782125 BLAKE2B 8027e91212d3269b8e3ceaa5c837ad961cd2dfd92849d3989094ab771d97d30f4b228cfc1e32e9e843676aa439d790fb444823f7db69004538ad068c7bf28a45 SHA512 1262e2faf1de6f05a62f9d622f43c02253b4c241342df9b443a70ae04bd328d1fc49cd2f91c881e694f67215005833fec8b1fa9d395b1e547985b376c7415d2e
22 DIST link-grammar-5.8.1.tar.gz 3791847 BLAKE2B 8c89b95eaae87f0b576374c3f8c00529d61b62004718424d1ac1a41b694d8b56ba75d0a7068e1411376c260781f5adae8512976a6572e54f18d84abe98c1839e SHA512 0ef99d3ccb3d922a946f1f73b8b81cee9ece156886dab3367837e1e9f79944967da1391daf7f96ea5a95a0abdd346b642111a7939eb9aa079557c10b3efe8022
23 +DIST link-grammar-5.9.1.tar.gz 3809872 BLAKE2B fe0c407e2e4ea4201036647cbea7d4c2606fa9943653fcc2d3505963a00773006912b8af5c2762acf498220d2f48319a031736d59790c0fed616432973ea24ec SHA512 c8d8bc99ddd6f6190ebcb24fcafc79497c3eeab1deb3099691f55c735a0a607a8372a8dca5cd86ce7c20cd3a45e4f1cbf91bef39dc781a5b5a2246006b4f601e
24
25 diff --git a/dev-libs/link-grammar/link-grammar-5.9.1.ebuild b/dev-libs/link-grammar/link-grammar-5.9.1.ebuild
26 new file mode 100644
27 index 00000000000..2be3e58a4fd
28 --- /dev/null
29 +++ b/dev-libs/link-grammar/link-grammar-5.9.1.ebuild
30 @@ -0,0 +1,123 @@
31 +# Copyright 1999-2021 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=7
35 +
36 +PYTHON_COMPAT=( python3_{7..9} )
37 +
38 +inherit autotools java-pkg-opt-2 python-r1 out-of-source
39 +
40 +DESCRIPTION="A Syntactic English parser"
41 +HOMEPAGE="https://www.abisource.com/projects/link-grammar/ https://www.link.cs.cmu.edu/link/"
42 +SRC_URI="https://www.abisource.com/downloads/${PN}/${PV}/${P}.tar.gz"
43 +
44 +LICENSE="LGPL-2.1"
45 +SLOT="0/5"
46 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
47 +IUSE="aspell +hunspell java python" # pcre
48 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
49 +
50 +# XXX: sqlite is automagic
51 +# Does not build with >=sci-mathematics/minisat-2, bug #593662
52 +# add pcre support: pcre? ( dev-libs/libpcre )
53 +RDEPEND="
54 + dev-db/sqlite:3
55 + aspell? ( app-text/aspell )
56 + hunspell? ( app-text/hunspell )
57 + java? (
58 + >=virtual/jdk-1.6:*
59 + dev-java/ant-core
60 + )
61 + python? ( ${PYTHON_DEPS} )
62 + !sci-mathematics/minisat"
63 +DEPEND="${RDEPEND}"
64 +BDEPEND="
65 + dev-lang/swig:0
66 + sys-devel/autoconf-archive
67 + virtual/pkgconfig"
68 +
69 +pkg_setup() {
70 + if use aspell && use hunspell; then
71 + ewarn "You have enabled 'aspell' and 'hunspell' support, but both cannot coexist,"
72 + ewarn "only hunspell will be built. Press Ctrl+C and set only 'aspell' USE flag if"
73 + ewarn "you want aspell support."
74 + fi
75 + use java && java-pkg-opt-2_pkg_setup
76 +}
77 +
78 +src_prepare() {
79 + default
80 + use java && java-pkg-opt-2_src_prepare
81 +
82 + eapply "${FILESDIR}"/${PN}-5.8.1-lld.patch
83 +
84 + eautoreconf
85 +}
86 +
87 +my_src_configure() {
88 + local myconf=(
89 + --disable-maintainer-mode
90 + --disable-editline
91 + --disable-perl-bindings
92 + --disable-static
93 + --enable-sat-solver=bundled
94 + $(use_enable aspell)
95 + $(use_enable hunspell)
96 + $(usex hunspell --with-hunspell-dictdir="${EPREFIX}"/usr/share/myspell '')
97 + $(use_enable java java-bindings)
98 + # $(use_enable pcre regex-tokenizer)
99 + # $(use_with pcre)
100 + )
101 +
102 + econf \
103 + --disable-python-bindings \
104 + "${myconf[@]}"
105 +
106 + if use python; then
107 + python_configure() {
108 + econf \
109 + --enable-python-bindings \
110 + "${myconf[@]}"
111 + }
112 + python_foreach_impl run_in_build_dir python_configure
113 + fi
114 +}
115 +
116 +my_src_compile() {
117 + local -x MAIN_BUILD_DIR="${BUILD_DIR}"
118 + default
119 +
120 + if use python; then
121 + python_compile() {
122 + emake -C bindings/python \
123 + VPATH="${S}:${MAIN_BUILD_DIR}" \
124 + _clinkgrammar_la_DEPENDENCIES="${MAIN_BUILD_DIR}"/link-grammar/liblink-grammar.la \
125 + _clinkgrammar_la_LIBADD="${MAIN_BUILD_DIR}"/link-grammar/liblink-grammar.la
126 + }
127 + python_foreach_impl run_in_build_dir python_compile
128 + fi
129 +}
130 +
131 +my_src_install() {
132 + local -x MAIN_BUILD_DIR="${BUILD_DIR}"
133 + default
134 +
135 + if use python; then
136 + python_install() {
137 + emake -C bindings/python \
138 + VPATH="${S}:${MAIN_BUILD_DIR}" \
139 + _clinkgrammar_la_DEPENDENCIES="${MAIN_BUILD_DIR}"/link-grammar/liblink-grammar.la \
140 + _clinkgrammar_la_LIBADD="${MAIN_BUILD_DIR}"/link-grammar/liblink-grammar.la \
141 + DESTDIR="${D}" \
142 + install
143 + }
144 + python_foreach_impl run_in_build_dir python_install
145 + fi
146 +
147 + # no static archives
148 + find "${ED}" -name '*.la' -delete || die
149 +}
150 +
151 +pkg_preinst() {
152 + use java && java-pkg-opt-2_pkg_preinst
153 +}