mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-25 08:58:27 -07:00
In commit 22acd3654a ("Add IUSE=blas.") I
tried to add support for linking against a BLAS implementation as
suggested in liblinear's documentation.
As so far liblinear does not support any helpers for linking against it
as well as a BLAS library in an automated way, enabling USE=blas can
result in linking failures in packages that are unaware of the BLAS
linkage. Until a pkg-config file or other reliable source for library
linkage is provided with liblinear, usage of an external BLAS library
cannot be supported.
Package-Manager: Portage-2.3.71, Repoman-2.3.17
Fixes: https://bugs.gentoo.org/691926
Signed-off-by: Jeroen Roovers <jer@gentoo.org>
53 lines
1.2 KiB
Bash
53 lines
1.2 KiB
Bash
# Copyright 1999-2019 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI="7"
|
|
inherit multilib 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://github.com/cjlin1/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
|
|
|
LICENSE="BSD"
|
|
SLOT="0/3"
|
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-macos"
|
|
|
|
src_prepare() {
|
|
default
|
|
|
|
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() {
|
|
emake \
|
|
CC="$(tc-getCC)" \
|
|
CXX="$(tc-getCXX)" \
|
|
CFLAGS="${CFLAGS} -fPIC" \
|
|
CXXFLAGS="${CXXFLAGS} -fPIC" \
|
|
AR="$(tc-getAR) rcv" \
|
|
RANLIB="$(tc-getRANLIB)" \
|
|
lib all
|
|
}
|
|
|
|
src_install() {
|
|
dolib.so ${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
|
|
}
|