| 1 |
# Copyright 1999-2005 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/dev-java/ant-core/ant-core-1.6.4.ebuild,v 1.1 2005/05/23 15:27:38 axxo Exp $
|
| 4 |
|
| 5 |
inherit java-pkg eutils
|
| 6 |
|
| 7 |
MY_PN=${PN/-core}
|
| 8 |
|
| 9 |
MY_PV=${PV/_/}
|
| 10 |
|
| 11 |
DESCRIPTION="Java-based build tool similar to 'make' that uses XML configuration files."
|
| 12 |
HOMEPAGE="http://ant.apache.org/"
|
| 13 |
SRC_URI="mirror://apache/ant/source/apache-${MY_PN}-${PV}-src.tar.bz2"
|
| 14 |
|
| 15 |
LICENSE="Apache-2.0"
|
| 16 |
SLOT="0"
|
| 17 |
KEYWORDS="~x86 ~amd64 ~ppc ~sparc ~ppc64"
|
| 18 |
IUSE="doc"
|
| 19 |
|
| 20 |
DEPEND="virtual/libc
|
| 21 |
>=virtual/jdk-1.4
|
| 22 |
>=dev-java/java-config-1.2"
|
| 23 |
RDEPEND=">=virtual/jdk-1.4
|
| 24 |
app-shells/bash
|
| 25 |
>=dev-java/java-config-1.2"
|
| 26 |
|
| 27 |
S="${WORKDIR}/apache-ant-${MY_PV}"
|
| 28 |
|
| 29 |
src_unpack() {
|
| 30 |
unpack ${A}
|
| 31 |
cd ${S}
|
| 32 |
|
| 33 |
# Patch build.sh to die with non-zero exit code in case of errors.
|
| 34 |
# This patch may be useful for all ant versions.
|
| 35 |
epatch ${FILESDIR}/build.sh-exit-fix.patch.gz
|
| 36 |
}
|
| 37 |
|
| 38 |
src_compile() {
|
| 39 |
addwrite "/proc/self/maps"
|
| 40 |
if [ `arch` == "ppc" ] ; then
|
| 41 |
# We're compiling _ON_ PPC
|
| 42 |
export THREADS_FLAG="green"
|
| 43 |
fi
|
| 44 |
|
| 45 |
|
| 46 |
local myc
|
| 47 |
myc="${myc} -Ddist.dir=${D}/usr/share/${PN}"
|
| 48 |
myc="${myc} -Djavac.target=1.4"
|
| 49 |
echo $CLASSPATH
|
| 50 |
CLASSPATH="." ./build.sh -Ddist.dir=${D}/usr/share/${PN} || die
|
| 51 |
|
| 52 |
use doc && ./build.sh dist_javadocs
|
| 53 |
}
|
| 54 |
|
| 55 |
src_install() {
|
| 56 |
newbin ${FILESDIR}/${PV/_*}-ant ant || die "failed to install wrapper"
|
| 57 |
|
| 58 |
dodir /usr/share/${PN}/bin
|
| 59 |
for each in antRun runant.pl runant.py complete-ant-cmd.pl ; do
|
| 60 |
dobin ${S}/src/script/${each}
|
| 61 |
dosym /usr/bin/${each} /usr/share/${PN}/bin/${each}
|
| 62 |
done
|
| 63 |
|
| 64 |
dodir /etc/env.d
|
| 65 |
echo "ANT_HOME=\"/usr/share/${PN}\"" > ${D}/etc/env.d/20ant
|
| 66 |
|
| 67 |
java-pkg_dojar build/lib/ant.jar
|
| 68 |
java-pkg_dojar build/lib/ant-launcher.jar
|
| 69 |
|
| 70 |
dodoc README WHATSNEW KEYS
|
| 71 |
use doc && dohtml welcome.html
|
| 72 |
use doc && java-pkg_dohtml -r docs/*
|
| 73 |
use doc && java-pkg_dohtml -r dist/docs/manual/api/*
|
| 74 |
}
|