summaryrefslogtreecommitdiff
path: root/print/ghostscript-gpl/files
diff options
context:
space:
mode:
authorAkinori MUSHA <knu@FreeBSD.org>2001-09-11 19:24:31 +0000
committerAkinori MUSHA <knu@FreeBSD.org>2001-09-11 19:24:31 +0000
commitf490d90d09cb643c6dc470973c79a0727edcf617 (patch)
tree203ae629f974481a97f7436ae11f2b4c4ea73bc8 /print/ghostscript-gpl/files
parent** ghostscript55 has been repocopied to ghostscript-gnu ** (diff)
** ghostscript6 has been repocopied to ghostscript-afpl **
Update to AFPL Ghostscript 7.00. PR: ports/29580 Submitted by: KATO Tsuguru <tkato@prontomail.com>
Notes
Notes: svn path=/head/; revision=47708
Diffstat (limited to 'print/ghostscript-gpl/files')
-rw-r--r--print/ghostscript-gpl/files/cdj850.contrib.mak24
-rw-r--r--print/ghostscript-gpl/files/hpijs.contrib.mak31
-rw-r--r--print/ghostscript-gpl/files/patch-aa224
-rw-r--r--print/ghostscript-gpl/files/patch-ac86
-rw-r--r--print/ghostscript-gpl/files/patch-hpijs:makefile32
-rw-r--r--print/ghostscript-gpl/files/patch-lib,gs_init.ps31
-rw-r--r--print/ghostscript-gpl/files/patch-lib:gs_init.ps19
-rw-r--r--print/ghostscript-gpl/files/patch-pcl3:eprn:gdeveprn.c12
-rw-r--r--print/ghostscript-gpl/files/patch-src.gdevxini.c47
-rw-r--r--print/ghostscript-gpl/files/patch-src:contrib.mak-5.94.add14
-rw-r--r--print/ghostscript-gpl/files/patch-src:genarch.c34
-rw-r--r--print/ghostscript-gpl/files/patch-src:gp_unifs.c34
-rw-r--r--print/ghostscript-gpl/files/patch-src:unix-gcc.mak130
-rw-r--r--print/ghostscript-gpl/files/patch-src:zmedia2.c25
14 files changed, 347 insertions, 396 deletions
diff --git a/print/ghostscript-gpl/files/cdj850.contrib.mak b/print/ghostscript-gpl/files/cdj850.contrib.mak
index ffb099b0caf8..8faefec5fe4e 100644
--- a/print/ghostscript-gpl/files/cdj850.contrib.mak
+++ b/print/ghostscript-gpl/files/cdj850.contrib.mak
@@ -1,13 +1,21 @@
-
###- cdj850 - HP 850 Driver under development -------- ###
+cdeskjet8_=$(GLOBJ)gdevcd8.$(OBJ) $(HPPCL)
-cdj8_=$(GLOBJ)gdevcd8.$(OBJ) $(HPPCL)
+$(DD)cdj670.dev : $(cdeskjet8_) $(DD)page.dev
+ $(SETPDEV2) $(DD)cdj670 $(cdeskjet8_)
-$(DD)cdj850.dev : $(cdj8_) $(DD)page.dev
- $(SETPDEV) $(DD)cdj850 $(cdj8_)
+$(DD)cdj850.dev : $(cdeskjet8_) $(DD)page.dev
+ $(SETPDEV2) $(DD)cdj850 $(cdeskjet8_)
-$(GLOBJ)gdevcd8.$(OBJ) : $(GLSRC)gdevcd8.c $(std_h) $(PDEVH)\
- $(gsparam_h) $(gsstate_h) $(gxlum_h)\
- $(gdevbjc_h) $(gdevpcl_h)
- $(GLCC) $(GLO_)gdevcd8.$(OBJ) $(C_) $(GLSRC)gdevcd8.c
+$(DD)cdj880.dev : $(cdeskjet8_) $(DD)page.dev
+ $(SETPDEV2) $(DD)cdj880 $(cdeskjet8_)
+
+$(DD)cdj890.dev : $(cdeskjet8_) $(DD)page.dev
+ $(SETPDEV2) $(DD)cdj890 $(cdeskjet8_)
+$(DD)cdj1600.dev : $(cdeskjet8_) $(DD)page.dev
+ $(SETPDEV2) $(DD)cdj1600 $(cdeskjet8_)
+
+$(GLOBJ)gdevcd8.$(OBJ) : $(GLSRC)gdevcd8.c $(PDEVH) $(math__h)\
+ $(gsparam_h) $(gxlum_h) $(gdevpcl_h)
+ $(GLCC) $(GLO_)gdevcd8.$(OBJ) $(C_) $(GLSRC)gdevcd8.c
diff --git a/print/ghostscript-gpl/files/hpijs.contrib.mak b/print/ghostscript-gpl/files/hpijs.contrib.mak
new file mode 100644
index 000000000000..35eb9e6b06b1
--- /dev/null
+++ b/print/ghostscript-gpl/files/hpijs.contrib.mak
@@ -0,0 +1,31 @@
+### ------------- Hewlett-Packard Co. Inkjet Driver -------------- ###
+
+hpijs_=$(GLOBJ)gdevhpij.$(OBJ)
+
+$(DD)gdevhpij.$(OBJ): $(GLSRC)gdevhpij.c $(PDEVH)
+ $(GLCC) $(GLO_)gdevhpij.$(OBJ) $(C_) $(GLSRC)gdevhpij.c
+
+$(DD)hpijs.dev : $(hpijs_) $(DD)page.dev
+ $(SETPDEV) $(DD)hpijs $(hpijs_)
+
+$(DD)DJ630.dev : $(hpijs_) $(DD)page.dev
+ $(SETPDEV) DJ630 $(hpijs_)
+
+$(DD)DJ6xx.dev : $(hpijs_) $(DD)page.dev
+ $(SETPDEV) DJ6xx $(hpijs_)
+
+$(DD)DJ6xxP.dev : $(hpijs_) $(DD)page.dev
+ $(SETPDEV) DJ6xxP $(hpijs_)
+
+$(DD)DJ8xx.dev : $(hpijs_) $(DD)page.dev
+ $(SETPDEV) DJ8xx $(hpijs_)
+
+$(DD)DJ9xx.dev : $(hpijs_) $(DD)page.dev
+ $(SETPDEV) DJ9xx $(hpijs_)
+
+$(DD)DJ9xxVIP.dev : $(hpijs_) $(DD)page.dev
+ $(SETPDEV) DJ9xxVIP $(hpijs_)
+
+$(DD)AP21xx.dev : $(hpijs_) $(DD)page.dev
+ $(SETPDEV) AP21xx $(hpijs_)
+
diff --git a/print/ghostscript-gpl/files/patch-aa b/print/ghostscript-gpl/files/patch-aa
deleted file mode 100644
index d4e6fa42b073..000000000000
--- a/print/ghostscript-gpl/files/patch-aa
+++ /dev/null
@@ -1,224 +0,0 @@
---- src/unix-gcc.mak.orig Mon Sep 25 16:06:28 2000
-+++ src/unix-gcc.mak Sun Feb 25 17:58:59 2001
-@@ -26,14 +26,15 @@
- # source, generated intermediate file, and object directories
- # for the graphics library (GL) and the PostScript/PDF interpreter (PS).
-
--BINDIR=./bin
--GLSRCDIR=./src
--GLGENDIR=./obj
--GLOBJDIR=./obj
--PSSRCDIR=./src
--PSLIBDIR=./lib
--PSGENDIR=./obj
--PSOBJDIR=./obj
-+.CURDIR?=.
-+BINDIR=${.CURDIR}/bin
-+GLSRCDIR=${.CURDIR}/src
-+GLGENDIR=${.CURDIR}/obj
-+GLOBJDIR=${.CURDIR}/obj
-+PSSRCDIR=${.CURDIR}/src
-+PSLIBDIR=${.CURDIR}/lib
-+PSGENDIR=${.CURDIR}/obj
-+PSOBJDIR=${.CURDIR}/obj
-
- # Do not edit the next group of lines.
-
-@@ -52,11 +53,10 @@
- # the directories also define the default search path for the
- # initialization files (gs_*.ps) and the fonts.
-
--INSTALL = $(GLSRCDIR)/instcopy -c
--INSTALL_PROGRAM = $(INSTALL) -m 755
--INSTALL_DATA = $(INSTALL) -m 644
-+INSTALL_PROGRAM = $(BSD_INSTALL_SCRIPT)
-+INSTALL_DATA = $(BSD_INSTALL_DATA)
-
--prefix = /usr/local
-+prefix = $(PREFIX)
- exec_prefix = $(prefix)
- bindir = $(exec_prefix)/bin
- scriptdir = $(bindir)
-@@ -128,7 +128,7 @@
- # You may need to change this if the IJG library version changes.
- # See jpeg.mak for more information.
-
--JSRCDIR=jpeg
-+JSRCDIR=${.CURDIR}/jpeg
- JVERSION=6
-
- # Choose whether to use a shared version of the IJG JPEG library (-ljpeg).
-@@ -148,14 +148,14 @@
- # You may need to change this if the libpng version changes.
- # See libpng.mak for more information.
-
--PSRCDIR=libpng
-+PSRCDIR=${LOCALBASE}/include
- PVERSION=10008
-
- # Choose whether to use a shared version of the PNG library, and if so,
- # what its name is.
- # See gs.mak and Make.htm for more information.
-
--SHARE_LIBPNG=0
-+SHARE_LIBPNG=1
- LIBPNG_NAME=png
-
- # Define the directory where the zlib sources are stored.
-@@ -167,7 +167,7 @@
- # what its name is (usually libz, but sometimes libgz).
- # See gs.mak and Make.htm for more information.
-
--SHARE_ZLIB=0
-+SHARE_ZLIB=1
- #ZLIB_NAME=gz
- ZLIB_NAME=z
-
-@@ -182,7 +182,7 @@
-
- # Define the name of the C compiler.
-
--CC=gcc
-+CC?=cc
-
- # Define the name of the linker for the final link step.
- # Normally this is the same as the C compiler.
-@@ -215,7 +215,7 @@
- # gcc to accept ANSI-style function prototypes and function definitions.
- XCFLAGS=
-
--CFLAGS=$(CFLAGS_STANDARD) $(GCFLAGS) $(XCFLAGS)
-+#CFLAGS=$(CFLAGS_STANDARD) $(GCFLAGS) $(XCFLAGS)
-
- # Define platform flags for ld.
- # SunOS 4.n may need -Bstatic.
-@@ -224,7 +224,7 @@
- # -R /usr/local/xxx/lib:/usr/local/lib
- # giving the full path names of the shared library directories.
- # XLDFLAGS can be set from the command line.
--XLDFLAGS=
-+XLDFLAGS=-L${LOCALBASE}/lib
-
- LDFLAGS=$(XLDFLAGS) -fno-common
-
-@@ -244,7 +244,7 @@
- # All reasonable platforms require -lm, but Rhapsody and perhaps one or
- # two others fold libm into libc and don't require any additional library.
-
--STDLIBS=-lpthread -lm
-+STDLIBS= -lm
-
- # 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
-@@ -254,7 +254,7 @@
- # Note that x_.h expects to find the header files in $(XINCLUDE)/X11,
- # not in $(XINCLUDE).
-
--XINCLUDE=-I/usr/local/X/include
-+XINCLUDE=-I${X11BASE}/include
-
- # 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
-@@ -266,12 +266,16 @@
- # Solaris and other SVR4 systems with dynamic linking probably want
- #XLIBDIRS=-L/usr/openwin/lib -R/usr/openwin/lib
- # X11R6 (on any platform) may need
--#XLIBS=Xt SM ICE Xext X11
-+ifdef NO_X
-+XLIBS=
-+else
-+XLIBS=Xt SM ICE Xext X11
-+endif
-
- #XLIBDIRS=-L/usr/local/X/lib
--XLIBDIRS=-L/usr/X11/lib
-+XLIBDIRS=-L${X11BASE}/lib
- XLIBDIR=
--XLIBS=Xt Xext X11
-+#XLIBS=Xt Xext X11
-
- # Define whether this platform has floating point hardware:
- # FPU_TYPE=2 means floating point is faster than fixed point.
-@@ -329,7 +333,7 @@
- # Choose the device(s) to include. See devs.mak for details,
- # devs.mak and contrib.mak for the list of available devices.
-
--DEVICE_DEVS=$(DD)x11.dev $(DD)x11alpha.dev $(DD)x11cmyk.dev $(DD)x11gray2.dev $(DD)x11gray4.dev $(DD)x11mono.dev
-+#DEVICE_DEVS=$(DD)x11.dev $(DD)x11alpha.dev $(DD)x11cmyk.dev $(DD)x11gray2.dev $(DD)x11gray4.dev $(DD)x11mono.dev
-
- #DEVICE_DEVS1=
- #DEVICE_DEVS2=
-@@ -352,27 +356,27 @@
- #DEVICE_DEVS19=
- #DEVICE_DEVS20=
-
--DEVICE_DEVS1=$(DD)bmpmono.dev $(DD)bmpgray.dev $(DD)bmpsep1.dev $(DD)bmpsep8.dev $(DD)bmp16.dev $(DD)bmp256.dev $(DD)bmp16m.dev $(DD)bmp32b.dev
--DEVICE_DEVS2=$(DD)bmpamono.dev $(DD)bmpasep1.dev $(DD)bmpasep8.dev $(DD)bmpa16.dev $(DD)bmpa256.dev $(DD)bmpa16m.dev $(DD)bmpa32b.dev
--DEVICE_DEVS3=$(DD)deskjet.dev $(DD)djet500.dev $(DD)laserjet.dev $(DD)ljetplus.dev $(DD)ljet2p.dev $(DD)ljet3.dev $(DD)ljet3d.dev $(DD)ljet4.dev $(DD)ljet4d.dev $(DD)lj5mono.dev $(DD)lj5gray.dev
--DEVICE_DEVS4=$(DD)cdeskjet.dev $(DD)cdjcolor.dev $(DD)cdjmono.dev $(DD)cdj550.dev $(DD)pj.dev $(DD)pjxl.dev $(DD)pjxl300.dev
--DEVICE_DEVS5=$(DD)uniprint.dev
--DEVICE_DEVS6=$(DD)bj10e.dev $(DD)bj200.dev $(DD)bjc600.dev $(DD)bjc800.dev
--DEVICE_DEVS7=$(DD)faxg3.dev $(DD)faxg32d.dev $(DD)faxg4.dev
--DEVICE_DEVS8=$(DD)pcxmono.dev $(DD)pcxgray.dev $(DD)pcx16.dev $(DD)pcx256.dev $(DD)pcx24b.dev $(DD)pcxcmyk.dev
--DEVICE_DEVS9=$(DD)pbm.dev $(DD)pbmraw.dev $(DD)pgm.dev $(DD)pgmraw.dev $(DD)pgnm.dev $(DD)pgnmraw.dev $(DD)pnm.dev $(DD)pnmraw.dev $(DD)ppm.dev $(DD)ppmraw.dev $(DD)pkm.dev $(DD)pkmraw.dev $(DD)pksm.dev $(DD)pksmraw.dev
--DEVICE_DEVS10=$(DD)tiffcrle.dev $(DD)tiffg3.dev $(DD)tiffg32d.dev $(DD)tiffg4.dev $(DD)tifflzw.dev $(DD)tiffpack.dev
--DEVICE_DEVS11=$(DD)tiff12nc.dev $(DD)tiff24nc.dev
--DEVICE_DEVS12=$(DD)psmono.dev $(DD)psgray.dev $(DD)psrgb.dev $(DD)bit.dev $(DD)bitrgb.dev $(DD)bitcmyk.dev
--DEVICE_DEVS13=$(DD)pngmono.dev $(DD)pnggray.dev $(DD)png16.dev $(DD)png256.dev $(DD)png16m.dev
--DEVICE_DEVS14=$(DD)jpeg.dev $(DD)jpeggray.dev
--DEVICE_DEVS15=$(DD)pdfwrite.dev $(DD)pswrite.dev $(DD)epswrite.dev $(DD)pxlmono.dev $(DD)pxlcolor.dev
--
--DEVICE_DEVS16=
--DEVICE_DEVS17=
--DEVICE_DEVS18=
--DEVICE_DEVS19=
--DEVICE_DEVS20=$(DD)cljet5.dev $(DD)cljet5c.dev
-+#DEVICE_DEVS1=$(DD)bmpmono.dev $(DD)bmpgray.dev $(DD)bmpsep1.dev $(DD)bmpsep8.dev $(DD)bmp16.dev $(DD)bmp256.dev $(DD)bmp16m.dev $(DD)bmp32b.dev
-+#DEVICE_DEVS2=$(DD)bmpamono.dev $(DD)bmpasep1.dev $(DD)bmpasep8.dev $(DD)bmpa16.dev $(DD)bmpa256.dev $(DD)bmpa16m.dev $(DD)bmpa32b.dev
-+#DEVICE_DEVS3=$(DD)deskjet.dev $(DD)djet500.dev $(DD)laserjet.dev $(DD)ljetplus.dev $(DD)ljet2p.dev $(DD)ljet3.dev $(DD)ljet3d.dev $(DD)ljet4.dev $(DD)ljet4d.dev $(DD)lj5mono.dev $(DD)lj5gray.dev
-+#DEVICE_DEVS4=$(DD)cdeskjet.dev $(DD)cdjcolor.dev $(DD)cdjmono.dev $(DD)cdj550.dev $(DD)pj.dev $(DD)pjxl.dev $(DD)pjxl300.dev
-+#DEVICE_DEVS5=$(DD)uniprint.dev
-+#DEVICE_DEVS6=$(DD)bj10e.dev $(DD)bj200.dev $(DD)bjc600.dev $(DD)bjc800.dev
-+#DEVICE_DEVS7=$(DD)faxg3.dev $(DD)faxg32d.dev $(DD)faxg4.dev
-+#DEVICE_DEVS8=$(DD)pcxmono.dev $(DD)pcxgray.dev $(DD)pcx16.dev $(DD)pcx256.dev $(DD)pcx24b.dev $(DD)pcxcmyk.dev
-+#DEVICE_DEVS9=$(DD)pbm.dev $(DD)pbmraw.dev $(DD)pgm.dev $(DD)pgmraw.dev $(DD)pgnm.dev $(DD)pgnmraw.dev $(DD)pnm.dev $(DD)pnmraw.dev $(DD)ppm.dev $(DD)ppmraw.dev $(DD)pkm.dev $(DD)pkmraw.dev $(DD)pksm.dev $(DD)pksmraw.dev
-+#DEVICE_DEVS10=$(DD)tiffcrle.dev $(DD)tiffg3.dev $(DD)tiffg32d.dev $(DD)tiffg4.dev $(DD)tifflzw.dev $(DD)tiffpack.dev
-+#DEVICE_DEVS11=$(DD)tiff12nc.dev $(DD)tiff24nc.dev
-+#DEVICE_DEVS12=$(DD)psmono.dev $(DD)psgray.dev $(DD)psrgb.dev $(DD)bit.dev $(DD)bitrgb.dev $(DD)bitcmyk.dev
-+#DEVICE_DEVS13=$(DD)pngmono.dev $(DD)pnggray.dev $(DD)png16.dev $(DD)png256.dev $(DD)png16m.dev
-+#DEVICE_DEVS14=$(DD)jpeg.dev $(DD)jpeggray.dev
-+#DEVICE_DEVS15=$(DD)pdfwrite.dev $(DD)pswrite.dev $(DD)epswrite.dev $(DD)pxlmono.dev $(DD)pxlcolor.dev
-+
-+#DEVICE_DEVS16=
-+#DEVICE_DEVS17=
-+#DEVICE_DEVS18=
-+#DEVICE_DEVS19=
-+#DEVICE_DEVS20=$(DD)cljet5.dev $(DD)cljet5c.dev
-
- # ---------------------------- End of options --------------------------- #
-
-@@ -386,13 +390,13 @@
- # detect whether we're running a version of gcc with the const optimization
- # bug.
-
--AK=$(GLGENDIR)/cc.tr
-+#AK=$(GLGENDIR)/cc.tr
-
- # Define the compilation rules and flags.
-
- CCFLAGS=$(GENOPT) $(CFLAGS)
--CC_=$(CC) `cat $(AK)` $(CCFLAGS)
--CCAUX=$(CC) `cat $(AK)`
-+CC_=$(CC) $(CCFLAGS)
-+CCAUX=$(CC)
- CC_LEAF=$(CC_) -fomit-frame-pointer
- # gcc can't use -fomit-frame-pointer with -pg.
- CC_LEAF_PG=$(CC_)
-@@ -419,5 +423,5 @@
- include $(GLSRCDIR)/unixinst.mak
-
- # This has to come last so it won't be taken as the default target.
--$(AK):
-- if ( $(CC) --version | egrep "^2\.7\.([01]|2(\.[^1-9]|$$))" >/dev/null ); then echo -Dconst= >$(AK); else echo -Wcast-qual -Wwrite-strings >$(AK); fi
-+#$(AK):
-+# if ( $(CC) --version | egrep "^2\.7\.([01]|2(\.[^1-9]|$$))" >/dev/null ); then echo -Dconst= >$(AK); else echo -Wcast-qual -Wwrite-strings >$(AK); fi
diff --git a/print/ghostscript-gpl/files/patch-ac b/print/ghostscript-gpl/files/patch-ac
deleted file mode 100644
index 148e0e556d33..000000000000
--- a/print/ghostscript-gpl/files/patch-ac
+++ /dev/null
@@ -1,86 +0,0 @@
-begin patches/patch-ac:
-This patch removes the code that tries to figure out the cache size of
-the host. The algorithm may very well fail under some circumstances --
-it makes too many assumptions about the cache behaviour, but most
-importantly, the figured out values ARE NOT USED anywhere in the
-ghostscript code anymore.
-
- -mi
-
---- src/genarch.c Thu Mar 9 03:40:41 2000
-+++ src/genarch.c Wed Jul 19 09:37:30 2000
-@@ -43,11 +42,0 @@
--private clock_t
--time_clear(char *buf, int bsize, int nreps)
--{
-- clock_t t = clock();
-- int i;
--
-- for (i = 0; i < nreps; ++i)
-- memset(buf, 0, bsize);
-- return clock() - t;
--}
--
-@@ -181,63 +170,2 @@
- #undef PRINT_MAX
--
-- section(f, "Cache sizes");
--
-- /*
-- * Determine the primary and secondary cache sizes by looking for a
-- * non-linearity in the time required to fill blocks with memset.
-- */
-- {
--#define MAX_BLOCK (1 << 20)
-- static char buf[MAX_BLOCK];
-- int bsize = 1 << 10;
-- int nreps = 1;
-- clock_t t = 0;
-- clock_t t_eps;
--
-- /*
-- * Increase the number of repetitions until the time is
-- * long enough to exceed the likely uncertainty.
-- */
--
-- while ((t = time_clear(buf, bsize, nreps)) == 0)
-- nreps <<= 1;
-- t_eps = t;
-- while ((t = time_clear(buf, bsize, nreps)) < t_eps * 10)
-- nreps <<= 1;
--
-- /*
-- * Increase the block size until the time jumps non-linearly.
-- */
-- for (; bsize <= MAX_BLOCK;) {
-- clock_t dt = time_clear(buf, bsize, nreps);
--
-- if (dt > t + (t >> 1)) {
-- t = dt;
-- break;
-- }
-- bsize <<= 1;
-- nreps >>= 1;
-- if (nreps == 0)
-- nreps = 1, t <<= 1;
-- }
-- define_int(f, "ARCH_CACHE1_SIZE", bsize >> 1);
-- /*
-- * Do the same thing a second time for the secondary cache.
-- */
-- if (nreps > 1)
-- nreps >>= 1, t >>= 1;
-- for (; bsize <= MAX_BLOCK;) {
-- clock_t dt = time_clear(buf, bsize, nreps);
--
-- if (dt > t * 1.25) {
-- t = dt;
-- break;
-- }
-- bsize <<= 1;
-- nreps >>= 1;
-- if (nreps == 0)
-- nreps = 1, t <<= 1;
-- }
-- define_int(f, "ARCH_CACHE2_SIZE", bsize >> 1);
-- }
diff --git a/print/ghostscript-gpl/files/patch-hpijs:makefile b/print/ghostscript-gpl/files/patch-hpijs:makefile
new file mode 100644
index 000000000000..8f53a8202f59
--- /dev/null
+++ b/print/ghostscript-gpl/files/patch-hpijs:makefile
@@ -0,0 +1,32 @@
+--- hpijs/makefile.orig Fri Jun 8 06:10:57 2001
++++ hpijs/makefile Tue Jul 10 03:09:21 2001
+@@ -1,17 +1,17 @@
+-FLAGS = -D_LITTLE_ENDIAN -D_DJ660 -D_DJ6xx -D_DJ6xxPhoto -D_DJ8xx -D_DJ9xx \
++FLAGS = -D_DJ660 -D_DJ6xx -D_DJ6xxPhoto -D_DJ8xx -D_DJ9xx \
+ -D_DJ9xxVIP -D_DJ630 -D_APOLLO2100 -D_DJ600 -D_DJ350
+
+ VERSION=0.97
+ INSTALLDIR=/usr/bin
+
+
+-CC = g++ -c -Wall -DVERSION=\"$(VERSION)\" $(FLAGS)
++CXXFLAGS += -DVERSION=\"$(VERSION)\" $(FLAGS)
+ #CC = g++ -c -g -Wall -DVERSION=\"$(VERSION)\" -DCAPTURE $(FLAGS)
+ #CC = g++ -c -g -Wall -DVERSION=\"$(VERSION)\" $(FLAGS)
+
+ .cpp.o:
+ echo "compiling $(<F)"
+- $(CC) $(<F) -o $(*F).o
++ $(CXX) $(CXXFLAGS) -c $(<F) -o $(*F).o
+
+ OBJS = hpijs.o models.o breaks_open.o \
+ aladdin.o broadway.o capture.o \
+@@ -28,7 +28,7 @@
+
+
+ linkit: $(OBJS)
+- g++ $(OBJS) -o hpijs
++ $(CXX) $(OBJS) -o hpijs
+
+ install:
+ install -m 0755 -s hpijs $(INSTALLDIR)
diff --git a/print/ghostscript-gpl/files/patch-lib,gs_init.ps b/print/ghostscript-gpl/files/patch-lib,gs_init.ps
deleted file mode 100644
index a2f5d54ee5b7..000000000000
--- a/print/ghostscript-gpl/files/patch-lib,gs_init.ps
+++ /dev/null
@@ -1,31 +0,0 @@
- File: @(#)$Id: README,v 2.6 2000/11/09 18:33:58 Martin Beta $
- Contents: README file for the pcl3 distribution
- Author: Martin Lottermoser, Greifswaldstrasse 28, 38124 Braunschweig,
- Germany. E-mail: Martin.Lottermoser@t-online.de.
-[...]
- 8. There is also a bug in ghostscript's default configuration for the
- undercolour removal and black generation functions. It shows up when
- printing PostScript documents using the RGB colour space ("setrgbcolor" or
- "sethsbcolor") on a device where the CMYK space is the native colour space;
- this is the case for pcl3 if you specify "-sColourModel=CMYK". The bug
- results in black being printed as a mixture of cyan, magenta, and yellow.
- On my printer, this is a slightly greenish grey with fuzzy edges. My
- subjective impression is that correcting this bug leads to sharper-looking
- images.
-[...]
-
-I generated a patch as suggested from Martin Lottermoser
-
- -andreas
-
---- lib/gs_init.ps.orig Mon Jan 8 20:47:39 2001
-+++ lib/gs_init.ps Mon Jan 8 20:49:02 2001
-@@ -1229,7 +1229,7 @@
- % Set the default screen and BG/UCR.
- /.setdefaultbgucr {
- systemdict /setblackgeneration known {
-- { pop 0 } dup setblackgeneration setundercolorremoval
-+ {} dup setblackgeneration setundercolorremoval
- } if
- } bind def
- /.useloresscreen { % - .useloresscreen <bool>
diff --git a/print/ghostscript-gpl/files/patch-lib:gs_init.ps b/print/ghostscript-gpl/files/patch-lib:gs_init.ps
new file mode 100644
index 000000000000..d3e7e8130021
--- /dev/null
+++ b/print/ghostscript-gpl/files/patch-lib:gs_init.ps
@@ -0,0 +1,19 @@
+--- lib/gs_init.ps.orig Mon Apr 9 15:20:03 2001
++++ lib/gs_init.ps Wed Jun 20 04:05:12 2001
+@@ -1263,7 +1263,7 @@
+ % Set the default screen and BG/UCR.
+ /.setdefaultbgucr {
+ systemdict /setblackgeneration known {
+- { pop 0 } dup setblackgeneration setundercolorremoval
++ {} dup setblackgeneration setundercolorremoval
+ } if
+ } bind def
+ /.useloresscreen { % - .useloresscreen <bool>
+@@ -1815,3 +1815,7 @@
+ (END GC) VMDEBUG
+
+ % The interpreter will run the initial procedure (start).
++
++% unofficial patch:
++% make it possible to print from within acroread pdf viewer
++/Default currenthalftone /Halftone defineresource pop
diff --git a/print/ghostscript-gpl/files/patch-pcl3:eprn:gdeveprn.c b/print/ghostscript-gpl/files/patch-pcl3:eprn:gdeveprn.c
new file mode 100644
index 000000000000..605148be439c
--- /dev/null
+++ b/print/ghostscript-gpl/files/patch-pcl3:eprn:gdeveprn.c
@@ -0,0 +1,12 @@
+--- pcl3/eprn/gdeveprn.c.orig Sun Mar 25 13:59:11 2001
++++ pcl3/eprn/gdeveprn.c Tue Apr 10 17:53:03 2001
+@@ -81,6 +81,9 @@
+ #include "gstypes.h" /* needed by gsstate.h */
+ #include "gsstate.h" /* needed by icstate.h */
+ #include "icstate.h" /* for struct gs_context_state_s */
++#if !defined(GS_REVISION) || GS_REVISION >= 700
++#include "iapi.h" /* needed by iminst.h */
++#endif
+ #include "iminst.h" /* for struct gs_main_instance_s */
+ #include "imain.h" /* for gs_main_instance_default() */
+ #include "gscoord.h" /* for gs_setdefaultmatrix() */
diff --git a/print/ghostscript-gpl/files/patch-src.gdevxini.c b/print/ghostscript-gpl/files/patch-src.gdevxini.c
deleted file mode 100644
index 5c072ec041e4..000000000000
--- a/print/ghostscript-gpl/files/patch-src.gdevxini.c
+++ /dev/null
@@ -1,47 +0,0 @@
-Message-ID: <3AB64C01.54380C00@we.lc.ehu.es>
-Date: Mon, 19 Mar 2001 19:12:17 +0100
-From: "Jose M. Alcaide" <jose@we.lc.ehu.es>
-Organization: Universidad del Pais Vasco - Dpto. de Electricidad y Electronica
-Subject: new patch for ghostscript 6.50
-
-Hello Andreas,
-
-About a month ago I sent you a patch for GhostScript 6.50. Without that
-patch, LyX 1.1.6 cannot show included EPS figures. Now that the LyX
-port has been updated this problem will begin to hit many LyX users,
-and the ports freeze is coming soon...
-
-The problem is described in:
-
-http://sourceforge.net/bugs/?func=detailbug&bug_id=124957&group_id=1897
-
-I am resending the patch attached to this message. I am using Ghostscript
-with this patch applied and everything (including LyX) seems to work OK.
-
-Cheers,
--- JMA
-****** Jose M. Alcaide // jose@we.lc.ehu.es // jmas@FreeBSD.org ******
-** "Beware of Programmers who carry screwdrivers" -- Leonard Brandwein **
---------------8E7698D95DE1CB06D5711335
-Content-Type: text/plain; charset=us-ascii;
- name="patch-src,gdevxini.c"
-Content-Transfer-Encoding: 7bit
-Content-Disposition: inline;
- filename="patch-src,gdevxini.c"
-
---- src/gdevxini.c.orig Tue Sep 19 21:00:23 2000
-+++ src/gdevxini.c Tue Feb 20 18:07:09 2001
-@@ -654,8 +654,10 @@
- }
- x_set_buffer(xdev);
- /* Clear the destination pixmap to avoid initializing with garbage. */
-- xdev->dest = (xdev->bpixmap != (Pixmap) 0 ?
-+ if (xdev->dest == (Pixmap) 0) {
-+ xdev->dest = (xdev->bpixmap != (Pixmap) 0 ?
- xdev->bpixmap : (Pixmap) xdev->win);
-+ }
- if (xdev->dest != (Pixmap) 0) {
- XSetForeground(xdev->dpy, xdev->gc, xdev->background);
- XFillRectangle(xdev->dpy, xdev->dest, xdev->gc,
-
-
diff --git a/print/ghostscript-gpl/files/patch-src:contrib.mak-5.94.add b/print/ghostscript-gpl/files/patch-src:contrib.mak-5.94.add
new file mode 100644
index 000000000000..1d2c46b8ea2e
--- /dev/null
+++ b/print/ghostscript-gpl/files/patch-src:contrib.mak-5.94.add
@@ -0,0 +1,14 @@
+--- src/contrib.mak-5.94.add.orig Sun Oct 17 05:20:06 1999
++++ src/contrib.mak-5.94.add Tue Jun 19 03:20:13 2001
+@@ -102,11 +102,6 @@
+ $(GLOBJ)hpdjprn.$(OBJ): $(GLSRC)hpdjprn.c
+ $(GLCC) $(C_) $(O_)$@ $(hpdj_opts) $(GLSRC)hpdjprn.c
+
+-$(GLOBJ)pclcomp.$(OBJ): $(GLSRC)pclcomp.c
+- $(GLCC) $(C_) $(O_)$@ $(hpdj_opts) $(GLSRC)pclcomp.c
+-
+-$(GLOBJ)pagecount.$(OBJ): $(GLSRC)pagecount.c
+- $(GLCC) $(C_) $(O_)$@ $(hpdj_opts) $(GLSRC)pagecount.c
+
+
+ $(DD)hpdj.dev: $(hpdj_) $(DD)page.dev
diff --git a/print/ghostscript-gpl/files/patch-src:genarch.c b/print/ghostscript-gpl/files/patch-src:genarch.c
new file mode 100644
index 000000000000..3b74ac7e6145
--- /dev/null
+++ b/print/ghostscript-gpl/files/patch-src:genarch.c
@@ -0,0 +1,34 @@
+--- src/genarch.c.orig Wed Sep 20 04:00:23 2000
++++ src/genarch.c Wed Jun 20 04:05:36 2001
+@@ -40,6 +40,7 @@
+ fprintf(f, "\n\t /* ---------------- %s ---------------- */\n\n", str);
+ }
+
++#ifndef __FreeBSD__
+ private clock_t
+ time_clear(char *buf, int bsize, int nreps)
+ {
+@@ -50,6 +51,7 @@
+ memset(buf, 0, bsize);
+ return clock() - t;
+ }
++#endif /* __FreeBSD__ */
+
+ private void
+ define(FILE *f, const char *str)
+@@ -180,6 +182,7 @@
+ fprintf(f, "((unsigned long)~0L + (unsigned long)0)\n");
+ #undef PRINT_MAX
+
++#ifndef __FreeBSD__
+ section(f, "Cache sizes");
+
+ /*
+@@ -240,6 +243,7 @@
+ }
+ define_int(f, "ARCH_CACHE2_SIZE", bsize >> 1);
+ }
++#endif /* __FreeBSD__ */
+
+ section(f, "Miscellaneous");
+
diff --git a/print/ghostscript-gpl/files/patch-src:gp_unifs.c b/print/ghostscript-gpl/files/patch-src:gp_unifs.c
new file mode 100644
index 000000000000..68c9bcaf175b
--- /dev/null
+++ b/print/ghostscript-gpl/files/patch-src:gp_unifs.c
@@ -0,0 +1,34 @@
+--- src/gp_unifs.c.orig Tue Mar 13 15:51:39 2001
++++ src/gp_unifs.c Wed Jun 20 04:06:02 2001
+@@ -28,6 +28,7 @@
+ #include "stat_.h"
+ #include "dirent_.h"
+ #include <sys/param.h> /* for MAXPATHLEN */
++#include <unistd.h>
+
+ /* Some systems (Interactive for example) don't define MAXPATHLEN,
+ * so we define it here. (This probably should be done via a Config-Script.)
+@@ -58,6 +59,8 @@
+ const char *mode)
+ { /* The -8 is for XXXXXX plus a possible final / and -. */
+ int len = gp_file_name_sizeof - strlen(prefix) - 8;
++ int fd;
++ FILE *f;
+
+ if (gp_gettmpdir(fname, &len) != 0)
+ strcpy(fname, "/tmp/");
+@@ -70,8 +73,12 @@
+ if (*fname != 0 && fname[strlen(fname) - 1] == 'X')
+ strcat(fname, "-");
+ strcat(fname, "XXXXXX");
+- mktemp(fname);
+- return gp_fopentemp(fname, mode);
++ fd = mkstemp(fname);
++ if (fd == -1)
++ return NULL;
++ if ((f = fdopen(fd, mode)) == NULL)
++ close(fd);
++ return f;
+ }
+
+ /* Open a file with the given name, as a stream of uninterpreted bytes. */
diff --git a/print/ghostscript-gpl/files/patch-src:unix-gcc.mak b/print/ghostscript-gpl/files/patch-src:unix-gcc.mak
new file mode 100644
index 000000000000..32c9f2b531d5
--- /dev/null
+++ b/print/ghostscript-gpl/files/patch-src:unix-gcc.mak
@@ -0,0 +1,130 @@
+--- src/unix-gcc.mak.orig Mon Apr 9 14:52:57 2001
++++ src/unix-gcc.mak Fri Jun 15 21:47:42 2001
+@@ -26,14 +26,15 @@
+ # source, generated intermediate file, and object directories
+ # for the graphics library (GL) and the PostScript/PDF interpreter (PS).
+
+-BINDIR=./bin
+-GLSRCDIR=./src
+-GLGENDIR=./obj
+-GLOBJDIR=./obj
+-PSSRCDIR=./src
+-PSLIBDIR=./lib
+-PSGENDIR=./obj
+-PSOBJDIR=./obj
++.CURDIR?=.
++BINDIR=${.CURDIR}/bin
++GLSRCDIR=${.CURDIR}/src
++GLGENDIR=${.CURDIR}/obj
++GLOBJDIR=${.CURDIR}/obj
++PSSRCDIR=${.CURDIR}/src
++PSLIBDIR=${.CURDIR}/lib
++PSGENDIR=${.CURDIR}/obj
++PSOBJDIR=${.CURDIR}/obj
+
+ # Do not edit the next group of lines.
+
+@@ -52,11 +53,10 @@
+ # the directories also define the default search path for the
+ # initialization files (gs_*.ps) and the fonts.
+
+-INSTALL = $(GLSRCDIR)/instcopy -c
+-INSTALL_PROGRAM = $(INSTALL) -m 755
+-INSTALL_DATA = $(INSTALL) -m 644
++INSTALL_PROGRAM = $(BSD_INSTALL_SCRIPT)
++INSTALL_DATA = $(BSD_INSTALL_DATA)
+
+-prefix = /usr/local
++prefix = $(PREFIX)
+ exec_prefix = $(prefix)
+ bindir = $(exec_prefix)/bin
+ scriptdir = $(bindir)
+@@ -128,7 +128,7 @@
+ # You may need to change this if the IJG library version changes.
+ # See jpeg.mak for more information.
+
+-JSRCDIR=jpeg
++JSRCDIR=${.CURDIR}/jpeg
+ JVERSION=6
+
+ # Choose whether to use a shared version of the IJG JPEG library (-ljpeg).
+@@ -148,14 +148,14 @@
+ # You may need to change this if the libpng version changes.
+ # See libpng.mak for more information.
+
+-PSRCDIR=libpng
++PSRCDIR=${LOCALBASE}/include
+ PVERSION=10010
+
+ # Choose whether to use a shared version of the PNG library, and if so,
+ # what its name is.
+ # See gs.mak and Make.htm for more information.
+
+-SHARE_LIBPNG=0
++SHARE_LIBPNG=1
+ LIBPNG_NAME=png
+
+ # Define the directory where the zlib sources are stored.
+@@ -167,7 +167,7 @@
+ # what its name is (usually libz, but sometimes libgz).
+ # See gs.mak and Make.htm for more information.
+
+-SHARE_ZLIB=0
++SHARE_ZLIB=1
+ #ZLIB_NAME=gz
+ ZLIB_NAME=z
+
+@@ -187,7 +187,7 @@
+
+ # Define the name of the C compiler.
+
+-CC=gcc
++CC?=cc
+
+ # Define the name of the linker for the final link step.
+ # Normally this is the same as the C compiler.
+@@ -222,7 +222,7 @@
+ # gcc to accept ANSI-style function prototypes and function definitions.
+ XCFLAGS=
+
+-CFLAGS=$(CFLAGS_STANDARD) $(GCFLAGS) $(XCFLAGS)
++#CFLAGS=$(CFLAGS_STANDARD) $(GCFLAGS) $(XCFLAGS)
+
+ # Define platform flags for ld.
+ # SunOS 4.n may need -Bstatic.
+@@ -231,7 +231,7 @@
+ # -R /usr/local/xxx/lib:/usr/local/lib
+ # giving the full path names of the shared library directories.
+ # XLDFLAGS can be set from the command line.
+-XLDFLAGS=
++XLDFLAGS=-L${LOCALBASE}/lib
+
+ LDFLAGS=$(XLDFLAGS) -fno-common
+
+@@ -264,7 +264,7 @@
+ # Note that x_.h expects to find the header files in $(XINCLUDE)/X11,
+ # not in $(XINCLUDE).
+
+-XINCLUDE=-I/usr/X11R6/include
++XINCLUDE=-I${X11BASE}/include
+
+ # 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
+@@ -277,11 +277,16 @@
+ #XLIBDIRS=-L/usr/openwin/lib -R/usr/openwin/lib
+ # X11R6 (on any platform) may need
+ #XLIBS=Xt SM ICE Xext X11
++ifdef NO_X
++XLIBS=
++else
++XLIBS=Xt SM ICE Xext X11
++endif
+
+ #XLIBDIRS=-L/usr/local/X/lib
+-XLIBDIRS=-L/usr/X11R6/lib
++XLIBDIRS=-L${X11BASE}/lib
+ XLIBDIR=
+-XLIBS=Xt Xext X11
++#XLIBS=Xt Xext X11
+
+ # Define whether this platform has floating point hardware:
diff --git a/print/ghostscript-gpl/files/patch-src:zmedia2.c b/print/ghostscript-gpl/files/patch-src:zmedia2.c
new file mode 100644
index 000000000000..7db33eaecc44
--- /dev/null
+++ b/print/ghostscript-gpl/files/patch-src:zmedia2.c
@@ -0,0 +1,25 @@
+--- src/zmedia2.c.orig Wed Sep 20 04:00:54 2000
++++ src/zmedia2.c Wed Jun 20 04:06:24 2001
+@@ -427,11 +427,17 @@
+
+ rx = ry, ry = temp;
+ }
+- /* Adjust the medium size if flexible. */
+- if (medium->p.x < MIN_MEDIA_SIZE && mx > rx)
+- mx = rx;
+- if (medium->p.y < MIN_MEDIA_SIZE && my > ry)
+- my = ry;
++ /* If 'medium' is flexible, adjust 'mx' and 'my' towards 'rx' and 'ry',
++ respectively. Note that 'mx' and 'my' have just acquired the largest
++ permissible value, medium->q. */
++ if (medium->p.x < mx) /* non-empty width range */
++ if (rx < medium->p.x) mx = medium->p.x; /* minimum */
++ else if (mx > rx) mx = rx; /* fits */
++ /* else use medium->q.x, i.e., the maximum */
++ if (medium->p.y < my) /* non-empty height range */
++ if (ry < medium->p.y) my = medium->p.y; /* minimum */
++ else if (my > ry) my = ry; /* fits */
++ /* else use medium->q.y, i.e., the maximum */
+
+ /* Translate to align the centers. */
+ gs_make_translation(mx / 2, my / 2, pmat);