-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathliblinear-2.49.ebuild
More file actions
53 lines (47 loc) · 1.19 KB
/
liblinear-2.49.ebuild
File metadata and controls
53 lines (47 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Distributed under the terms of the GNU General Public License v2
# Autogen by MARK Devkit
EAPI=7
inherit 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://www.csie.ntu.edu.tw/~cjlin/liblinear/./liblinear-2.49.tar.gz -> liblinear-2.49.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="*"
IUSE="blas"
RDEPEND="blas? ( virtual/blas )
"
DEPEND="${RDEPEND}
blas? ( virtual/pkgconfig )
"
src_prepare() {
default
sed -i \
-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() {
emake \
CC="$(tc-getCC)" \
CXX="$(tc-getCXX)" \
CFLAGS="${CFLAGS} -fPIC" \
CXXFLAGS="${CXXFLAGS} -fPIC" \
AR="$(tc-getAR)" \
RANLIB="$(tc-getRANLIB)" \
lib all
}
src_install() {
dolib.so liblinear.so.*
dosym liblinear.so.* /usr/$(get_libdir)/liblinear$(get_libname)
newbin predict liblinear-predict
newbin train liblinear-train
doheader linear.h
dodoc README
}
# vim: filetype=ebuild