1 |
commit: c022f38e439e408e0e2780190512e81eb26cd009 |
2 |
Author: Justin Lecher <jlec <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Sep 29 09:09:27 2015 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Sep 29 09:09:42 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c022f38e |
7 |
|
8 |
dev-libs/liblinear: Unbundle blas |
9 |
|
10 |
Package-Manager: portage-2.2.22 |
11 |
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org> |
12 |
|
13 |
dev-libs/liblinear/liblinear-210-r1.ebuild | 58 ++++++++++++++++++++++++++++++ |
14 |
1 file changed, 58 insertions(+) |
15 |
|
16 |
diff --git a/dev-libs/liblinear/liblinear-210-r1.ebuild b/dev-libs/liblinear/liblinear-210-r1.ebuild |
17 |
new file mode 100644 |
18 |
index 0000000..250995b |
19 |
--- /dev/null |
20 |
+++ b/dev-libs/liblinear/liblinear-210-r1.ebuild |
21 |
@@ -0,0 +1,58 @@ |
22 |
+# Copyright 1999-2015 Gentoo Foundation |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+# $Id$ |
25 |
+ |
26 |
+EAPI=5 |
27 |
+ |
28 |
+inherit multilib toolchain-funcs |
29 |
+ |
30 |
+DESCRIPTION="A Library for Large Linear Classification" |
31 |
+HOMEPAGE="http://www.csie.ntu.edu.tw/~cjlin/liblinear/ https://github.com/cjlin1/liblinear" |
32 |
+SRC_URI="https://github.com/cjlin1/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
33 |
+ |
34 |
+LICENSE="BSD" |
35 |
+SLOT="0/3" |
36 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
37 |
+ |
38 |
+RDEPEND="virtual/blas" |
39 |
+DEPEND="${RDEPEND} |
40 |
+ virtual/pkgconfig" |
41 |
+ |
42 |
+src_prepare() { |
43 |
+ sed -i \ |
44 |
+ -e '/^AR/s|=|?=|g' \ |
45 |
+ -e '/^RANLIB/s|=|?=|g' \ |
46 |
+ -e '/^CFLAGS/d;/^CXXFLAGS/d' \ |
47 |
+ blas/Makefile || die |
48 |
+ sed -i \ |
49 |
+ -e 's|make|$(MAKE)|g' \ |
50 |
+ -e '/$(LIBS)/s|$(CFLAGS)|& $(LDFLAGS)|g' \ |
51 |
+ -e '/^CFLAGS/d;/^CXXFLAGS/d' \ |
52 |
+ -e 's|$${SHARED_LIB_FLAG}|& $(LDFLAGS)|g' \ |
53 |
+ -e 's:blas/blas.a::g' \ |
54 |
+ Makefile || die |
55 |
+} |
56 |
+ |
57 |
+src_compile() { |
58 |
+ emake \ |
59 |
+ CC=$(tc-getCC) \ |
60 |
+ CXX=$(tc-getCXX) \ |
61 |
+ CFLAGS="${CFLAGS} -fPIC" \ |
62 |
+ CXXFLAGS="${CXXFLAGS} -fPIC" \ |
63 |
+ AR="$(tc-getAR) rcv" \ |
64 |
+ RANLIB="$(tc-getRANLIB)" \ |
65 |
+ LIBS=$($(tc-getPKG_CONFIG) --libs blas) \ |
66 |
+ lib all |
67 |
+} |
68 |
+ |
69 |
+src_install() { |
70 |
+ dolib ${PN}.so.3 |
71 |
+ dosym ${PN}.so.3 /usr/$(get_libdir)/${PN}.so |
72 |
+ |
73 |
+ newbin predict ${PN}-predict |
74 |
+ newbin train ${PN}-train |
75 |
+ |
76 |
+ doheader linear.h |
77 |
+ |
78 |
+ dodoc README |
79 |
+} |