summaryrefslogtreecommitdiff
path: root/cad/spice/patches
diff options
context:
space:
mode:
authormlelstv <mlelstv@pkgsrc.org>2006-10-09 20:04:38 +0000
committermlelstv <mlelstv@pkgsrc.org>2006-10-09 20:04:38 +0000
commitbf486336c3e1003c8e9c3b6794f787a4a008dcae (patch)
treea578d027d30eca66e9dbc0819b21c915964373ad /cad/spice/patches
parent93e0daf8378ae8a3bdc421581249211aa556167c (diff)
downloadpkgsrc-bf486336c3e1003c8e9c3b6794f787a4a008dcae.tar.gz
Make package compile with gcc-4.
Diffstat (limited to 'cad/spice/patches')
-rw-r--r--cad/spice/patches/patch-ac6
-rw-r--r--cad/spice/patches/patch-ae219
-rw-r--r--cad/spice/patches/patch-ag2
-rw-r--r--cad/spice/patches/patch-am132
4 files changed, 192 insertions, 167 deletions
diff --git a/cad/spice/patches/patch-ac b/cad/spice/patches/patch-ac
index 4e9fe1470aa..fdb65657d13 100644
--- a/cad/spice/patches/patch-ac
+++ b/cad/spice/patches/patch-ac
@@ -1,6 +1,6 @@
-$NetBSD: patch-ac,v 1.5 2006/01/06 18:21:44 joerg Exp $
+$NetBSD: patch-ac,v 1.6 2006/10/09 20:04:38 mlelstv Exp $
---- src/include/misc.h.orig 1993-04-25 21:37:48.000000000 +0000
+--- src/include/misc.h.orig 1993-04-25 23:37:48.000000000 +0200
+++ src/include/misc.h
@@ -5,6 +5,8 @@ Copyright 1990 Regents of the University
#ifndef MISC_H
@@ -68,7 +68,7 @@ $NetBSD: patch-ac,v 1.5 2006/01/06 18:21:44 joerg Exp $
#ifndef HAS_MEMAVL
# ifdef HAS_RLIMIT_
-+#if !defined(__DragonFly__)
++#if !(defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__OpenBSD__))
extern char *sbrk();
+#endif
# endif
diff --git a/cad/spice/patches/patch-ae b/cad/spice/patches/patch-ae
index fce9f3b520b..1621bb6e532 100644
--- a/cad/spice/patches/patch-ae
+++ b/cad/spice/patches/patch-ae
@@ -1,143 +1,78 @@
-$NetBSD: patch-ae,v 1.1 1999/10/01 17:05:15 dmcmahill Exp $
+$NetBSD: patch-ae,v 1.2 2006/10/09 20:04:38 mlelstv Exp $
-NOTE: This are Berkeley patches for 3F4
-*** src/lib/fte/grid.c.orig Sun Apr 25 14:53:11 1993
---- src/lib/fte/grid.c Sat Jan 29 10:47:59 1994
-***************
-*** 17,22 ****
---- 17,23 ----
- #include "suffix.h"
-
- #define RAD_TO_DEG (180.0 / M_PI)
-+ #define LABEL_CHARS 20
-
- static double *lingrid(), *loggrid();
- static void polargrid(), smithgrid();
-***************
-*** 225,231 ****
- int max;
- static double dd[2];
- int mult = 1;
-! char buf[16], *s;
- int slim, digits;
-
- if (axis == y_axis && graph->grid.ysized) {
---- 226,232 ----
- int max;
- static double dd[2];
- int mult = 1;
-! char buf[LABEL_CHARS], *s;
- int slim, digits;
-
- if (axis == y_axis && graph->grid.ysized) {
-***************
-*** 477,483 ****
- drawlingrid(graph, units, spacing, nsp, dst, lmt, hmt, onedec, mult, mag,
- digits, axis)
- GRAPH *graph;
-! char units[16];
- bool onedec;
- int nsp, spacing, mult;
- double hmt, lmt, dst;
---- 478,484 ----
- drawlingrid(graph, units, spacing, nsp, dst, lmt, hmt, onedec, mult, mag,
- digits, axis)
- GRAPH *graph;
-! char *units;
- bool onedec;
- int nsp, spacing, mult;
- double hmt, lmt, dst;
-***************
-*** 488,494 ****
-
- int i, j;
- double m, step;
-! char buf[16];
-
- /* i counts how many pixels we have drawn, and j counts which unit
- * we are at.
---- 489,495 ----
-
- int i, j;
- double m, step;
-! char buf[LABEL_CHARS];
-
- /* i counts how many pixels we have drawn, and j counts which unit
- * we are at.
-***************
-*** 567,573 ****
- double k;
- double decs;
- double mag, gain;
-! char buf[32], *s;
-
- if (axis == x_axis && graph->grid.xsized) {
- lmt = graph->grid.xaxis.log.lmt;
---- 568,574 ----
- double k;
- double decs;
- double mag, gain;
-! char buf[LABEL_CHARS], *s;
-
- if (axis == x_axis && graph->grid.xsized) {
- lmt = graph->grid.xaxis.log.lmt;
-***************
-*** 671,677 ****
- {
- int i, j, k, l, m;
- double t;
-! char buf[16];
-
- /* Now plot every pp'th decade line, with subs lines between them. */
- if (subs > 1)
---- 672,678 ----
- {
- int i, j, k, l, m;
- double t;
-! char buf[LABEL_CHARS];
-
- /* Now plot every pp'th decade line, with subs lines between them. */
- if (subs > 1)
-*** src/lib/fte/newcoms.c.orig Sun Mar 7 16:30:58 1993
---- src/lib/fte/newcoms.c Wed Feb 23 22:39:55 1994
-***************
-*** 151,156 ****
---- 151,160 ----
- /* Copy from the first */
- vname = cp_unquote(wl->wl_word);
- dv = vec_get(vname);
-+ if (!dv) {
-+ printf("'%s' reference vector not found\n", vname);
-+ return;
-+ }
- numdims = dv->v_numdims;
- dims = dv->v_dims;
- wl = wl->wl_next;
-*** src/lib/sparse/spsmp.c.orig Wed Feb 3 14:20:50 1993
---- src/lib/sparse/spsmp.c Sun Jan 30 11:53:10 1994
-***************
-*** 483,492 ****
- int CreateIfMissing;
- {
- MatrixPtr Matrix = (MatrixPtr)eMatrix;
-! ElementPtr Element = Matrix->FirstInCol[Col];
-
- /* Begin `SMPfindElt'. */
- ASSERT( IS_SPARSE( Matrix ) );
- Element = spcFindElementInCol(Matrix, &Element, Row, Col, CreateIfMissing);
- return (SMPelement *)Element;
- }
---- 485,497 ----
- int CreateIfMissing;
- {
- MatrixPtr Matrix = (MatrixPtr)eMatrix;
-! ElementPtr Element;
-
- /* Begin `SMPfindElt'. */
- ASSERT( IS_SPARSE( Matrix ) );
-+ Row = Matrix->ExtToIntRowMap[Row];
-+ Col = Matrix->ExtToIntColMap[Col];
-+ Element = Matrix->FirstInCol[Col];
- Element = spcFindElementInCol(Matrix, &Element, Row, Col, CreateIfMissing);
- return (SMPelement *)Element;
- }
+--- src/lib/fte/grid.c.orig 1993-04-25 23:53:11.000000000 +0200
++++ src/lib/fte/grid.c
+@@ -17,11 +17,14 @@ Copyright 1990 Regents of the University
+ #include "suffix.h"
+
+ #define RAD_TO_DEG (180.0 / M_PI)
++#define LABEL_CHARS 20
+
+ static double *lingrid(), *loggrid();
+ static void polargrid(), smithgrid();
+ static void drawpolargrid( );
+ static void drawsmithgrid( );
++static void drawlingrid( );
++static void drawloggrid( );
+
+ static void arcset();
+ static double cliparc();
+@@ -225,7 +228,7 @@ lingrid(graph, lo, hi, delta, type, axis
+ int max;
+ static double dd[2];
+ int mult = 1;
+- char buf[16], *s;
++ char buf[LABEL_CHARS], *s;
+ int slim, digits;
+
+ if (axis == y_axis && graph->grid.ysized) {
+@@ -473,11 +476,11 @@ lingrid(graph, lo, hi, delta, type, axis
+ return (dd);
+ }
+
+-static
++static void
+ drawlingrid(graph, units, spacing, nsp, dst, lmt, hmt, onedec, mult, mag,
+ digits, axis)
+ GRAPH *graph;
+- char units[16];
++ char *units;
+ bool onedec;
+ int nsp, spacing, mult;
+ double hmt, lmt, dst;
+@@ -488,7 +491,7 @@ drawlingrid(graph, units, spacing, nsp,
+
+ int i, j;
+ double m, step;
+- char buf[16];
++ char buf[LABEL_CHARS];
+
+ /* i counts how many pixels we have drawn, and j counts which unit
+ * we are at.
+@@ -567,7 +570,7 @@ loggrid(graph, lo, hi, type, axis)
+ double k;
+ double decs;
+ double mag, gain;
+- char buf[32], *s;
++ char buf[LABEL_CHARS], *s;
+
+ if (axis == x_axis && graph->grid.xsized) {
+ lmt = graph->grid.xaxis.log.lmt;
+@@ -661,7 +664,7 @@ loggrid(graph, lo, hi, type, axis)
+
+ }
+
+-static
++static void
+ drawloggrid(graph, units, hmt, lmt, decsp, subs, pp, axis)
+ GRAPH *graph;
+ char *units;
+@@ -671,7 +674,7 @@ drawloggrid(graph, units, hmt, lmt, decs
+ {
+ int i, j, k, l, m;
+ double t;
+- char buf[16];
++ char buf[LABEL_CHARS];
+
+ /* Now plot every pp'th decade line, with subs lines between them. */
+ if (subs > 1)
diff --git a/cad/spice/patches/patch-ag b/cad/spice/patches/patch-ag
index 24d6f3633fb..e46de6b420f 100644
--- a/cad/spice/patches/patch-ag
+++ b/cad/spice/patches/patch-ag
@@ -1,4 +1,4 @@
-$NetBSD: patch-ag,v 1.3 2002/09/23 09:28:48 jlam Exp $
+$NetBSD: patch-ag,v 1.4 2006/10/09 20:04:38 mlelstv Exp $
--- conf/defaults.orig Thu Jul 29 17:33:56 1993
+++ conf/defaults
diff --git a/cad/spice/patches/patch-am b/cad/spice/patches/patch-am
index 4b2f12f71de..08620ec0a1c 100644
--- a/cad/spice/patches/patch-am
+++ b/cad/spice/patches/patch-am
@@ -1,22 +1,112 @@
-$NetBSD: patch-am,v 1.1 1999/10/01 17:05:15 dmcmahill Exp $
+$NetBSD: patch-am,v 1.2 2006/10/09 20:04:38 mlelstv Exp $
-diff -cr spice3f4/src/lib/fte/x11.c src/lib/fte/x11.c
-*** spice3f4/src/lib/fte/x11.c Thu Jun 17 17:32:59 1993
---- src/lib/fte/x11.c Tue Nov 4 22:18:54 1997
-***************
-*** 773,784 ****
---- 773,787 ----
- graph->commandline, fx0, fx1, fy0, fy1);
- }
-
-+ /* don't use the following if using GNU Readline - AV */
-+ #ifndef HAS_GNUREADLINE
- /* hack for Gordon Jacobs */
- /* add to history list if plothistory is set */
- if (cp_getvar("plothistory", VT_BOOL, (char *) &dummy)) {
- wl = cp_parse(buf);
- (void) cp_addhistent(cp_event++, wl);
- }
-+ #endif /* HAS_GNUREADLINE */
-
- (void) cp_evloop(buf);
+--- src/lib/fte/x11.c.orig 1993-04-14 21:44:56.000000000 +0200
++++ src/lib/fte/x11.c
+@@ -12,6 +12,7 @@ Author: 1988 Jeffrey M. Hsu
+ #ifdef HAS_X11
+
+ # include <sys/time.h>
++# include <sys/select.h>
+
+ # include "util.h"
+
+@@ -62,6 +63,10 @@ typedef struct x11info {
+ #define DEVDEP(g) (*((X11devdep *) (g)->devdep))
+
+ static void linear_arc( );
++static void initlinestyles( );
++static void initcolors( );
++static void X_ScreentoData( );
++
+ static Display *display;
+ static GC xorgc;
+ static char *xlinestyles[NUMLINESTYLES] = { /* test patterns XXX */
+@@ -302,7 +307,7 @@ GRAPH *graph;
+ return (0);
+ }
+
+-static
++static void
+ initlinestyles()
+ {
+
+@@ -318,7 +323,7 @@ initlinestyles()
+ return;
+ }
+
+-static
++static void
+ initcolors(graph)
+ GRAPH *graph;
+ {
+@@ -773,12 +778,15 @@ GRAPH *graph;
+ graph->commandline, fx0, fx1, fy0, fy1);
+ }
+
++/* don't use the following if using GNU Readline - AV */
++#ifndef HAS_GNUREADLINE
+ /* hack for Gordon Jacobs */
+ /* add to history list if plothistory is set */
+ if (cp_getvar("plothistory", VT_BOOL, (char *) &dummy)) {
+ wl = cp_parse(buf);
+ (void) cp_addhistent(cp_event++, wl);
+ }
++#endif /* HAS_GNUREADLINE */
+
+ (void) cp_evloop(buf);
+
+@@ -921,7 +929,8 @@ X11_Input(request, response)
+ {
+
+ XEvent ev;
+- int nfds, readfds;
++ int nfds;
++ fd_set readfds;
+
+ switch (request->option) {
+ case char_option:
+@@ -938,14 +947,15 @@ X11_Input(request, response)
+ XtDispatchEvent(&ev);
+ }
+
+- readfds = 1 << fileno(request->fp) |
+- 1 << ConnectionNumber(display);
++ FD_ZERO(&readfds);
++ FD_SET(fileno(request->fp), &readfds);
++ FD_SET(ConnectionNumber(display), &readfds);
+
+ /* block on ConnectionNumber and request->fp */
+- select(nfds + 1, &readfds, (int *) NULL, (int *) NULL, NULL);
++ select(nfds + 1, &readfds, NULL, NULL, NULL);
+
+ /* handle X events first */
+- if (readfds & (1 << ConnectionNumber(display))) {
++ if (FD_ISSET(ConnectionNumber(display),&readfds)) {
+ /* handle ALL X events */
+ while (XtPending()) {
+ XtNextEvent(&ev);
+@@ -953,7 +963,7 @@ X11_Input(request, response)
+ }
+ }
+
+- if (readfds & (1 << fileno(request->fp))) {
++ if (FD_ISSET(fileno(request->fp), &readfds)) {
+ response->reply.ch = inchar(request->fp);
+ goto out;
+ }
+@@ -995,10 +1005,11 @@ out:
+
+ }
+
+-static X_ScreentoData(graph, x, y, fx, fy)
+-GRAPH *graph;
+-int x,y;
+-double *fx, *fy;
++static void
++X_ScreentoData(graph, x, y, fx, fy)
++ GRAPH *graph;
++ int x,y;
++ double *fx, *fy;
+ {
+ double lmin, lmax;
+