Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandr Miloslavskiy2019-03-21 09:49:17 +0000
committerEric Williams2019-03-21 13:23:17 +0000
commite0133791455d2af191b86b84d01713201484fffd (patch)
treec71520d03f3e272acd6e483f2c43903ce165ac12
parent43c60f652164bba42eb9b4682e31b60325021606 (diff)
downloadeclipse.platform.swt-e0133791455d2af191b86b84d01713201484fffd.tar.gz
eclipse.platform.swt-e0133791455d2af191b86b84d01713201484fffd.tar.xz
eclipse.platform.swt-e0133791455d2af191b86b84d01713201484fffd.zip
Bug 545619 - [GTK] Building native libraries fails to auto-detect JAVA_HOME for linux.x86_64
Change-Id: Ia5c30604366c790c5a679451c18a2845a9985fbb Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh
index 4368630b28..2d69ba69f7 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh
@@ -156,12 +156,12 @@ case $SWT_OS.$SWT_ARCH in
# Cross-platform method of finding JAVA_HOME.
# Tested on Fedora 24 and Ubuntu 16
DYNAMIC_JAVA_HOME=`readlink -f /usr/bin/java | sed "s:jre/::" | sed "s:bin/java::"`
- if [ -a "${DYNAMIC_JAVA_HOME}include/jni.h" ]; then
- func_echo_plus "JAVA_HOME not set, but jni.h found, dynamically configured to $DYNAMIC_JAVA_HOME"
- export JAVA_HOME="$DYNAMIC_JAVA_HOME"
- else
- func_echo_error "JAVA_HOME not set and jni.h could not be located. You might get a compile error about include 'jni.h'. You should install 'java-*-openjdk-devel' package or if you have it installed already, find jni.h and set JAVA_HOME manually to base of 'include' folder"
- fi
+ if [ -e "${DYNAMIC_JAVA_HOME}include/jni.h" ]; then
+ func_echo_plus "JAVA_HOME not set, but jni.h found, dynamically configured to $DYNAMIC_JAVA_HOME"
+ export JAVA_HOME="$DYNAMIC_JAVA_HOME"
+ else
+ func_echo_error "JAVA_HOME not set and jni.h could not be located. You might get a compile error about include 'jni.h'. You should install 'java-*-openjdk-devel' package or if you have it installed already, find jni.h and set JAVA_HOME manually to base of 'include' folder"
+ fi
fi
fi
if [ "${PKG_CONFIG_PATH}" = "" ]; then
@@ -364,4 +364,4 @@ elif [ "${GTK_VERSION}" = "4.0" ]; then
elif [ "${GTK_VERSION}" = "3.0" -o "${GTK_VERSION}" = "" ]; then
export GTK_VERSION="3.0"
func_build_gtk3 "$@"
-fi \ No newline at end of file
+fi

Back to the top