summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/libsvm')
-rw-r--r--sci-libs/libsvm/files/libsvm-3.30-javaMakefile.patch13
-rw-r--r--sci-libs/libsvm/libsvm-3.30.ebuild12
2 files changed, 17 insertions, 8 deletions
diff --git a/sci-libs/libsvm/files/libsvm-3.30-javaMakefile.patch b/sci-libs/libsvm/files/libsvm-3.30-javaMakefile.patch
new file mode 100644
index 000000000000..a134ca1a44b1
--- /dev/null
+++ b/sci-libs/libsvm/files/libsvm-3.30-javaMakefile.patch
@@ -0,0 +1,13 @@
+https://bugs.gentoo.org/936550
+
+--- a/java/Makefile
++++ b/java/Makefile
+@@ -4,8 +4,6 @@ FILES = libsvm/svm.class libsvm/svm_model.class libsvm/svm_node.class \
+ libsvm/svm_print_interface.class \
+ svm_train.class svm_predict.class svm_toy.class svm_scale.class
+
+-#JAVAC = jikes
+-JAVAC_FLAGS = -target 1.7 -source 1.7
+ JAVAC = javac
+ # JAVAC_FLAGS =
+ export CLASSPATH := .:$(CLASSPATH)
diff --git a/sci-libs/libsvm/libsvm-3.30.ebuild b/sci-libs/libsvm/libsvm-3.30.ebuild
index e94e47acd243..f818be835984 100644
--- a/sci-libs/libsvm/libsvm-3.30.ebuild
+++ b/sci-libs/libsvm/libsvm-3.30.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -31,6 +31,7 @@ RDEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-3.25-openmp.patch
"${FILESDIR}"/${PN}-3.30-makefile.patch
+ "${FILESDIR}"/${PN}-3.30-javaMakefile.patch
)
pkg_pretend() {
@@ -43,6 +44,7 @@ pkg_setup() {
src_prepare() {
default
+ java-pkg_clean
sed -i -e "s@\.\./@${EPREFIX}/usr/bin/@g" tools/*.py \
|| die "Failed to fix paths in python files"
@@ -50,16 +52,10 @@ src_prepare() {
|| 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
}
src_configure() {
+ use java && export JAVAC_FLAGS="$(java-pkg_javac-args)"
if use openmp; then
export OPENMP_CFLAGS="-fopenmp -DOPENMP"
export OPENMP_LIBS="-fopenmp"