commit:     03027911410624d6e59ef558a6747eef81464996
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 16 21:55:56 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Mar 16 21:55:56 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03027911

dev-libs/liblinear: add 243

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/liblinear/Manifest             |  1 +
 dev-libs/liblinear/liblinear-243.ebuild | 59 +++++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+)

diff --git a/dev-libs/liblinear/Manifest b/dev-libs/liblinear/Manifest
index 575e7819b21..cd2bb818865 100644
--- a/dev-libs/liblinear/Manifest
+++ b/dev-libs/liblinear/Manifest
@@ -1 +1,2 @@
 DIST liblinear-242.tar.gz 561806 BLAKE2B 
49c8f87909083addaf62666f34c008e6cf44240f28fdf2fbeca89862e9e19d451cc7ff51ce5b5da589cc701f70ce408c3eefb249f8585a8598e5ff3976177fe2
 SHA512 
fbcb219f7313b15898e55bd17c6b280007dd4feb913fafd2c3e10375b5a63b8bd274c9d52fd7b265a7575d4657cf4797b734e5793b18c758dfd9ab731fc0e904
+DIST liblinear-243.tar.gz 565437 BLAKE2B 
6367cfbdc040b9183c4993f5340a4d74a8dde48da04ef07f725dc5735073e1b9a7440bad325e9f7527ad76d675dbf3bb47d1d43fc323e1e42ef360d679e816ff
 SHA512 
a0cfa9803285cdfda54752e7addfb210a9ba8f7056cfc8aca13987db7f0bef5fe02d6179eadc829cb243670414da061e6c4cf3d50d682ce392778a0e8cb9e753

diff --git a/dev-libs/liblinear/liblinear-243.ebuild 
b/dev-libs/liblinear/liblinear-243.ebuild
new file mode 100644
index 00000000000..bc03e36ab2d
--- /dev/null
+++ b/dev-libs/liblinear/liblinear-243.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+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://github.com/cjlin1/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/4"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~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
+
+       # fix install_name on Darwin
+       sed -i \
+               -e 
'/install_name/s:liblinear.so.$(SHVER):'"${EPREFIX}"'/usr/lib/liblinear.$(SHVER).dylib:'
 \
+               -e '/LDFLAGS/s:liblinear.so.$(SHVER):liblinear'"$(get_libname 
'$(SHVER)')"':' \
+               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}$(get_libname 4)
+       dosym ${PN}$(get_libname 4) /usr/$(get_libdir)/${PN}$(get_libname)
+
+       newbin predict ${PN}-predict
+       newbin train ${PN}-train
+
+       doheader linear.h
+
+       dodoc README
+}

Reply via email to