gcc-3.2 related fix
authorGeorge Shapovalov <george@gentoo.org>
Tue, 15 Oct 2002 03:45:07 +0000 (03:45 +0000)
committerGeorge Shapovalov <george@gentoo.org>
Tue, 15 Oct 2002 03:45:07 +0000 (03:45 +0000)
app-sci/xcircuit/ChangeLog
app-sci/xcircuit/files/xcircuit-2.5.4-XQueryColor.patch [new file with mode: 0644]
app-sci/xcircuit/files/xcircuit-2.5.4-sigsegv.patch [new file with mode: 0644]
app-sci/xcircuit/xcircuit-2.5.4.ebuild

index e7fd416a270accf15ba255f74c5396d58427cd99..fb4a83b104b8f9538a83dae84c2a71ca41331488 100644 (file)
@@ -1,9 +1,14 @@
 # ChangeLog for <CATEGORY>/<PACKAGE_NAME>
 # Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL
-# $Header: /var/cvsroot/gentoo-x86/app-sci/xcircuit/ChangeLog,v 1.3 2002/08/16 19:25:30 george Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-sci/xcircuit/ChangeLog,v 1.4 2002/10/15 03:45:07 george Exp $
 
 *xcircuit-2.5.4 (5 Apr 2003)
 
+  14 Oct 2002; George Shapovalov <george@gentoo.org> xcircuit-2.5.4.ebuild, files/xcircuit-2.5.4-*.patch :
+
+  Thanks to Jonathan Nall <nall@themountaingoats.net> for tracing few gcc related problems. 
+  One patch is conditional on gcc-3.2 presence. See #8957 and #8960 for details.
+
   16 Aug 2002; George Shapovalov <george@gentoo.org> xcircuit-2.5.4.ebuild :
 
   due to report by Marius Bernklev <mariube@sex.ifi.uio.no> added code 
diff --git a/app-sci/xcircuit/files/xcircuit-2.5.4-XQueryColor.patch b/app-sci/xcircuit/files/xcircuit-2.5.4-XQueryColor.patch
new file mode 100644 (file)
index 0000000..001c506
--- /dev/null
@@ -0,0 +1,10 @@
+--- xcircuit.c.orig    2002-03-20 14:00:50.000000000 -0800
++++ xcircuit.c 2002-10-11 12:24:24.000000000 -0700
+@@ -1845,6 +1845,7 @@
+    XQueryColor(dpy, cmap, &loccolor);
+ 
+    locidx = rgb_alloccolor(loccolor.red, loccolor.green, loccolor.blue);
++   return locidx;
+ }
+ 
+ /*-------------------------------------------------------------------------*/
diff --git a/app-sci/xcircuit/files/xcircuit-2.5.4-sigsegv.patch b/app-sci/xcircuit/files/xcircuit-2.5.4-sigsegv.patch
new file mode 100644 (file)
index 0000000..1719313
--- /dev/null
@@ -0,0 +1,11 @@
+--- files.c.orig       2002-03-26 13:12:18.000000000 -0800
++++ files.c    2002-10-11 12:23:38.000000000 -0700
+@@ -1970,6 +1970,8 @@
+    int curcolor = ccolor;
+    int i, j, k;
+    objinstptr *newinst;
++   objinstptr  tmpobjinstptr;
++   newinst = &tmpobjinstptr;
+ 
+    /* path-handling variables */
+    pathptr *newpath;
index 7858da87487f29a4b46a7191b2025871898e26f1..e24ad322cefde0cf4a2943e75d6cca16985ce1ee 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/app-sci/xcircuit/xcircuit-2.5.4.ebuild,v 1.5 2002/10/04 05:01:37 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-sci/xcircuit/xcircuit-2.5.4.ebuild,v 1.6 2002/10/15 03:45:07 george Exp $
 
 inherit flag-o-matic
 
@@ -10,7 +10,7 @@ DESCRIPTION="Circuit drawing and schematic capture program."
 SRC_URI="http://bach.ece.jhu.edu/~tim/programs/xcircuit/archive/${P}.tar.bz2"
 HOMEPAGE="http://bach.ece.jhu.edu/~tim/programs/xcircuit/xcircuit.html"
 
-KEYWORDS="x86"
+KEYWORDS="~x86"
 SLOT="0"
 LICENSE="GPL-2"
 
@@ -22,6 +22,20 @@ RDEPEND="${DEPEND}"
 #looks like -O3 causes problems at times
 replace-flags -O3 -O2
 
+src_unpack() {
+
+       unpack ${A}
+       cd ${S}
+       patch xcircuit.c < ${FILESDIR}/${PN}-${PV}-XQueryColor.patch || die "patch failed"
+
+       #only apply this patch if under gcc-3.2
+       if [ "`gcc -dumpversion | cut -d. -f1,2`" == "3.2" ]; then 
+               patch files.c <${FILESDIR}/${PN}-${PV}-sigsegv.patch || die "patch failed"
+       fi
+
+}
+
+
 src_compile() {
        
        ./configure \