aboutsummaryrefslogtreecommitdiffstats
path: root/main/fastjar
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-01-03 23:05:07 +0200
committerTimo Teräs <timo.teras@iki.fi>2014-01-03 23:06:19 +0200
commit73cbccee55adadf6260a3a71484d518984035b1f (patch)
treeeef22773ff0684d546aed970ec7b9ec3f3eb49c0 /main/fastjar
parent0ba7d2a347fdad136d046b1057958050a91075e2 (diff)
downloadaports-73cbccee55adadf6260a3a71484d518984035b1f.tar.bz2
aports-73cbccee55adadf6260a3a71484d518984035b1f.tar.xz
main/fastjar: fix gcc-java bootstrap
cherry-pick upstream commits, most importantly the one from: http://lists.gnu.org/archive/html/fastjar-dev/2010-03/msg00000.html
Diffstat (limited to 'main/fastjar')
-rw-r--r--main/fastjar/0001-Properly-zero-terminate-filename.patch16
-rw-r--r--main/fastjar/0002-Fix-write-return-value-check.patch17
-rw-r--r--main/fastjar/APKBUILD17
3 files changed, 47 insertions, 3 deletions
diff --git a/main/fastjar/0001-Properly-zero-terminate-filename.patch b/main/fastjar/0001-Properly-zero-terminate-filename.patch
new file mode 100644
index 0000000000..ed510b09df
--- /dev/null
+++ b/main/fastjar/0001-Properly-zero-terminate-filename.patch
@@ -0,0 +1,16 @@
+http://cvs.savannah.gnu.org/viewvc/fastjar/jartool.c?root=fastjar&r1=1.59&r2=1.60&view=patch
+
+2010-03-01 Richard Guenther <rguenther@suse.de>
+
+ * jartool.c (read_entries): Properly zero-terminate filename.
+
+--- a/jartool.c 2009/09/06 22:16:00 1.59
++++ b/jartool.c 2010/03/01 15:38:43 1.60
+@@ -790,6 +790,7 @@
+ progname, jarfile);
+ return 1;
+ }
++ ze->filename[len] = '\0';
+ len = UNPACK_UB4(header, CEN_EFLEN);
+ len += UNPACK_UB4(header, CEN_COMLEN);
+ if (lseek (fd, len, SEEK_CUR) == -1)
diff --git a/main/fastjar/0002-Fix-write-return-value-check.patch b/main/fastjar/0002-Fix-write-return-value-check.patch
new file mode 100644
index 0000000000..e13f63ecca
--- /dev/null
+++ b/main/fastjar/0002-Fix-write-return-value-check.patch
@@ -0,0 +1,17 @@
+http://cvs.savannah.gnu.org/viewvc/fastjar/jartool.c?root=fastjar&r1=1.60&r2=1.61&view=patch
+
+2010-06-10 Chris Ball <cjb@laptop.org>
+
+ * jartool.c (add_file_to_jar): Fix write return value check.
+
+--- a/jartool.c 2010/03/01 15:38:43 1.60
++++ b/jartool.c 2010/06/10 08:46:10 1.61
+@@ -1258,7 +1258,7 @@
+ exit_on_error("write");
+
+ /* write the file name to the zip file */
+- if (1 == write(jfd, fname, file_name_length))
++ if (-1 == write(jfd, fname, file_name_length))
+ exit_on_error("write");
+
+ if(verbose){
diff --git a/main/fastjar/APKBUILD b/main/fastjar/APKBUILD
index 83e89996e0..6faf5840a1 100644
--- a/main/fastjar/APKBUILD
+++ b/main/fastjar/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Timo Teras <timo.teras@iki.fi>
pkgname=fastjar
pkgver=0.98
-pkgrel=1
+pkgrel=2
pkgdesc="A fast implementation of Java Archiver"
url="http://savannah.nongnu.org/projects/fastjar"
arch="all"
@@ -11,7 +11,10 @@ depends=
makedepends="zlib-dev"
install=""
subpackages="$pkgname-doc"
-source="http://download.savannah.gnu.org/releases/$pkgname/$pkgname-$pkgver.tar.gz"
+source="http://download.savannah.gnu.org/releases/$pkgname/$pkgname-$pkgver.tar.gz
+ 0001-Properly-zero-terminate-filename.patch
+ 0002-Fix-write-return-value-check.patch
+ "
_builddir=$srcdir/$pkgname-$pkgver
prepare() {
@@ -47,4 +50,12 @@ package() {
return 0
}
-md5sums="d2d264d343d4d0e1575832cc1023c3bf fastjar-0.98.tar.gz"
+md5sums="d2d264d343d4d0e1575832cc1023c3bf fastjar-0.98.tar.gz
+1bc25be94be0704601ccdabdea055cb0 0001-Properly-zero-terminate-filename.patch
+d7e249b113f335a24660f317cbb69e34 0002-Fix-write-return-value-check.patch"
+sha256sums="f156abc5de8658f22ee8f08d7a72c88f9409ebd8c7933e9466b0842afeb2f145 fastjar-0.98.tar.gz
+93aa186b95f686e8bc383fea7e875aa2f71aeeda9fb4d74720c926c40b31658d 0001-Properly-zero-terminate-filename.patch
+9bbd0b5e3e2d41a87c454a29b3386e6e7aa7e56117f58e9a467fb9aff23b3aec 0002-Fix-write-return-value-check.patch"
+sha512sums="c0f9fca7b58d6acd00b90a5184dbde9ba3ffc5bf4d69512743e450649a272baf1f6af98b15d79d2b53990eaf84ef402c986035e6b615a19e35ed424348143903 fastjar-0.98.tar.gz
+0aa74753c008e20f009dc5f84fc9219668c1365b2c53012e32ed1b8cc216c4833d8d1af80af8eb9e138b0c7f4fcda207448ff57941184dbfe71f7d4cd08392ea 0001-Properly-zero-terminate-filename.patch
+f4ae60d70f2c547bebd6c3fc1baaa0e959de54c36a667b2c0d9526e87e5604fbef29b4ab20a4140306157b98528a16744a8b7dfb14ff4781fb2fe196b00665d8 0002-Fix-write-return-value-check.patch"