summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorband-a-prend <torokhov-s-a@yandex.ru>2019-06-08 00:57:39 +0300
committerMichał Górny <mgorny@gentoo.org>2019-06-15 16:19:20 +0200
commit09341a0d87c62c568ec5bc78208dc68d56af06f5 (patch)
treeb79373653d136baa3ca21f413be020222354953d /dev-util/scons
parentdev-util/scons: fix CC, CXX, C*FLAGS, LDFLAGS tests (diff)
downloadgentoo-09341a0d87c62c568ec5bc78208dc68d56af06f5.tar.gz
gentoo-09341a0d87c62c568ec5bc78208dc68d56af06f5.tar.bz2
gentoo-09341a0d87c62c568ec5bc78208dc68d56af06f5.zip
dev-util/scons: 3.0.5-r1 repair JDK include installation paths
The commit repairs the JDK installation paths to make scons test scripts to know where the include directory is. This fix the failure (couldn't find jni.h) of the following tests: 1. test/Java/multi-step.py 2. test/SWIG/SWIGOUTDIR.py if java jdk is installed. Signed-off-by: Sergey Torokhov <torokhov_s_a@mail.ru> Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-util/scons')
-rw-r--r--dev-util/scons/files/scons-3.0.5-jdk-include-path.patch14
-rw-r--r--dev-util/scons/files/scons-3.0.5-jni.h-include-path.patch14
-rw-r--r--dev-util/scons/scons-3.0.5-r1.ebuild6
3 files changed, 34 insertions, 0 deletions
diff --git a/dev-util/scons/files/scons-3.0.5-jdk-include-path.patch b/dev-util/scons/files/scons-3.0.5-jdk-include-path.patch
new file mode 100644
index 000000000000..708447592fa8
--- /dev/null
+++ b/dev-util/scons/files/scons-3.0.5-jdk-include-path.patch
@@ -0,0 +1,14 @@
+diff -Nur old/scons-3.0.5/src/engine/SCons/Tool/JavaCommon.py new/scons-3.0.5/src/engine/SCons/Tool/JavaCommon.py
+--- old/src/engine/SCons/Tool/JavaCommon.py 2019-03-27 02:16:32.000000000 +0300
++++ new/src/engine/SCons/Tool/JavaCommon.py 2019-06-04 10:44:01.000000000 +0300
+@@ -403,7 +403,8 @@
+ java_macos_version_include_dir = '/System/Library/Frameworks/JavaVM.framework/Versions/%s*/Headers/'
+
+-java_linux_include_dirs = ['/usr/lib/jvm/default-java/include',
+- '/usr/lib/jvm/java-*/include']
++java_linux_include_dirs = ['/usr/lib/jvm/*/include',
++ '/opt/*jdk-bin-*/include',
++ '/usr/lib*/openjdk-*/include']
+ # Need to match path like below (from Centos 7)
+ # /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el7_5.x86_64/include/
+ java_linux_version_include_dirs = ['/usr/lib/jvm/java-*-sun-%s*/include',
diff --git a/dev-util/scons/files/scons-3.0.5-jni.h-include-path.patch b/dev-util/scons/files/scons-3.0.5-jni.h-include-path.patch
new file mode 100644
index 000000000000..818db02279af
--- /dev/null
+++ b/dev-util/scons/files/scons-3.0.5-jni.h-include-path.patch
@@ -0,0 +1,14 @@
+diff -Nur old/testing/framework/TestSCons.py new/testing/framework/TestSCons.py
+--- old/testing/framework/TestSCons.py 2019-03-27 02:15:48.000000000 +0300
++++ new/testing/framework/TestSCons.py 2019-06-07 16:13:48.000000000 +0300
+@@ -742,7 +742,8 @@
+ version=''
+ jni_dirs = ['/System/Library/Frameworks/JavaVM.framework/Headers/jni.h',
+- '/usr/lib/jvm/default-java/include/jni.h',
+- '/usr/lib/jvm/java-*-oracle/include/jni.h']
++ '/usr/lib/jvm/*/include/jni.h',
++ '/opt/*jdk-bin-*/include/jni.h',
++ '/usr/lib*/openjdk-*/include/jni.h']
+ else:
+ jni_dirs = ['/System/Library/Frameworks/JavaVM.framework/Versions/%s*/Headers/jni.h'%version]
+ jni_dirs.extend(['/usr/lib/jvm/java-*-sun-%s*/include/jni.h'%version,
diff --git a/dev-util/scons/scons-3.0.5-r1.ebuild b/dev-util/scons/scons-3.0.5-r1.ebuild
index d38461f93b0d..9b0e05bcdd68 100644
--- a/dev-util/scons/scons-3.0.5-r1.ebuild
+++ b/dev-util/scons/scons-3.0.5-r1.ebuild
@@ -36,6 +36,8 @@ PATCHES=(
"${FILESDIR}"/scons-3.0.1-env-passthrough.patch
# respect CC, CXX, C*FLAGS, LDFLAGS by default
"${FILESDIR}"/scons-3.0.3-respect-cc-etc-r1.patch
+ # add Gentoo JDK include installation paths
+ "${FILESDIR}"/scons-3.0.5-jdk-include-path.patch
)
src_unpack() {
@@ -59,6 +61,10 @@ src_prepare() {
# and fix manpage install location
sed -i -e '/cmdclass/,/},$/d' \
-e '/data_files/s:man/:share/man/:' "${S}"/setup.py || die
+ if use test; then
+ # addtional fix for Gentoo JDK installation paths to find include directory with jni.h
+ eapply "${FILESDIR}"/scons-3.0.5-jni.h-include-path.patch
+ fi
}
python_test() {