@ -4,6 +4,7 @@ TERMUX_PKG_VERSION=4.6.2
_date = 201611241400
TERMUX_PKG_REVISION = 3
TERMUX_PKG_SRCURL = http://eclipse.mirror.wearetriple.com/eclipse/downloads/drops${ TERMUX_PKG_VERSION : 0 : 1 } /R-${ TERMUX_PKG_VERSION } -${ _date } /ecj-${ TERMUX_PKG_VERSION } .jar
# http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops4/R-4.7.2-201711300510/ecj-4.7.2.jar
TERMUX_PKG_SHA256 = 9953dc2be829732e1b939106a71de018f660891220dbca559a5c7bff84883e51
TERMUX_PKG_PLATFORM_INDEPENDENT = true
@ -12,19 +13,37 @@ termux_step_extract_package () {
}
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 \
$TERMUX_PKG_SHA256
fi
mkdir -p $TERMUX_PREFIX /share/{ dex,java}
$TERMUX_DX \
--dex \
--output= $TERMUX_PREFIX /share/dex/ecj.jar \
local RAW_JAR = $TERMUX_PKG_CACHEDIR /ecj-${ TERMUX_PKG_VERSION } .jar
termux_download $TERMUX_PKG_SRCURL \
$RAW_JAR \
$TERMUX_PKG_SHA256
mkdir -p $TERMUX_PREFIX /share/{ dex,java}
$TERMUX_D8 \
--release \
--min-api 21 \
--output $TERMUX_PKG_TMPDI R \
$RAW_JAR
# Package classes.dex into jar:
cd $TERMUX_PKG_TMPDIR
jar cf ecj.jar classes.dex
# Add needed properties file to jar file:
jar xf $RAW_JAR org/eclipse/jdt/internal/compiler/batch/messages.properties
jar uf ecj.jar org/eclipse/jdt/internal/compiler/batch/messages.properties
jar xf $RAW_JAR org/eclipse/jdt/internal/compiler/problem/messages.properties
jar uf ecj.jar org/eclipse/jdt/internal/compiler/problem/messages.properties
jar xf $RAW_JAR org/eclipse/jdt/internal/compiler/messages.properties
jar uf ecj.jar org/eclipse/jdt/internal/compiler/messages.properties
jar xf $RAW_JAR org/eclipse/jdt/internal/compiler/parser/readableNames.props
jar uf ecj.jar org/eclipse/jdt/internal/compiler/parser/readableNames.props
for i in ` seq 1 24` ; do
jar xf $RAW_JAR org/eclipse/jdt/internal/compiler/parser/parser$i .rsc
jar uf ecj.jar org/eclipse/jdt/internal/compiler/parser/parser$i .rsc
done
# Move into place:
mv ecj.jar $TERMUX_PREFIX /share/dex/ecj.jar
rm -rf android-jar
mkdir android-jar
cd android-jar