diff --git a/disabled-packages/openjdk-9-headless/build.sh b/disabled-packages/openjdk-9-jre-headless/build.sh similarity index 55% rename from disabled-packages/openjdk-9-headless/build.sh rename to disabled-packages/openjdk-9-jre-headless/build.sh index 1a45ae251..787f6afbf 100644 --- a/disabled-packages/openjdk-9-headless/build.sh +++ b/disabled-packages/openjdk-9-jre-headless/build.sh @@ -1,11 +1,13 @@ TERMUX_PKG_HOMEPAGE=http://openjdk.java.net TERMUX_PKG_DESCRIPTION="OpenJDK 9 Java Runtime Environment (prerelease)" -_jbuild=160 +_jbuild=162 _hg_tag="jdk-9+${_jbuild}" -TERMUX_PKG_VERSION="9.2017.3.20" +_jvm_dir="lib/jvm/openjdk-9" +TERMUX_PKG_VERSION="9.2017.4.3" TERMUX_PKG_MAINTAINER="Vishal Biswas @vishalbiswas" TERMUX_PKG_HOMEPAGE=http://openjdk.java.net/projects/jdk9 -TERMUX_PKG_DEPENDS="freetype, libpng, libffi" +TERMUX_PKG_DEPENDS="freetype, libpng, ca-certificates-java" +TERMUX_PKG_CONFFILES="$_jvm_dir/lib/jvm.cfg" # currently upstream has no support building for these arches on android # this will change in the future TERMUX_PKG_BLACKLISTED_ARCHES="aarch64 x86_64" @@ -14,32 +16,35 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" --disable-option-checking --disable-warnings-as-errors --enable-headless-only ---with-libffi=$TERMUX_PREFIX --with-freetype=$TERMUX_PREFIX --with-libpng=system --with-zlib=system +--with-jdk-variant=normal +--with-jvm-variants=client " TERMUX_PKG_CLANG=no -_cups_ver=2.2.2 +TERMUX_PKG_RM_AFTER_INSTALL="$_jvm_dir/demo $_jvm_dir/sample" -changesets=('b273cb907f72' - '18f02bc43fe9' - '033d015c6d8b' - 'ac4c88ea156c' - '7d5352c54fc8' - '51b63f1b8001' - '2340259b3155' - 'd6ef419af865') +_cups_ver=2.2.3 -sha256sums=('1fe425e4cade15bc552083b067270b1049a9ae2a4f721a48c55709cc593f1657' - '1dff59f743f03a284caa70184873d24e9d3733485f15c9c3519843ea2986e0d7' - 'f417fce184e755b279d681819470f4a6f2d8ba6aa2624b520c67bfc184cb3ab2' - '7de8fd296a1b9602851797d88268fae4fac171706bfeb80b20c352ff070ab60f' - 'efe917c6c776485069bfa147065e7ebfa9d7b3d937eec6db4f143b847548c0a2' - '801261a2e65688264ba33fe50ef87bbf3ff703cb6b70d0661b365ca17d776b16' - 'a3961c7ff0e2f8c80f99e49e321dc0c2e15c752a90f6ff6b95d77f54e10e1650' - 'a4e817b9f2e66f46646b4043081aa8be8e6502221d85d1f606f5e808b0b23f2a' - 'f589bb7d5d1dc3aa0915d7cf2b808571ef2e1530cd1a6ebe76ae8f9f4994e4f6') +changesets=('d9c3e4f30936' + '493011dee80e' + 'dc3346496843' + '0d44d05a4c96' + '3890f96e8995' + '92a38c75cd27' + '24582dd2649a' + '5e5e436543da') + +sha256sums=('36ca35e4fe90ae1b1966d9f909c108f39fe411b2e783faa49102d2088909be8e' + '9d24cab2e16c17f51d591b9786005062bee3e60e394d1b78dddbdfb01b9a5ea6' + '312204f76d4f23be09aa7121273ac791588de5c6a3c25d49b3087a6eb547bb7a' + '9ef21b7013ef2a0b0870d4741fc961d1fce0fcb91f44a1f8cdad865455583246' + '8d925111270630a171b0165b740bdd5d8d07c4aa1f9ea3caa86076b9f896d3ed' + '1fec470e1480472ec7e4ff402bc4b6de5e095cfd5f787bdc250814eb9479a3c0' + 'db95a143078cdf3cefff5479c5350b678b1a779fcdcf7e066049559a537d81e1' + '115601bbce2f5d9df66ce49d4ca6f6db327f1e17865537911160f0cde919e7bf' + '66701fe15838f2c892052c913bde1ba106bbee2e0a953c955a62ecacce76885f') reponames=(dev corba hotspot jdk jaxws jaxp langtools nashorn cups) @@ -71,7 +76,7 @@ termux_step_post_extract_package () { $TERMUX_TAR xf $file -C $TERMUX_PKG_SRCDIR } -# override this step to since openjdk provides their own customized guess scripts +# override this step to since openjdk provides its own customized guess scripts termux_step_replace_guess_scripts () { return } @@ -79,14 +84,6 @@ termux_step_replace_guess_scripts () { termux_step_pre_configure () { TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-cups-include=$TERMUX_PKG_SRCDIR/cups-$_cups_ver" - # might be required - # libffi dependency is required if zero interpreter is used - #if [ -o "$TERMUX_ARCH" == 'i686' -o "$TERMUX_ARCH" == 'x86_64' ]; then - # TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=' --with-jvm-variants=client' - #else - # TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=' --with-jvm-variants=zero' - #fi - cat > "$TERMUX_STANDALONE_TOOLCHAIN/devkit.info" < $TERMUX_PREFIX/bin/$binary + echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$JAVA_HOME/lib:\$JAVA_HOME/lib/jli" >> $TERMUX_PREFIX/bin/$binary + echo "\$JAVA_HOME/bin/$binary \"\$@\"" >> $TERMUX_PREFIX/bin/$binary + chmod u+x $TERMUX_PREFIX/bin/$binary + done + + # use cacerts provided by ca-certificates-java + ln -sf "$TERMUX_PREFIX/$_jvm_dir/lib/security/jssecacerts" "$TERMUX_PREFIX/$_jvm_dir/lib/security/cacerts" +} diff --git a/disabled-packages/openjdk-9-headless/getgr_r.patch b/disabled-packages/openjdk-9-jre-headless/getgr_r.patch similarity index 100% rename from disabled-packages/openjdk-9-headless/getgr_r.patch rename to disabled-packages/openjdk-9-jre-headless/getgr_r.patch diff --git a/disabled-packages/openjdk-9-jre-headless/hotspot-jvm_home.patch b/disabled-packages/openjdk-9-jre-headless/hotspot-jvm_home.patch new file mode 100644 index 000000000..4669b5530 --- /dev/null +++ b/disabled-packages/openjdk-9-jre-headless/hotspot-jvm_home.patch @@ -0,0 +1,12 @@ +shoutout to @its-pointless (live_the_dream) +--- ./hotspot/src/share/vm/runtime/os.cpp 2017-03-30 20:45:45.000000000 +0530 ++++ ../os.cpp 2017-03-31 11:04:17.097618021 +0530 +@@ -74,7 +74,7 @@ + int os::_processor_count = 0; + int os::_initial_active_processor_count = 0; + size_t os::_page_sizes[os::page_sizes_max]; +-const char * os::_java_home = NULL; ++const char * os::_java_home = "@TERMUX_PREFIX@/lib/jvm/openjdk-9"; + + #ifndef PRODUCT + julong os::num_mallocs = 0; // # of calls to malloc/realloc diff --git a/disabled-packages/openjdk-9-jre-headless/jdk-java_home.patch b/disabled-packages/openjdk-9-jre-headless/jdk-java_home.patch new file mode 100644 index 000000000..638fb79d3 --- /dev/null +++ b/disabled-packages/openjdk-9-jre-headless/jdk-java_home.patch @@ -0,0 +1,11 @@ +--- ./jdk/src/java.base/unix/native/libjli/java_md_solinux.c 2017-03-30 20:45:48.000000000 +0530 ++++ ../java_md_solinux.c 2017-03-31 09:15:07.979651293 +0530 +@@ -163,7 +163,7 @@ + */ + + #ifdef __ANDROID__ +-static char * __java_home = NULL; ++static char * __java_home = "@TERMUX_PREFIX@/lib/jvm/openjdk-9"; + #endif + + void SetJavaHome(char *arg) { diff --git a/disabled-packages/openjdk-9-jre-headless/openjdk-9-jdk-headless.subpackage.sh b/disabled-packages/openjdk-9-jre-headless/openjdk-9-jdk-headless.subpackage.sh new file mode 100644 index 000000000..5f9d800ee --- /dev/null +++ b/disabled-packages/openjdk-9-jre-headless/openjdk-9-jdk-headless.subpackage.sh @@ -0,0 +1,33 @@ +TERMUX_SUBPKG_INCLUDE="$_jvm_dir/bin/idlj bin/idlj +$_jvm_dir/bin/jar bin/jar +$_jvm_dir/bin/jarsigner bin/jarsigner +$_jvm_dir/bin/javac bin/javac +$_jvm_dir/bin/javadoc bin/javadoc +$_jvm_dir/bin/javah bin/javah +$_jvm_dir/bin/javap bin/javap +$_jvm_dir/bin/jcmd bin/jcmd +$_jvm_dir/bin/jdb bin/jdb +$_jvm_dir/bin/jdeprscan bin/jdeprscan +$_jvm_dir/bin/jdeps bin/jdeps +$_jvm_dir/bin/jhsdb bin/jhsdb +$_jvm_dir/bin/jimage bin/jimage +$_jvm_dir/bin/jinfo bin/jinfo +$_jvm_dir/bin/jlink bin/jlink +$_jvm_dir/bin/jmap bin/jmap +$_jvm_dir/bin/jmod bin/jmod +$_jvm_dir/bin/jps bin/jps +$_jvm_dir/bin/jrunscript bin/jrunscript +$_jvm_dir/bin/jshell bin/jshell +$_jvm_dir/bin/jstack bin/jstack +$_jvm_dir/bin/jstat bin/jstat +$_jvm_dir/bin/jstatd bin/jstatd +$_jvm_dir/bin/policytool bin/policytool +$_jvm_dir/bin/rmic bin/rmic +$_jvm_dir/bin/schemagen bin/schemagen +$_jvm_dir/bin/serialver bin/serialver +$_jvm_dir/bin/wsgen bin/wsgen +$_jvm_dir/bin/wsimport bin/wsimport +$_jvm_dir/bin/xjc bin/xjc +$_jvm_dir/include" +TERMUX_SUBPKG_DEPENDS="openjdk-9-jre-headless" +TERMUX_SUBPKG_DESCRIPTION="OpenJDK Development Kit (JDK) (headless)" diff --git a/disabled-packages/openjdk-9-jre-headless/openjdk-9-source.subpackage.sh b/disabled-packages/openjdk-9-jre-headless/openjdk-9-source.subpackage.sh new file mode 100644 index 000000000..0bd160fec --- /dev/null +++ b/disabled-packages/openjdk-9-jre-headless/openjdk-9-source.subpackage.sh @@ -0,0 +1,4 @@ +TERMUX_SUBPKG_INCLUDE="$_jvm_dir/src.zip" +TERMUX_SUBPKG_DEPENDS="openjdk-9-jre-headless" +TERMUX_SUBPKG_DESCRIPTION="OpenJDK Development Kit (JDK) source files" +TERMUX_SUBPKG_PLATFORM_INDEPENDENT=yes diff --git a/disabled-packages/openjdk-9-jre-headless/osName.patch b/disabled-packages/openjdk-9-jre-headless/osName.patch new file mode 100644 index 000000000..2e628f095 --- /dev/null +++ b/disabled-packages/openjdk-9-jre-headless/osName.patch @@ -0,0 +1,12 @@ +thanks @fornwall for finding this +--- ./jdk/src/java.base/unix/classes/java/lang/ProcessImpl.java 2017-03-30 20:45:48.000000000 +0530 ++++ ../ProcessImpl.java 2017-04-01 23:04:39.565293249 +0530 +@@ -157,7 +157,7 @@ + static Platform get() { + String osName = GetPropertyAction.privilegedGetProperty("os.name"); + +- if (osName.equals("Linux")) { return LINUX; } ++ if (osName.equals("Linux") || osName.equals("Android")) { return LINUX; } + if (osName.contains("OS X")) { return BSD; } + if (osName.equals("SunOS")) { return SOLARIS; } + if (osName.equals("AIX")) { return AIX; }