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

Contents of /dev-java/ant-core/ant-core-1.5.4-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Sun Mar 12 04:21:56 2006 UTC (8 years, 5 months ago) by nichoj
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +1 -1 lines
FILE REMOVED
Removing older version with same keywords.
(Portage version: 2.1_pre6)

1 # Copyright 1999-2006 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.5.4-r2.ebuild,v 1.7 2006/02/05 11:05:30 blubb Exp $
4
5 inherit java-pkg eutils
6
7 MY_PN=${PN/-core}
8 DESCRIPTION="Java-based build tool similar to 'make' that uses XML configuration files."
9 HOMEPAGE="http://ant.apache.org/"
10 SRC_URI="http://archive.apache.org/dist/ant/source/apache-${MY_PN}-${PV}-src.zip"
11
12 LICENSE="Apache-1.1"
13 SLOT="0"
14 KEYWORDS="x86 ppc sparc amd64"
15 IUSE="doc source"
16
17 DEPEND="virtual/libc
18 !<dev-java/ant-1.5.4-r2
19 >=virtual/jdk-1.3
20 source? ( app-arch/zip )
21 >=app-arch/unzip-5.50-r1"
22 RDEPEND=">=virtual/jdk-1.3"
23
24 S="${WORKDIR}/apache-ant-${PV}"
25
26 src_unpack() {
27 unpack ${A}
28 cd ${S}
29
30 # Patch build.sh to die with non-zero exit code in case of errors.
31 # This patch may be useful for all ant versions.
32 epatch ${FILESDIR}/build.sh-exit-fix.patch
33 # This patch will be used until ant 1.6 is released
34 epatch ${FILESDIR}/rpmbuild.patch
35 }
36
37 src_compile() {
38 addwrite "/proc/self/maps"
39 local myclasspath deps
40
41 [ -z ${JDK_HOME} ] && einfo "JDK_HOME not set, please check with java-config" && die
42
43 JAVA_HOME=${JDK_HOME}
44 if [ `arch` == "ppc" ] ; then
45 # We're compiling _ON_ PPC
46 export THREADS_FLAG="green"
47 fi
48
49 # Make sure junit tasks get built if we have junit
50 if [ -f "/usr/share/junit/lib/junit.jar" ] ; then
51 myclasspath="/usr/share/junit/lib/junit.jar"
52 deps="junit"
53 if [ -f "/usr/share/xalan/lib/xalan.jar" ] ; then
54 myclasspath="${myclasspath}:/usr/share/xalan/lib/xalan.jar"
55 deps="${deps} xalan"
56 fi
57 fi
58
59 # Add Xerces in if we have it
60 if [ -f "/usr/share/xerces/lib/xercesImpl.jar" ] ; then
61 myclasspath="${myclasspath}:/usr/share/xerces/lib/xercesImpl.jar:/usr/share/xerces/lib/xml-apis.jar"
62 deps="${deps} xerces"
63 fi
64
65 # Add oro in if we have it
66 if [ -f "/usr/share/oro/lib/oro.jar" ] ; then
67 myclasspath="${myclasspath}:/usr/share/oro/lib/oro.jar"
68 deps="${deps} oro"
69 fi
70
71 # Add beanutils if we have it
72 if [ -f "/usr/share/commons-beanutils/lib/commons-beanutils.jar" ] ; then
73 myclasspath="${myclasspath}:/usr/share/commons-beanutils/lib/commons-beanutils.jar"
74 deps="${deps} commons-beanutils"
75 fi
76
77 # add antlr if we have it
78 if [ -f "/usr/share/antlr/lib/antlr.jar" ] ; then
79 myclasspath="${myclasspath}:/usr/share/antlr/lib/antlr.jar"
80 deps="${deps} antlr"
81 fi
82
83 # add bcel if we have it
84 if [ -f "/usr/share/bcel/lib/bcel.jar" ] ; then
85 myclasspath="${myclasspath}:/usr/share/bcel/lib/bcel.jar"
86 deps="${deps} bcel"
87 fi
88
89 DEP_APPEND=${deps} CLASSPATH=${myclasspath} \
90 ./build.sh -Ddist.dir=${D}/usr/share/${PN} || die
91 }
92
93 src_install() {
94 cp ${FILESDIR}/${PV}-ant ${S}/src/ant
95
96 exeinto /usr/bin
97 doexe src/ant
98 for each in antRun runant.pl runant.py complete-ant-cmd.pl ; do
99 dobin ${S}/src/script/${each}
100 done
101
102 java-pkg_dojar build/lib/*.jar
103
104 use source && java-pkg_dosrc src/main/*
105
106 dodoc README WHATSNEW KEYS
107 use doc && dohtml welcome.html
108 use doc && java-pkg_dohtml -r docs/*
109 }

  ViewVC Help
Powered by ViewVC 1.1.20