angelauramc-openjdk-build/removejdkdebuginfo.sh
fukiame a753e0e862
buildjre8: improvements (#19)
* .github: move apt commands to workflow

the scripts are capable of running on other distros, so "let the host cook"
also explicitly use Python 3 here as the build env do not use Python 2

* treewide: use bash [[

./buildlibs.sh: line 18: [: : integer expression expected
...
./buildjdk.sh: line 53: [: : integer expression expected
...

all scripts has bash shebang anyways,
replace all single brackets [ with bash's double brackets [[

* [hack] tarjdk: force termux-elf-cleaner v2.2.0

g++: error: unrecognized command line option ‘-std=c++20’; did you mean ‘-std=c++2a’?

caused by a mix of our outdated toolchains and an upstream commit [1]
downgrade the version of termux-elf-cleaner we use to the latest stable tag to workaround the issue

[1]: 9578f2c4bc

Test: presubmit
Signed-off-by: fukiame <fukiame@proton.me>

* .github: update actions

The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/setup-java@v1, actions/upload-artifact@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/

* .github: actions runner: update to ubuntu-22.04

a bit of future-proofing wont hurt... right?

* fixup! .github: java setup: its 7 not 1.7

i retartded

---------

Signed-off-by: fukiame <fukiame@proton.me>
2024-01-16 19:33:23 +03:00

49 lines
2.0 KiB
Bash
Executable File

#!/bin/bash
set -e
if [[ "$TARGET_JDK" == "arm" ]]; then
export TARGET_JDK=aarch32
fi
imagespath=openjdk/build/${JVM_PLATFORM}-${TARGET_JDK}-normal-${JVM_VARIANTS}-${JDK_DEBUG_LEVEL}/images
rm -rf dizout jreout jdkout
mkdir dizout
cp -r $imagespath/j2re-image jreout
cp -r $imagespath/j2sdk-image jdkout
if [[ "$TARGET_JDK" == "x86" ]]; then
export TARGET_JDK=i386
fi
mv jdkout/jre/lib/${TARGET_JDK}/libfreetype.so.6 jdkout/lib/${TARGET_JDK}/libfreetype.so || echo "Move exit $?"
mv jdkout/jre/lib/libfreetype.dylib.6 jdkout/jre/lib/libfreetype.dylib || echo "Move exit $?"
mv jreout/lib/${TARGET_JDK}/libfreetype.so.6 jreout/lib/${TARGET_JDK}/libfreetype.so || echo "Move exit $?"
mv jreout/lib/libfreetype.dylib.6 jreout/lib/libfreetype.dylib || echo "Move exit $?"
# mv jreout/lib/${TARGET_JDK}/libfontmanager.diz jreout/lib/${TARGET_JDK}/libfontmanager.diz.keep
# find jreout -name "*.diz" | xargs -- rm
# mv jreout/lib/${TARGET_JDK}/libfontmanager.diz.keep jreout/lib/${TARGET_JDK}/libfontmanager.diz
find jreout -name "*.diz" -delete
find jdkout -name "*.diz" -exec mv {} dizout/ \;
if [[ "$BUILD_IOS" == "1" ]]; then
install_name_tool -id @rpath/libfreetype.dylib jdkout/jre/lib/libfreetype.dylib
install_name_tool -id @rpath/libfreetype.dylib jreout/lib/libfreetype.dylib
install_name_tool -change build_android-arm64/lib/libfreetype.dylib @rpath/libfreetype.dylib jdkout/jre/lib/libfontmanager.dylib
install_name_tool -change build_android-arm64/lib/libfreetype.dylib @rpath/libfreetype.dylib jreout/lib/libfontmanager.dylib
JAVA_HOME=/usr/lib/jvm/java-8-openjdk
for dafile in $(find j*out -name "*.dylib"); do
install_name_tool -add_rpath $JAVA_HOME/lib/server -add_rpath $JAVA_HOME/lib/jli \
-add_rpath $JAVA_HOME/lib -add_rpath $JAVA_HOME/jre/lib/server -add_rpath $JAVA_HOME/jre/lib/jli \
-add_rpath $JAVA_HOME/jre/lib $dafile
ldid -Sios-sign-entitlements.xml $dafile
done
ldid -Sios-sign-entitlements.xml jreout/bin/*
ldid -Sios-sign-entitlements.xml jdkout/bin/*
ldid -Sios-sign-entitlements.xml jdkout/jre/bin/*
fi