Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/liblinear/
Date: Tue, 29 Dec 2020 23:35:27
Message-Id: 1609284249.03828336b6146dd39775b9bcb2620995a4147ca7.sam@gentoo
1 commit: 03828336b6146dd39775b9bcb2620995a4147ca7
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 29 23:24:09 2020 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 29 23:24:09 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03828336
7
8 dev-libs/liblinear: bump to 242
9
10 Package-Manager: Portage-3.0.9, Repoman-3.0.2
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 dev-libs/liblinear/Manifest | 1 +
14 dev-libs/liblinear/liblinear-242.ebuild | 59 +++++++++++++++++++++++++++++++++
15 2 files changed, 60 insertions(+)
16
17 diff --git a/dev-libs/liblinear/Manifest b/dev-libs/liblinear/Manifest
18 index 88d8ac1f3b0..1561b834948 100644
19 --- a/dev-libs/liblinear/Manifest
20 +++ b/dev-libs/liblinear/Manifest
21 @@ -1 +1,2 @@
22 DIST liblinear-241.tar.gz 559122 BLAKE2B 793ef45fc652d6f35908465e754e0aed6568125e74e68ca72466c4d71cc0e30746a999e978521c09a3ada079698f59f2bf65a430679538b7bebc133a258f2588 SHA512 a9ca47b051e28046829a3f355a552b2f5b270dd706170e1d21db1509ef09eca55e2d8ff29695d9e8192baad8bcf50aa76e75a3683948c726f2c9b915a3e4bf27
23 +DIST liblinear-242.tar.gz 561806 BLAKE2B 49c8f87909083addaf62666f34c008e6cf44240f28fdf2fbeca89862e9e19d451cc7ff51ce5b5da589cc701f70ce408c3eefb249f8585a8598e5ff3976177fe2 SHA512 fbcb219f7313b15898e55bd17c6b280007dd4feb913fafd2c3e10375b5a63b8bd274c9d52fd7b265a7575d4657cf4797b734e5793b18c758dfd9ab731fc0e904
24
25 diff --git a/dev-libs/liblinear/liblinear-242.ebuild b/dev-libs/liblinear/liblinear-242.ebuild
26 new file mode 100644
27 index 00000000000..a26af094c70
28 --- /dev/null
29 +++ b/dev-libs/liblinear/liblinear-242.ebuild
30 @@ -0,0 +1,59 @@
31 +# Copyright 1999-2020 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=7
35 +
36 +inherit toolchain-funcs
37 +
38 +DESCRIPTION="A Library for Large Linear Classification"
39 +HOMEPAGE="https://www.csie.ntu.edu.tw/~cjlin/liblinear/ https://github.com/cjlin1/liblinear"
40 +SRC_URI="https://github.com/cjlin1/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
41 +
42 +LICENSE="BSD"
43 +SLOT="0/4"
44 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x64-macos"
45 +
46 +src_prepare() {
47 + default
48 +
49 + sed -i \
50 + -e '/^AR/s|=|?=|g' \
51 + -e '/^RANLIB/s|=|?=|g' \
52 + -e '/^CFLAGS/d;/^CXXFLAGS/d' \
53 + blas/Makefile || die
54 + sed -i \
55 + -e 's|make|$(MAKE)|g' \
56 + -e '/$(LIBS)/s|$(CFLAGS)|& $(LDFLAGS)|g' \
57 + -e '/^CFLAGS/d;/^CXXFLAGS/d' \
58 + -e 's|$${SHARED_LIB_FLAG}|& $(LDFLAGS)|g' \
59 + Makefile || die
60 +
61 + # fix install_name on Darwin
62 + sed -i \
63 + -e '/install_name/s:liblinear.so.$(SHVER):'"${EPREFIX}"'/usr/lib/liblinear.$(SHVER).dylib:' \
64 + -e '/LDFLAGS/s:liblinear.so.$(SHVER):liblinear'"$(get_libname '$(SHVER)')"':' \
65 + Makefile || die
66 +}
67 +
68 +src_compile() {
69 + emake \
70 + CC="$(tc-getCC)" \
71 + CXX="$(tc-getCXX)" \
72 + CFLAGS="${CFLAGS} -fPIC" \
73 + CXXFLAGS="${CXXFLAGS} -fPIC" \
74 + AR="$(tc-getAR) rcv" \
75 + RANLIB="$(tc-getRANLIB)" \
76 + lib all
77 +}
78 +
79 +src_install() {
80 + dolib.so ${PN}$(get_libname 4)
81 + dosym ${PN}$(get_libname 4) /usr/$(get_libdir)/${PN}$(get_libname)
82 +
83 + newbin predict ${PN}-predict
84 + newbin train ${PN}-train
85 +
86 + doheader linear.h
87 +
88 + dodoc README
89 +}