summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-09-20 02:03:38 +0000
committerMike Frysinger <vapier@gentoo.org>2010-09-20 02:03:38 +0000
commita66d3ef41309671d994612b48620e60adca318ba (patch)
tree0bef682e8510c7d53dc028b3468e9602394dc2ab /sys-fs/squashfs-tools
parentAdded ~arm keyword (diff)
downloadgentoo-2-a66d3ef41309671d994612b48620e60adca318ba.tar.gz
gentoo-2-a66d3ef41309671d994612b48620e60adca318ba.tar.bz2
gentoo-2-a66d3ef41309671d994612b48620e60adca318ba.zip
Add fixes from upstream #292011 by Nicolas Dufresne.
(Portage version: 2.2_rc83/cvs/Linux x86_64)
Diffstat (limited to 'sys-fs/squashfs-tools')
-rw-r--r--sys-fs/squashfs-tools/ChangeLog11
-rw-r--r--sys-fs/squashfs-tools/files/squashfs-tools-4.0-progress-bar.patch36
-rw-r--r--sys-fs/squashfs-tools/files/squashfs-tools-4.0-read-ret.patch23
-rw-r--r--sys-fs/squashfs-tools/squashfs-tools-4.0-r1.ebuild45
4 files changed, 113 insertions, 2 deletions
diff --git a/sys-fs/squashfs-tools/ChangeLog b/sys-fs/squashfs-tools/ChangeLog
index c1e1f4130789..b05a977da65b 100644
--- a/sys-fs/squashfs-tools/ChangeLog
+++ b/sys-fs/squashfs-tools/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-fs/squashfs-tools
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/squashfs-tools/ChangeLog,v 1.68 2009/12/07 23:01:46 vapier Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/squashfs-tools/ChangeLog,v 1.69 2010/09/20 02:03:38 vapier Exp $
+
+*squashfs-tools-4.0-r1 (20 Sep 2010)
+
+ 20 Sep 2010; Mike Frysinger <vapier@gentoo.org>
+ +squashfs-tools-4.0-r1.ebuild, +files/squashfs-tools-4.0-progress-bar.patch,
+ +files/squashfs-tools-4.0-read-ret.patch:
+ Add fixes from upstream #292011 by Nicolas Dufresne.
07 Dec 2009; Mike Frysinger <vapier@gentoo.org> squashfs-tools-4.0.ebuild:
Fix building on non-glibc systems #276951 by Ed Wildgoose.
diff --git a/sys-fs/squashfs-tools/files/squashfs-tools-4.0-progress-bar.patch b/sys-fs/squashfs-tools/files/squashfs-tools-4.0-progress-bar.patch
new file mode 100644
index 000000000000..4efb8ff90a25
--- /dev/null
+++ b/sys-fs/squashfs-tools/files/squashfs-tools-4.0-progress-bar.patch
@@ -0,0 +1,36 @@
+http://bugs.gentoo.org/292011
+
+revision 1.121
+date: 2010/03/08 01:30:17; author: plougher; state: Exp; lines: +10 -5
+Fix floating point error in progress_bar when max == 0
+
+Index: unsquashfs.c
+===================================================================
+RCS file: /cvsroot/squashfs/squashfs/squashfs-tools/unsquashfs.c,v
+retrieving revision 1.120
+retrieving revision 1.121
+diff -u -p -r1.120 -r1.121
+--- squashfs-tools/unsquashfs.c 7 Mar 2010 03:16:46 -0000 1.120
++++ squashfs-tools/unsquashfs.c 8 Mar 2010 01:30:17 -0000 1.121
+@@ -1871,12 +1871,17 @@ void update_progress_bar()
+ void progress_bar(long long current, long long max, int columns)
+ {
+ char rotate_list[] = { '|', '/', '-', '\\' };
+- int max_digits = floor(log10(max)) + 1;
+- int used = max_digits * 2 + 11;
+- int hashes = (current * (columns - used)) / max;
+- int spaces = columns - used - hashes;
++ int max_digits, used, hashes, spaces;
+ static int tty = -1;
+
++ if(max == 0)
++ return;
++
++ max_digits = floor(log10(max)) + 1;
++ used = max_digits * 2 + 11;
++ hashes = (current * (columns - used)) / max;
++ spaces = columns - used - hashes;
++
+ if((current > max) || (columns - used < 0))
+ return;
+
diff --git a/sys-fs/squashfs-tools/files/squashfs-tools-4.0-read-ret.patch b/sys-fs/squashfs-tools/files/squashfs-tools-4.0-read-ret.patch
new file mode 100644
index 000000000000..f57d49c0eed5
--- /dev/null
+++ b/sys-fs/squashfs-tools/files/squashfs-tools-4.0-read-ret.patch
@@ -0,0 +1,23 @@
+http://bugs.gentoo.org/292011
+
+revision 1.21
+date: 2009/04/21 00:59:16; author: plougher; state: Exp; lines: +1 -1
+Fix return in read_fragment_table_4
+
+Index: squashfs-tools/unsquash-4.c
+===================================================================
+RCS file: /cvsroot/squashfs/squashfs/squashfs-tools/unsquash-4.c,v
+retrieving revision 1.20
+retrieving revision 1.21
+diff -u -p -r1.20 -r1.21
+--- squashfs-tools/unsquash-4.c 31 Mar 2009 04:38:53 -0000 1.20
++++ squashfs-tools/unsquash-4.c 21 Apr 2009 00:59:16 -0000 1.21
+@@ -38,7 +38,7 @@ int read_fragment_table_4()
+ sBlk.fragment_table_start);
+
+ if(sBlk.fragments == 0)
+- return;
++ return TRUE;
+
+ if((fragment_table = malloc(sBlk.fragments *
+ sizeof(squashfs_fragment_entry))) == NULL)
diff --git a/sys-fs/squashfs-tools/squashfs-tools-4.0-r1.ebuild b/sys-fs/squashfs-tools/squashfs-tools-4.0-r1.ebuild
new file mode 100644
index 000000000000..c6e60fda7dbb
--- /dev/null
+++ b/sys-fs/squashfs-tools/squashfs-tools-4.0-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/squashfs-tools/squashfs-tools-4.0-r1.ebuild,v 1.1 2010/09/20 02:03:38 vapier Exp $
+
+inherit toolchain-funcs eutils
+
+MY_PV=${PV}
+DESCRIPTION="Tool for creating compressed filesystem type squashfs"
+HOMEPAGE="http://squashfs.sourceforge.net/"
+SRC_URI="mirror://sourceforge/squashfs/squashfs${MY_PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE=""
+
+RDEPEND="sys-libs/zlib"
+
+S=${WORKDIR}/squashfs${MY_PV}/squashfs-tools
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ sed -i \
+ -e 's:-O2:$(CFLAGS):' \
+ -e '/-lz/s:$: $(LDFLAGS):' \
+ Makefile || die "sed failed"
+ sed -i -e 's:get_nprocs():sysconf(_SC_NPROCESSORS_ONLN):' *.c
+ epatch "${FILESDIR}"/${P}-read-ret.patch #292011
+ epatch "${FILESDIR}"/${P}-progress-bar.patch #292011
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" || die
+}
+
+src_install() {
+ dobin mksquashfs unsquashfs || die
+ cd ..
+ dodoc README ACKNOWLEDGEMENTS CHANGES PERFORMANCE.README
+}
+
+pkg_postinst() {
+ ewarn "This version of mksquashfs requires a 2.6.29 kernel or better"
+}