diff options
author | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
---|---|---|
committer | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
commit | 415856bdd4f48ab4f2732996f0bae58595092bbe (patch) | |
tree | ede2018b591f6dfb477fe9341ba17b9bc000fab9 /extra/apache-ant |
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'extra/apache-ant')
-rw-r--r-- | extra/apache-ant/PKGBUILD | 51 | ||||
-rw-r--r-- | extra/apache-ant/ant_diagnostics.patch | 23 | ||||
-rw-r--r-- | extra/apache-ant/apache-ant.sh | 3 |
3 files changed, 77 insertions, 0 deletions
diff --git a/extra/apache-ant/PKGBUILD b/extra/apache-ant/PKGBUILD new file mode 100644 index 000000000..7eec5c172 --- /dev/null +++ b/extra/apache-ant/PKGBUILD @@ -0,0 +1,51 @@ +# $Id: PKGBUILD 107828 2011-01-27 04:37:07Z paul $ +# Contributor: Andrew Wright <andreww@photism.org> +# Maintainer: Paul Mattal <paul@archlinux.org> + +pkgname=apache-ant +pkgver=1.8.2 +pkgrel=1 +pkgdesc="A java-based build tool." +arch=('i686' 'x86_64') +license=('APACHE') +url="http://ant.apache.org/" +depends=('java-runtime') +optdepends=('junit: to jave junit on the classpath in javac tasks') +source=(http://archive.apache.org/dist/ant/binaries/${pkgname}-${pkgver}-bin.tar.bz2 + ${pkgname}.sh + ant_diagnostics.patch) +md5sums=('9e9ae9fc7352960191489a1286fb0928' + '593ee6ebd9b8ec321534a028e686880f' + 'cbaab423be40a6e63f0fde901b91eb50') + +build() { + # install profile.d script + install -dm755 ${pkgdir}/etc/profile.d || return 1 + install -m755 ${srcdir}/${pkgname}.sh ${pkgdir}/etc/profile.d/ || return 1 + + # Get the ANT_HOME env var + source ${srcdir}/${pkgname}.sh || return 1 + + cd ${srcdir}/${pkgname}-${pkgver} + install -dm755 ${pkgdir}/${ANT_HOME}/{bin,lib} || return 1 + + install -m644 ./lib/*.jar ${pkgdir}/${ANT_HOME}/lib || return 1 + cp -Rp ./etc ${pkgdir}/${ANT_HOME} || return 1 + + # Do not copy Windows .bat/.cmd files + find ./bin -type f -a ! -name \*.bat -a ! -name \*.cmd \ + -exec install -m755 {} ${pkgdir}/${ANT_HOME}/bin \; || return 1 + + # symlink to junit so it's on the javac build path for ant + # matches behavior on ubuntu 9 and makes sense for compatibility + # http://bugs.archlinux.org/task/15229 + cd $startdir/pkg/usr/share/java/apache-ant/lib || return 1 + ln -s ../../junit.jar . || return 1 + cd - || return 1 + + # The license says the NOTICE file should be redistributed for derivative + # works, so lets supply it. + install -dm755 ${pkgdir}/usr/share/licenses/${pkgname} || return 1 + install -m644 LICENSE NOTICE ${pkgdir}/usr/share/licenses/${pkgname} || return 1 +} + diff --git a/extra/apache-ant/ant_diagnostics.patch b/extra/apache-ant/ant_diagnostics.patch new file mode 100644 index 000000000..38148b45c --- /dev/null +++ b/extra/apache-ant/ant_diagnostics.patch @@ -0,0 +1,23 @@ +--- a/src/main/org/apache/tools/ant/Diagnostics.java ++++ b/src/main/org/apache/tools/ant/Diagnostics.java +@@ -179,7 +179,10 @@ + * @param clazz the class to get the information from.
+ * @since Ant 1.8.0
+ */
+- private static URL getClassLocation(Class clazz) {
++ private static URL getClassLocation(Class clazz) { ++ if (clazz.getProtectionDomain().getCodeSource() == null) { ++ return null; ++ }
+ return clazz.getProtectionDomain().getCodeSource().getLocation();
+ }
+
+@@ -241,7 +244,7 @@ + }
+ Transformer transformer = null;
+ try {
+- transformer = transformerFactory.newTransformer();
++ transformer = transformerFactory.newTransformer(); + } catch (Exception e) {
+ // ignore
+ ignoreThrowable(e);
diff --git a/extra/apache-ant/apache-ant.sh b/extra/apache-ant/apache-ant.sh new file mode 100644 index 000000000..ab602fb28 --- /dev/null +++ b/extra/apache-ant/apache-ant.sh @@ -0,0 +1,3 @@ +export ANT_HOME=/usr/share/java/apache-ant +export PATH=$PATH:$ANT_HOME/bin + |