summaryrefslogtreecommitdiff
path: root/sci-libs/libsvm
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-06-15 14:57:03 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-06-15 14:57:03 +0100
commitd18bf1e01b65ee4bf0c804e2843b282d3d4e5d7c (patch)
tree4a95cbc6ffdf13bad6ecbc7f8d5af99631984123 /sci-libs/libsvm
parente748ba9741f6540f4675c23e3e37b73e822c13a4 (diff)
gentoo resync : 15.06.2021
Diffstat (limited to 'sci-libs/libsvm')
-rw-r--r--sci-libs/libsvm/Manifest2
-rw-r--r--sci-libs/libsvm/libsvm-3.25.ebuild118
2 files changed, 120 insertions, 0 deletions
diff --git a/sci-libs/libsvm/Manifest b/sci-libs/libsvm/Manifest
index 9ca7a9e73fad..5426c179e873 100644
--- a/sci-libs/libsvm/Manifest
+++ b/sci-libs/libsvm/Manifest
@@ -1,5 +1,7 @@
AUX 3.11-openmp.patch 943 BLAKE2B 39f092a108f808711dd928595cd82d507f6154efd549c319047c7a94edb772887338209549dba99cca4ed0a8106dc40ef4afd3a42dfe41d7d884f7f630391bfe SHA512 17bcea4da6a6aa32192ce7fb66e7eefef5e037ca2afd968e67de385938555975abe2103ee2cc50d02cd21d9783e9334eac93de694d6e685f13af80c49e42af38
AUX 3.14-makefile.patch 1634 BLAKE2B f25e5225e07040e43cc6057558914f177de4e3d40254df9668de8719fbacd6cbadd685d38e2935c13e1778d8a260ef0733672bfc5c719a9e5d9a8832cbbe8ca8 SHA512 f4c2e2f6556604bf3572e341176c855e87caf4c3db8c2b347ce4e7a7948d21b708a7df29d5bf9b741dd3f34e08a0750572b94bd5e94bb4052f1ba4b9ae50e918
DIST libsvm-3.24.tar.gz 876441 BLAKE2B 6781804ba9706de5ad363bcbda20f2ec181cc4ee9613c9e7429f03872f7a03b04859df2ec00692d9de3ea237d1e478435a4d4db3ce7e5292689a2eab26a1fe46 SHA512 ff3c39bc84291bfb707151d7b8b6fb2eece937afa769cb8ee579d00ee4c30e943d476cd7bb18851d482c9bed89cf94fb3fd8abca4d47253360e12e9406f2f24b
+DIST libsvm-3.25.tar.gz 892471 BLAKE2B a80b7192981811f57446a966c911a07a2de17042e67faa26451c23129dafeac642596a619731b57a27d9845f904e2e4c5c11ae8aa3006fa49e2f62d7cec4cca2 SHA512 91afbcfd204f5fc9c367df446550cecaf01d5e34770fa10fc6bb02277d79b756393f7d057290df0f72fc941faaf0f4c84a863a3bf9d8628eeff1f99b6bc57a98
EBUILD libsvm-3.24.ebuild 2674 BLAKE2B 710e0e5791defed993a820b2bc8cc500d6df28b739b726bc4a4181b16892035c3d0e088cbb92284915c131905673acaf0e169ad03928d14f306c9bdc76c18145 SHA512 909838eeb6af0280d4cc7ec27e84c9ffa5c44544bb2a3a5ca9da862e4ace9f40a8b8ecff6131ef7504558ec35ecba3c24be27806bc45088aaee46dd157d13d79
+EBUILD libsvm-3.25.ebuild 2683 BLAKE2B b57d0d18bebd2f4b441a0d36831206e1354e108fe0f7a5576b2328f99068c37ad67d236afb24ca8e12d19f84175d9ac04302792cc8cf3e99f96b410664ba20fa SHA512 f8fe08780d85e0d2882829c1f3e28e7b331b1b6751f768e778d8dba12c2b248bccfa3c0fe931fcd2d4789ea7d666c14b95b8423a14fe3b40b7a5df5661944b62
MISC metadata.xml 815 BLAKE2B b73e733b7881fd6c9b45f7605259a7d99e9bef6729936b7502df8c857e40e8552ebc0be25065a7d1391dd9b98cb4dd81b5dfd12722e5852f18c85ee693b2d20f SHA512 0e26fd0b3ddb08f769e92249819e93483cbca426465b8cd623703be2c242b5c8dd9731c978f6965e2c39d680229d5b15587ec0a16aea0b6fcf8172cf70e7f7ec
diff --git a/sci-libs/libsvm/libsvm-3.25.ebuild b/sci-libs/libsvm/libsvm-3.25.ebuild
new file mode 100644
index 000000000000..f4a2fdf7ebd9
--- /dev/null
+++ b/sci-libs/libsvm/libsvm-3.25.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_{7..10} )
+
+inherit flag-o-matic java-pkg-opt-2 python-r1 toolchain-funcs
+
+DESCRIPTION="Library for Support Vector Machines"
+HOMEPAGE="https://www.csie.ntu.edu.tw/~cjlin/libsvm/"
+SRC_URI="https://www.csie.ntu.edu.tw/~cjlin/libsvm/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/2"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="java openmp python tools"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+DEPEND="
+ java? ( >=virtual/jdk-1.8:* )
+ python? ( ${PYTHON_DEPS} )
+"
+RDEPEND="
+ java? ( >=virtual/jre-1.8:* )
+ python? ( ${PYTHON_DEPS} )
+ tools? ( sci-visualization/gnuplot )
+"
+
+PATCHES=(
+ "${FILESDIR}/3.11-openmp.patch"
+ "${FILESDIR}/3.14-makefile.patch"
+)
+
+pkg_setup() {
+ if use openmp; then
+ if ! tc-has-openmp; then
+ ewarn "OpenMP is not supported by your currently selected compiler"
+
+ if tc-is-clang; then
+ ewarn "OpenMP support in sys-devel/clang is provided by sys-libs/libomp,"
+ ewarn "which you will need to build ${CATEGORY}/${PN} for USE=\"openmp\""
+ fi
+
+ die "need openmp capable compiler"
+ fi
+
+ append-cflags -fopenmp
+ append-cxxflags -fopenmp
+ append-cppflags -DOPENMP
+ fi
+}
+
+src_prepare() {
+ default
+
+ sed -i -e "s@\.\./@${EPREFIX}/usr/bin/@g" tools/*.py \
+ || die "Failed to fix paths in python files"
+ sed -i -e "s|./grid.py|${EPREFIX}/usr/bin/svm-grid|g" tools/*.py \
+ || die "Failed to fix paths for svm-grid"
+ sed -i -e 's/grid.py/svm-grid/g' tools/grid.py \
+ || die "Failed to rename grid.py to svm-grid"
+
+ if use java; then
+ local JAVAC_FLAGS="$(java-pkg_javac-args)"
+ sed -i \
+ -e "s/JAVAC_FLAGS =/JAVAC_FLAGS=${JAVAC_FLAGS}/g" \
+ java/Makefile || die "Failed to fix java makefile"
+ fi
+ tc-export CXX CC
+}
+
+src_compile() {
+ default
+ use java && emake -C java
+}
+
+src_install() {
+ dobin svm-train svm-predict svm-scale
+ dolib.so *.so*
+ doheader svm.h
+
+ DOCS=( README )
+
+ if use tools; then
+ local t
+ for t in tools/*.py; do
+ python_foreach_impl python_newscript ${t} svm-$(basename ${t} .py)
+ done
+
+ mv tools/README{,.tools} || die
+ DOCS+=( tools/README.tools )
+
+ insinto /usr/share/doc/${PF}/examples
+ docompress -x /usr/share/doc/${PF}/examples
+ doins heart_scale
+ doins -r svm-toy
+ fi
+
+ if use python ; then
+ installation() {
+ touch python/__init__.py || die
+ python_moduleinto libsvm
+ python_domodule python/*.py
+ }
+ python_foreach_impl installation
+
+ mv python/README{,.python} || die
+ DOCS+=( python/README.python )
+ fi
+
+ HTML_DOCS=( FAQ.html )
+ if use java; then
+ java-pkg_dojar java/libsvm.jar
+ HTML_DOCS+=( java/test_applet.html )
+ fi
+
+ einstalldocs
+}