Subject: pkg/5070: FIX: ghostscript doesn't really use its configure scripts
To: None <gnats-bugs@gnats.netbsd.org>
From: Johnny C. Lam <lamj@stat.cmu.edu>
List: netbsd-bugs
Date: 02/25/1998 15:38:29
>Number:         5070
>Category:       pkg
>Synopsis:       FIX: ghostscript doesn't really use its configure scripts
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 26 10:50:02 1998
>Last-Modified:
>Originator:     Johnny C. Lam
>Organization:
>Release:        1.3B
>Environment:
System: NetBSD deepthought 1.3B NetBSD 1.3B (DEEPTHOUGHT) #1: Thu Jan 22 17:27:08 EST 1998 toor@deepthought:/usr/local/src/sys/arch/mac68k/compile/DEEPTHOUGHT mac68k


>Description:
	The ghostscript package doesn't really use the configure
	scripts in the scripts/ directory to select the devices
	for which to compile-in support.  We currently just patch the
	makefile to include a fixed list of devices.

>How-To-Repeat:
	N/A
>Fix:
	Using the dialog package which was put up for inclusion into 
	the pkgsrc tree, we can configure the ghostscript package
	in the same way that FreeBSD does.  We can either interactively
	choose the devices we want to be included, or make the package
	with the env variable BATCH set.  The following patch makes
	the appropriate changes:

--- Makefile	Mon Feb 23 07:25:29 1998
+++ ../Makefile	Wed Feb 25 03:28:52 1998
@@ -17,9 +17,15 @@
 
 MAINTAINER=	explorer@netbsd.org
 
+OPSYS!=		uname -s
+
 BUILD_DEPENDS=	${PORTSDIR}/graphics/jpeg/${WRKDIR:T}/jpeg-6a:${PORTSDIR}/graphics/jpeg:extract \
 		${PORTSDIR}/graphics/png/${WRKDIR:T}/libpng-0.96:${PORTSDIR}/graphics/png:extract \
 		unzip:${PORTSDIR}/archivers/unzip
+
+.if !defined(BATCH) && (${OPSYS} == "NetBSD")
+BUILD_DEPENDS+=	dialog:${PORTSDIR}/misc/dialog
+.endif
 
 MAKE_ENV=	PORTSDIR=${PORTSDIR}
 EXTRACT_ONLY=	${GS_SOURCES}
--- patches/patch-aa	Mon Feb 23 07:25:29 1998
+++ ../patches/patch-aa	Wed Feb 25 03:39:57 1998
@@ -1,11 +1,6 @@
---- unix-gcc.mak.orig	Tue Nov 25 03:29:01 1997
-+++ unix-gcc.mak	Sun Feb 22 17:08:48 1998
-@@ -1,3 +1,4 @@
-+DEVICE_DEVS=x11.dev x11alpha.dev x11cmyk.dev x11gray2.dev x11mono.dev sxlcrt.dev ap3250.dev appledmp.dev bj10e.dev bj200.dev bjc600.dev bjc800.dev ccr.dev cdeskjet.dev cdjcolor.dev cdjmono.dev cdj500.dev cdj550.dev cdj850.dev cp50.dev declj250.dev deskjet.dev djet500.dev djet500c.dev dnj650c.dev epson.dev eps9mid.dev eps9high.dev epsonc.dev ibmpro.dev imagen.dev iwhi.dev iwlo.dev iwlq.dev jetp3852.dev laserjet.dev la50.dev la70.dev la75.dev la75plus.dev lbp8.dev lips3.dev ln03.dev lj250.dev ljet2p.dev ljet3.dev ljet3d.dev ljet4.dev lj4dith.dev ljetplus.dev lj5mono.dev lj5gray.dev lp2563.dev lp8000.dev m8510.dev necp6.dev oce9050.dev oki182.dev okiibm.dev paintjet.dev pj.dev pjetxl.dev pjxl.dev pjxl300.dev pxlmono.dev pxlcolor.dev r4081.dev sj48.dev st800.dev stcolor.dev t4693d2.dev t4693d4.dev t4693d8.dev tek4696.dev uniprint.dev xes.dev dfaxhigh.dev dfaxlow.dev faxg3.dev faxg32d.dev faxg4.dev tiffcrle.dev tiffg3.dev tiffg32d.dev tiffg4.dev epswrite.dev pdfwrite.dev pswrit!
 e.dev pxlmono.dev pxlcolor.dev bit.dev bitrgb.dev bitcmyk.dev bmpmono.dev bmp16.dev bmp256.dev bmp16m.dev cgmmono.dev cgm8.dev cgm24.dev cif.dev jpeg.dev jpeggray.dev miff24.dev mgrmono.dev mgrgray2.dev mgrgray4.dev mgrgray8.dev mgr4.dev mgr8.dev pdfwrite.dev pcxmono.dev pcxgray.dev pcx16.dev pcx256.dev pcx24b.dev pcxcmyk.dev pbm.dev pbmraw.dev pgm.dev pgmraw.dev pgnm.dev pgnmraw.dev pnm.dev pnmraw.dev ppm.dev ppmraw.dev pkm.dev pkmraw.dev pngmono.dev pnggray.dev png16.dev png256.dev png16m.dev psmono.dev psgray.dev sgirgb.dev tiff12nc.dev tiff24nc.dev tifflzw.dev tiffpack.dev
- #    Copyright (C) 1997 Aladdin Enterprises.  All rights reserved.
- # 
- # This file is part of Aladdin Ghostscript.
-@@ -151,7 +152,7 @@
+--- unix-gcc.mak.orig	Mon Nov 24 21:29:01 1997
++++ unix-gcc.mak	Wed Feb 25 03:39:13 1998
+@@ -151,7 +151,7 @@
  # Define the directory where the zlib sources are stored.
  # See zlib.mak for more information.
  
@@ -14,7 +9,7 @@
  
  # Choose whether to use a shared version of the zlib library, and if so,
  # what its name is (usually libz, but sometimes libgz).
-@@ -176,7 +177,7 @@
+@@ -176,7 +176,7 @@
  
  # Define the name of the C compiler.
  
@@ -23,7 +18,7 @@
  
  # Define the name of the linker for the final link step.
  # Normally this is the same as the C compiler.
-@@ -218,7 +219,7 @@
+@@ -218,7 +218,7 @@
  # SVR4 may need -lnsl.
  # (Libraries required by individual drivers are handled automatically.)
  
@@ -32,7 +27,7 @@
  
  # Define the include switch(es) for the X11 header files.
  # This can be null if handled in some other way (e.g., the files are
-@@ -228,7 +229,7 @@
+@@ -228,7 +228,7 @@
  # Note that x_.h expects to find the header files in $(XINCLUDE)/X11,
  # not in $(XINCLUDE).
  
@@ -41,7 +36,7 @@
  
  # Define the directory/ies and library names for the X11 library files.
  # XLIBDIRS is for ld and should include -L; XLIBDIR is for LD_RUN_PATH
-@@ -240,12 +241,12 @@
+@@ -240,12 +240,12 @@
  #XLIBDIRS=-L/usr/openwin/lib
  #XLIBDIR=/usr/openwin/lib
  # X11R6 (on any platform) may need
@@ -57,7 +52,7 @@
  
  # Define whether this platform has floating point hardware:
  #	FPU_TYPE=2 means floating point is faster than fixed point.
-@@ -287,22 +288,22 @@
+@@ -287,22 +287,22 @@
  
  # Choose the device(s) to include.  See devs.mak for details.
  
@@ -96,7 +91,7 @@
  
  # ---------------------------- End of options --------------------------- #
  
-@@ -3676,8 +3677,8 @@
+@@ -3676,8 +3676,8 @@
  libpng95.dev: $(LIBPNG_MAK) $(ECHOGS_XE) pngwio.$(OBJ) crc32.dev
  	$(SETMOD) libpng95 pngwio.$(OBJ) -include crc32
  
@@ -107,7 +102,7 @@
  #    Copyright (C) 1995, 1996, 1997 Aladdin Enterprises.  All rights reserved.
  # 
  # This file is part of Aladdin Ghostscript.
-@@ -3758,7 +3759,7 @@
+@@ -3758,7 +3758,7 @@
  zlibe_1.dev: $(MAKEFILE) $(ZLIB_MAK) $(ECHOGS_XE)
  	$(SETMOD) zlibe_1 -lib $(ZLIB_NAME)
  
@@ -116,7 +111,7 @@
  zlibe_0.dev: $(ZLIB_MAK) $(ECHOGS_XE) zlibc.dev $(zlibe_)
  	$(SETMOD) zlibe_0 $(zlibe_)
  	$(ADDMOD) zlibe_0 -include zlibc
-@@ -3805,11 +3806,11 @@
+@@ -3805,11 +3805,11 @@
  
  zlibd1_=infblock.$(OBJ) infcodes.$(OBJ) inffast.$(OBJ)
  zlibd2_=inflate.$(OBJ) inftrees.$(OBJ) infutil.$(OBJ)
@@ -133,7 +128,7 @@
  
  infblock.$(OBJ): $(ZSRC)infblock.c $(ZDEP) zutil.h
  	$(CP_) $(ZSRC)infblock.c .
-@@ -4584,8 +4585,13 @@
+@@ -4584,8 +4584,13 @@
  
  cdeskjet_=gdevcdj.$(OBJ) $(HPPCL)
  
--- scripts/configure	Sun Nov 23 07:45:26 1997
+++ ../scripts/configure	Wed Feb 25 03:17:28 1998
@@ -4,7 +4,7 @@
 touch ${WRKSRC}/makefile
 
 # driverselection
-/usr/bin/dialog --title "Ghostscript 4 driver configuration" --clear \
+dialog	--title "Ghostscript 5 driver configuration" --clear \
 	--checklist "\n\
 This new ghostscript driver configuration dialog allows you to choose \n\
 only those gs drivers, you really need. Don't think too economical, since \n\
@@ -50,7 +50,6 @@
   "laserjet" "HP LaserJet" ON \
   "la50"     "DEC LA50 printer" ON \
   "la70"     "DEC LA70 printer" ON \
-  "la70t"    "DEC LA70 printer with low resol. text enhancement" ON \
   "la75"     "DEC LA75 printer" ON \
   "la75plus" "DEC LA75plus printer" ON \
   "lbp8"     "Canon LBP-8II laser printer" ON \
@@ -174,8 +173,9 @@
 # bring it into the right format with '.dev' appended to each driver name
 echo "DEVICE_DEVS=$choice" \
 	| sed -e "s/\"//g" \
+	| sed -e "s/$/ /g" \
+	| sed -e "s/  */ /g" \
 	| sed -e "s/ /.dev /g" \
-	| sed -e "s/$/.dev/g" \
 	> ${WRKSRC}/unix-gcc.mak.new
 
 # create one new Makefile, where DEVICE_DEVS contains all wanted devices
--- scripts/configure.batch	Sun Nov 23 07:45:26 1997
+++ ../scripts/configure.batch	Wed Feb 25 03:21:01 1998
@@ -4,7 +4,7 @@
 touch ${WRKSRC}/makefile
 
 cat - > ${WRKSRC}/unix-gcc.mak.new << !EOT
-DEVICE_DEVS=x11.dev x11alpha.dev x11cmyk.dev x11gray2.dev x11mono.dev sxlcrt.dev ap3250.dev appledmp.dev bj10e.dev bj200.dev bjc600.dev bjc800.dev ccr.dev cdeskjet.dev cdjcolor.dev cdjmono.dev cdj500.dev cdj550.dev cdj850.dev cp50.dev declj250.dev deskjet.dev djet500.dev djet500c.dev dnj650c.dev epson.dev eps9mid.dev eps9high.dev epsonc.dev ibmpro.dev imagen.dev iwhi.dev iwlo.dev iwlq.dev jetp3852.dev laserjet.dev la50.dev la70.dev la70t.dev la75.dev la75plus.dev lbp8.dev lips3.dev ln03.dev lj250.dev ljet2p.dev ljet3.dev ljet3d.dev ljet4.dev lj4dith.dev ljetplus.dev lj5mono.dev lj5gray.dev lp2563.dev lp8000.dev lq850.dev m8510.dev necp6.dev oce9050.dev oki182.dev okiibm.dev paintjet.dev pj.dev pjetxl.dev pjxl.dev pjxl300.dev pxlmono.dev pxlcolor.dev r4081.dev sj48.dev st800.dev stcolor.dev t4693d2.dev t4693d4.dev t4693d8.dev tek4696.dev uniprint.dev xes.dev dfaxhigh.dev dfaxlow.dev faxg3.dev faxg32d.dev faxg4.dev tiffcrle.dev tiffg3.dev tiffg32d.dev tiffg4.dev epswrite.dev !
 pdfwrite.dev pswrite.dev pxlmono.dev pxlcolor.dev bit.dev bitrgb.dev bitcmyk.dev bmpmono.dev bmp16.dev bmp256.dev bmp16m.dev cgmmono.dev cgm8.dev cgm24.dev cif.dev jpeg.dev jpeggray.dev miff24.dev mgrmono.dev mgrgray2.dev mgrgray4.dev mgrgray8.dev mgr4.dev mgr8.dev pcxmono.dev pcxgray.dev pcx16.dev pcx256.dev pcx24b.dev pcxcmyk.dev pbm.dev pbmraw.dev pgm.dev pgmraw.dev pgnm.dev pgnmraw.dev pnm.dev pnmraw.dev ppm.dev ppmraw.dev pkm.dev pkmraw.dev pngmono.dev pnggray.dev png16.dev png256.dev png16m.dev psmono.dev psgray.dev sgirgb.dev tiff12nc.dev tiff24nc.dev tifflzw.dev tiffpack.dev
+DEVICE_DEVS=x11.dev x11alpha.dev x11cmyk.dev x11gray2.dev x11mono.dev sxlcrt.dev ap3250.dev appledmp.dev bj10e.dev bj200.dev bjc600.dev bjc800.dev ccr.dev cdeskjet.dev cdjcolor.dev cdjmono.dev cdj500.dev cdj550.dev cdj850.dev cp50.dev declj250.dev deskjet.dev djet500.dev djet500c.dev dnj650c.dev epson.dev eps9mid.dev eps9high.dev epsonc.dev ibmpro.dev imagen.dev iwhi.dev iwlo.dev iwlq.dev jetp3852.dev laserjet.dev la50.dev la70.dev la75.dev la75plus.dev lbp8.dev lips3.dev ln03.dev lj250.dev ljet2p.dev ljet3.dev ljet3d.dev ljet4.dev lj4dith.dev ljetplus.dev lj5mono.dev lj5gray.dev lp2563.dev lp8000.dev lq850.dev m8510.dev necp6.dev oce9050.dev oki182.dev okiibm.dev paintjet.dev pj.dev pjetxl.dev pjxl.dev pjxl300.dev pxlmono.dev pxlcolor.dev r4081.dev sj48.dev st800.dev stcolor.dev t4693d2.dev t4693d4.dev t4693d8.dev tek4696.dev uniprint.dev xes.dev dfaxhigh.dev dfaxlow.dev faxg3.dev faxg32d.dev faxg4.dev tiffcrle.dev tiffg3.dev tiffg32d.dev tiffg4.dev epswrite.dev pdfwrite.d!
 ev pswrite.dev pxlmono.dev pxlcolor.dev bit.dev bitrgb.dev bitcmyk.dev bmpmono.dev bmp16.dev bmp256.dev bmp16m.dev cgmmono.dev cgm8.dev cgm24.dev cif.dev jpeg.dev jpeggray.dev miff24.dev mgrmono.dev mgrgray2.dev mgrgray4.dev mgrgray8.dev mgr4.dev mgr8.dev pcxmono.dev pcxgray.dev pcx16.dev pcx256.dev pcx24b.dev pcxcmyk.dev pbm.dev pbmraw.dev pgm.dev pgmraw.dev pgnm.dev pgnmraw.dev pnm.dev pnmraw.dev ppm.dev ppmraw.dev pkm.dev pkmraw.dev pngmono.dev pnggray.dev png16.dev png256.dev png16m.dev psmono.dev psgray.dev sgirgb.dev tiff12nc.dev tiff24nc.dev tifflzw.dev tiffpack.dev
 !EOT
 
 # create one new Makefile, where DEVICE_DEVS contains all wanted devices
>Audit-Trail:
>Unformatted: