Commit | Line | Data |
---|---|---|
ffcb22f1 | 1 | TERMUX_PKG_HOMEPAGE=http://openjdk.java.net |
efb97f17 VB |
2 | TERMUX_PKG_DESCRIPTION="OpenJDK 9 Java Runtime Environment (prerelease)" |
3 | _jbuild=160 | |
ffcb22f1 | 4 | _hg_tag="jdk-9+${_jbuild}" |
efb97f17 VB |
5 | TERMUX_PKG_VERSION="9.2017.3.20" |
6 | TERMUX_PKG_MAINTAINER="Vishal Biswas @vishalbiswas" | |
7 | TERMUX_PKG_HOMEPAGE=http://openjdk.java.net/projects/jdk9 | |
77b0e696 VB |
8 | TERMUX_PKG_DEPENDS="freetype, libpng, libffi" |
9 | # currently upstream has no support building for these arches on android | |
10 | # this will change in the future | |
11 | TERMUX_PKG_BLACKLISTED_ARCHES="aarch64 x86_64" | |
b8589503 FF |
12 | TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" |
13 | --disable-hotspot-gtest | |
14 | --disable-option-checking | |
15 | --disable-warnings-as-errors | |
16 | --enable-headless-only | |
77b0e696 VB |
17 | --with-libffi=$TERMUX_PREFIX |
18 | --with-freetype=$TERMUX_PREFIX | |
b8589503 FF |
19 | --with-libpng=system |
20 | --with-zlib=system | |
21 | " | |
ffcb22f1 VB |
22 | TERMUX_PKG_CLANG=no |
23 | _cups_ver=2.2.2 | |
24 | ||
efb97f17 VB |
25 | changesets=('b273cb907f72' |
26 | '18f02bc43fe9' | |
27 | '033d015c6d8b' | |
28 | 'ac4c88ea156c' | |
29 | '7d5352c54fc8' | |
30 | '51b63f1b8001' | |
31 | '2340259b3155' | |
32 | 'd6ef419af865') | |
77b0e696 | 33 | |
efb97f17 VB |
34 | sha256sums=('1fe425e4cade15bc552083b067270b1049a9ae2a4f721a48c55709cc593f1657' |
35 | '1dff59f743f03a284caa70184873d24e9d3733485f15c9c3519843ea2986e0d7' | |
36 | 'f417fce184e755b279d681819470f4a6f2d8ba6aa2624b520c67bfc184cb3ab2' | |
37 | '7de8fd296a1b9602851797d88268fae4fac171706bfeb80b20c352ff070ab60f' | |
38 | 'efe917c6c776485069bfa147065e7ebfa9d7b3d937eec6db4f143b847548c0a2' | |
39 | '801261a2e65688264ba33fe50ef87bbf3ff703cb6b70d0661b365ca17d776b16' | |
40 | 'a3961c7ff0e2f8c80f99e49e321dc0c2e15c752a90f6ff6b95d77f54e10e1650' | |
41 | 'a4e817b9f2e66f46646b4043081aa8be8e6502221d85d1f606f5e808b0b23f2a' | |
77b0e696 VB |
42 | 'f589bb7d5d1dc3aa0915d7cf2b808571ef2e1530cd1a6ebe76ae8f9f4994e4f6') |
43 | ||
44 | reponames=(dev corba hotspot jdk jaxws jaxp langtools nashorn cups) | |
45 | ||
46 | _url_src=http://hg.openjdk.java.net/mobile/dev | |
47 | ||
48 | TERMUX_PKG_SRCURL=$_url_src/archive/${changesets[0]}.tar.bz2 | |
49 | TERMUX_PKG_SHA256=${sha256sums[0]} | |
50 | TERMUX_PKG_FOLDERNAME=dev-${changesets[0]} | |
ffcb22f1 VB |
51 | |
52 | termux_step_post_extract_package () { | |
77b0e696 VB |
53 | cd "$TERMUX_PKG_TMPDIR" |
54 | # download and extract repo archives | |
55 | for index in {1..7}; do | |
56 | local sum=${sha256sums[index]} | |
57 | local repo=${reponames[index]} | |
58 | local change=${changesets[index]} | |
59 | local file=$TERMUX_PKG_CACHEDIR/$repo-$change.tar.bz2 | |
60 | local url=${_url_src}/$repo/archive/$change.tar.bz2 | |
61 | ||
62 | termux_download $url $file $sum | |
63 | $TERMUX_TAR xf $file -C $TERMUX_PKG_SRCDIR | |
64 | mv $TERMUX_PKG_SRCDIR/$repo-$change $TERMUX_PKG_SRCDIR/$repo | |
ffcb22f1 VB |
65 | done |
66 | ||
77b0e696 VB |
67 | # setup cups source dir |
68 | file=$TERMUX_PKG_CACHEDIR/cups-$_cups_ver-source.tar.gz | |
69 | url="https://github.com/apple/cups/releases/download/v$_cups_ver/`basename $file`" | |
70 | termux_download $url $file ${sha256sums[8]} | |
71 | $TERMUX_TAR xf $file -C $TERMUX_PKG_SRCDIR | |
72 | } | |
73 | ||
74 | # override this step to since openjdk provides their own customized guess scripts | |
75 | termux_step_replace_guess_scripts () { | |
76 | return | |
ffcb22f1 VB |
77 | } |
78 | ||
79 | termux_step_pre_configure () { | |
77b0e696 VB |
80 | TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-cups-include=$TERMUX_PKG_SRCDIR/cups-$_cups_ver" |
81 | ||
82 | # might be required | |
83 | # libffi dependency is required if zero interpreter is used | |
84 | #if [ -o "$TERMUX_ARCH" == 'i686' -o "$TERMUX_ARCH" == 'x86_64' ]; then | |
85 | # TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=' --with-jvm-variants=client' | |
86 | #else | |
87 | # TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=' --with-jvm-variants=zero' | |
88 | #fi | |
ffcb22f1 VB |
89 | |
90 | cat > "$TERMUX_STANDALONE_TOOLCHAIN/devkit.info" <<HERE | |
91 | DEVKIT_NAME="Android ${TERMUX_ARCH^^}" | |
92 | DEVKIT_TOOLCHAIN_PATH="\$DEVKIT_ROOT/$TERMUX_HOST_PLATFORM/bin" | |
77b0e696 | 93 | DEVKIT_SYSROOT="\$DEVKIT_ROOT/sysroot" |
ffcb22f1 VB |
94 | HERE |
95 | ||
96 | export ANDROID_DEVKIT=$TERMUX_STANDALONE_TOOLCHAIN | |
97 | ||
77b0e696 | 98 | if [ -n "$TERMUX_DEBUG" ]; then TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-debug-level=slowdebug"; fi |
ffcb22f1 VB |
99 | } |
100 | ||
101 | termux_step_configure () { | |
77b0e696 | 102 | bash $TERMUX_PKG_SRCDIR/configure \ |
ffcb22f1 | 103 | --prefix=$TERMUX_PREFIX \ |
77b0e696 | 104 | --openjdk-target=$TERMUX_HOST_PLATFORM \ |
ffcb22f1 VB |
105 | --with-jdk-variant=normal \ |
106 | --libexecdir=$TERMUX_PREFIX/libexec \ | |
107 | --with-devkit=$ANDROID_DEVKIT \ | |
77b0e696 VB |
108 | --with-extra-cflags="$CPPFLAGS $CFLAGS" \ |
109 | --with-extra-cxxflags="$CPPFLAGS $CXXFLAGS" \ | |
ffcb22f1 VB |
110 | --with-extra-ldflags="$LDFLAGS" \ |
111 | $TERMUX_PKG_EXTRA_CONFIGURE_ARGS | |
112 | } | |
113 | ||
114 | termux_step_make () { | |
115 | make JOBS=$TERMUX_MAKE_PROCESSES images | |
116 | } | |
117 |