- Make portlint happy.

- Honor CC, CFLAGS.
- Remove unused code that trips GCC3.

PR:		44467
Submitted by:	Volker Stolz <vs@foldr.org>
This commit is contained in:
Christian Weisgerber 2002-10-26 01:38:44 +00:00
parent 9c2af8b4c4
commit 29dfd7bb4d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=68847
4 changed files with 332 additions and 185 deletions

View file

@ -9,7 +9,8 @@ PORTNAME= gplot
PORTVERSION= 4.3 PORTVERSION= 4.3
CATEGORIES= graphics CATEGORIES= graphics
MASTER_SITES= ftp://ftp.psc.edu/pub/gplot/ MASTER_SITES= ftp://ftp.psc.edu/pub/gplot/
DISTFILES= gplot.tar.Z DISTNAME= ${PORTNAME}
EXTRACT_SUFX= .tar.Z
MAINTAINER= ports@FreeBSD.org MAINTAINER= ports@FreeBSD.org

View file

@ -1,161 +1,302 @@
*** Makefile.orig Tue Oct 27 11:07:42 1992 --- Makefile.orig Tue Oct 27 16:07:42 1992
--- Makefile Sun Dec 14 15:04:04 1997 +++ Makefile Fri Oct 25 16:57:05 2002
*************** @@ -55,9 +55,9 @@
*** 55,61 **** # lvr.o lvr_io.o sony laser video disk recorder controller
# lvr.o lvr_io.o sony laser video disk recorder controller # dq.o diaquest controller
# dq.o diaquest controller
-DRV_FLAGS = -Dincps -Dinctek -Dinccgmc -Dinccgmb
! DRV_FLAGS = -Dincps -Dinctek -Dinccgmc -Dinccgmb +DRV_FLAGS = -Dincps -Dinctek -Dinccgmc -Dinccgmb
CTR_FLAGS = -O -Dinctty -CTR_FLAGS = -O -Dinctty
CTR_OBJ = tty.o +CTR_FLAGS = $(CFLAGS) -Dinctty
--- 55,61 ---- CTR_OBJ = tty.o
# lvr.o lvr_io.o sony laser video disk recorder controller
# dq.o diaquest controller XWS_OBJ = xws_cla.o xws_color.o xws_delim.o xws_marker.o xws_polygon.o \
@@ -87,8 +87,8 @@
! DRV_FLAGS = -Dincps -Dinctek -Dinccgmc -Dinccgmb
# To build this software on a Sun workstation, uncomment the next lines.
CTR_FLAGS = -O -Dinctty #AR = ar ru
CTR_OBJ = tty.o -#F_LINK = f77
*************** -#RANLIB = ranlib
*** 87,94 **** +F_LINK = f77
+RANLIB = ranlib
# To build this software on a Sun workstation, uncomment the next lines. # To include the Sunview driver and gplottool interface, uncomment SVLIBS.
#AR = ar ru # To include the Sun CGI B&W driver, uncomment SLIBS.
! #F_LINK = f77 # NOTE: Uncomment only one of the following two lines.
! #RANLIB = ranlib @@ -141,7 +141,7 @@
# To include the Sunview driver and gplottool interface, uncomment SVLIBS. #CFLAGS = -g
# To include the Sun CGI B&W driver, uncomment SLIBS. # To build Gplot on the IRIS, uncomment the next line.
# NOTE: Uncomment only one of the following two lines. #CFLAGS = -cckr
--- 87,94 ---- -CFLAGS =
+#CFLAGS =
# To build this software on a Sun workstation, uncomment the next lines.
#AR = ar ru # ******************************************************************
! F_LINK = f77 #
! RANLIB = ranlib @@ -162,32 +162,32 @@
# To include the Sunview driver and gplottool interface, uncomment SVLIBS. utils.o carray.o io.o $(FONTS) devices.o emul.o
# To include the Sun CGI B&W driver, uncomment SLIBS.
# NOTE: Uncomment only one of the following two lines. gplot: $(GPT_OBJ) $(CTR_OBJ) $(DRV_OBJ) $(MACHINE_OBJ)
*************** - cc -o $@ $(GPT_OBJ) $(CTR_OBJ) $(DRV_OBJ) $(MACHINE_OBJ) $(LIBS)
*** 141,147 **** + $(CC) -o $@ $(GPT_OBJ) $(CTR_OBJ) $(DRV_OBJ) $(MACHINE_OBJ) $(LIBS)
#CFLAGS = -g
# To build Gplot on the IRIS, uncomment the next line. gtex: $(GTEX_OBJ) ps.o tek.o qms.o cgmb.o cgmc.o tty.o
#CFLAGS = -cckr - cc -o $@ $(GTEX_OBJ) ps.o tek.o qms.o cgmb.o cgmc.o tty.o -lm
! CFLAGS = + $(CC) -o $@ $(GTEX_OBJ) ps.o tek.o qms.o cgmb.o cgmc.o tty.o -lm
# ****************************************************************** gplottool: gplot_suntool.o wint.o ccgm.o cgm.o utils.o io.o carray.o \
# hload.o emul.o sv.o
--- 141,147 ---- - cc -o $@ gplot_suntool.o wint.o cgm.o utils.o io.o carray.o ccgm.o \
#CFLAGS = -g + $(CC) -o $@ gplot_suntool.o wint.o cgm.o utils.o io.o carray.o ccgm.o \
# To build Gplot on the IRIS, uncomment the next line. hload.o emul.o sv.o $(LIBS)
#CFLAGS = -cckr
! #CFLAGS = # To use the xws driver for gplotdw, include $(XWS_OBJ) instead of xl.o
gplotdw: gplotdw.o wint.o cgm.o utils.o io.o carray.o ccgm.o emul.o \
# ****************************************************************** hload.o xl.o
# - cc -o $@ gplotdw.o wint.o cgm.o utils.o io.o carray.o ccgm.o emul.o \
*************** + $(CC) -o $@ gplotdw.o wint.o cgm.o utils.o io.o carray.o ccgm.o emul.o \
*** 309,315 **** hload.o xl.o $(LIBS)
# (1000 implies 10 point fonts at 300 pt/in), e.g.,
# /usr/staff/andrews/pk/1000/cmr10.pk # To use the xws driver for gplotaw, include $(XWS_OBJ) instead of xl.o
pkras.o: pkras.c defs.h gplotaw: gplotaw.o wint.o cgm.o ccgm.o utils.o io.o carray.o \
! cc -c -DUNIXFONTS=\"/usr/staff/andrews/pk\" pkras.c hload.o emul.o xl.o $(MACHINE_OBJ)
- cc -o $@ gplotaw.o wint.o cgm.o ccgm.o utils.o io.o carray.o \
#TTY controller + $(CC) -o $@ gplotaw.o wint.o cgm.o ccgm.o utils.o io.o carray.o \
tty.o: tty.c defs.h hload.o emul.o xl.o $(MACHINE_OBJ) $(LIBS)
--- 309,315 ----
# (1000 implies 10 point fonts at 300 pt/in), e.g., # To use the xws driver for gplotm, include $(XWS_OBJ) instead of xl.o
# /usr/staff/andrews/pk/1000/cmr10.pk gplotm: gplotm.o wint.o cgm.o utils.o io.o carray.o ccgm.o emul.o \
pkras.o: pkras.c defs.h hload.o xl.o $(MACHINE_OBJ)
! cc -c -DUNIXFONTS=\"/usr/local/share/texmf/fonts/pk\" pkras.c - cc -o $@ gplotm.o wint.o cgm.o utils.o io.o carray.o ccgm.o emul.o \
+ $(CC) -o $@ gplotm.o wint.o cgm.o utils.o io.o carray.o ccgm.o emul.o \
#TTY controller hload.o xl.o $(MACHINE_OBJ) $(LIBS)
tty.o: tty.c defs.h
*************** drawcgm: $(DCGM_PATH)drawcgm.a
*** 366,408 **** @@ -230,77 +230,77 @@
xws_setup.o: /usr/include/stdio.h \ # controlling GPLOT program
/usr/include/strings.h \ gplot.o: gplot.c defs.h
! /usr/include/X11/Intrinsic.h \ - cc -c $(CFLAGS) gplot.c
! /usr/include/X11/StringDefs.h \ + $(CC) -c $(CFLAGS) gplot.c
! /usr/include/X11/Xutil.h \
! /usr/include/X11/cursorfont.h \ # controlling GPLOT program for the SUNview driver
defs.h xws_defs.h gplot_suntool.o: gplot_suntool.c defs.h
- cc -c $(CFLAGS) gplot_suntool.c
xws_delim.o: /usr/include/stdio.h \ + $(CC) -c $(CFLAGS) gplot_suntool.c
/usr/include/strings.h \
! /usr/include/X11/Intrinsic.h \ # controlling GPLOTAW program for Athena Widgets
! /usr/include/X11/Xutil.h \ gplotaw.o: gplotaw.c
defs.h xws_defs.h # To make gplotaw (xl) compile on the Cray, uncomment the next line
-# cc -c -DR3_INTRINSICS gplotaw.c
xws_color.o: /usr/include/stdio.h \ +# $(CC) -c -DR3_INTRINSICS gplotaw.c
/usr/include/math.h \ # To make gplotaw (xws) compile on the Cray, uncomment the next line
! /usr/include/X11/Intrinsic.h \ -# cc -c -DR3_INTRINSICS -Dincxws gplotaw.c
! /usr/include/X11/Xutil.h \ +# $(CC) -c -DR3_INTRINSICS -Dincxws gplotaw.c
! /usr/include/X11/Xatom.h \ # To use the xws driver for gplotaw, uncomment the next line
defs.h xws_defs.h xws_color.h -# cc -c $(CFLAGS) -Dincxws gplotaw.c
+# $(CC) -c $(CFLAGS) -Dincxws gplotaw.c
! xws_polyline.o:/usr/include/X11/Intrinsic.h \
defs.h xws_defs.h # controlling GPLOTDW program for Decwindows
gplotdw.o: gplotdw.c defs.h
xws_polygon.o: /usr/include/stdio.h \ # To use the xws driver for gplotdw, uncomment the next line
! /usr/include/X11/Intrinsic.h \ -# cc -c $(CFLAGS) -Dincxws gplotdw.c
defs.h xws_defs.h xws_fill.h +# $(CC) -c $(CFLAGS) -Dincxws gplotdw.c
! xws_marker.o: /usr/include/X11/Intrinsic.h \ # controlling GPLOTM program for Motif
defs.h xws_defs.h gplotm.o: gplotm.c defs.h
# To use the xws driver for gplotm, uncomment the next line
xws_text.o: /usr/include/strings.h \ -# cc -c $(CFLAGS) -Dincxws gplotm.c
! /usr/include/X11/Intrinsic.h \ +# $(CC) -c $(CFLAGS) -Dincxws gplotm.c
! /usr/include/X11/Xatom.h \
defs.h xws_defs.h # window interface module
wint.o: wint.c defs.h
xws_cla.o: /usr/include/stdio.h \ - cc -c $(CFLAGS) wint.c
/usr/include/math.h \ + $(CC) -c $(CFLAGS) wint.c
! /usr/include/X11/Intrinsic.h \
defs.h xws_defs.h xws_color.h # controlling GTEX program
#----------------------------------------------------------------------------- gtex.o: gtex.c defs.h
# DrawCGM and CGMGen, and test routines - cc -c $(CFLAGS) -Dincps -Dincqms gtex.c
--- 366,408 ---- + $(CC) -c $(CFLAGS) -Dincps -Dincqms gtex.c
xws_setup.o: /usr/include/stdio.h \ # all of the cgm specific stuff
/usr/include/strings.h \ cgm.o: cgm.c defs.h
! $(X11BASE)/include/X11/Intrinsic.h \ - cc -c $(CFLAGS) cgm.c
! $(X11BASE)/include/X11/StringDefs.h \ + $(CC) -c $(CFLAGS) cgm.c
! $(X11BASE)/include/X11/Xutil.h \
! $(X11BASE)/include/X11/cursorfont.h \ # all of the clear text cgm specific stuff
defs.h xws_defs.h ccgm.o: ccgm.c defs.h ccdefs.h
- cc -c $(CFLAGS) ccgm.c
xws_delim.o: /usr/include/stdio.h \ + $(CC) -c $(CFLAGS) ccgm.c
/usr/include/strings.h \
! $(X11BASE)/include/X11/Intrinsic.h \ # utility functions
! $(X11BASE)/include/X11/Xutil.h \ utils.o: utils.c defs.h
defs.h xws_defs.h - cc -c $(CFLAGS) -Dinchershey utils.c
+ $(CC) -c $(CFLAGS) -Dinchershey utils.c
xws_color.o: /usr/include/stdio.h \ # if we wanted PK fonts also, it would be
/usr/include/math.h \ -# cc -c $(CFLAGS) -Dinchershey -Dincpkras utils.c
! $(X11BASE)/include/X11/Intrinsic.h \ +# $(CC) -c $(CFLAGS) -Dinchershey -Dincpkras utils.c
! $(X11BASE)/include//X11/Xutil.h \
! $(X11BASE)/include/X11/Xatom.h \ # I/O routines
defs.h xws_defs.h xws_color.h io.o: io.c defs.h
- cc -c $(CFLAGS) $(CTR_FLAGS) io.c
! xws_polyline.o:$(X11BASE)/include/X11/Intrinsic.h \ + $(CC) -c $(CFLAGS) $(CTR_FLAGS) io.c
defs.h xws_defs.h # To get a gplot usage log file on Unix, uncomment the next line
-# cc -c $(CTR_FLAGS) -DUSAGE_NAME=\"gplot_usage.log\" io.c
xws_polygon.o: /usr/include/stdio.h \ +# $(CC) -c $(CTR_FLAGS) -DUSAGE_NAME=\"gplot_usage.log\" io.c
! $(X11BASE)/include/X11/Intrinsic.h \
defs.h xws_defs.h xws_fill.h # devices interface
devices.o: devices.c defs.h
! xws_marker.o: $(X11BASE)/include/X11/Intrinsic.h \ - cc -c $(CFLAGS) $(CTR_FLAGS) $(DRV_FLAGS) devices.c
defs.h xws_defs.h + $(CC) -c $(CFLAGS) $(CTR_FLAGS) $(DRV_FLAGS) devices.c
xws_text.o: /usr/include/strings.h \ # Cell Array libraries
! $(X11BASE)/include/X11/Intrinsic.h \ carray.o: carray.c defs.h
! $(X11BASE)/include/X11/Xatom.h \ - cc -c $(CFLAGS) carray.c
defs.h xws_defs.h + $(CC) -c $(CFLAGS) carray.c
xws_cla.o: /usr/include/stdio.h \ drvcla.o: drvcla.c defs.h
/usr/include/math.h \ - cc -c $(CFLAGS) drvcla.c
! $(X11BASE)/include/X11/Intrinsic.h \ + $(CC) -c $(CFLAGS) drvcla.c
defs.h xws_defs.h xws_color.h
#----------------------------------------------------------------------------- # Emulation package
# DrawCGM and CGMGen, and test routines emul.o: emul.c defs.h
- cc -c $(CFLAGS) emul.c
+ $(CC) -c $(CFLAGS) emul.c
# Hershey font support
hload.o: hload.c hload.h defs.h
- cc -c $(CFLAGS) hload.c
+ $(CC) -c $(CFLAGS) hload.c
# decoding for the PK format files
# if fonts are available we must say here where they are
@@ -309,100 +309,100 @@
# (1000 implies 10 point fonts at 300 pt/in), e.g.,
# /usr/staff/andrews/pk/1000/cmr10.pk
pkras.o: pkras.c defs.h
- cc -c -DUNIXFONTS=\"/usr/staff/andrews/pk\" pkras.c
+ $(CC) -c -DUNIXFONTS=\"/usr/local/share/texmf/fonts/pk\" pkras.c
#TTY controller
tty.o: tty.c defs.h
- cc -c $(CFLAGS) tty.c
+ $(CC) -c $(CFLAGS) tty.c
# LVR controller
lvr.o: lvr.c lvr_defines.h defs.h
- cc -c $(CFLAGS) lvr.c
+ $(CC) -c $(CFLAGS) lvr.c
# to change audit file name, lvr port
-# cc -c -DAUDIT_FILE="lvr.dat" -DDEFAULT_PORT="ttyd2" lvr.c
+# $(CC) -c -DAUDIT_FILE="lvr.dat" -DDEFAULT_PORT="ttyd2" lvr.c
dq.o: dq.c defs.h
- cc -c $(CFLAGS) dq.c
+ $(CC) -c $(CFLAGS) dq.c
lvr_io.o: lvr_io.c lvr_defines.h
- cc -c $(CFLAGS) lvr_io.c
+ $(CC) -c $(CFLAGS) lvr_io.c
# to turn on debug I/O printout
-# cc -c -DDEBUG_IO lvr_io.c
+# $(CC) -c -DDEBUG_IO lvr_io.c
# Postscript device
ps.o: ps.c defs.h
- cc -c $(CFLAGS) ps.c
+ $(CC) -c $(CFLAGS) ps.c
# Tektronix devices
tek.o: tek.c defs.h
- cc -c $(CFLAGS) tek.c
+ $(CC) -c $(CFLAGS) tek.c
# Clear text CGM driver
cgmc.o: cgmc.c defs.h
- cc -c $(CFLAGS) cgmc.c
+ $(CC) -c $(CFLAGS) cgmc.c
# Binary CGM driver
cgmb.o: cgmb.c defs.h
- cc -c $(CFLAGS) cgmb.c
+ $(CC) -c $(CFLAGS) cgmb.c
# Sun CGI driver
sundriv.o: sundriv.c defs.h
- cc -c $(CFLAGS) sundriv.c
+ $(CC) -c $(CFLAGS) sundriv.c
# Silicon Graphics GI driver
igl.o: igl.c defs.h
- cc -c $(CFLAGS) igl.c
+ $(CC) -c $(CFLAGS) igl.c
# the sunview driver
sv.o: sv.c defs.h
- cc -c $(CFLAGS) sv.c
+ $(CC) -c $(CFLAGS) sv.c
# the Xlib driver
xl.o: xl.c defs.h
- cc -c $(CFLAGS) xl.c
+ $(CC) -c $(CFLAGS) xl.c
#-------------- X Window System driver (xws) --------------------------
xws_setup.o: /usr/include/stdio.h \
/usr/include/strings.h \
- /usr/include/X11/Intrinsic.h \
- /usr/include/X11/StringDefs.h \
- /usr/include/X11/Xutil.h \
- /usr/include/X11/cursorfont.h \
+ $(X11BASE)/include/X11/Intrinsic.h \
+ $(X11BASE)/include/X11/StringDefs.h \
+ $(X11BASE)/include/X11/Xutil.h \
+ $(X11BASE)/include/X11/cursorfont.h \
defs.h xws_defs.h
xws_delim.o: /usr/include/stdio.h \
/usr/include/strings.h \
- /usr/include/X11/Intrinsic.h \
- /usr/include/X11/Xutil.h \
+ $(X11BASE)/include/X11/Intrinsic.h \
+ $(X11BASE)/include/X11/Xutil.h \
defs.h xws_defs.h
xws_color.o: /usr/include/stdio.h \
/usr/include/math.h \
- /usr/include/X11/Intrinsic.h \
- /usr/include/X11/Xutil.h \
- /usr/include/X11/Xatom.h \
+ $(X11BASE)/include/X11/Intrinsic.h \
+ $(X11BASE)/include//X11/Xutil.h \
+ $(X11BASE)/include/X11/Xatom.h \
defs.h xws_defs.h xws_color.h
-xws_polyline.o:/usr/include/X11/Intrinsic.h \
+xws_polyline.o:$(X11BASE)/include/X11/Intrinsic.h \
defs.h xws_defs.h
xws_polygon.o: /usr/include/stdio.h \
- /usr/include/X11/Intrinsic.h \
+ $(X11BASE)/include/X11/Intrinsic.h \
defs.h xws_defs.h xws_fill.h
-xws_marker.o: /usr/include/X11/Intrinsic.h \
+xws_marker.o: $(X11BASE)/include/X11/Intrinsic.h \
defs.h xws_defs.h
xws_text.o: /usr/include/strings.h \
- /usr/include/X11/Intrinsic.h \
- /usr/include/X11/Xatom.h \
+ $(X11BASE)/include/X11/Intrinsic.h \
+ $(X11BASE)/include/X11/Xatom.h \
defs.h xws_defs.h
xws_cla.o: /usr/include/stdio.h \
/usr/include/math.h \
- /usr/include/X11/Intrinsic.h \
+ $(X11BASE)/include/X11/Intrinsic.h \
defs.h xws_defs.h xws_color.h
#-----------------------------------------------------------------------------
# DrawCGM and CGMGen, and test routines

View file

@ -1,23 +1,14 @@
*** utils.c.orig Sun Nov 30 01:11:39 1997 --- utils.c.orig Fri Oct 25 19:08:50 2002
--- utils.c Sun Nov 30 01:24:00 1997 +++ utils.c Fri Oct 25 19:10:44 2002
*************** @@ -300,9 +300,8 @@
*** 300,308 **** struct info_struct *out_info;
struct info_struct *out_info; struct one_opt *opt; /* put command line options here */
struct one_opt *opt; /* put command line options here */ #define may_override(name) if (opt[(int) name].set) switch (opt[(int) name].tag) { \
#define may_override(name) if (opt[(int) name].set) switch (opt[(int) name].tag) { \ - case integer: out_info->name = opt[(int) name].val.i; break; \
! case integer: out_info->name = opt[(int) name].val.i; break; \ - case real: out_info->name = opt[(int) name].val.r; break; \
! case real: out_info->name = opt[(int) name].val.r; break; \ - case lst: case str: strcpy(out_info->name, opt[(int) name].val.str); break;}
! case lst: case str: strcpy(out_info->name, opt[(int) name].val.str); break;} + case integer: out_info->name = opt[(int) name].val.i; break; \
{ + case real: out_info->name = opt[(int) name].val.r; break; }
/* and now overide the device if the command line wants us to */ {
may_override(pxl_in); /* and now overide the device if the command line wants us to */
--- 300,308 ---- may_override(pxl_in);
struct info_struct *out_info;
struct one_opt *opt; /* put command line options here */
#define may_override(name) if (opt[(int) name].set) switch (opt[(int) name].tag) { \
! case integer: out_info->name = opt[(int) name].val.i; break; \
! case real: out_info->name = opt[(int) name].val.r; break; \
! case lst: case str: strncpy(out_info->name, opt[(int) name].val.str,max_str); break;}
{
/* and now overide the device if the command line wants us to */
may_override(pxl_in);

View file

@ -0,0 +1,14 @@
$FreeBSD$
--- drawcgm/Makefile.orig Sat Oct 26 02:58:37 2002
+++ drawcgm/Makefile Sat Oct 26 02:58:44 2002
@@ -25,7 +25,7 @@
# Here ends the section the installer should have to modify
#----------------------------------------------------------------------------
-CFLAGS = -O
+#CFLAGS = -O
# DrawCGM and CGMGen, and test routines
cgmgen.o: /usr/include/stdio.h \