diff options
author | Alyx Wolcott <alyx@malkier.net> | 2019-06-03 00:12:56 +0000 |
---|---|---|
committer | Alyx Wolcott <alyx@malkier.net> | 2019-06-03 00:12:56 +0000 |
commit | 34e23698a76668af8f4895c6b0c1e2f12322051c (patch) | |
tree | 9efdc631726a2b7ae74e3234f9d3c0721f4948f3 | |
parent | 0ee2191bdaf224bcc5c9bd4cfd3e42e0fe5fed16 (diff) | |
download | packages-34e23698a76668af8f4895c6b0c1e2f12322051c.tar.gz packages-34e23698a76668af8f4895c6b0c1e2f12322051c.tar.bz2 packages-34e23698a76668af8f4895c6b0c1e2f12322051c.tar.xz packages-34e23698a76668af8f4895c6b0c1e2f12322051c.zip |
New package: ant
-rw-r--r-- | user/ant/APKBUILD | 58 | ||||
-rw-r--r-- | user/ant/ant.sh | 3 | ||||
-rw-r--r-- | user/ant/imageio_fix_java_test.patch | 26 | ||||
-rw-r--r-- | user/ant/imageio_fix_test.patch | 23 |
4 files changed, 110 insertions, 0 deletions
diff --git a/user/ant/APKBUILD b/user/ant/APKBUILD new file mode 100644 index 000000000..93fa476a5 --- /dev/null +++ b/user/ant/APKBUILD @@ -0,0 +1,58 @@ +# Contributor: Steeve Chailloux <steeve@chaahk.com> +# Contributor: Jakub Jirutka <jakub@jirutka.cz> +# Contributor: Alyx Wolcott <alyx@leuhta.com> +# Maintainer: Alyx Wolcott <alyx@leuhta.com> +pkgname=ant +pkgver=1.10.6 +pkgrel=0 +pkgdesc="Java-based build tool" +url="http://ant.apache.org/" +arch="noarch" +license="Apache-2.0" +makedepends="" +depends="openjdk8" +source="https://www-eu.apache.org/dist/ant/source/apache-$pkgname-$pkgver-src.tar.gz + ant.sh + imageio_fix_java_test.patch + imageio_fix_test.patch" +builddir="$srcdir/apache-$pkgname-$pkgver" + +_anthome="/usr/share/java/$pkgname" + +build() { + sh ./bootstrap.sh + ./bootstrap/bin/ant dist-lite +} + +check() { + ./bootstrap/bin/ant test +} + +package() { + local destdir="$pkgdir/$_anthome" + + install -dm755 "$destdir"/bin + rm dist/bin/*.bat dist/bin/*.cmd + install -m755 dist/bin/* "$destdir"/bin + + install -dm755 "$pkgdir"/usr/bin + ln -sf $_anthome/bin/ant "$pkgdir"/usr/bin/ant + + install -dm755 "$destdir"/lib + install -m644 dist/lib/*.jar "$destdir"/lib + + # symlink to junit so it's on the javac build path for ant + # matches behavior on ubuntu 9 and makes sense for compatibility + ln -sf ../../junit.jar "$destdir"/lib/junit.jar + + # The license says the NOTICE file should be redistributed for + # derivative works, so lets supply it. + install -m644 -D NOTICE "$pkgdir"/usr/share/licenses/$pkgname/NOTICE + + install -m644 -D $srcdir/$pkgname.sh "$pkgdir"/etc/profile.d/$pkgname.sh +} + +sha512sums="2bef0cf5f53ce9fa6e9dc7a673745f75bcd0df027f9ff07442cf66bc8d7d99e022153b08d20d314061b497763e85d587c3087952b3f5730e5a19b2656f3236fb apache-ant-1.10.6-src.tar.gz +955fe52b415d57716df1338eff6d667d80e06a67bffd53def7d63d96f1224157b724a92df647afe8b3243dea749e221aec1e86d5be01060408fa000ec1132374 ant.sh +9a698041a06ccc6db7765133fc6fabc6f2d0e70b96ff9de594bd836fc05ac33f489968a4fdd12fe044458eb3b99e905ca1e2a62a55acdbacebff9782c82a27de imageio_fix_java_test.patch +1457c7415df1e80c8763b4db9f41cbdebfa58e17bcd263dae9ce31f9ee601650b51a893e4e0a324c974b60a6c2076fddfd78180baca0bcdbff65e9e88b30e063 imageio_fix_test.patch" diff --git a/user/ant/ant.sh b/user/ant/ant.sh new file mode 100644 index 000000000..bab7b972d --- /dev/null +++ b/user/ant/ant.sh @@ -0,0 +1,3 @@ +#!/bin/sh +ANT_HOME="/usr/share/java/ant" +export ANT_HOME diff --git a/user/ant/imageio_fix_java_test.patch b/user/ant/imageio_fix_java_test.patch new file mode 100644 index 000000000..4fa856e73 --- /dev/null +++ b/user/ant/imageio_fix_java_test.patch @@ -0,0 +1,26 @@ +diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/image/ImageIOTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/image/ImageIOTest.java +index c96691d..e8cfd29 100644 +--- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/image/ImageIOTest.java ++++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/image/ImageIOTest.java +@@ -86,21 +86,6 @@ public class ImageIOTest { + assertTrue("File was not overwritten.", lastModified < overwrittenLastModified); + } + +- @Test +- public void testDrawOverwriteTrue() { +- buildRule.executeTarget("testSimpleScale"); +- assertThat(buildRule.getLog(), containsString("Processing File")); +- File f = new File(buildRule.getOutputDir(), LARGEIMAGE); +- assumeTrue("Could not change file modification date", +- f.setLastModified(f.lastModified() - FILE_UTILS.getFileTimestampGranularity() * 2)); +- long lastModified = f.lastModified(); +- buildRule.executeTarget("testDrawOverwriteTrue"); +- assertThat(buildRule.getLog(), containsString("Processing File")); +- f = new File(buildRule.getOutputDir(), LARGEIMAGE); +- long overwrittenLastModified = f.lastModified(); +- assertTrue("File was not overwritten.", lastModified < overwrittenLastModified); +- } +- + @Test + public void testOverwriteFalse() { + buildRule.executeTarget("testSimpleScale"); diff --git a/user/ant/imageio_fix_test.patch b/user/ant/imageio_fix_test.patch new file mode 100644 index 000000000..ad3cc3e67 --- /dev/null +++ b/user/ant/imageio_fix_test.patch @@ -0,0 +1,23 @@ +diff --git a/src/etc/testcases/taskdefs/optional/image/imageio.xml b/src/etc/testcases/taskdefs/optional/image/imageio.xml +index a7d6a23..0f0318b 100644 +--- a/src/etc/testcases/taskdefs/optional/image/imageio.xml ++++ b/src/etc/testcases/taskdefs/optional/image/imageio.xml +@@ -59,18 +59,6 @@ + </imageio> + </target> + +- <!-- this should produce a single file in the dest dir, overwriting any existing file --> +- <target name="testDrawOverwriteTrue" depends="setUp"> +- <imageio includes="*.jpg" srcdir="${src.dir}" destdir="${output}" +- overwrite="yes" failonerror="no"> +- <scale width="300" proportions="width"/> +- <draw xloc="10" yloc="10"> +- <rectangle height="50" width="50" strokewidth="2"/> +- <text string="Test"/> +- </draw> +- </imageio> +- </target> +- + <!-- this should not overwrite the existing file --> + <target name="testOverwriteFalse" depends="setUp"> + <imageio includes="*.jpg" srcdir="${src.dir}" destdir="${output}" |