dev-libs/liblinear: Version bump.
authorJeroen Roovers <jer@gentoo.org>
Mon, 28 Sep 2015 08:21:16 +0000 (10:21 +0200)
committerJeroen Roovers <jer@gentoo.org>
Tue, 29 Sep 2015 04:03:58 +0000 (06:03 +0200)
Package-Manager: portage-2.2.20.1

dev-libs/liblinear/Manifest
dev-libs/liblinear/liblinear-210.ebuild [new file with mode: 0644]

index a5af098345babc7ae25ef09f48e607a436a195be..bb890c783dc6b3dffbe5146db1b196d892a229fe 100644 (file)
@@ -1 +1,2 @@
 DIST liblinear-196.tar.gz 361430 SHA256 e61297bf72f882ba891ec7b77fbc633d6d933738c1d61780917d75747bd0539c SHA512 6ed1ed45a98c1ff050537d4dd3234088c9ec394d339456168133200d074d1eb5ce80391dd2bf99b1a74e3bd4907ca7b04a5dd95bc42fcfad84ec8a6c38a7feb9 WHIRLPOOL a3622c23b29a0c40e00d1af8d53323c2131123d568223ab54a9dcd0c746906a576f57fd5e4d207643283a655647ebd66a9ac13c31fc36a2ffbac2e0bfdfcd98e
+DIST liblinear-210.tar.gz 381662 SHA256 9e559d1f0714799d4cf7742fb186012459285e25bed9c5847d5d8032daefc8de SHA512 4e4558467f2ebb3dbd640c172b1129c8e5981c231a043abb0398a803252559795604a34992baee50ae6689646050733d3a908d7d76f8b1c94309b859eae7f8c8 WHIRLPOOL 6756930f5fec958f3f137b9757a6a3704d1a5ab799d1634e2223990847ebe05a2602a77e4310a4f653434230ca47c0053de2ff3a03dc1cb265f85a6148db6f5d
diff --git a/dev-libs/liblinear/liblinear-210.ebuild b/dev-libs/liblinear/liblinear-210.ebuild
new file mode 100644 (file)
index 0000000..db3c49f
--- /dev/null
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+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 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+src_prepare() {
+       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
+}
+
+src_compile() {
+       CC=$(tc-getCC) \
+               CXX=$(tc-getCXX) \
+               CFLAGS="${CFLAGS} -fPIC" \
+               CXXFLAGS="${CXXFLAGS} -fPIC" \
+               AR="$(tc-getAR) rcv" \
+               RANLIB="$(tc-getRANLIB)" \
+               emake 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
+
+       insinto /usr/include
+       doins linear.h
+
+       dodoc README
+}