From 75ebc36309ccccdb4d5d53d1ae6eb666589bdde9 Mon Sep 17 00:00:00 2001 From: Britney Fransen Date: Mon, 28 Jan 2019 19:34:18 +0000 Subject: ant: update to 1.10.5. change to ant --- abs/extra/ant/PKGBUILD | 82 ++++++++++++++++++++++++++++++ abs/extra/ant/ant.conf | 8 +++ abs/extra/apache-ant/PKGBUILD | 74 --------------------------- abs/extra/apache-ant/ant_diagnostics.patch | 23 --------- abs/extra/apache-ant/apache-ant.csh | 1 - abs/extra/apache-ant/apache-ant.sh | 1 - 6 files changed, 90 insertions(+), 99 deletions(-) create mode 100644 abs/extra/ant/PKGBUILD create mode 100644 abs/extra/ant/ant.conf delete mode 100644 abs/extra/apache-ant/PKGBUILD delete mode 100644 abs/extra/apache-ant/ant_diagnostics.patch delete mode 100644 abs/extra/apache-ant/apache-ant.csh delete mode 100644 abs/extra/apache-ant/apache-ant.sh diff --git a/abs/extra/ant/PKGBUILD b/abs/extra/ant/PKGBUILD new file mode 100644 index 0000000..7ed980b --- /dev/null +++ b/abs/extra/ant/PKGBUILD @@ -0,0 +1,82 @@ +# Maintainer: Levente Polyak +# Maintainer: Guillaume ALAUX +# Contributor: Andrew Wright +# Contributor: Paul Mattal + +pkgbase=ant +pkgname=('ant' 'ant-doc') +pkgver=1.10.5 +pkgrel=1 +pkgdesc='Java based build tool' +url='https://ant.apache.org/' +arch=('any') +license=('APACHE') +makedepends=('bash' 'java-environment' 'junit' 'java-hamcrest') +source=(https://www.apache.org/dist/ant/source/apache-${pkgbase}-${pkgver}-src.tar.bz2{,.asc} + ant.conf) +sha256sums=('71a5cdd45a54901b6321d5a140d882f7580c38f766a4e4959bcc36555da9f3ac' + 'SKIP' + '23bbef577b56d48adb1985dbd9795e5533146646f1e8bb879dd061a4014ffcf2') +validpgpkeys=('CE8075A251547BEE249BC151A2115AE15F6B8B72') # Stefan Bodewig + +_replace_lib() { + # explicitly call rm to ensure we replace instead of add + rm "$2" + ln -s "$1" "$2" +} + +prepare() { + cd apache-${pkgbase}-${pkgver} + sed -i 's|/usr/bin/python|/usr/bin/python2|' src/script/runant.py +} + +build() { + cd apache-${pkgbase}-${pkgver} + export JAVA_HOME=/usr/lib/jvm/default + ./bootstrap.sh + bootstrap/bin/ant -Ddest=optional -f fetch.xml + _replace_lib /usr/share/java/junit.jar lib/optional/junit-4.12.jar + _replace_lib /usr/share/java/hamcrest-core.jar lib/optional/hamcrest-core-1.3.jar + _replace_lib /usr/share/java/hamcrest-library.jar lib/optional/hamcrest-library-1.3.jar + bootstrap/bin/ant dist +} + +package_ant() { + depends=('java-environment' 'bash') + optdepends=('junit: junit tasks' + 'java-hamcrest: junit tasks') + replaces=('apache-ant') + provides=('apache-ant') + conflicts=('apache-ant') + backup=('etc/ant.conf') + + cd apache-${pkgbase}-${pkgver}/apache-${pkgbase}-${pkgver} + local _ant_home=/usr/share/ant + + install -d "${pkgdir}${_ant_home}" + cp -Rp etc "${pkgdir}${_ant_home}" + + find bin -type f -a ! -name \*.bat -a ! -name \*.cmd \ + -exec install -Dm 755 {} -t "${pkgdir}${_ant_home}/bin" \; + install -d "${pkgdir}/usr/bin" + ln -s /usr/share/ant/bin/ant "${pkgdir}/usr/bin/ant" + + install -Dm 644 "${srcdir}/ant.conf" -t "${pkgdir}/etc" + install -Dm 644 lib/*.jar -t "${pkgdir}/usr/share/java/ant" + ln -s /usr/share/java/ant "${pkgdir}${_ant_home}/lib" + + install -Dm 644 ../{LICENSE,NOTICE} -t "${pkgdir}/usr/share/licenses/${pkgname}" +} + +package_ant-doc() { + pkgdesc='Apache Ant build tool documentation' + replaces=('apache-ant-doc') + provices=('apache-ant-doc') + conflicts=('apache-ant-doc') + + install -d "${pkgdir}/usr/share/doc/ant" + cp -r apache-${pkgbase}-${pkgver}/apache-${pkgbase}-${pkgver}/manual/* \ + "${pkgdir}/usr/share/doc/ant" +} + +# vim: ts=2 sw=2 et: diff --git a/abs/extra/ant/ant.conf b/abs/extra/ant/ant.conf new file mode 100644 index 0000000..63bf219 --- /dev/null +++ b/abs/extra/ant/ant.conf @@ -0,0 +1,8 @@ +# Apache Ant start script configuration file +ANT_HOME=/usr/share/ant + +# Optional jars and their dependencies +OPT_JAR_LIST=/usr/share/java/junit.jar:/usr/share/java/hamcrest-core.jar +LOCALCLASSPATH=${OPT_JAR_LIST} + +# vim:ft=sh diff --git a/abs/extra/apache-ant/PKGBUILD b/abs/extra/apache-ant/PKGBUILD deleted file mode 100644 index d8982e8..0000000 --- a/abs/extra/apache-ant/PKGBUILD +++ /dev/null @@ -1,74 +0,0 @@ -# $Id: PKGBUILD 160040 2012-05-28 13:39:12Z guillaume $ -# Maintainer: Guillaume ALAUX -# Contributor: Andrew Wright -# Contributor: Paul Mattal -pkgname=apache-ant -pkgver=1.8.4 -pkgrel=1 -pkgdesc="A java-based build tool" -arch=('any') -url="http://ant.apache.org/" -license=('APACHE') -depends=('java-environment') -makedepends=('java-environment' 'xalan-java' 'junit' 'apache-ant') -optdepends=('junit: to jave junit on the classpath in javac tasks') -#http://apache.org/dist/ant/source/${pkgname}-${pkgver}-src.tar.bz2 -source=(http://apache.org/dist/ant/binaries/${pkgname}-${pkgver}-bin.tar.bz2 - ${pkgname}.sh - ${pkgname}.csh) -md5sums=('561838e665e5dc185dde9d220fce1336' - 'dbfa1e8dd4bab2f5821f5abe50835c83' - 'b3f67824043b6fb00667bb7a4007af42') - -_ant_home=/usr/share/${pkgname} - -#build() { -# cd "${srcdir}/${pkgname}-${pkgver}" - -# ant -Ddest=optional -f fetch.xml - -# ln -s /usr/share/java/junit.jar lib/optional/junit.jar -# ./bootstrap.sh - -# mkdir ${srcdir}/.m2 -# ./bootstrap/bin/ant -Ddest=optional -Ddest.dir=${srcdir}/.m2 -f fetch.xml -# ./bootstrap/bin/ant -f fetch.xml -nouserlib -Ddest=optional - -# sh build.sh dist - -# ant dist -#} - -package() { -# cd "${srcdir}/${pkgname}-${pkgver}/${pkgname}-${pkgver}" - cd "${srcdir}/${pkgname}-${pkgver}" - - install -dm755 ${pkgdir}/${_ant_home}/bin - cp -Rp etc ${pkgdir}/${_ant_home} - find ./bin -type f -a ! -name \*.bat -a ! -name \*.cmd \ - -exec install -m755 {} ${pkgdir}/${_ant_home}/bin \; - - install -dm755 ${pkgdir}/usr/bin - ln -s ${_ant_home}/bin/ant ${pkgdir}/usr/bin/ant - - install -dm755 ${pkgdir}/usr/share/java/${pkgname} - install -m644 lib/*.jar ${pkgdir}/usr/share/java/${pkgname} - ln -s /usr/share/java/${pkgname} ${pkgdir}/${_ant_home}/lib - - # Symlink to junit so it's on the javac build path - # http://bugs.archlinux.org/task/15229 - # http://ant.apache.org/manual/install.html#optionalTasks - ln -sf ../junit.jar ${pkgdir}/usr/share/java/apache-ant/ - - # fix python2 path - sed -i 's|/usr/bin/python|/usr/bin/python2|' ${pkgdir}${_ant_home}/bin/runant.py - - # install profile.d script - install -dm755 ${pkgdir}/etc/profile.d - install -m755 "${srcdir}"/${pkgname}.{csh,sh} ${pkgdir}/etc/profile.d/ - - # License says NOTICE file should be redistributed for derivative works - cd ${srcdir}/${pkgname}-${pkgver} - install -dm755 ${pkgdir}/usr/share/licenses/${pkgname} - install -m644 LICENSE NOTICE ${pkgdir}/usr/share/licenses/${pkgname} -} diff --git a/abs/extra/apache-ant/ant_diagnostics.patch b/abs/extra/apache-ant/ant_diagnostics.patch deleted file mode 100644 index 38148b4..0000000 --- a/abs/extra/apache-ant/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/abs/extra/apache-ant/apache-ant.csh b/abs/extra/apache-ant/apache-ant.csh deleted file mode 100644 index a19392b..0000000 --- a/abs/extra/apache-ant/apache-ant.csh +++ /dev/null @@ -1 +0,0 @@ -setenv ANT_HOME /usr/share/apache-ant diff --git a/abs/extra/apache-ant/apache-ant.sh b/abs/extra/apache-ant/apache-ant.sh deleted file mode 100644 index eaa8a54..0000000 --- a/abs/extra/apache-ant/apache-ant.sh +++ /dev/null @@ -1 +0,0 @@ -export ANT_HOME=/usr/share/apache-ant -- cgit v0.12