summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedrich Oslage <bluebird@gentoo.org>2008-11-17 22:34:49 +0000
committerFriedrich Oslage <bluebird@gentoo.org>2008-11-17 22:34:49 +0000
commitb1aa6b2f5382977b2bce8084319a5dd874d4d75b (patch)
tree5e5385fe203282d0afeb7b0e29ff69e538391e7c /dev-libs/zziplib
parentFix ssp detection on uClibc hosts. (diff)
downloadgentoo-2-b1aa6b2f5382977b2bce8084319a5dd874d4d75b.tar.gz
gentoo-2-b1aa6b2f5382977b2bce8084319a5dd874d4d75b.tar.bz2
gentoo-2-b1aa6b2f5382977b2bce8084319a5dd874d4d75b.zip
Fix a bus error on sparc and add ~sparc keyword, bug #239472
(Portage version: 2.2_rc14/cvs/Linux 2.6.28-rc5-00019-ge14c8bf sparc64)
Diffstat (limited to 'dev-libs/zziplib')
-rw-r--r--dev-libs/zziplib/ChangeLog7
-rw-r--r--dev-libs/zziplib/files/zziplib-0.13.49-sparc-aligned-access.patch41
-rw-r--r--dev-libs/zziplib/zziplib-0.13.49-r1.ebuild5
3 files changed, 50 insertions, 3 deletions
diff --git a/dev-libs/zziplib/ChangeLog b/dev-libs/zziplib/ChangeLog
index 37ec926566b5..15f2e9df7de5 100644
--- a/dev-libs/zziplib/ChangeLog
+++ b/dev-libs/zziplib/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-libs/zziplib
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/zziplib/ChangeLog,v 1.50 2008/11/09 16:11:43 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/zziplib/ChangeLog,v 1.51 2008/11/17 22:34:49 bluebird Exp $
+
+ 17 Nov 2008; Friedrich Oslage <bluebird@gentoo.org>
+ +files/zziplib-0.13.49-sparc-aligned-access.patch,
+ zziplib-0.13.49-r1.ebuild:
+ Fix a bus error on sparc and add ~sparc keyword, bug #239472
09 Nov 2008; Peter Volkov <pva@gentoo.org> zziplib-0.13.49-r1.ebuild:
Dependencies required to run tests fixed, bug #246164.
diff --git a/dev-libs/zziplib/files/zziplib-0.13.49-sparc-aligned-access.patch b/dev-libs/zziplib/files/zziplib-0.13.49-sparc-aligned-access.patch
new file mode 100644
index 000000000000..5e0ac50d19f7
--- /dev/null
+++ b/dev-libs/zziplib/files/zziplib-0.13.49-sparc-aligned-access.patch
@@ -0,0 +1,41 @@
+This patch for zziplib (0.13.49) fixes a bus error on Linux/SPARC.
+
+Since SPARC machines are big endian and zip files are stored in little endian,
+zziplib needs to do byte swapping. On GNU/Linux this is usually done using
+glibc's bswap_{16,32,64} functions but in this case calling one of these
+functions triggers a bus error. This patch makes zziplib use it's own byte
+swapping functions (which do work) on Linux/SPARC instead of glibc's.
+
+To reproduce it run (in the src dir):
+ cd Linux_*_sparc64.d && ./bins/zzcat test/test/README
+or
+ make check
+
+Problem found by: Ferris McCormick <fmccor@gentoo.org>
+Patch written by: Friedrich Oslage <bluebird@gentoo.org>
+ with advice from: Mike Frysinger <vapier@gentoo.org>
+
+External references: https://bugs.gentoo.org/show_bug.cgi?id=239472
+
+--- zzip/fetch.c
++++ zzip/fetch.c
+@@ -17,7 +17,7 @@
+ #include <zzip/fetch.h>
+
+ #if defined ZZIP_WORDS_BIGENDIAN && \
+- defined bswap_16 && defined bswap_32 && defined bswap_64
++ defined bswap_16 && defined bswap_32 && defined bswap_64 && !defined(__sparc__)
+ # define __ZZIP_GET16(__p) bswap_16(*(uint16_t*)(__p))
+ # define __ZZIP_GET32(__p) bswap_32(*(uint32_t*)(__p))
+ # define __ZZIP_SET16(__p,__x) (*(uint16_t*)(__p) = bswap_16((uint16_t)(__x)))
+--- zzip/fetch.h
++++ zzip/fetch.h
+@@ -24,7 +24,7 @@ extern uint64_t __zzip_get64(zzip_byte_t * s) __zzip_attribute__((const));
+ extern void __zzip_set64(zzip_byte_t * s, uint64_t v);
+
+ #ifdef ZZIP_WORDS_BIGENDIAN
+-# if defined bswap_16 && defined bswap_32 && defined bswap_64 /* i.e. linux */
++# if defined bswap_16 && defined bswap_32 && defined bswap_64 && !defined(__sparc__) /* i.e. linux */
+ # define ZZIP_GET16(__p) bswap_16(*(uint16_t*)(__p))
+ # define ZZIP_GET32(__p) bswap_32(*(uint32_t*)(__p))
+ # define ZZIP_GET64(__p) bswap_64(*(uint64_t*)(__p))
diff --git a/dev-libs/zziplib/zziplib-0.13.49-r1.ebuild b/dev-libs/zziplib/zziplib-0.13.49-r1.ebuild
index 3a8b8784f690..be1e74b0a7b0 100644
--- a/dev-libs/zziplib/zziplib-0.13.49-r1.ebuild
+++ b/dev-libs/zziplib/zziplib-0.13.49-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/zziplib/zziplib-0.13.49-r1.ebuild,v 1.4 2008/11/09 16:11:43 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/zziplib/zziplib-0.13.49-r1.ebuild,v 1.5 2008/11/17 22:34:49 bluebird Exp $
inherit libtool fixheadtails eutils
@@ -10,7 +10,7 @@ SRC_URI="mirror://sourceforge/zziplib/${P}.tar.bz2"
LICENSE="|| ( LGPL-2.1 MPL-1.1 )"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh -sparc ~x86 ~x86-fbsd"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
IUSE="sdl test"
RDEPEND=">=dev-lang/python-2.3
@@ -26,6 +26,7 @@ src_unpack() {
epatch "${FILESDIR}"/${P}-python.patch
epatch "${FILESDIR}"/${P}-configure-sed.patch #240556
epatch "${FILESDIR}"/${P}-SDL-test.patch
+ epatch "${FILESDIR}"/${P}-sparc-aligned-access.patch #239472
sed -i '/^Libs:/s:@LDFLAGS@::' configure || die #235511
sed -i '/^zzip-postinstall:/s:^:disabled-:' Makefile.in || die
ht_fix_file configure docs/Makefile.in uses/depcomp