fixed metacity-2.4.3 gcc ICE patch for ppc
authorJon Nall <nall@gentoo.org>
Sun, 3 Nov 2002 23:55:53 +0000 (23:55 +0000)
committerJon Nall <nall@gentoo.org>
Sun, 3 Nov 2002 23:55:53 +0000 (23:55 +0000)
x11-wm/metacity/ChangeLog
x11-wm/metacity/files/metacity-2.4.3-ppc-gcc3.2.diff [new file with mode: 0644]
x11-wm/metacity/metacity-2.4.3.ebuild

index 537374aaa1915be10722cca3639128694cf31b43..754578864e05c14b1d5481c8fbfb4ac0c18e950a 100644 (file)
@@ -1,9 +1,12 @@
 # ChangeLog for x11-wm/metacity
 # Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-wm/metacity/ChangeLog,v 1.16 2002/11/03 14:51:57 foser Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-wm/metacity/ChangeLog,v 1.17 2002/11/03 23:55:53 nall Exp $
 
 *metacity-2.4.3 (03 Nov 2002)
 
+  03 Nov 2002; Jon Nall <nall@gentoo.org> metacity-2.4.3.ebuild :
+  Fixed gcc 3.2 patch for PPC version.
+
   03 Nov 2002; foser <foser@gentoo.org> metacity-2.4.3.ebuild :
   New version. Fixed deps, added startup-notification.
 
diff --git a/x11-wm/metacity/files/metacity-2.4.3-ppc-gcc3.2.diff b/x11-wm/metacity/files/metacity-2.4.3-ppc-gcc3.2.diff
new file mode 100644 (file)
index 0000000..cbf49e4
--- /dev/null
@@ -0,0 +1,45 @@
+--- src/screen.c.orig  2002-11-03 17:35:17.000000000 -0600
++++ src/screen.c       2002-11-03 17:36:41.000000000 -0600
+@@ -1552,10 +1552,27 @@
+   if (rows <= 0 && cols <= 0)
+     cols = num_workspaces;
+ 
+-  if (rows <= 0)
+-    rows = num_workspaces / cols + ((num_workspaces % cols) > 0 ? 1 : 0);
+-  if (cols <= 0)
+-    cols = num_workspaces / rows + ((num_workspaces % rows) > 0 ? 1 : 0);
++  if (rows <= 0) {
++    /* fix PPC compile issue
++     * ICE occurs using embedded macro in calculation, split 
++     * into if statements 
++     */
++    if ((num_workspaces % cols) > 0) { 
++      rows = num_workspaces / cols + 1;
++    } else {
++      rows  = num_workspaces / cols;
++    }
++  }
++  if (cols <= 0) {
++    /* another fix for PPC compile issue */
++    if ((num_workspaces % rows) > 0) {
++      cols = num_workspaces / rows + 1;
++    } else {
++      cols = num_workspaces / rows;
++    }
++  }
++
++
+ 
+   /* paranoia */
+   if (rows < 1)
+@@ -1563,8 +1580,8 @@
+   if (cols < 1)
+     cols = 1;
+ 
+-  *r = rows;
+-  *c = cols;
++  r[0] = rows;
++  c[0] = cols;
+ }
+ 
+ static void
index 1a6bbd17b75f426b90c7ce92f973301d4f16fa50..542642bc74501f226583fd2359ed4a24569947f4 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2002 Gentoo Technologies, Inc.
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-wm/metacity/metacity-2.4.3.ebuild,v 1.2 2002/11/03 15:00:29 foser Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-wm/metacity/metacity-2.4.3.ebuild,v 1.3 2002/11/03 23:55:53 nall Exp $
 
 inherit gnome2
 
@@ -27,10 +27,11 @@ DOCS="AUTHORS ChangeLog HACKING INSTALL NEWS README"
 src_unpack(){
        unpack ${A}
        # causes ICE on ppc w/ gcc (still)
+       cd ${S}
        use ppc && (
                [ -z "${CC}" ] && CC=gcc
                if [ "`${CC} -dumpversion | cut -d. -f1,2`" != "2.95" ] ; then
-                       patch -p0 < ${FILESDIR}/metacity-2.4.1-ppc-gcc3.2.diff || die "patch failed"
+                       patch -p0 < ${FILESDIR}/metacity-2.4.3-ppc-gcc3.2.diff || die "patch failed"
                fi
        )
 }