From 1c27f57b1a28074a50e05aaa73c47ef55127e318 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 6 Jun 2012 09:19:56 -0400 Subject: rename libre/apache-ant{-libre,} and add more optional dependencies --- libre/apache-ant-libre/PKGBUILD | 72 ------------------ libre/apache-ant-libre/ant_diagnostics.patch | 23 ------ libre/apache-ant-libre/apache-ant.csh | 2 - libre/apache-ant-libre/apache-ant.sh | 3 - libre/apache-ant/PKGBUILD | 108 +++++++++++++++++++++++++++ libre/apache-ant/apache-ant.csh | 3 + libre/apache-ant/apache-ant.sh | 2 + 7 files changed, 113 insertions(+), 100 deletions(-) delete mode 100644 libre/apache-ant-libre/PKGBUILD delete mode 100644 libre/apache-ant-libre/ant_diagnostics.patch delete mode 100644 libre/apache-ant-libre/apache-ant.csh delete mode 100644 libre/apache-ant-libre/apache-ant.sh create mode 100644 libre/apache-ant/PKGBUILD create mode 100644 libre/apache-ant/apache-ant.csh create mode 100644 libre/apache-ant/apache-ant.sh (limited to 'libre') diff --git a/libre/apache-ant-libre/PKGBUILD b/libre/apache-ant-libre/PKGBUILD deleted file mode 100644 index 9f5ef223b..000000000 --- a/libre/apache-ant-libre/PKGBUILD +++ /dev/null @@ -1,72 +0,0 @@ -# Maintainer (Arch): Paul Mattal -# Contributor: Andrew Wright - -_pkgname=apache-ant -pkgname=apache-ant-libre -pkgver=1.8.2 - -provides=("$_pkgname=$pkgver") -replaces=("$_pkgname") -conflicts=("$_pkgname") - -pkgrel=3 -pkgdesc="A java-based build tool" -arch=('any') -license=('APACHE') -url="http://ant.apache.org/" -depends=('java-environment') -makedepends=('junit') -optdepends=('junit: to have JUnit on the classpath in javac tasks') -source=(http://archive.apache.org/dist/ant/source/${_pkgname}-${pkgver}-src.tar.bz2 - ${_pkgname}.sh ${_pkgname}.csh - ant_diagnostics.patch) - -build() { - # This directory is what becomes - # http://archive.apache.org/dist/ant/binaries/${pkgname}-${pkgver}-bin.tar.bz2 - # which is what Arch uses - rm -rf "${srcdir}"/${_pkgname}-${pkgver}-bin - mkdir -p "${srcdir}"/${_pkgname}-${pkgver}-bin - - cd "${srcdir}"/${_pkgname}-${pkgver} - ln -sf /usr/share/java/junit.jar lib/optional # JUnit isn't really optional - sh build.sh -Ddist.dir="${srcdir}"/${_pkgname}-${pkgver}-bin dist -} - -package() { - # install profile.d script - install -dm755 "${pkgdir}"/etc/profile.d - install -m755 "${srcdir}"/${_pkgname}.{csh,sh} "${pkgdir}"/etc/profile.d/ - - # Get the ANT_HOME env var - source "${srcdir}"/${_pkgname}.sh - - cd "${srcdir}"/${_pkgname}-${pkgver}-bin - install -dm755 "${pkgdir}"/${ANT_HOME}/{bin,lib} - - install -m644 ./lib/*.jar "${pkgdir}"/${ANT_HOME}/lib - cp -Rp ./etc "${pkgdir}"/${ANT_HOME} - - # Do not copy Windows .bat/.cmd files - find ./bin -type f -a ! -name \*.bat -a ! -name \*.cmd \ - -exec install -m755 {} "${pkgdir}"/${ANT_HOME}/bin \; - - # 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 - ln -sf /usr/share/java/junit.jar "${pkgdir}"/usr/share/java/apache-ant/lib/ - - # fix python2 path - sed -i 's|/usr/bin/python|/usr/bin/python2|' "${pkgdir}"/usr/share/java/apache-ant/bin/runant.py - - # The license says the NOTICE file should be redistributed for derivative - # works, so lets supply it. - cd "${srcdir}"/${_pkgname}-${pkgver} - install -dm755 "${pkgdir}"/usr/share/licenses/${_pkgname} - install -m644 LICENSE NOTICE "${pkgdir}"/usr/share/licenses/${_pkgname} -} - -md5sums=('0d9e108afcd15b820150b8085c96d2b1' - '593ee6ebd9b8ec321534a028e686880f' - '475b684eb8202c09cbb51496cd8ee1e0' - 'cbaab423be40a6e63f0fde901b91eb50') diff --git a/libre/apache-ant-libre/ant_diagnostics.patch b/libre/apache-ant-libre/ant_diagnostics.patch deleted file mode 100644 index 38148b45c..000000000 --- a/libre/apache-ant-libre/ant_diagnostics.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- 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/libre/apache-ant-libre/apache-ant.csh b/libre/apache-ant-libre/apache-ant.csh deleted file mode 100644 index b6a6d5840..000000000 --- a/libre/apache-ant-libre/apache-ant.csh +++ /dev/null @@ -1,2 +0,0 @@ -setenv ANT_HOME /usr/share/java/apache-ant -setenv PATH ${PATH}:${ANT_HOME}/bin diff --git a/libre/apache-ant-libre/apache-ant.sh b/libre/apache-ant-libre/apache-ant.sh deleted file mode 100644 index ab602fb28..000000000 --- a/libre/apache-ant-libre/apache-ant.sh +++ /dev/null @@ -1,3 +0,0 @@ -export ANT_HOME=/usr/share/java/apache-ant -export PATH=$PATH:$ANT_HOME/bin - diff --git a/libre/apache-ant/PKGBUILD b/libre/apache-ant/PKGBUILD new file mode 100644 index 000000000..b6b429442 --- /dev/null +++ b/libre/apache-ant/PKGBUILD @@ -0,0 +1,108 @@ +# Maintainer: Luke Shumaker +# Maintainer (Arch): Paul Mattal +# Contributor: Andrew Wright + +pkgname=apache-ant +pkgver=1.8.2 + +provides=("apache-ant-libre=$pkgver") +replaces=("apache-ant-libre") +conflicts=("apache-ant-libre") + +pkgrel=4.2 +pkgdesc="A Java-based build tool" +arch=('any') +license=('Apache') +url="http://ant.apache.org/" +_mirror=http://archive.apache.org/dist +source=($_mirror/ant/source/${pkgname}-${pkgver}-src.tar.bz2 + ${pkgname}.sh ${pkgname}.csh) +depends=('java-environment') + +# This list is adapted from https://ant.apache.org/manual/install.html#librarydependencies +declare -A _opts +_opts[junit]='to have JUnit on the classpath in javac tasks;/usr/share/java/junit.jar' +_opts[xalan-java]=' task;/usr/share/java/xalan.jar' +_opts[antlr2]=' task;/usr/share/java/antlr2.jar::antlr.jar' +#_opts[java-bsf]='