Added image blending patch for ppc, possibly other big-endian arches. Fixes bug ...
authorJoseph Jezak <josejx@gentoo.org>
Thu, 16 Dec 2004 14:26:49 +0000 (14:26 +0000)
committerJoseph Jezak <josejx@gentoo.org>
Thu, 16 Dec 2004 14:26:49 +0000 (14:26 +0000)
games-puzzle/easysok/ChangeLog
games-puzzle/easysok/Manifest
games-puzzle/easysok/easysok-0.3.4.ebuild
games-puzzle/easysok/files/image_effect-ppc.patch [new file with mode: 0644]

index 6d6d66dacd4fc6d65c78b1be360719bc2e1fef0b..f28be806fd3ff2a6a82404b1a50be00001669f2d 100644 (file)
@@ -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)
 
index 597ff0ee272c4d2603fd3d1a8bba7c0e3082082a..d1f26fe652a7d09824e2cf1b629e46ded5117abc 100644 (file)
@@ -1,6 +1,7 @@
-MD5 bdc5e31ac099b18dd22ea2a7880f30ad easysok-0.3.3.ebuild 474
+MD5 194c3c1b8629d1030235fe21c848b0d8 ChangeLog 822
 MD5 f17b9b8fa07a38914fe1c03268f51678 metadata.xml 158
-MD5 b307eedecd708efc49224a37dc0fb8ef ChangeLog 629
-MD5 b7620d2379f9154a468bdd1b51e1ef6c easysok-0.3.4.ebuild 477
+MD5 f45f4551c7238d16b3a74c8f0351cda5 easysok-0.3.4.ebuild 588
+MD5 bdc5e31ac099b18dd22ea2a7880f30ad easysok-0.3.3.ebuild 474
+MD5 f16cee6ce52d2fff612d8b436349947b files/image_effect-ppc.patch 1453
 MD5 aca5d2d10914c829b8f94ba929f2e97f files/digest-easysok-0.3.3 66
 MD5 c3ae7e22e3f84384cbcba9b8f16d4595 files/digest-easysok-0.3.4 66
index 9c215fa3ea941894b5ccb14021edc1e23d4449d4..c0ab47fc5755de65872287112b24b3f9f8a82f15 100644 (file)
@@ -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 (file)
index 0000000..744d33e
--- /dev/null
@@ -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;