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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Sep 17 16:02:33 2004 UTC (9 years, 10 months ago) by axxo
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
fix classpath in wrapper script, bug 64410

1 # Copyright 1999-2004 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.ebuild,v 1.1 2004/09/10 19:45:18 axxo 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"
16
17 DEPEND="virtual/libc
18 >=virtual/jdk-1.3
19 >=app-arch/unzip-5.50-r1"
20 RDEPEND=">=virtual/jdk-1.3
21 app-shells/bash"
22
23 S="${WORKDIR}/apache-ant-${PV}"
24
25 src_unpack() {
26 unpack ${A}
27 cd ${S}
28
29 # Patch build.sh to die with non-zero exit code in case of errors.
30 # This patch may be useful for all ant versions.
31 epatch ${FILESDIR}/build.sh-exit-fix.patch.gz
32 # This patch will be used until ant 1.6 is released
33 epatch ${FILESDIR}/rpmbuild.patch.gz
34 }
35
36 src_compile() {
37 addwrite "/proc/self/maps"
38
39 [ -z ${JDK_HOME} ] && einfo "JDK_HOME not set, please check with java-config" && die
40
41 export JAVA_HOME=${JDK_HOME}
42 if [ `arch` == "ppc" ] ; then
43 # We're compiling _ON_ PPC
44 export THREADS_FLAG="green"
45 fi
46
47 # Make sure junit tasks get built if we have junit
48 if [ -f "/usr/share/junit/lib/junit.jar" ] ; then
49 export CLASSPATH="/usr/share/junit/lib/junit.jar"
50 export DEP_APPEND="junit"
51 if [ -f "/usr/share/xalan/lib/xalan.jar" ] ; then
52 export CLASSPATH="${CLASSPATH}:/usr/share/xalan/lib/xalan.jar"
53 export DEP_APPEND="${DEP_APPEND} xalan"
54 fi
55 fi
56
57 # Add Xerces in if we have it
58 if [ -f "/usr/share/xerces/lib/xercesImpl.jar" ] ; then
59 export CLASSPATH="${CLASSPATH}:/usr/share/xerces/lib/xercesImpl.jar:/usr/share/xerces/lib/xml-apis.jar"
60 export DEP_APPEND="${DEP_APPEND} xerces"
61 fi
62
63 # Add oro in if we have it
64 if [ -f "/usr/share/oro/lib/oro.jar" ] ; then
65 export CLASSPATH="${CLASSPATH}:/usr/share/oro/lib/oro.jar"
66 export DEP_APPEND="${DEP_APPEND} oro"
67 fi
68
69 # Add beanutils if we have it
70 if [ -f "/usr/share/commons-beanutils/lib/commons-beanutils.jar" ] ; then
71 export CLASSPATH="${CLASSPATH}:/usr/share/commons-beanutils/lib/commons-beanutils.jar"
72 export DEP_APPEND="${DEP_APPEND} commons-beanutils"
73 fi
74
75 # add antlr if we have it
76 if [ -f "/usr/share/antlr/lib/antlr.jar" ] ; then
77 export CLASSPATH="${CLASSPATH}:/usr/share/antlr/lib/antlr.jar"
78 export DEP_APPEND="${DEP_APPEND} antlr"
79 fi
80
81 # add bcel if we have it
82 if [ -f "/usr/share/bcel/lib/bcel.jar" ] ; then
83 export CLASSPATH="${CLASSPATH}:/usr/share/bcel/lib/bcel.jar"
84 export DEP_APPEND="${DEP_APPEND} bcel"
85 fi
86
87 ./build.sh -Ddist.dir=${D}/usr/share/${PN} || die
88 }
89
90 src_install() {
91 cp ${FILESDIR}/${PVR}-ant ${S}/src/ant
92
93 exeinto /usr/bin
94 doexe src/ant
95 for each in antRun runant.pl runant.py complete-ant-cmd.pl ; do
96 dobin ${S}/src/script/${each}
97 done
98
99 java-pkg_dojar build/lib/*.jar
100
101 dodoc LICENSE LICENSE.* README WHATSNEW KEYS
102 use doc && dohtml welcome.html
103 use doc && dohtml -r docs/*
104 }

  ViewVC Help
Powered by ViewVC 1.1.20