command-not-found: Update with latest commands
[termux-packages] / disabled-packages / openjdk-9-jre-headless / build.sh
index 9c89c42..71b14b3 100644 (file)
@@ -1,17 +1,15 @@
 TERMUX_PKG_HOMEPAGE=http://openjdk.java.net
 TERMUX_PKG_DESCRIPTION="OpenJDK 9 Java Runtime Environment (prerelease)"
-_jbuild=162
+_jbuild=174
 _hg_tag="jdk-9+${_jbuild}"
 _jvm_dir="lib/jvm/openjdk-9"
-TERMUX_PKG_VERSION="9.2017.4.3"
+TERMUX_PKG_VERSION="9.2017.6.24"
 TERMUX_PKG_MAINTAINER="Vishal Biswas @vishalbiswas"
 TERMUX_PKG_HOMEPAGE=http://openjdk.java.net/projects/jdk9
 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"
 TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
+--disable-aot
 --disable-hotspot-gtest
 --disable-option-checking
 --disable-warnings-as-errors
@@ -20,30 +18,29 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
 --with-libpng=system
 --with-zlib=system
 --with-jdk-variant=normal
---with-jvm-variants=client
+--with-jvm-variants=server
 "
 TERMUX_PKG_CLANG=no
 TERMUX_PKG_RM_AFTER_INSTALL="$_jvm_dir/demo $_jvm_dir/sample"
-
 _cups_ver=2.2.3
 
-changesets=('d9c3e4f30936'
-       '493011dee80e'
-       'dc3346496843'
-       '0d44d05a4c96'
-       '3890f96e8995'
-       '92a38c75cd27'
-       '24582dd2649a'
-       '5e5e436543da')
-
-sha256sums=('36ca35e4fe90ae1b1966d9f909c108f39fe411b2e783faa49102d2088909be8e'
-       '9d24cab2e16c17f51d591b9786005062bee3e60e394d1b78dddbdfb01b9a5ea6'
-       '312204f76d4f23be09aa7121273ac791588de5c6a3c25d49b3087a6eb547bb7a'
-       '9ef21b7013ef2a0b0870d4741fc961d1fce0fcb91f44a1f8cdad865455583246'
-       '8d925111270630a171b0165b740bdd5d8d07c4aa1f9ea3caa86076b9f896d3ed'
-       '1fec470e1480472ec7e4ff402bc4b6de5e095cfd5f787bdc250814eb9479a3c0'
-       'db95a143078cdf3cefff5479c5350b678b1a779fcdcf7e066049559a537d81e1'
-       '115601bbce2f5d9df66ce49d4ca6f6db327f1e17865537911160f0cde919e7bf'
+changesets=('b0ac0fef5b92'
+       'dc78a3dd6b3a'
+       'a81769cc0015'
+       'ee95c24502f3'
+       'a5d361b9d1f7'
+       '736412a8dcce'
+       '83f6eb009d8f'
+       '734b3209b6ed')
+
+sha256sums=('b269c630374c181840c126f8e82cd799147b556482cad3231c577741d0718373'
+       '7da8245591a3ea3c6c7d0aea6cd2c653e0039a2ea5511ff2cea988223b02c388'
+       '021b9b8f943087fc7967fe3640d68ab989b791ed1133966a402e1b49f4c6154e'
+       '77200280da08f56dd298a748b99a8107dddd113872d619677e0a02eeee88bc84'
+       '435d2e98df810ce45c36af511acbf8cf9b19c68371f9692e95c6aeef2b8fd473'
+       '43a89436e6f9c11939c7d93a4daa748bc3155e8f1d6fc6e6507310b3addf31a2'
+       'c8341d99f315575a11d1f33b243f4cbdab25240caf53668eea8e09a9ecfaf2c5'
+       '52eeb4ea0c77054f7abb847f9798cedf653ac50de56a6e2d69b7277822738314'
        '66701fe15838f2c892052c913bde1ba106bbee2e0a953c955a62ecacce76885f')
 
 reponames=(dev corba hotspot jdk jaxws jaxp langtools nashorn cups)
@@ -93,17 +90,29 @@ HERE
        export ANDROID_DEVKIT=$TERMUX_STANDALONE_TOOLCHAIN
 
        if [ -n "$TERMUX_DEBUG" ]; then TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-debug-level=slowdebug"; fi
+       BUILD_TRIPLE=$TERMUX_ARCH-linux-gnu
+       test "$TERMUX_ARCH" == "arm" && BUILD_TRIPLE+="eabi"
+
+       JVM_FEATURES="compiler1,compiler2,jvmti,fprof,vm-structs,jni-check,services,management,all-gcs,nmt,cds"
+       # enable features specific to some arches
+       if [ "$TERMUX_ARCH" == "aarch64" ] || [ "$TERMUX_ARCH" == "x86_64" ]; then JVM_FEATURES+=",jvmci,graal"; fi
+
+       test "$TERMUX_ARCH" == "aarch64" && CFLAGS="$CFLAGS -DUSE_LIBRARY_BASED_TLS_ONLY"
+
+       # remove sa_proc support
+       rm $TERMUX_PKG_SRCDIR/hotspot/make/lib/Lib-jdk.hotspot.agent.gmk
 }
 
 termux_step_configure () {
        bash $TERMUX_PKG_SRCDIR/configure \
                --prefix=$TERMUX_PREFIX \
-               --openjdk-target=$TERMUX_HOST_PLATFORM \
+               --openjdk-target=$BUILD_TRIPLE \
                --libexecdir=$TERMUX_PREFIX/libexec \
                --with-devkit=$ANDROID_DEVKIT \
                --with-extra-cflags="$CPPFLAGS $CFLAGS" \
                --with-extra-cxxflags="$CPPFLAGS $CXXFLAGS" \
                --with-extra-ldflags="$LDFLAGS" \
+               --with-jvm-features="$JVM_FEATURES" \
                $TERMUX_PKG_EXTRA_CONFIGURE_ARGS
 }