diff options
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/liblinear/Manifest | 1 | ||||
-rw-r--r-- | dev-libs/liblinear/liblinear-246.ebuild | 61 |
2 files changed, 62 insertions, 0 deletions
diff --git a/dev-libs/liblinear/Manifest b/dev-libs/liblinear/Manifest index 202d311a741a..51d7295908e9 100644 --- a/dev-libs/liblinear/Manifest +++ b/dev-libs/liblinear/Manifest @@ -1 +1,2 @@ +DIST liblinear-2.46.tar.gz 569001 BLAKE2B d1f9019717b47414c11611a253ca9185d80cb5860e53462f9b4a6f95c99b0d39502ba91827d8afca6e98d279b50ce44cdcfde9a3629f2c5d4773eeb93e17de76 SHA512 94b892a51f85246cad36562f1e4870a22e73c0c6bf237dfcdc50467e93212a6e88a8f7ba36cfd691c031d8ced9ad663f592ef94e309df764d56095cfff7835ce DIST liblinear-243.tar.gz 565437 BLAKE2B 6367cfbdc040b9183c4993f5340a4d74a8dde48da04ef07f725dc5735073e1b9a7440bad325e9f7527ad76d675dbf3bb47d1d43fc323e1e42ef360d679e816ff SHA512 a0cfa9803285cdfda54752e7addfb210a9ba8f7056cfc8aca13987db7f0bef5fe02d6179eadc829cb243670414da061e6c4cf3d50d682ce392778a0e8cb9e753 diff --git a/dev-libs/liblinear/liblinear-246.ebuild b/dev-libs/liblinear/liblinear-246.ebuild new file mode 100644 index 000000000000..58cdbbc224ae --- /dev/null +++ b/dev-libs/liblinear/liblinear-246.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib toolchain-funcs + +MY_PV="${PV:0:1}.${PV:1}" +MY_P="${PN}-${MY_PV}" + +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/${MY_P}.tar.gz" +S="${WORKDIR}"/${MY_P} + +LICENSE="BSD" +SLOT="0/5" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos" + +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 + + # 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)" \ + RANLIB="$(tc-getRANLIB)" \ + lib all +} + +src_install() { + dolib.so ${PN}$(get_libname ${SLOT#*/}) + dosym ${PN}$(get_libname ${SLOT#*/}) /usr/$(get_libdir)/${PN}$(get_libname) + + newbin predict ${PN}-predict + newbin train ${PN}-train + + doheader linear.h + + dodoc README +} |