summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-libs/liblinear/Manifest1
-rw-r--r--dev-libs/liblinear/liblinear-220.ebuild65
2 files changed, 66 insertions, 0 deletions
diff --git a/dev-libs/liblinear/Manifest b/dev-libs/liblinear/Manifest
index 6776b445ff0c..8615836097c2 100644
--- a/dev-libs/liblinear/Manifest
+++ b/dev-libs/liblinear/Manifest
@@ -1,2 +1,3 @@
DIST liblinear-210.tar.gz 381662 BLAKE2B d64d217f7ba67605821062f66d4e9f130f4f2396dde14cd35532bad11f4af4f34bc231a1e3796ba2d0e14f84830ec05c6358d40018e048f4ae3fa62db2b1d0d7 SHA512 4e4558467f2ebb3dbd640c172b1129c8e5981c231a043abb0398a803252559795604a34992baee50ae6689646050733d3a908d7d76f8b1c94309b859eae7f8c8
DIST liblinear-211.tar.gz 506507 BLAKE2B 31b7677dfbf9dbb060a28dc19c63db4244e55c4ddc984a8c9ccadc517beabaf8fabef04488366cd7375608412dad3c37d4f09fe27b37b69e69209d32379a9e45 SHA512 005a47b3a8ff27f9890ce10549478be4b041c92d162815fba33dd56db7c014e6958b3e7e161451490c34d88df2161366365bd41b1a48d6a77034edc346a0fc3a
+DIST liblinear-220.tar.gz 517302 BLAKE2B 6aa28c3357f830441ee3cb2e9691d4952e4d4db6592622f6e93be1ed12c8f871e4a9c98abcb35b472a227005bad0cc1e6076678358dc324a7453cbbfb34a0866 SHA512 cde798b7cb221513cf2b8bbe134d6c3dce1ed26c43504d8c09dbed93b82ca47bfd271d4dd3d03384187273906ce140d4ce4418a4a8c21410015ec1631c1042c6
diff --git a/dev-libs/liblinear/liblinear-220.ebuild b/dev-libs/liblinear/liblinear-220.ebuild
new file mode 100644
index 000000000000..aa78ae616b61
--- /dev/null
+++ b/dev-libs/liblinear/liblinear-220.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit multilib toolchain-funcs
+
+DESCRIPTION="A Library for Large Linear Classification"
+HOMEPAGE="http://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"
+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 ${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
+}