openjdk-17: link with libandroid-shmem and libandroid-spawn

Note: it is unknown whether these libraries actually needed during runtime.
Utilities are working fine without linking with these libraries. However
there are chances that certain Java functions may require spawn and shmem
functionality. I'm considering them as runtime dependencies because their
headers are required during compilation.
This commit is contained in:
Leonid Pliushch 2021-08-01 12:42:11 +03:00
parent bdf1a73dd8
commit 72f4f27b14
No known key found for this signature in database
GPG Key ID: 45F2964132545795

View File

@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Java development kit and runtime"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=17.0
TERMUX_PKG_REVISION=6
TERMUX_PKG_REVISION=7
TERMUX_PKG_SRCURL=https://github.com/termux/openjdk-mobile-termux/archive/ec285598849a27f681ea6269342cf03cf382eb56.tar.gz
TERMUX_PKG_SHA256=d7c6ead9d80d0f60d98d0414e9dc87f5e18a304e420f5cd21f1aa3210c1a1528
TERMUX_PKG_DEPENDS="freetype, libandroid-shmem, libandroid-spawn, libiconv, zlib"
@ -58,7 +58,7 @@ termux_step_configure() {
--openjdk-target=$TERMUX_HOST_PLATFORM \
--with-extra-cflags="$CFLAGS $CPPFLAGS -DLE_STANDALONE -DANDROID -D__TERMUX__=1" \
--with-extra-cxxflags="$CXXFLAGS $CPPFLAGS -DLE_STANDALONE -DANDROID -D__TERMUX__=1" \
--with-extra-ldflags="-L${TERMUX_PREFIX}/lib" \
--with-extra-ldflags="-L${TERMUX_PREFIX}/lib -landroid-shmem -landroid-spawn" \
--disable-precompiled-headers \
--disable-warnings-as-errors \
--enable-option-checking=fatal \
@ -108,7 +108,7 @@ termux_step_make_install() {
# Symlink external dependencies.
local l
for l in libfreetype.so libiconv.so libz.so.1; do
for l in libandroid-shmem.so libandroid-spawn.so libfreetype.so libiconv.so libz.so.1; do
ln -sfr $TERMUX_PREFIX/lib/$l \
$TERMUX_PREFIX/opt/openjdk/lib/$l
done