summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Jezak <josejx@gentoo.org>2004-12-16 14:26:49 +0000
committerJoseph Jezak <josejx@gentoo.org>2004-12-16 14:26:49 +0000
commitbbb43d9da9c794366784ce0f19c72720c6f24de4 (patch)
tree962c903e6f43e0c9151b85d84e4b14e8ff10f8f7 /games-puzzle/easysok
parentNew version (Manifest recommit) (diff)
downloadgentoo-2-bbb43d9da9c794366784ce0f19c72720c6f24de4.tar.gz
gentoo-2-bbb43d9da9c794366784ce0f19c72720c6f24de4.tar.bz2
gentoo-2-bbb43d9da9c794366784ce0f19c72720c6f24de4.zip
Added image blending patch for ppc, possibly other big-endian arches. Fixes bug #72721.
Diffstat (limited to 'games-puzzle/easysok')
-rw-r--r--games-puzzle/easysok/ChangeLog7
-rw-r--r--games-puzzle/easysok/easysok-0.3.4.ebuild12
-rw-r--r--games-puzzle/easysok/files/image_effect-ppc.patch35
3 files changed, 51 insertions, 3 deletions
diff --git a/games-puzzle/easysok/ChangeLog b/games-puzzle/easysok/ChangeLog
index 6d6d66dacd4f..f28be806fd3f 100644
--- a/games-puzzle/easysok/ChangeLog
+++ b/games-puzzle/easysok/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for games-puzzle/easysok
# Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-puzzle/easysok/ChangeLog,v 1.4 2004/10/18 20:12:25 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-puzzle/easysok/ChangeLog,v 1.5 2004/12/16 14:26:49 josejx Exp $
+
+ 17 Dec 2004; Joseph Jezak <josejx@gentoo.org>
+ +files/image_effect-ppc.patch, easysok-0.3.4.ebuild:
+ Added image blending patch for ppc, possibly other big-endian arches. Fixes
+ bug #72721.
*easysok-0.3.4 (18 Oct 2004)
diff --git a/games-puzzle/easysok/easysok-0.3.4.ebuild b/games-puzzle/easysok/easysok-0.3.4.ebuild
index 9c215fa3ea94..c0ab47fc5755 100644
--- a/games-puzzle/easysok/easysok-0.3.4.ebuild
+++ b/games-puzzle/easysok/easysok-0.3.4.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-puzzle/easysok/easysok-0.3.4.ebuild,v 1.1 2004/10/18 20:12:25 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-puzzle/easysok/easysok-0.3.4.ebuild,v 1.2 2004/12/16 14:26:49 josejx Exp $
-inherit kde
+inherit kde eutils
need-kde 3
DESCRIPTION="Sokoban clone with editor, solver, and other neat goodies"
@@ -13,3 +13,11 @@ LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86 ppc amd64"
IUSE=""
+
+src_unpack () {
+ unpack ${A}
+ cd ${S}
+ if use ppc; then
+ epatch ${FILESDIR}/image_effect-ppc.patch
+ fi
+}
diff --git a/games-puzzle/easysok/files/image_effect-ppc.patch b/games-puzzle/easysok/files/image_effect-ppc.patch
new file mode 100644
index 000000000000..744d33ece96e
--- /dev/null
+++ b/games-puzzle/easysok/files/image_effect-ppc.patch
@@ -0,0 +1,35 @@
+--- src/image_effect.cpp 2004-12-12 23:33:38.452490448 +1100
++++ easysok-0.3.4-clean/src/image_effect.cpp 2003-12-31 04:42:50.000000000 +1100
+@@ -91,20 +91,20 @@
+ for (int y = 0; y < height; ++y)
+ {
+ uchar * upper_line = upper.scanLine(y + upper_y_offset) + ((width + upper_x_offset) << 2) - 1;
+- uchar * lower_line = lower.scanLine(y + y_offset) + ((width + x_offset) << 2) - 1;
++ uchar * lower_line = lower.scanLine(y + y_offset) + ((width + x_offset) << 2) - 1;
+
+ int x = width - 1;
+
+ do
+ {
+- while ( !(alpha = *upper_line) && (x > 0) )
++ while ( !(alpha = *(upper_line - 3)) && (x > 0) )
+ {
+ upper_line -= 4;
+ lower_line -= 4;
+ --x;
+ }
+
+- *lower_line = 255 - (((255 - *upper_line) * (255 - *lower_line) + 255) >> 8);
++ *lower_line += ( ((*upper_line - *lower_line) * alpha) >> 8);
+ --upper_line;
+ --lower_line;
+ *lower_line += ( ((*upper_line - *lower_line) * alpha) >> 8);
+@@ -113,7 +113,7 @@
+ *lower_line += ( ((*upper_line - *lower_line) * alpha) >> 8);
+ --upper_line;
+ --lower_line;
+- *lower_line += ( ((*upper_line - *lower_line) * alpha) >> 8);
++ *lower_line = 255 - (((255 - *upper_line) * (255 - *lower_line) + 255) >> 8);
+ --upper_line;
+ --lower_line;
+ --x;