summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Martin <gmsoft@gentoo.org>2010-08-23 09:55:19 +0000
committerGuy Martin <gmsoft@gentoo.org>2010-08-23 09:55:19 +0000
commit06d35fa0479d2f09d0edd485b0f309ed4f5c32b5 (patch)
treea988a50c5e540983e32fd34530c361f8b7b4304f /app-arch/unace
parentAdd fix from upstream for issues with non-english uncompressed man pages #327... (diff)
downloadgentoo-2-06d35fa0479d2f09d0edd485b0f309ed4f5c32b5.tar.gz
gentoo-2-06d35fa0479d2f09d0edd485b0f309ed4f5c32b5.tar.bz2
gentoo-2-06d35fa0479d2f09d0edd485b0f309ed4f5c32b5.zip
Fix endianess detection, bug #222301.
(Portage version: 2.1.8.3/cvs/Linux parisc64)
Diffstat (limited to 'app-arch/unace')
-rw-r--r--app-arch/unace/ChangeLog8
-rw-r--r--app-arch/unace/files/unace-2.5-endianness-detection.patch26
-rw-r--r--app-arch/unace/unace-2.5-r2.ebuild35
3 files changed, 68 insertions, 1 deletions
diff --git a/app-arch/unace/ChangeLog b/app-arch/unace/ChangeLog
index e22692c8d402..a250711e002a 100644
--- a/app-arch/unace/ChangeLog
+++ b/app-arch/unace/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-arch/unace
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-arch/unace/ChangeLog,v 1.35 2010/01/01 19:40:07 fauli Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-arch/unace/ChangeLog,v 1.36 2010/08/23 09:55:19 gmsoft Exp $
+
+*unace-2.5-r2 (23 Aug 2010)
+
+ 23 Aug 2010; Guy Martin <gmsoft@gentoo.org> +unace-2.5-r2.ebuild,
+ +files/unace-2.5-endianness-detection.patch:
+ Fix endianess detection, bug #222301.
01 Jan 2010; Christian Faulhammer <fauli@gentoo.org> unace-2.5-r1.ebuild:
Transfer Prefix keywords
diff --git a/app-arch/unace/files/unace-2.5-endianness-detection.patch b/app-arch/unace/files/unace-2.5-endianness-detection.patch
new file mode 100644
index 000000000000..3a574a6b90ba
--- /dev/null
+++ b/app-arch/unace/files/unace-2.5-endianness-detection.patch
@@ -0,0 +1,26 @@
+diff -uNr unace-2.5.orig/source/base/all/all.h unace-2.5/source/base/all/all.h
+--- unace-2.5.orig/source/base/all/all.h 2010-08-03 14:22:49.809269706 +0000
++++ unace-2.5/source/base/all/all.h 2010-08-03 14:29:10.189469638 +0000
+@@ -61,7 +61,7 @@
+ #define put_unaligned(ptr, val) ((void)( *(ptr) = (val) ))
+ #endif /* __EMULATE_UNALIGNED__ */
+
+-#ifdef __BIG_ENDIAN__
++#if __BYTE_ORDER == __BIG_ENDIAN
+ #define ADJUST_ENDIANNESS16(Ptr) {\
+ USHORT x = get_unaligned((USHORT*) (Ptr));\
+ put_unaligned((USHORT*) (Ptr), x >> 8 | x << 8);\
+@@ -78,10 +78,12 @@
+ x2 = x2 >> 16 | x2 << 16;\
+ put_unaligned(((ULONG*) (Ptr)), (x2&0xff00ff00) >> 8 | (x2&0x00ff00ff) << 8);\
+ }
+-#else
++#elif __BYTE_ORDER == __LITTLE_ENDIAN
+ #define ADJUST_ENDIANNESS16(Ptr)
+ #define ADJUST_ENDIANNESS32(Ptr)
+ #define ADJUST_ENDIANNESS64(Ptr)
++#else
++#error Please define system endianness
+ #endif
+
+ #endif
diff --git a/app-arch/unace/unace-2.5-r2.ebuild b/app-arch/unace/unace-2.5-r2.ebuild
new file mode 100644
index 000000000000..9644aafe25e3
--- /dev/null
+++ b/app-arch/unace/unace-2.5-r2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-arch/unace/unace-2.5-r2.ebuild,v 1.1 2010/08/23 09:55:19 gmsoft Exp $
+
+inherit eutils toolchain-funcs
+
+DEB_VER="5"
+DESCRIPTION="ACE unarchiver"
+HOMEPAGE="http://www.winace.com/"
+SRC_URI="mirror://debian/pool/non-free/u/unace-nonfree/unace-nonfree_${PV}.orig.tar.gz
+ mirror://debian/pool/non-free/u/unace-nonfree/unace-nonfree_${PV}-${DEB_VER}.diff.gz"
+
+LICENSE="freedist"
+SLOT="1"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~sparc-solaris"
+IUSE=""
+
+DEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${WORKDIR}"/unace-nonfree_${PV}-${DEB_VER}.diff
+ local p
+ for p in $(<unace-nonfree-${PV}/debian/patches/00list) ; do
+ epatch unace-nonfree-${PV}/debian/patches/${p}.dpatch
+ done
+ epatch "${FILESDIR}"/${P}-endianness-detection.patch
+ tc-export CC
+}
+
+src_install() {
+ dobin unace || die
+ doman unace-nonfree-${PV}/debian/manpage/unace.1
+}