/[gentoo-x86]/dev-java/ant-core/ant-core-1.8.2.ebuild
Gentoo

Contents of /dev-java/ant-core/ant-core-1.8.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Fri May 25 11:20:50 2012 UTC (2 years, 1 month ago) by ago
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +2 -2 lines
Stable for amd64, wrt bug #417403

(Portage version: 2.1.10.49/cvs/Linux x86_64)

1 # Copyright 1999-2012 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.8.2.ebuild,v 1.4 2012/05/25 01:18:09 jdhore Exp $
4
5 EAPI="4"
6
7 # don't depend on itself
8 JAVA_ANT_DISABLE_ANT_CORE_DEP=true
9 # rewriting build.xml files for the testcases has no reason atm
10 JAVA_PKG_BSFIX_ALL=no
11 JAVA_PKG_IUSE="doc source"
12 inherit eutils java-pkg-2 java-ant-2 prefix versionator
13
14 MY_P="apache-ant-${PV}"
15
16 DESCRIPTION="Java-based build tool similar to 'make' that uses XML configuration files."
17 HOMEPAGE="http://ant.apache.org/"
18 SRC_URI="mirror://apache/ant/source/${MY_P}-src.tar.bz2
19 http://dev.gentoo.org/~caster/distfiles/ant-${PV}-gentoo.tar.bz2"
20
21 LICENSE="Apache-2.0"
22 SLOT="0"
23 KEYWORDS="amd64 ~ia64 ~ppc ~ppc64 x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
24 IUSE=""
25
26 DEPEND=">=virtual/jdk-1.4
27 !dev-java/ant-tasks
28 !dev-java/ant-optional"
29 RDEPEND="${DEPEND}"
30
31 S="${WORKDIR}/${MY_P}"
32
33 src_prepare() {
34 EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches/"
35 eprefixify "${WORKDIR}/ant"
36
37 # use our split-ant build.xml
38 mv -f "${WORKDIR}/build.xml" . || die
39
40 # bug #196080
41 java-ant_bsfix_one build.xml
42 java-pkg-2_src_prepare
43 }
44
45 src_compile() {
46 export ANT_HOME=""
47
48 local bsyscp
49
50 # this ensures that when building ant with bootstrapped ant,
51 # only the source is used for resolving references, and not
52 # the classes in bootstrapped ant
53 # but jikes in kaffe has issues with this...
54 if ! java-pkg_current-vm-matches kaffe; then
55 bsyscp="-Dbuild.sysclasspath=ignore"
56 fi
57
58 CLASSPATH="$(java-config -t)" ./build.sh ${bsyscp} jars-core internal_dist \
59 $(use_doc javadocs) || die "build failed"
60 }
61
62 src_install() {
63 dodir /usr/share/ant/lib
64 for jar in ant.jar ant-bootstrap.jar ant-launcher.jar ; do
65 java-pkg_dojar build/lib/${jar}
66 dosym /usr/share/${PN}/lib/${jar} /usr/share/ant/lib/${jar}
67 done
68
69 dobin "${WORKDIR}/ant" || die "failed to install wrapper"
70 dodir /usr/share/${PN}/bin
71 for each in antRun antRun.pl runant.pl runant.py complete-ant-cmd.pl ; do
72 dobin "${S}/src/script/${each}"
73 dosym /usr/bin/${each} /usr/share/${PN}/bin/${each}
74 done
75 dosym /usr/share/${PN}/bin /usr/share/ant/bin
76
77 insinto /usr/share/${PN}
78 doins -r dist/etc
79 dosym /usr/share/${PN}/etc /usr/share/ant/etc
80
81 echo "ANT_HOME=\"${EPREFIX}/usr/share/ant\"" > "${T}/20ant"
82 doenvd "${T}/20ant" || die "failed to install env.d file"
83
84 dodoc NOTICE README WHATSNEW KEYS || die
85
86 if use doc; then
87 dohtml -r docs/*
88 java-pkg_dojavadoc --symlink manual/api build/javadocs
89 fi
90
91 use source && java-pkg_dosrc src/main/*
92 }
93
94 pkg_postinst() {
95 if [[ -n ${REPLACING_VERSIONS} ]]; then
96 if ! version_is_at_least 1.7.0 ${REPLACING_VERSIONS}; then
97 elog "The way of packaging ant in Gentoo has changed significantly since"
98 elog "the 1.7.0 version, For more information, please see:"
99 elog "http://www.gentoo.org/proj/en/java/ant-guide.xml"
100 fi
101
102 if ! version_is_at_least 1.7.1 ${REPLACING_VERSIONS}; then
103 elog "Since 1.7.1, the ant-tasks meta-ebuild has been removed and its USE"
104 elog "flags have been moved to dev-java/ant."
105 fi
106 fi
107 }

  ViewVC Help
Powered by ViewVC 1.1.20