0
0
Fork 0
haikuports/dev-java/ant_core/ant_core-1.10.9.recipe

76 lines
2.3 KiB
Bash

SUMMARY="Java-based build tool similar to 'make'"
DESCRIPTION="Apache Ant is a Java library and command-line tool whose mission \
is to drive processes described in build files as targets and extension \
points dependent upon each other. The main known usage of Ant is the build of \
Java applications. Ant supplies a number of built-in tasks allowing to \
compile, assemble, test and run Java applications. Ant can also be used \
effectively to build non Java applications, for instance C or C++ applications.
More generally, Ant can be used to pilot any type of process which can be \
described in terms of targets and tasks.
Ant is written in Java. Users of Ant can develop their own "antlibs" \
containing Ant tasks and types, and are offered a large number of ready-made \
commercial or open-source "antlibs".
Ant is extremely flexible and does not impose coding conventions or directory \
layouts to the Java projects which adopt it as a build tool.
Software development projects looking for a solution combining build tool and \
dependency management can use Ant in combination with Apache Ivy.
The Apache Ant project is part of the Apache Software Foundation."
HOMEPAGE="http://ant.apache.org/"
COPYRIGHT="1999-2020 The Apache Software Foundation"
LICENSE="Apache v2"
REVISION="1"
SOURCE_URI="http://archive.apache.org/dist/ant/source/apache-ant-$portVersion-src.tar.bz2"
CHECKSUM_SHA256="cac5cf44906fceae4604fb6a641d67ab1703b45e3dc941d2dd6108edf89fca71"
SOURCE_DIR="apache-ant-$portVersion"
ARCHITECTURES="any"
GLOBAL_WRITABLE_FILES="
settings/etc/ant.conf auto-merge
"
PROVIDES="
ant_core = $portVersion compat >= 1
cmd:ant = $portVersion compat >= 1
"
REQUIRES="
haiku
java:environment >= 8
"
BUILD_REQUIRES="
"
BUILD_PREREQUIRES="
java:environment == 8
"
PATCH()
{
sed -i 's/depends=\"jars,test-jar\"/depends=\"jars\"/' build.xml
}
BUILD()
{
source /system/data/profile.d/openjdk8.sh
export PATH=$JDK8_HOME/bin:$PATH
export JAVA_HOME="$JDK8_HOME"
export DISABLE_ASLR=1
ANT_HOME= ./build.sh
}
INSTALL()
{
source /system/data/profile.d/openjdk8.sh
export JAVA_HOME=$JDK8_HOME
export ANT_HOME=$libDir/ant
./build.sh install-lite
# symlink the executable to binDir
mkdir -p $binDir
ln -s $ANT_HOME/bin/ant $binDir
mkdir -p $settingsDir/etc
echo ANT_HOME=$ANT_HOME > $settingsDir/etc/ant.conf
rm $ANT_HOME/bin/*{.bat,.cmd}
}