summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-12-31 22:40:02 +0000
committerMike Frysinger <vapier@gentoo.org>2008-12-31 22:40:02 +0000
commit4494ff5269a03e5a832c127269ab0b3ee99362e4 (patch)
tree901bc03f525e34ffa747d0d81ef49c328960d3db /dev-libs/zziplib
parent--enable-freetype became --enable-ft. Forgot to update this a while back. bug... (diff)
downloadgentoo-2-4494ff5269a03e5a832c127269ab0b3ee99362e4.tar.gz
gentoo-2-4494ff5269a03e5a832c127269ab0b3ee99362e4.tar.bz2
gentoo-2-4494ff5269a03e5a832c127269ab0b3ee99362e4.zip
Update by Friedrich Oslage to use ZZIP_HAVE_ALIGNED_ACCESS_REQUIRED.
(Portage version: 2.2_rc20/cvs/Linux 2.6.28 x86_64)
Diffstat (limited to 'dev-libs/zziplib')
-rw-r--r--dev-libs/zziplib/ChangeLog6
-rw-r--r--dev-libs/zziplib/files/zziplib-0.13.50-sparc-aligned-access.patch22
-rw-r--r--dev-libs/zziplib/zziplib-0.13.50.ebuild5
3 files changed, 14 insertions, 19 deletions
diff --git a/dev-libs/zziplib/ChangeLog b/dev-libs/zziplib/ChangeLog
index 5b1783baebd8..8705e7f4a1cd 100644
--- a/dev-libs/zziplib/ChangeLog
+++ b/dev-libs/zziplib/ChangeLog
@@ -1,6 +1,10 @@
# 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.56 2008/12/31 18:03:23 bluebird Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/zziplib/ChangeLog,v 1.57 2008/12/31 22:40:02 vapier Exp $
+
+ 31 Dec 2008; Mike Frysinger <vapier@gentoo.org>
+ files/zziplib-0.13.50-sparc-aligned-access.patch, zziplib-0.13.50.ebuild:
+ Update by Friedrich Oslage to use ZZIP_HAVE_ALIGNED_ACCESS_REQUIRED.
31 Dec 2008; Friedrich Oslage <bluebird@gentoo.org>
zziplib-0.13.49-r1.ebuild:
diff --git a/dev-libs/zziplib/files/zziplib-0.13.50-sparc-aligned-access.patch b/dev-libs/zziplib/files/zziplib-0.13.50-sparc-aligned-access.patch
index b3ffb6962c35..87ee790465a4 100644
--- a/dev-libs/zziplib/files/zziplib-0.13.50-sparc-aligned-access.patch
+++ b/dev-libs/zziplib/files/zziplib-0.13.50-sparc-aligned-access.patch
@@ -1,12 +1,13 @@
-XXX: should investigate ZZIP_HAVE_ALIGNED_ACCESS_REQUIRED
-
This patch for zziplib (0.13.50) 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.
+functions triggers a bus error. This patch completes upstreams work to
+implement ZZIP_HAVE_ALIGNED_ACCESS_REQUIRED for machines which required aligned
+access.
+After applying the patch zziplib needs to be compiled with
+-DZZIP_HAVE_ALIGNED_ACCESS_REQUIRED
To reproduce it run (in the src dir):
cd Linux_*_sparc64.d && ./bins/zzcat test/test/README
@@ -26,18 +27,7 @@ http://bugs.gentoo.org/239472
#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__)
++ defined bswap_16 && defined bswap_32 && defined bswap_64 && !defined(ZZIP_HAVE_ALIGNED_ACCESS_REQUIRED)
# 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 */
- # ifndef ZZIP_HAVE_ALIGNED_ACCESS_REQUIRED
- # define _ZZIP_USE_BSWAP
- # endif
diff --git a/dev-libs/zziplib/zziplib-0.13.50.ebuild b/dev-libs/zziplib/zziplib-0.13.50.ebuild
index 2da45d96632f..24d683f7bd6d 100644
--- a/dev-libs/zziplib/zziplib-0.13.50.ebuild
+++ b/dev-libs/zziplib/zziplib-0.13.50.ebuild
@@ -1,8 +1,8 @@
# 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.50.ebuild,v 1.1 2008/12/27 19:44:00 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/zziplib/zziplib-0.13.50.ebuild,v 1.2 2008/12/31 22:40:02 vapier Exp $
-inherit libtool fixheadtails eutils
+inherit libtool fixheadtails eutils flag-o-matic
DESCRIPTION="Lightweight library used to easily extract data from files archived in a single zip file"
HOMEPAGE="http://zziplib.sourceforge.net/"
@@ -35,6 +35,7 @@ src_unpack() {
}
src_compile() {
+ use sparc && append-flags -DZZIP_HAVE_ALIGNED_ACCESS_REQUIRED
econf $(use_enable sdl) || die
emake || die "emake failed"
}