mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-23 16:49:10 -07:00
sci-libs/libsvm: improve handling of javac options
removes JAVAC_FLAGS from java/Makefile via patch and sets it via export JAVAC_CFLAGS="$(java-pkg_javac-args)" Closes: https://bugs.gentoo.org/936550 Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Closes: https://github.com/gentoo/gentoo/pull/37777 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
committed by
Sam James
parent
41cff4b699
commit
5cbfdb881a
13
sci-libs/libsvm/files/libsvm-3.30-javaMakefile.patch
Normal file
13
sci-libs/libsvm/files/libsvm-3.30-javaMakefile.patch
Normal file
@@ -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)
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user