summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2018-11-18 01:14:31 +0100
committerThomas Deutschmann <whissi@gentoo.org>2018-11-18 02:17:52 +0100
commit1add77d9ac1705d6b2732c7593f62e0d48f20e2e (patch)
tree1e8d9f3ceccb81749dd978be89806b4fb129555a /dev-libs/liblinear/liblinear-221.ebuild
parentmedia-libs/libopenraw: bump to 0.1.3 (diff)
downloadgentoo-1add77d9ac1705d6b2732c7593f62e0d48f20e2e.tar.gz
gentoo-1add77d9ac1705d6b2732c7593f62e0d48f20e2e.tar.bz2
gentoo-1add77d9ac1705d6b2732c7593f62e0d48f20e2e.zip
dev-libs/liblinear: bump to v221
- EAPI bumped to EAPI=7 Package-Manager: Portage-2.3.51, Repoman-2.3.12 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'dev-libs/liblinear/liblinear-221.ebuild')
-rw-r--r--dev-libs/liblinear/liblinear-221.ebuild65
1 files changed, 65 insertions, 0 deletions
diff --git a/dev-libs/liblinear/liblinear-221.ebuild b/dev-libs/liblinear/liblinear-221.ebuild
new file mode 100644
index 00000000000..1aaede97f49
--- /dev/null
+++ b/dev-libs/liblinear/liblinear-221.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+inherit multilib toolchain-funcs
+
+DESCRIPTION="A Library for Large Linear Classification"
+HOMEPAGE="https://www.csie.ntu.edu.tw/~cjlin/liblinear/ https://github.com/cjlin1/liblinear"
+SRC_URI="https://github.com/cjlin1/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/3"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-macos"
+IUSE="blas"
+
+RDEPEND="
+ blas? ( virtual/blas )
+"
+DEPEND="
+ ${RDEPEND}
+ blas? ( virtual/pkgconfig )
+"
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e '/^AR/s|=|?=|g' \
+ -e '/^RANLIB/s|=|?=|g' \
+ -e '/^CFLAGS/d;/^CXXFLAGS/d' \
+ blas/Makefile || die
+ sed -i \
+ -e 's|make|$(MAKE)|g' \
+ -e '/$(LIBS)/s|$(CFLAGS)|& $(LDFLAGS)|g' \
+ -e '/^CFLAGS/d;/^CXXFLAGS/d' \
+ -e 's|$${SHARED_LIB_FLAG}|& $(LDFLAGS)|g' \
+ Makefile || die
+ if use blas; then
+ sed -i -e 's:blas/blas.a::g' Makefile || die
+ fi
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ CXX="$(tc-getCXX)" \
+ CFLAGS="${CFLAGS} -fPIC" \
+ CXXFLAGS="${CXXFLAGS} -fPIC" \
+ AR="$(tc-getAR) rcv" \
+ RANLIB="$(tc-getRANLIB)" \
+ LIBS="$(usex blas "$( $(tc-getPKG_CONFIG) --libs blas )" blas/blas.a)" \
+ lib all
+}
+
+src_install() {
+ dolib.so ${PN}.so.3
+ dosym ${PN}.so.3 /usr/$(get_libdir)/${PN}.so
+
+ newbin predict ${PN}-predict
+ newbin train ${PN}-train
+
+ doheader linear.h
+
+ dodoc README
+}