--- /dev/null
+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',
--- /dev/null
+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,
"${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() {
# 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() {