summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2015-10-03 09:49:02 +0200
committerJeroen Roovers <jer@gentoo.org>2015-10-03 09:49:19 +0200
commit207e19f486d92c24aae0dd2e8cb6254b26fb174d (patch)
tree9cf27684f7a6782f6e4ef002ef1fbe1b125dc9b2 /dev-libs
parentmedia-radio/fldigi: Maintenace release (diff)
downloadgentoo-207e19f486d92c24aae0dd2e8cb6254b26fb174d.tar.gz
gentoo-207e19f486d92c24aae0dd2e8cb6254b26fb174d.tar.bz2
gentoo-207e19f486d92c24aae0dd2e8cb6254b26fb174d.zip
dev-libs/liblinear: Add IUSE=blas.
Package-Manager: portage-2.2.22
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/liblinear/liblinear-210-r1.ebuild65
1 files changed, 65 insertions, 0 deletions
diff --git a/dev-libs/liblinear/liblinear-210-r1.ebuild b/dev-libs/liblinear/liblinear-210-r1.ebuild
new file mode 100644
index 000000000000..031b30b45616
--- /dev/null
+++ b/dev-libs/liblinear/liblinear-210-r1.ebuild
@@ -0,0 +1,65 @@
+# 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"
+IUSE="blas"
+
+RDEPEND="
+ blas? ( virtual/blas )
+"
+DEPEND="
+ ${RDEPEND}
+ blas? ( virtual/pkgconfig )
+"
+
+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
+ 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
+}