Skip to content

Commit

Permalink
dev-libs/link-grammar: Version bump
Browse files Browse the repository at this point in the history
Package-Manager: portage-2.3.0
  • Loading branch information
pacho2 committed Sep 17, 2016
1 parent 274e643 commit d6a34e2
Show file tree
Hide file tree
Showing 2 changed files with 156 additions and 0 deletions.
1 change: 1 addition & 0 deletions dev-libs/link-grammar/Manifest
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
DIST link-grammar-5.3.10.tar.gz 3612522 SHA256 7ead9a5190cfac2f8a0f8b2608fd48b6d71a50aa55cb4fedd3f52e85a4df0a95 SHA512 b91c79c6c668c7d1ccb0f29e3762e4426f082421fc3a15e77bfacbc3681d4f969db7015010504dc8418e4d8c90847ed156bcc0ea01fd6589ef31c4d35af6e989 WHIRLPOOL 3c1d05f3523e6b411b653803c4f2490078d3a227eec3fc4497c0d801127c00fe3eca7bb9d1b868b2c776b59829ea96da42ceee70d24d6617f9040b0164dfe1bc
DIST link-grammar-5.3.7.tar.gz 3555475 SHA256 d0cf0061cccccfdc7c539e1f402da11b5fe2783940546560cd11a05382263a6a SHA512 f1a1e03841f847d427acb24cfb7a7a552ade6731253cf5f2ce6fcb82be387426d7cb5b47a82523f01fc56771c0667881ae663380dbc644e775694029c7fef740 WHIRLPOOL 86bf7f2e26a6e3e5c560c85719d2a8823846ad1d4a273641104111bff2523c431f459a38415c22c12db61dc344ac99e8dd33dcb7210ee42d5517f39c1e0ff90f
DIST link-grammar-5.3.9.tar.gz 3597250 SHA256 fa0a9957607705a42dbfa6bddae6567fdd11c0f648157dc824bb6facf873156a SHA512 1fa7c36c53c0525e774239fd3d9c6159ae6416b0ca3d1a4d6883c77443132fed22d13d367f26dc335b75e40ecdb163e0057d1cd1f76ffa92c7f7cbd18f31266f WHIRLPOOL 8954f0d285e9b1b045781a2cf40d401dfafb51a3f7506251d4542509d260f7f501375f9a9b036359717e7b3d0a90d5a78cd02df947bc7d9027eff274caacf61b
155 changes: 155 additions & 0 deletions dev-libs/link-grammar/link-grammar-5.3.10.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=6
GNOME2_LA_PUNT="yes"
PYTHON_COMPAT=( python{2_7,3_4,3_5} )

inherit autotools eutils gnome2 java-pkg-opt-2 python-r1

DESCRIPTION="A Syntactic English parser"
HOMEPAGE="http://www.abisource.com/projects/link-grammar/ http://www.link.cs.cmu.edu/link/"
SRC_URI="http://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 static-libs threads"

RDEPEND="
aspell? ( app-text/aspell )
hunspell? ( app-text/hunspell )
java? (
>=virtual/jdk-1.6:*
dev-java/ant-core )
python? ( ${PYTHON_DEPS} )
"
DEPEND="${RDEPEND}
dev-lang/swig:0
sys-devel/autoconf-archive
virtual/pkgconfig
"

NORMAL_BUILD_DIR="${WORKDIR}/${P}-normal"

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.3.9-out-of-source-build.patch
eautoreconf

if use python ; then
prepare_python() {
mkdir -p "${BUILD_DIR}" || die
}
python_foreach_impl prepare_python
fi

mkdir -p "${NORMAL_BUILD_DIR}" || die
gnome2_src_prepare
}

src_configure() {
local myconf=(
--disable-editline
--disable-perl-bindings
--enable-shared
$(use_enable aspell)
$(use_enable hunspell)
$(usex hunspell --with-hunspell-dictdir=/usr/share/myspell)
$(use_enable java java-bindings)
$(use_enable static-libs static)
$(use_enable threads pthreads)
)

cd "${NORMAL_BUILD_DIR}" || die
ECONF_SOURCE="${S}" gnome2_src_configure \
--disable-python-bindings \
--disable-python3-bindings \
${myconf[@]}

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
}
python_foreach_impl run_in_build_dir prepare_python
fi
}

src_compile() {
cd "${NORMAL_BUILD_DIR}" || die
gnome2_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 \
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
}
python_foreach_impl run_in_build_dir compile_binding
fi
}

src_test() {
cd "${NORMAL_BUILD_DIR}" || die
ln -s "${S}"/data tests/data || die
emake check
}

src_install() {
cd "${NORMAL_BUILD_DIR}" || die
gnome2_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 \
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 \
DESTDIR="${D}" \
install
}
python_foreach_impl run_in_build_dir install_binding
fi
}

pkg_preinst() {
use java && java-pkg-opt-2_pkg_preinst
gnome2_pkg_preinst
}

0 comments on commit d6a34e2

Please sign in to comment.