summaryrefslogtreecommitdiff
path: root/sys-libs/db/files/db-6.2.32-jni-check-prefix-first.patch
diff options
context:
space:
mode:
Diffstat (limited to 'sys-libs/db/files/db-6.2.32-jni-check-prefix-first.patch')
-rw-r--r--sys-libs/db/files/db-6.2.32-jni-check-prefix-first.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/sys-libs/db/files/db-6.2.32-jni-check-prefix-first.patch b/sys-libs/db/files/db-6.2.32-jni-check-prefix-first.patch
new file mode 100644
index 000000000000..0a320d7f9336
--- /dev/null
+++ b/sys-libs/db/files/db-6.2.32-jni-check-prefix-first.patch
@@ -0,0 +1,44 @@
+--- db-6.2.32/dist/aclocal_java/ac_jni_include_dirs.m4
++++ db-6.2.32/dist/aclocal_java/ac_jni_include_dirs.m4
+@@ -43,21 +43,26 @@
+ *) AC_MSG_ERROR([$_ACJNI_JAVAC is not an absolute path name]);;
+ esac
+
+-_ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
+-_JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
+-case "$host_os" in
+- darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
+- if test -d "$_JTOPDIR/include"; then
+- _JINC="$_JTOPDIR/include"
+- else
+- _JINC="`$_JTOPDIR/Commands/java_home`/include"
+- fi;;
+- *) if test ! -r "$_JTOPDIR/include/jni.h"; then
+- _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
+- fi
+- _JINC="$_JTOPDIR/include";;
+-esac
+-
++# If JAVAPREFIX is defined, look there first
++if test -r "$JAVAPREFIX/include/jni.h"; then
++ _JTOPDIR="$JAVAPREFIX"
++ _JINC="$JAVAPREFIX/include"
++else
++ _ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
++ _JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
++ case "$host_os" in
++ darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
++ if test -d "$_JTOPDIR/include"; then
++ _JINC="$_JTOPDIR/include"
++ else
++ _JINC="`$_JTOPDIR/Commands/java_home`/include"
++ fi;;
++ *) if test ! -r "$_JTOPDIR/include/jni.h"; then
++ _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
++ fi
++ _JINC="$_JTOPDIR/include";;
++ esac
++fi
+ # If we find jni.h in /usr/include, then it's not a java-only tree, so
+ # don't add /usr/include or subdirectories to the list of includes.
+ # An extra -I/usr/include can foul things up with newer gcc's.