commit: 09341a0d87c62c568ec5bc78208dc68d56af06f5
Author: band-a-prend <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Fri Jun 7 21:57:39 2019 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jun 15 14:19:20 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=09341a0d
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 <AT> mail.ru>
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-util/scons/files/scons-3.0.5-jdk-include-path.patch | 14 ++++++++++++++
dev-util/scons/files/scons-3.0.5-jni.h-include-path.patch | 14 ++++++++++++++
dev-util/scons/scons-3.0.5-r1.ebuild | 6 ++++++
3 files changed, 34 insertions(+)
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 00000000000..708447592fa
--- /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 00000000000..818db02279a
--- /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 d38461f93b0..9b0e05bcdd6 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() {