Browse Source

ecj: Update for api level 24

emacs-27
Fredrik Fornwall 6 years ago
parent
commit
0811f7a177
  1. 14
      packages/ecj/build.sh
  2. 2
      packages/ecj/ecj-24

14
packages/ecj/build.sh

@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Eclipse Compiler for Java"
TERMUX_PKG_LICENSE="EPL-2.0"
TERMUX_PKG_VERSION=4.7.2
local _date=201711300510
TERMUX_PKG_REVISION=2
TERMUX_PKG_REVISION=3
TERMUX_PKG_SHA256=43c2f45d1fd9afb8b04e547a253041957f19b2f21d8780cdb3a8706ce9b9b9ee
TERMUX_PKG_SRCURL=http://archive.eclipse.org/eclipse/downloads/drops${TERMUX_PKG_VERSION:0:1}/R-$TERMUX_PKG_VERSION-$_date/ecj-$TERMUX_PKG_VERSION.jar
TERMUX_PKG_PLATFORM_INDEPENDENT=true
@ -23,7 +23,7 @@ termux_step_make() {
$TERMUX_D8 \
--classpath $ANDROID_HOME/platforms/android-$TERMUX_PKG_API_LEVEL/android.jar \
--release \
--min-api 21 \
--min-api $TERMUX_PKG_API_LEVEL \
--output $TERMUX_PKG_TMPDIR \
$RAW_JAR
@ -61,15 +61,15 @@ termux_step_make() {
# Bundle in an android.jar from an older API also, for those who want to
# build apps that run on older Android versions.
rm -Rf ./*
cp $ANDROID_HOME/platforms/android-21/android.jar android.jar
cp $ANDROID_HOME/platforms/android-$TERMUX_PKG_API_LEVEL/android.jar android.jar
unzip -q android.jar
rm -Rf android.jar resources.arsc res assets
jar cfM android-21.jar .
cp $TERMUX_PKG_TMPDIR/android-jar/android-21.jar $TERMUX_PREFIX/share/java/
jar cfM android-$TERMUX_PKG_API_LEVEL.jar .
cp $TERMUX_PKG_TMPDIR/android-jar/android-$TERMUX_PKG_API_LEVEL.jar $TERMUX_PREFIX/share/java/
rm -Rf $TERMUX_PREFIX/bin/javac
install $TERMUX_PKG_BUILDER_DIR/ecj $TERMUX_PREFIX/bin/ecj
perl -p -i -e "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" $TERMUX_PREFIX/bin/ecj
install $TERMUX_PKG_BUILDER_DIR/ecj-21 $TERMUX_PREFIX/bin/ecj-21
perl -p -i -e "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" $TERMUX_PREFIX/bin/ecj-21
install $TERMUX_PKG_BUILDER_DIR/ecj-$TERMUX_PKG_API_LEVEL $TERMUX_PREFIX/bin/ecj-$TERMUX_PKG_API_LEVEL
perl -p -i -e "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" $TERMUX_PREFIX/bin/ecj-$TERMUX_PKG_API_LEVEL
}

2
packages/ecj/ecj-21 → packages/ecj/ecj-24

@ -7,5 +7,5 @@ dalvikvm -Xmx256m \
org.eclipse.jdt.internal.compiler.batch.Main \
-proc:none \
-7 \
-cp @TERMUX_PREFIX@/share/java/android-21.jar \
-cp @TERMUX_PREFIX@/share/java/android-24.jar \
"$@"
Loading…
Cancel
Save