diff options
-rw-r--r-- | libre/apache-ant-libre/PKGBUILD | 72 | ||||
-rw-r--r-- | libre/apache-ant-libre/ant_diagnostics.patch | 23 | ||||
-rw-r--r-- | libre/apache-ant-libre/apache-ant.sh | 3 | ||||
-rw-r--r-- | libre/apache-ant/PKGBUILD | 108 | ||||
-rw-r--r-- | libre/apache-ant/apache-ant.csh (renamed from libre/apache-ant-libre/apache-ant.csh) | 1 | ||||
-rw-r--r-- | libre/apache-ant/apache-ant.sh | 2 |
6 files changed, 111 insertions, 98 deletions
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 <paul@archlinux.org> -# Contributor: Andrew Wright <andreww@photism.org> - -_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.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 <lukeshu@sbcglobal.net> +# Maintainer (Arch): Paul Mattal <paul@archlinux.org> +# Contributor: Andrew Wright <andreww@photism.org> + +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]='<junitreport> task;/usr/share/java/xalan.jar' +_opts[antlr2]='<antlr> task;/usr/share/java/antlr2.jar::antlr.jar' +#_opts[java-bsf]='<script> task;/usr/share/java/bsf.jar' +#_opts[groovy]='Groovy with <script> and <scriptdef> tasks;/usr/share/java/groovy.jar' +_opts[java-asm2]='Groovy with <script> and <scriptdef> tasks;/usr/share/java/asm-2.jar::asm.jar /usr/share/java/asm-util-2.jar::asm-util.jar' +#_opts[netrexx]='<netrexx> task, Rexx with <script> task;/usr/share/java/netrexx.jar' +_opts[rhino]='Javascript with <script> task;/usr/share/java/js.jar' +_opts[jython]='Python with <script> task;/opt/jython/jython.jar' +#_opts[jacl]='TCL with <script> task;/usr/share/java/jacl.jar' +#_opts[tcljava]='TCL with <script> task;/usr/share/java/tcljava.jar' +_opts[beanshell>=1.3]='BeanShell with <script> task;/usr/share/java/bsh.jar::beanshell.jar' +#_opts[jruby]='Ruby with <script> task;/usr/share/java/jruby.jar' +#_opts[judo]='Judoscript with <script> task;/usr/share/java/judo.jar' +_opts[java-commons-logging]='CommonsLoggingListener;/usr/share/java/commons-logging/commons-logging.jar' +#_opts[java-log4j]='Log4jListener;/usr/share/java/log4j.jar' +#_opts[java-commons-net>=1.4.0]='<ftp>, <rexec> and <telnet> tasks;/usr/share/java/commons-net.jar' +#_opts[java-bcel]="'classfileset' data type, JavaClassHelper for ClassConstants filter reader;/usr/share/java/bcel.jar" +#_opts[java-mail]='<mimemail> task, mime encoding with <mail>;/usr/share/java/mail.jar' +#_opts[java-activation]='<mimemail> task, mime encoding with <mail>;/usr/share/java/activation.jar' +#_opts[jdepend]='<jdepend> task;/usr/share/java/jdepend.jar' +#_opts[java-xmlcommons-resolver>=1.1beta]="external files for 'xmlcatalog' datatype;/usr/share/java/resolver.jar" +#_opts[java-jsch>=0.1.42]='<sshexec> and <scp> tasks;/usr/share/java/jsch.jar' +#_opts[java-advanced-imaging]='<image> task/usr/share/java/jai/*.jar' + +for pkg in "${!_opts[@]}"; do + optdepends+=("$pkg: ${_opts[$pkg]%;*}") + makedepends+=("$pkg") +done + +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} + # Symlink to external optional libraries + for jar in ${_opts[@]#*;}; do + ln -sf ${jar%::*} lib/optional/`basename ${jar/*::}` + done + # Build + sh build.sh -Ddist.dir="${srcdir}"/${pkgname}-${pkgver}-bin dist +} + +package() { + cd "${srcdir}"/${pkgname}-${pkgver}-bin + source "${srcdir}"/${pkgname}.sh # Get the ANT_HOME env var + + ## Install profile.d script + install -d "${pkgdir}"/etc/profile.d + install -m755 "${srcdir}"/${pkgname}.{csh,sh} "${pkgdir}"/etc/profile.d/ + + ## Install the main distribution + install -d "${pkgdir}"/${ANT_HOME} + cp -Rp * "${pkgdir}"/${ANT_HOME} + + ## Fix the distribution + # Remove Windows .bat/.cmd files + rm -f "${pkgdir}"/${ANT_HOME}/bin/*.{bat,cmd} + # Fix python2 path + sed -i 's|/usr/bin/python|/usr/bin/python2|' "${pkgdir}"/${ANT_HOME}/bin/runant.py + # Symlink to external optional libraries + for jar in ${_opts[@]#*;}; do + ln -sf ${jar%::*} "${pkgdir}"/${ANT_HOME}/lib/`basename ${jar/*::}` + done + + ## Symlink the /opt distribution to the normal places + install -d "${pkgdir}"/usr/bin + install -d "${pkgdir}"/usr/share/doc/${pkgname} + install -d "${pkgdir}"/usr/share/licenses/${pkgname} + + cd "${pkgdir}"/${ANT_HOME} + for prog in bin/*; do + ln -sf ${ANT_HOME}/$prog "${pkgdir}"/usr/bin + done + ln -sf ${ANT_HOME}/{README,WHATSNEW} "${pkgdir}"/usr/share/doc/${pkgname} + ln -sf ${ANT_HOME}/docs "${pkgdir}"/usr/share/doc/${pkgname}/html + ln -sf ${ANT_HOME}/{LICENSE,NOTICE} "${pkgdir}"/usr/share/licenses/${pkgname} +} + +md5sums=('0d9e108afcd15b820150b8085c96d2b1' + 'bd63c881be406f515fc4d22635e8326a' + '298e8ba2e99ccda7706113ea37e030f2') diff --git a/libre/apache-ant-libre/apache-ant.csh b/libre/apache-ant/apache-ant.csh index b6a6d5840..490a17b65 100644 --- a/libre/apache-ant-libre/apache-ant.csh +++ b/libre/apache-ant/apache-ant.csh @@ -1,2 +1,3 @@ +#!/bin/csh setenv ANT_HOME /usr/share/java/apache-ant setenv PATH ${PATH}:${ANT_HOME}/bin diff --git a/libre/apache-ant/apache-ant.sh b/libre/apache-ant/apache-ant.sh new file mode 100644 index 000000000..6e4809da5 --- /dev/null +++ b/libre/apache-ant/apache-ant.sh @@ -0,0 +1,2 @@ +#!/bin/sh +export ANT_HOME=/opt/apache-ant |