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