64666c40b2
- Update to build tools 26.0.1. - Update from android-25 to android-26. - Add android-16 for use in https://github.com/termux/termux-packages/pull/1133
41 lines
1.3 KiB
Bash
Executable File
41 lines
1.3 KiB
Bash
Executable File
TERMUX_PKG_HOMEPAGE=http://www.eclipse.org/jdt/core/
|
|
TERMUX_PKG_DESCRIPTION="Eclipse Compiler for Java"
|
|
TERMUX_PKG_VERSION=4.6.2
|
|
TERMUX_PKG_REVISION=1
|
|
TERMUX_PKG_SRCURL=http://ftp.acc.umu.se/mirror/eclipse.org/eclipse/downloads/drops4/R-4.6.2-201611241400/ecj-4.6.2.jar
|
|
TERMUX_PKG_PLATFORM_INDEPENDENT=true
|
|
|
|
termux_step_extract_package () {
|
|
mkdir $TERMUX_PKG_SRCDIR
|
|
}
|
|
|
|
termux_step_make () {
|
|
RAW_JAR=$TERMUX_PKG_CACHEDIR/ecj-${TERMUX_PKG_VERSION}.jar
|
|
if [ ! -f $RAW_JAR ]; then
|
|
termux_download $TERMUX_PKG_SRCURL $RAW_JAR \
|
|
9953dc2be829732e1b939106a71de018f660891220dbca559a5c7bff84883e51
|
|
fi
|
|
|
|
mkdir -p $TERMUX_PREFIX/share/{dex,java}
|
|
$TERMUX_DX \
|
|
--dex \
|
|
--output=$TERMUX_PREFIX/share/dex/ecj.jar \
|
|
$RAW_JAR
|
|
|
|
cd $TERMUX_PKG_TMPDIR
|
|
rm -rf android-jar
|
|
mkdir android-jar
|
|
cd android-jar
|
|
|
|
# We need the android classes for JDT to compile against.
|
|
cp $ANDROID_HOME/platforms/android-26/android.jar .
|
|
unzip -q android.jar
|
|
rm -Rf android.jar resources.arsc res assets
|
|
zip -q -r android.jar .
|
|
|
|
cp $TERMUX_PKG_TMPDIR/android-jar/android.jar $TERMUX_PREFIX/share/java/android.jar
|
|
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
|
|
}
|