1 # Copyright 1999-2018 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 inherit multilib toolchain-funcs
7 DESCRIPTION="A Library for Large Linear Classification"
8 HOMEPAGE="https://www.csie.ntu.edu.tw/~cjlin/liblinear/ https://github.com/cjlin1/liblinear"
9 SRC_URI="https://github.com/cjlin1/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
13 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-macos"
17 blas? ( virtual/blas )
21 blas? ( virtual/pkgconfig )
29 -e '/^RANLIB/s|=|?=|g' \
30 -e '/^CFLAGS/d;/^CXXFLAGS/d' \
33 -e 's|make|$(MAKE)|g' \
34 -e '/$(LIBS)/s|$(CFLAGS)|& $(LDFLAGS)|g' \
35 -e '/^CFLAGS/d;/^CXXFLAGS/d' \
36 -e 's|$${SHARED_LIB_FLAG}|& $(LDFLAGS)|g' \
39 sed -i -e 's:blas/blas.a::g' Makefile || die
47 CFLAGS="${CFLAGS} -fPIC" \
48 CXXFLAGS="${CXXFLAGS} -fPIC" \
49 AR="$(tc-getAR) rcv" \
50 RANLIB="$(tc-getRANLIB)" \
51 LIBS="$(usex blas "$( $(tc-getPKG_CONFIG) --libs blas )" blas/blas.a)" \
57 dosym ${PN}.so.3 /usr/$(get_libdir)/${PN}.so
59 newbin predict ${PN}-predict
60 newbin train ${PN}-train