From bf486336c3e1003c8e9c3b6794f787a4a008dcae Mon Sep 17 00:00:00 2001 From: mlelstv Date: Mon, 9 Oct 2006 20:04:38 +0000 Subject: Make package compile with gcc-4. --- cad/spice/Makefile | 4 +- cad/spice/PLIST | 2 +- cad/spice/distinfo | 10 ++- cad/spice/patches/patch-ac | 6 +- cad/spice/patches/patch-ae | 219 ++++++++++++++++----------------------------- cad/spice/patches/patch-ag | 2 +- cad/spice/patches/patch-am | 132 ++++++++++++++++++++++----- 7 files changed, 201 insertions(+), 174 deletions(-) (limited to 'cad/spice') diff --git a/cad/spice/Makefile b/cad/spice/Makefile index f2bed6f9482..cf20efa1258 100644 --- a/cad/spice/Makefile +++ b/cad/spice/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.34 2006/04/06 06:21:38 reed Exp $ +# $NetBSD: Makefile,v 1.35 2006/10/09 20:04:38 mlelstv Exp $ DISTNAME= sp3f4.kit PKGNAME= spice-3f5.1 -PKGREVISION= 3 +PKGREVISION= 4 CATEGORIES= cad MASTER_SITES= ftp://ic.eecs.berkeley.edu/pub/Spice3/ EXTRACT_SUFX= .tar.Z diff --git a/cad/spice/PLIST b/cad/spice/PLIST index ccc5387f4db..75b27eb374e 100644 --- a/cad/spice/PLIST +++ b/cad/spice/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.2 2002/02/27 17:14:28 jlam Exp $ +@comment $NetBSD: PLIST,v 1.3 2006/10/09 20:04:38 mlelstv Exp $ bin/help bin/multidec bin/nutmeg diff --git a/cad/spice/distinfo b/cad/spice/distinfo index fbc51895a98..9fb78a45343 100644 --- a/cad/spice/distinfo +++ b/cad/spice/distinfo @@ -1,13 +1,13 @@ -$NetBSD: distinfo,v 1.8 2006/01/10 10:59:05 joerg Exp $ +$NetBSD: distinfo,v 1.9 2006/10/09 20:04:38 mlelstv Exp $ SHA1 (sp3f4.kit.tar.Z) = bded1e078d0acfef090117490a7ac8a57887f39e RMD160 (sp3f4.kit.tar.Z) = 0bd293298c41791a9a452648f5c6a936175e220c Size (sp3f4.kit.tar.Z) = 2086528 bytes SHA1 (patch-aa) = 35d8d9ecfb2beaa54e0763197b551d5e26fc7f4e SHA1 (patch-ab) = aa036badf15b69f199861b1f1d0d10f85471f496 -SHA1 (patch-ac) = 5939be87e7ffeea545360b6ff02dfdc9181746eb +SHA1 (patch-ac) = 6b0a62e2f153401cd4dd806d08e5df24a9a7d488 SHA1 (patch-ad) = a1a1a8dbbe7eebb9c224e42a34013ba7918cdad4 -SHA1 (patch-ae) = cad6420b959acadedeeaaa17e4d8ff06511cda10 +SHA1 (patch-ae) = 858e35606ff1eb622bac3bb1cc90f7ec50064b6d SHA1 (patch-af) = 23d047049d5f183af12e14b56c535adf95b9f208 SHA1 (patch-ag) = d03a660e2e1f96eb4b5edb71c32fb0b44cc7921e SHA1 (patch-ah) = 2c1f4f135cbba8e7159be4ae811e54e5464cbdda @@ -15,7 +15,7 @@ SHA1 (patch-ai) = 7e94175896b98f17f43338a05ed993657d4cc844 SHA1 (patch-aj) = 6229e4066ab8bfba8b29bcc1260d75563637a784 SHA1 (patch-ak) = f7e630445f87514e58221e0e10ae17cb4b532849 SHA1 (patch-al) = 4b27e02d8e6c74cb2ba6608d86f58fda891c6735 -SHA1 (patch-am) = b6d2c242c0a637b584c934d1f357d15197d85849 +SHA1 (patch-am) = f80ff5cc36abdf0780f87ecdacce73ccd4abd395 SHA1 (patch-an) = f0b06bf671f4370dedfe3693bfcd5461ddcccf24 SHA1 (patch-ao) = 6701fc535be7f3ab3d6287b42af7b15e63980189 SHA1 (patch-ap) = f82a0828c1c2681dc1df5e3de7a37cd042c0494f @@ -24,3 +24,5 @@ SHA1 (patch-ar) = 7bfa494147b26f7b330498d9c64ae66a79cebd27 SHA1 (patch-as) = b1c077eb64eb1a4401604283cfc1534a0ee4269b SHA1 (patch-at) = cf0156a20f3fdadca74434d1ee26f023f7d40bac SHA1 (patch-au) = 5b69fde30ec2cc301b970e2c40d83fac1b00c874 +SHA1 (patch-av) = 9828210e621310023e059e4fc7f8f1c5d1c7e187 +SHA1 (patch-aw) = 6bbc7e279d92def9ca90b5544b2777b7f221071a 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 ++# include + + # 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; + -- cgit v1.2.3