diff options
Diffstat (limited to '')
-rw-r--r-- | debian/patches/disable-java-in-odk-build-examples-on-zero-vm.diff | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/debian/patches/disable-java-in-odk-build-examples-on-zero-vm.diff b/debian/patches/disable-java-in-odk-build-examples-on-zero-vm.diff new file mode 100644 index 000000000..193536092 --- /dev/null +++ b/debian/patches/disable-java-in-odk-build-examples-on-zero-vm.diff @@ -0,0 +1,58 @@ +diff --git a/config_host.mk.in b/config_host.mk.in +index 8cbbc5fee1d5..40e37643a0ea 100644 +--- a/config_host.mk.in ++++ b/config_host.mk.in +@@ -282,6 +282,7 @@ export JAVAFLAGS=@JAVAFLAGS@ + export JAVAIFLAGS=@JAVAIFLAGS@ + export JAVA_CLASSPATH_NOT_SET=@JAVA_CLASSPATH_NOT_SET@ + export JAVAINTERPRETER=@JAVAINTERPRETER@ ++export JAVA_HAS_ZERO_VM=@JAVA_HAS_ZERO_VM@ + export JAVA_HOME=@JAVA_HOME@ + export JAVA_SOURCE_VER=@JAVA_SOURCE_VER@ + export JAVA_TARGET_VER=@JAVA_TARGET_VER@ +diff --git a/configure.ac b/configure.ac +index e6bfb13ebab8..3b7f0a2e1121 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -6675,6 +6675,14 @@ you must use the "--with-jdk-home" configure option explicitly]) + JAVAIFLAGS=-Xmx64M + # set to limit VM usage for javac + JAVAFLAGS=-J-Xmx128M ++ ++ AC_MSG_CHECKING([whether $JAVAINTERPRETER is using the Zero VM]) ++ if $JAVAINTERPRETER -version 2>&1 | grep -q Zero; then ++ JAVA_HAS_ZERO_VM=y ++ AC_MSG_RESULT([yes]) ++ else ++ AC_MSG_RESULT([no]) ++ fi + fi + else + AC_MSG_ERROR([Java not found. You need at least JDK 9]) +@@ -6684,6 +6689,7 @@ else + JAVA_HOME= + export JAVA_HOME + fi ++AC_SUBST(JAVA_HAS_ZERO_VM) + + dnl =================================================================== + dnl Checks for javac +diff --git a/odk/Module_odk.mk b/odk/Module_odk.mk +index 410f8cf8ef1e..bd05d4bba200 100644 +--- a/odk/Module_odk.mk ++++ b/odk/Module_odk.mk +@@ -60,10 +62,14 @@ $(eval $(call gb_Module_add_check_targets,odk,\ + ifneq ($(filter $(OS),LINUX MACOSX),) + $(eval $(call gb_Module_add_subsequentcheck_targets,odk, \ + CustomTarget_build-examples \ ++)) ++ifneq ($(JAVA_HAS_ZERO_VM),y) ++$(eval $(call gb_Module_add_subsequentcheck_targets,odk, \ + $(if $(ENABLE_JAVA),\ + CustomTarget_build-examples_java \ + ) \ + )) + endif ++endif + + # vim: set noet sw=4 ts=4: |