diff options
author | Adrian Almenar <strider@gentoo.org> | 2004-01-18 21:50:32 +0000 |
---|---|---|
committer | Adrian Almenar <strider@gentoo.org> | 2004-01-18 21:50:32 +0000 |
commit | 2e1b4292e4d5a96028559c65677671e3cb6e5190 (patch) | |
tree | 395a456e15dae913b3634b295d7c0a1fceb9077e /dev-java/ant | |
parent | versionbump, added XML-Parser dep due to intltool. now works with 1.6 mozilla... (diff) | |
download | gentoo-2-2e1b4292e4d5a96028559c65677671e3cb6e5190.tar.gz gentoo-2-2e1b4292e4d5a96028559c65677671e3cb6e5190.tar.bz2 gentoo-2-2e1b4292e4d5a96028559c65677671e3cb6e5190.zip |
New build system for ant.
Diffstat (limited to 'dev-java/ant')
-rw-r--r-- | dev-java/ant/ant-1.6.0-r2.ebuild | 61 | ||||
-rw-r--r-- | dev-java/ant/files/1.6.0-r2/ant | 89 | ||||
-rw-r--r-- | dev-java/ant/files/20ant | 1 | ||||
-rw-r--r-- | dev-java/ant/files/digest-ant-1.6.0-r2 | 1 |
4 files changed, 152 insertions, 0 deletions
diff --git a/dev-java/ant/ant-1.6.0-r2.ebuild b/dev-java/ant/ant-1.6.0-r2.ebuild new file mode 100644 index 000000000000..8906c432206c --- /dev/null +++ b/dev-java/ant/ant-1.6.0-r2.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-java/ant/ant-1.6.0-r2.ebuild,v 1.1 2004/01/18 21:50:32 strider Exp $ + +inherit java-pkg + +S="${WORKDIR}/apache-ant-${PV}" +DESCRIPTION="Java-based build tool similar to 'make' that uses XML configuration files." +SRC_URI="mirror://apache/ant/source/apache-${PN}-${PV}-src.tar.bz2" +HOMEPAGE="http://ant.apache.org" +LICENSE="Apache-1.1" +SLOT="0" +KEYWORDS="-*" +DEPEND="virtual/glibc + >=virtual/jdk-1.4 + >=dev-java/java-config-1.2" +RDEPEND=">=virtual/jdk-1.4 + app-shells/bash + >=dev-java/java-config-1.2" +PDEPEND="optional-tasks? ( =dev-java/ant-optional-1.6.0-r2 )" +IUSE="doc optional-tasks" + +src_unpack() { + unpack ${A} + cd ${S} + + # Patch build.sh to die with non-zero exit code in case of errors. + # This patch may be useful for all ant versions. + epatch ${FILESDIR}/build.sh-exit-fix.patch.gz +} + +src_compile() { + + addwrite "/proc/self/maps" + export JAVA_HOME=${JDK_HOME} + if [ `arch` == "ppc" ] ; then + # We're compiling _ON_ PPC + export THREADS_FLAG="green" + fi + + ./build.sh -Ddist.dir=${D}/usr/share/ant || die +} + +src_install() { + cp ${FILESDIR}/${PV}-${PR}/ant ${S}/src/ant + exeinto /usr/bin + doexe src/ant + for each in antRun runant.pl runant.py complete-ant-cmd.pl ; do + dobin ${S}/src/script/${each} + done + + insinto /etc/env.d + doins ${FILESDIR}/20ant + + java-pkg_dojar build/lib/ant.jar + java-pkg_dojar build/lib/ant-launcher.jar + + dodoc LICENSE LICENSE.* README WHATSNEW KEYS + use doc && dohtml welcome.html + use doc && dohtml -r docs/* +} diff --git a/dev-java/ant/files/1.6.0-r2/ant b/dev-java/ant/files/1.6.0-r2/ant new file mode 100644 index 000000000000..5811c9b31e43 --- /dev/null +++ b/dev-java/ant/files/1.6.0-r2/ant @@ -0,0 +1,89 @@ +#! /bin/bash + +# Copyright (c) 2001-2003 The Apache Software Foundation. All rights +# reserved. +# Edited for Gentoo Linux +# $Header: /var/cvsroot/gentoo-x86/dev-java/ant/files/1.6.0-r2/ant,v 1.1 2004/01/18 21:50:32 strider Exp $ + +if [ -f $HOME/.gentoo/java-env ] ; then + source $HOME/.gentoo/java-env +else + JAVA_HOME=`java-config --jdk-home` + CLASSPATH=`java-config --classpath`:${CLASSPATH} +fi + +if [ -z $JAVA_HOME ] ; then + echo "Error: No JDK found!" + echo "Try using java-config script to set your JDK" + echo "Remember that you need a JDK not a JRE" + exit 1 +fi + +# load system-wide ant configuration +if [ -f "/etc/ant.conf" ] ; then + . /etc/ant.conf +fi + +# provide default values for people who don't use RPMs +if [ -z "$rpm_mode" ] ; then + rpm_mode=false; +fi +if [ -z "$usejikes" ] ; then + usejikes=false; +fi + +# load user ant configuration +if [ -f "$HOME/.antrc" ] ; then + . "$HOME/.antrc" +fi + +ANT_HOME=/usr/share/ant + +# set ANT_LIB location +ANT_LIB="${ANT_HOME}/lib" + +JAVACMD="`java-config --java`" + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." + echo " We cannot execute $JAVACMD" + exit 1 +fi + +if [ -n "$CLASSPATH" ] ; then + LOCALCLASSPATH="$CLASSPATH" +fi + +# add in the dependency .jar files +LOCALCLASSPATH="${LOCALCLASSPATH}:`java-config --classpath=ant,ant-optional,log4j,xerces,xalan,junit,antlr,bcel,bsh,commons-beanutils,commons-logging,commons-net,oro,jdepend,jsch,regexp,rhino,jython,jta,jaf,javamail`" + +if [ -n "$JAVA_HOME" ] ; then + if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then + LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar" + fi + + if [ -f "$JAVA_HOME/lib/classes.zip" ] ; then + LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip" + fi + +else + echo "Warning: JAVA_HOME environment variable is not set (or not exported)." + echo " If build fails because sun.* classes could not be found" + echo " you will need to set the JAVA_HOME environment variable" + echo " to the installation directory of java." + echo " Try using java-config script" +fi + +# Allow Jikes support (off by default) +if $usejikes; then + ANT_OPTS="$ANT_OPTS -Dbuild.compiler=jikes" +fi + +# 2002-11-02, karltk@gentoo.org: +# The Blackdown JDK on PPC hiccups with native threads +# +if [ "`arch`" == "ppc" ] ; then + export THREADS_FLAG="green" +fi + +"$JAVACMD" -classpath "$LOCALCLASSPATH" -Dant.home="${ANT_HOME}" $ANT_OPTS org.apache.tools.ant.Main $ANT_ARGS "$@" diff --git a/dev-java/ant/files/20ant b/dev-java/ant/files/20ant new file mode 100644 index 000000000000..b4bcea575eff --- /dev/null +++ b/dev-java/ant/files/20ant @@ -0,0 +1 @@ +ANT_HOME="/usr/share/ant" diff --git a/dev-java/ant/files/digest-ant-1.6.0-r2 b/dev-java/ant/files/digest-ant-1.6.0-r2 new file mode 100644 index 000000000000..dd7fbab35622 --- /dev/null +++ b/dev-java/ant/files/digest-ant-1.6.0-r2 @@ -0,0 +1 @@ +MD5 18aed5aa33951aa85c237fc4139bad6e apache-ant-1.6.0-src.tar.bz2 6217526 |