2015-06-13 01:03:31 +02:00
|
|
|
TERMUX_PKG_HOMEPAGE=http://developer.android.com/tools/help/index.html
|
|
|
|
TERMUX_PKG_DESCRIPTION="Command which takes in class files and reformulates them for usage on Android"
|
|
|
|
TERMUX_PKG_VERSION=$TERMUX_ANDROID_BUILD_TOOLS_VERSION
|
|
|
|
TERMUX_PKG_PLATFORM_INDEPENDENT=true
|
|
|
|
|
|
|
|
termux_step_make_install () {
|
2016-07-26 13:23:39 +02:00
|
|
|
# As of build tools 24 the dx tool is implemented using java 8, but
|
|
|
|
# as dx itself does not support java 8 (class file format 52)
|
2017-02-02 01:39:29 +01:00
|
|
|
# we use jack:
|
2016-07-26 13:23:39 +02:00
|
|
|
java -jar $TERMUX_JACK \
|
|
|
|
--output-dex $TERMUX_PKG_TMPDIR \
|
2017-02-02 01:39:29 +01:00
|
|
|
--import $ANDROID_HOME/build-tools/${TERMUX_PKG_VERSION}/lib/dx.jar
|
2016-07-26 13:23:39 +02:00
|
|
|
|
2017-02-02 01:39:29 +01:00
|
|
|
mkdir -p $TERMUX_PREFIX/share/dex
|
2016-07-26 13:23:39 +02:00
|
|
|
mv $TERMUX_PKG_TMPDIR/classes.dex $TERMUX_PREFIX/share/dex/dx.dex
|
2015-06-13 01:03:31 +02:00
|
|
|
|
|
|
|
install $TERMUX_PKG_BUILDER_DIR/dx $TERMUX_PREFIX/bin/dx
|
2016-05-06 01:55:13 +02:00
|
|
|
perl -p -i -e "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" $TERMUX_PREFIX/bin/dx
|
2015-06-13 01:03:31 +02:00
|
|
|
}
|