blob: 9c20251b2929783d8cb6672ca0f3bd0e1278b257 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/ant-core/ant-core-1.7.0.ebuild,v 1.5 2007/01/25 18:13:17 wltjr Exp $
inherit java-pkg-2
MY_P="apache-ant-${PV}"
DESCRIPTION="Java-based build tool similar to 'make' that uses XML configuration files."
HOMEPAGE="http://ant.apache.org/"
SRC_URI="mirror://apache/ant/source/${MY_P}-src.tar.bz2
mirror://gentoo/ant-${PV}-gentoo.tar.bz2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~ppc64 ~x86 ~x86-fbsd"
IUSE="doc source"
RDEPEND=">=virtual/jdk-1.4
!<dev-java/ant-tasks-${PV}
!dev-java/ant-optional"
DEPEND="${RDEPEND}
source? ( app-arch/zip )"
S="${WORKDIR}/${MY_P}"
src_unpack() {
unpack ${A}
cd "${S}"
# remove bundled xerces
rm -v lib/*.jar
# use our split-ant build.xml
mv -f ${WORKDIR}/build.xml .
}
src_compile() {
export ANT_HOME=""
local bsyscp
# this ensures that when building ant with bootstrapped ant,
# only the source is used for resolving references, and not
# the classes in bootstrapped ant
# but jikes in kaffe has issues with this...
if ! java-pkg_current-vm-matches kaffe; then
bsyscp="-Dbuild.sysclasspath=ignore"
fi
./build.sh ${bsyscp} jars-core $(use_doc javadocs) \
|| die "build failed"
}
src_install() {
newbin ${FILESDIR}/${PV}-ant ant || die "failed to install wrapper"
dodir /usr/share/${PN}/bin
for each in antRun runant.pl runant.py complete-ant-cmd.pl ; do
dobin ${S}/src/script/${each}
dosym /usr/bin/${each} /usr/share/${PN}/bin/${each}
done
echo "ANT_HOME=\"/usr/share/${PN}\"" > ${T}/20ant
doenvd ${T}/20ant || die "failed to install env.d file"
java-pkg_dojar build/lib/ant.jar
java-pkg_dojar build/lib/ant-bootstrap.jar
java-pkg_dojar build/lib/ant-launcher.jar
use source && java-pkg_dosrc src/main/*
dodoc README WHATSNEW KEYS
if use doc; then
dohtml welcome.html
dohtml -r docs/*
java-pkg_dojavadoc build/javadocs
fi
}
pkg_postinst() {
elog "The way of packaging ant in Gentoo has changed since version 1.7.0."
elog "For more info, please see http://overlays.gentoo.org/proj/java/wiki/Split_Ant"
}
|