diff options
author | tron <tron@pkgsrc.org> | 1999-01-10 23:52:15 +0000 |
---|---|---|
committer | tron <tron@pkgsrc.org> | 1999-01-10 23:52:15 +0000 |
commit | f9cc3e2fe3166bc53d24920d40a75616a15b5e82 (patch) | |
tree | 99d3147289899b06709d968bf62d94403c80f9c3 /graphics/netpbm | |
parent | 4aba3cc51f80d0cac59ec6837b5ac9348cb65567 (diff) | |
download | pkgsrc-f9cc3e2fe3166bc53d24920d40a75616a15b5e82.tar.gz |
Major cleanup of "netpbm" package based on patches supply by
John F. Woods in PR pkg/6763 and Rob Windsor in PR pkg/6779.
Diffstat (limited to 'graphics/netpbm')
39 files changed, 1202 insertions, 716 deletions
diff --git a/graphics/netpbm/Makefile b/graphics/netpbm/Makefile index 1caff755d57..6562ebd1bea 100644 --- a/graphics/netpbm/Makefile +++ b/graphics/netpbm/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.22 1998/11/30 19:42:02 tv Exp $ +# $NetBSD: Makefile,v 1.23 1999/01/10 23:52:15 tron Exp $ # DISTNAME= netpbm @@ -10,7 +10,7 @@ MASTER_SITES= ftp://ftp.wustl.edu/graphics/graphics/packages/NetPBM/ \ DISTFILES= netpbm-1mar1994.tar.gz \ pcxtoppm.tar.gz \ rletopnm.tar.gz \ - pnmtopng-2.36.tar.gz + pnmtopng-2.37.1.tar.gz MAINTAINER= tron@netbsd.org @@ -18,23 +18,16 @@ DEPENDS+= tiff-3.4:../../graphics/tiff DEPENDS+= jpeg-6b:../../graphics/jpeg DEPENDS+= png-1.0.2:../../graphics/png -CONFLICTS= netpbm-94.3.1 +CONFLICTS= netpbm-* WRKSRC= ${WRKDIR}/netpbm -MAKE_ENV += PREFIX=${PREFIX} INSTALL_MAN="${INSTALL_MAN}" +MAKE_ENV += PREFIX=${PREFIX} MANCP="${INSTALL_MAN}" +NO_CONFIGURE= yes post-extract: -# make sure our TIFF library is used - ${RM} -rf ${WRKSRC}/libtiff # move updates into source tree - cd ${WRKSRC};\ - ${MV} ../*pcx*.? ppm;\ - ${MV} ../*rle*.? ../*png*.? pnm - -post-install: -.for PBMLIB in pbm pgm pnm ppm - ${INSTALL_DATA} ${WRKSRC}/${PBMLIB}/lib${PBMLIB}.a ${PREFIX}/lib - ${INSTALL_DATA} ${WRKSRC}/${PBMLIB}/${PBMLIB}.h ${PREFIX}/include -.endfor + cd ${WRKSRC}; \ + ${MV} ../*pcx*.? ppm; \ + ${MV} ../*rle*.? ../*png*.? pnm; .include "../../mk/bsd.pkg.mk" diff --git a/graphics/netpbm/files/md5 b/graphics/netpbm/files/md5 index 8ca8eafb798..d4daaf57605 100644 --- a/graphics/netpbm/files/md5 +++ b/graphics/netpbm/files/md5 @@ -1,6 +1,6 @@ -$NetBSD: md5,v 1.4 1998/08/07 13:21:37 agc Exp $ +$NetBSD: md5,v 1.5 1999/01/10 23:52:15 tron Exp $ MD5 (netpbm-1mar1994.tar.gz) = 55f505b09e69a5db8f08844435282dfb MD5 (pcxtoppm.tar.gz) = d9a37913ef2c2cd412b0e7f969487dc2 MD5 (rletopnm.tar.gz) = c0488f9918f506bf6a8d09870d5d115f -MD5 (pnmtopng-2.36.tar.gz) = 37258ecb340f58784faef72f280b1b9f +MD5 (pnmtopng-2.37.1.tar.gz) = 3addb1d14811c86169c4bb09ee8942d7 diff --git a/graphics/netpbm/patches/patch-aa b/graphics/netpbm/patches/patch-aa index e8a7ca5134d..d2a025e598d 100644 --- a/graphics/netpbm/patches/patch-aa +++ b/graphics/netpbm/patches/patch-aa @@ -1,8 +1,17 @@ -$NetBSD: patch-aa,v 1.4 1998/08/07 10:40:50 agc Exp $ +$NetBSD: patch-aa,v 1.5 1999/01/10 23:52:15 tron Exp $ --- Makefile.orig Wed Jan 26 12:47:35 1994 -+++ Makefile Wed Feb 25 02:22:04 1998 -@@ -48,31 +48,31 @@ ++++ Makefile Mon Jan 11 00:17:07 1999 +@@ -21,7 +21,7 @@ + #CC = gcc -ansi -pedantic -fcombine-regs -fpcc-struct-return + + # CONFIGURE: cc flags go here. +-CFLAGS = -O ++CFLAGS = -O2 + #CFLAGS = -g + #CFLAGS = -g -O + +@@ -48,33 +48,36 @@ # By the way, you must have at least version 2.4 of libtiff. Earlier # versions will not work. TIFFDEF = -DLIBTIFF @@ -37,11 +46,16 @@ $NetBSD: patch-aa,v 1.4 1998/08/07 10:40:50 agc Exp $ # compress or pack. The ../mantocat is used on systems which use man pages # in the "cat" format. -MANCP = cp -+MANCP = ${INSTALL_MAN} ++MANCP = install -c -m 0644 #MANCP = ../mantocat ++INSTALLLIBS = $(PREFIX)/lib ++INSTALLDEFS = $(PREFIX)/include ++ # CONFIGURE: Normally the Makefiles build and install separate binaries for -@@ -87,10 +87,10 @@ + # each program. However, on some systems (especially those without shared + # libraries) this can mean a lot of space. In this case you might try +@@ -87,10 +90,10 @@ # # Note that if you make a "merge", the executables don't get created # until you do the install. @@ -56,7 +70,7 @@ $NetBSD: patch-aa,v 1.4 1998/08/07 10:40:50 agc Exp $ # End of configurable definitions. -@@ -99,8 +99,8 @@ +@@ -99,10 +102,10 @@ SUBDIRS = pbm pgm ppm pnm binaries: @@ -65,5 +79,42 @@ $NetBSD: patch-aa,v 1.4 1998/08/07 10:40:50 agc Exp $ +# ./stamp-date +# ( echo "libtiff" ; cd libtiff ; make ) for i in $(SUBDIRS) ; do \ - ( echo $$i ; cd $$i ; $(MAKE) $(MFLAGS) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'TIFFDEF=$(TIFFDEF)' 'TIFFINC=$(TIFFINC)' 'TIFFLIB=$(TIFFLIB)' 'TIFFBINARIES=$(TIFFBINARIES)' 'TIFFOBJECTS=$(TIFFOBJECTS)' 'LDFLAGS=$(LDFLAGS)' binaries ); \ +- ( echo $$i ; cd $$i ; $(MAKE) $(MFLAGS) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'TIFFDEF=$(TIFFDEF)' 'TIFFINC=$(TIFFINC)' 'TIFFLIB=$(TIFFLIB)' 'TIFFBINARIES=$(TIFFBINARIES)' 'TIFFOBJECTS=$(TIFFOBJECTS)' 'LDFLAGS=$(LDFLAGS)' binaries ); \ ++ ( echo "===> $$i" ; cd $$i ; $(MAKE) $(MFLAGS) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'TIFFDEF=$(TIFFDEF)' 'TIFFINC=$(TIFFINC)' 'TIFFLIB=$(TIFFLIB)' 'TIFFBINARIES=$(TIFFBINARIES)' 'TIFFOBJECTS=$(TIFFOBJECTS)' 'LDFLAGS=$(LDFLAGS)' binaries ); \ + done + + merge: +@@ -113,15 +116,19 @@ + done + + install.bin: +- -mkdir $(INSTALLBINARIES) ++# -mkdir $(INSTALLBINARIES) ++# -mkdir $(INSTALLLIBS) ++# -mkdir $(INSTALLDEFS) + for i in $(SUBDIRS) ; do \ +- ( echo $$i ; cd $$i ; $(MAKE) $(MFLAGS) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'TIFFDEF=$(TIFFDEF)' 'TIFFINC=$(TIFFINC)' 'TIFFLIB=$(TIFFLIB)' 'TIFFBINARIES=$(TIFFBINARIES)' 'TIFFOBJECTS=$(TIFFOBJECTS)' 'LDFLAGS=$(LDFLAGS)' 'INSTALLBINARIES=$(INSTALLBINARIES)' 'INSTALLSCRIPTS=$(INSTALLSCRIPTS)' install.bin ); \ ++ ( echo $$i ; cd $$i ; $(MAKE) $(MFLAGS) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'TIFFDEF=$(TIFFDEF)' 'TIFFINC=$(TIFFINC)' 'TIFFLIB=$(TIFFLIB)' 'TIFFBINARIES=$(TIFFBINARIES)' 'TIFFOBJECTS=$(TIFFOBJECTS)' 'LDFLAGS=$(LDFLAGS)' 'INSTALLBINARIES=$(INSTALLBINARIES)' 'INSTALLSCRIPTS=$(INSTALLSCRIPTS)' 'INSTALLLIBS=$(INSTALLLIBS)' 'INSTALLDEFS=$(INSTALLDEFS)' install.bin ); \ + done + + install.merge: +- -mkdir $(INSTALLBINARIES) ++# -mkdir $(INSTALLBINARIES) ++# -mkdir $(INSTALLLIBS) ++# -mkdir $(INSTALLDEFS) + for i in $(SUBDIRS) ; do \ +- ( echo $$i ; cd $$i ; $(MAKE) $(MFLAGS) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'TIFFDEF=$(TIFFDEF)' 'TIFFINC=$(TIFFINC)' 'TIFFLIB=$(TIFFLIB)' 'TIFFBINARIES=$(TIFFBINARIES)' 'TIFFOBJECTS=$(TIFFOBJECTS)' 'LDFLAGS=$(LDFLAGS)' 'INSTALLBINARIES=$(INSTALLBINARIES)' 'INSTALLSCRIPTS=$(INSTALLSCRIPTS)' install.merge ); \ ++ ( echo $$i ; cd $$i ; $(MAKE) $(MFLAGS) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'TIFFDEF=$(TIFFDEF)' 'TIFFINC=$(TIFFINC)' 'TIFFLIB=$(TIFFLIB)' 'TIFFBINARIES=$(TIFFBINARIES)' 'TIFFOBJECTS=$(TIFFOBJECTS)' 'LDFLAGS=$(LDFLAGS)' 'INSTALLBINARIES=$(INSTALLBINARIES)' 'INSTALLSCRIPTS=$(INSTALLSCRIPTS)' 'INSTALLLIBS=$(INSTALLLIBS)' 'INSTALLDEFS=$(INSTALLDEFS)' install.merge ); \ + done + + install.man: +@@ -131,7 +138,7 @@ + + clean: + rm -f *.shar *.shar? art.* *~ +- echo "" > compile.h +- for i in $(SUBDIRS) libtiff ; do \ ++ rm -f compile.h ; echo "" > compile.h ++ for i in $(SUBDIRS) ; do \ + ( echo $$i ; cd $$i ; $(MAKE) $(MFLAGS) clean ); \ done diff --git a/graphics/netpbm/patches/patch-ab b/graphics/netpbm/patches/patch-ab index 439b7044493..d4967e9d50f 100644 --- a/graphics/netpbm/patches/patch-ab +++ b/graphics/netpbm/patches/patch-ab @@ -1,25 +1,27 @@ -$NetBSD: patch-ab,v 1.3 1998/08/07 10:40:50 agc Exp $ +$NetBSD: patch-ab,v 1.4 1999/01/10 23:52:15 tron Exp $ ---- pgm/Makefile.orig Fri Jan 28 11:14:02 1994 -+++ pgm/Makefile Sat Dec 20 22:51:17 1997 -@@ -39,10 +39,10 @@ - LIBPGM = libpgm.a +--- pbmplus.h.orig Tue Mar 1 10:46:36 1994 ++++ pbmplus.h Mon Jan 11 00:33:32 1999 +@@ -119,10 +119,12 @@ + #ifndef VMS + #include <unistd.h> + #endif ++#ifndef __NetBSD__ + extern int atoi(); + extern void exit(); + extern long time(); + extern int write(); ++#endif /* NetBSD */ + #endif - PORTBINARIES = asciitopgm bioradtopgm fstopgm hipstopgm \ -- lispmtopgm pbmtopgm pgmbentley pgmenhance pgmhist pgmkernel \ -+ lispmtopgm pbmtopgm pgmbentley pgmenhance pgmhist \ - pgmnoise pgmnorm pgmoil pgmramp pgmtofs pgmtolispm \ - pgmtopbm psidtopgm spottopgm --MATHBINARIES = pgmcrater pgmedge pgmtexture rawtopgm -+MATHBINARIES = pgmcrater pgmedge pgmtexture rawtopgm pgmkernel - BINARIES = $(PORTBINARIES) $(MATHBINARIES) + /* CONFIGURE: On most BSD systems, malloc() gets declared in stdlib.h, on +@@ -275,5 +277,9 @@ + int vfprintf ARGS(( FILE* stream, char* format, va_list args )); + #endif /*NEED_VFPRINTF*/ - OBJECTS = asciitopgm.o bioradtopgm.o fstopgm.o hipstopgm.o \ -@@ -134,7 +134,6 @@ - pgmedge pgmedge.o: pgmedge.c - pgmenhance pgmenhance.o: pgmenhance.c - pgmhist pgmhist.o: pgmhist.c --pgmkernel pgmkernel.o: pgmkernel.c - pgmnoise pgmnoise.o: pgmnoise.c - pgmnorm pgmnorm.o: pgmnorm.c - pgmoil pgmoil.o: pgmoil.c ++#ifdef __NetBSD__ ++#include <errno.h> ++#define A_STRERROR ++#endif + + #endif /*_PBMPLUS_H_*/ diff --git a/graphics/netpbm/patches/patch-ac b/graphics/netpbm/patches/patch-ac index 0cc29ccda80..c62b5d8bc11 100644 --- a/graphics/netpbm/patches/patch-ac +++ b/graphics/netpbm/patches/patch-ac @@ -1,33 +1,116 @@ -$NetBSD: patch-ac,v 1.5 1998/08/07 10:40:50 agc Exp $ +$NetBSD: patch-ac,v 1.6 1999/01/10 23:52:15 tron Exp $ ---- pnm/Makefile.orig Mon Jan 31 09:47:32 1994 -+++ pnm/Makefile Sat Jun 20 04:21:57 1998 -@@ -62,6 +62,7 @@ - pnmtile pnmtoddif pnmtofits pnmtops pnmtorast \ -- pnmtosgi pnmtosir pnmtoxwd \ -- rasttopnm sgitopnm sirtopnm xwdtopnm zeisstopnm -+ pnmtorle pnmtosgi pnmtosir pnmtoxwd \ -+ rasttopnm rletopnm sgitopnm sirtopnm xwdtopnm zeisstopnm - MATHBINARIES = pnmgamma pnmnlfilt pnmrotate pnmscale pnmshear --BINARIES = $(PORTBINARIES) $(MATHBINARIES) $(TIFFBINARIES) -+PNGBINARIES = pngtopnm pnmtopng -+BINARIES = $(PORTBINARIES) $(MATHBINARIES) $(PNGBINARIES) $(TIFFBINARIES) - SCRIPTS = anytopnm pnmindex pnmmargin pnmsmooth pstopnm -@@ -76,3 +77,3 @@ - pnmgamma.o pnmnlfilt.o pnmrotate.o pnmscale.o pnmshear.o --OBJECTS = $(PORTOBJECTS) $(TIFFOBJECTS) -+OBJECTS = $(PORTOBJECTS) - -@@ -130,4 +131,10 @@ - # Rules for plain programs. --$(PORTBINARIES) $(TIFFBINARIES): pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) $(TIFFLIB) -- $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) $(TIFFLIB) -+$(PORTBINARIES): pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) -+ $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) -+ -+$(PNGBINARIES): pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) -+ $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) -L${LOCALBASE}/lib -lpng -lz -lm -+ -+$(TIFFBINARIES): pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) -+ $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) $(TIFFLIB) -lm -lz +--- pbm/Makefile.orig Sat Nov 20 15:59:20 1993 ++++ pbm/Makefile Mon Jan 11 00:18:43 1999 +@@ -10,28 +10,31 @@ + # implied warranty. + # Default values, usually overridden by top-level Makefile. +-CC = cc ++CC = gcc + #CC = gcc -ansi -pedantic -fcombine-regs -fpcc-struct-return + #CFLAGS = -O +-CFLAGS = -g ++CFLAGS = -O2 + #CFLAGS = -g -O + TIFFDEF = -DLIBTIFF + #LDFLAGS = -s + LDFLAGS = +-INSTALLBINARIES = /usr/new/pbm +-INSTALLMANUALS1 = /usr/man/man1 ++INSTALLBINARIES = $(PREFIX)/bin ++INSTALLMANUALS1 = $(PREFIX)/man/man1 + SUFFIXMANUALS1 = 1 +-INSTALLMANUALS3 = /usr/man/man3 ++INSTALLMANUALS3 = $(PREFIX)/man/man3 + SUFFIXMANUALS3 = 3 +-INSTALLMANUALS5 = /usr/man/man5 ++INSTALLMANUALS5 = $(PREFIX)/man/man5 + SUFFIXMANUALS5 = 5 +-MANCP = cp ++MANCP = install -c -m 0644 ++INSTALLLIBS = $(PREFIX)/lib ++INSTALLDEFS = $(PREFIX)/include + + SHELL = /bin/sh + INCLUDE = -I.. + ALLCFLAGS = $(CFLAGS) $(TIFFDEF) $(INCLUDE) + LIBPBM = libpbm.a +-DEFPBM = pbm.h ../pbmplus.h ++DEFPBM = pbm.h ++DEFPBMPLUS = ../pbmplus.h + + PORTBINARIES = atktopbm brushtopbm cmuwmtopbm g3topbm \ + icontopbm gemtopbm macptopbm mgrtopbm \ +@@ -67,18 +70,19 @@ + MANUALS5 = pbm + + +-#all: binaries +-all: merge +-#install: install.bin +-install: install.merge ++all: binaries ++#all: merge ++install: install.bin ++#install: install.merge + + + binaries: $(BINARIES) + + install.bin: binaries + cd $(INSTALLBINARIES) ; rm -f $(BINARIES) +- cp $(BINARIES) $(INSTALLBINARIES) +- ++ install -c -s -m 0755 $(BINARIES) $(INSTALLBINARIES) ++ install -c -m 0644 $(LIBPBM) $(INSTALLLIBS) ++ install -c -m 0644 $(DEFPBM) $(INSTALLDEFS) + + merge: pbmmerge + pbmmerge: pbmmerge.c $(OBJECTS) $(LIBPBM) +@@ -107,15 +111,15 @@ + done + + # Rule for plain programs. +-$(PORTBINARIES): $(DEFPBM) $(LIBPBM) ++$(PORTBINARIES): $(DEFPBM) $(DEFPBMPLUS) $(LIBPBM) + $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c $(LIBPBM) + + # Rule for math-dependent programs. +-$(MATHBINARIES): $(DEFPBM) $(LIBPBM) ++$(MATHBINARIES): $(DEFPBM) $(DEFPBMPLUS) $(LIBPBM) + $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c -lm $(LIBPBM) + + # Rule for objects. +-$(OBJECTS): $(DEFPBM) ++$(OBJECTS): $(DEFPBM) $(DEFPBMPLUS) + $(CC) $(ALLCFLAGS) "-Dmain=$*_main" -c $*.c + + # And library. +@@ -125,15 +129,15 @@ + ar rc $(LIBPBM) libpbm1.o libpbm2.o libpbm3.o libpbm4.o libpbm5.o + -ranlib $(LIBPBM) + +-libpbm1.o: $(DEFPBM) ../version.h ../compile.h libpbm.h libpbm1.c ++libpbm1.o: $(DEFPBM) $(DEFPBMPLUS) ../version.h ../compile.h libpbm.h libpbm1.c + $(CC) $(ALLCFLAGS) -c libpbm1.c +-libpbm2.o: $(DEFPBM) libpbm.h libpbm2.c ++libpbm2.o: $(DEFPBM) $(DEFPBMPLUS) libpbm.h libpbm2.c + $(CC) $(ALLCFLAGS) -c libpbm2.c +-libpbm3.o: $(DEFPBM) libpbm.h libpbm3.c ++libpbm3.o: $(DEFPBM) $(DEFPBMPLUS) libpbm.h libpbm3.c + $(CC) $(ALLCFLAGS) -c libpbm3.c +-libpbm4.o: $(DEFPBM) libpbm.h libpbm4.c ++libpbm4.o: $(DEFPBM) $(DEFPBMPLUS) libpbm.h libpbm4.c + $(CC) $(ALLCFLAGS) -c libpbm4.c +-libpbm5.o: $(DEFPBM) pbmfont.h libpbm5.c ++libpbm5.o: $(DEFPBM) $(DEFPBMPLUS) pbmfont.h libpbm5.c + $(CC) $(ALLCFLAGS) -c libpbm5.c + + # Other dependencies. +@@ -184,4 +188,4 @@ + pbmtoepsi pbmtoepsi.o: pbmtoepsi.c + + clean: +- -rm -f *.o *.a *.cat *~ core $(BINARIES) pbmmerge ++ -rm -f *.o *.a *.cat *~ core *.core $(BINARIES) pbmmerge diff --git a/graphics/netpbm/patches/patch-ad b/graphics/netpbm/patches/patch-ad index e3b23ec8647..f9baf19cb7f 100644 --- a/graphics/netpbm/patches/patch-ad +++ b/graphics/netpbm/patches/patch-ad @@ -1,12 +1,13 @@ -$NetBSD: patch-ad,v 1.6 1998/08/07 10:40:50 agc Exp $ +$NetBSD: patch-ad,v 1.7 1999/01/10 23:52:16 tron Exp $ ---- pbmplus.h.orig Sat Jun 20 03:42:19 1998 -+++ pbmplus.h Sat Jun 20 03:43:47 1998 -@@ -121,2 +121,3 @@ - #endif -+#ifndef __NetBSD__ - extern int atoi(); -@@ -125,2 +126,3 @@ - extern int write(); -+#endif /* NetBSD */ - #endif +--- pbm/libpbm1.c.orig Mon Jan 10 18:37:22 1994 ++++ pbm/libpbm1.c Sun Jan 10 23:48:40 1999 +@@ -132,7 +132,7 @@ + if ( isupper( c1 ) ) + c1 = tolower( c1 ); + if ( isupper( c2 ) ) +- c1 = tolower( c2 ); ++ c2 = tolower( c2 ); + if ( c1 != c2 ) + return 0; + } diff --git a/graphics/netpbm/patches/patch-ae b/graphics/netpbm/patches/patch-ae new file mode 100644 index 00000000000..bdf0bd0553e --- /dev/null +++ b/graphics/netpbm/patches/patch-ae @@ -0,0 +1,15 @@ +$NetBSD: patch-ae,v 1.3 1999/01/10 23:52:16 tron Exp $ + +--- pbm/pbmmerge.c.orig Wed Nov 3 10:28:55 1993 ++++ pbm/pbmmerge.c Sun Jan 10 23:48:40 1999 +@@ -29,6 +29,10 @@ + { + ++argv; + --argc; ++ if(!*argv) { ++ fprintf(stderr, "Usage: pbmmerge pbm_program_name [args ...]\n"); ++ exit(1); ++ } + goto again; + } + diff --git a/graphics/netpbm/patches/patch-af b/graphics/netpbm/patches/patch-af new file mode 100644 index 00000000000..a0f762db9c7 --- /dev/null +++ b/graphics/netpbm/patches/patch-af @@ -0,0 +1,18 @@ +$NetBSD: patch-af,v 1.3 1999/01/10 23:52:16 tron Exp $ + +--- pbm/pbmtext.c.orig Wed Oct 27 08:27:04 1993 ++++ pbm/pbmtext.c Sun Jan 10 23:48:40 1999 +@@ -105,10 +105,12 @@ + else + { /* Read text from stdin. */ + lines = 0; +- while ( gets( buf ) != NULL ) ++ while ( fgets( buf, sizeof(buf), stdin ) != NULL ) + { + int l; ++ char *nl = strchr(buf, '\n'); + ++ if (nl) *nl = 0; + fix_control_chars( buf ); + l = strlen( buf ); + if ( lines >= maxlines ) diff --git a/graphics/netpbm/patches/patch-ag b/graphics/netpbm/patches/patch-ag new file mode 100644 index 00000000000..7be2f305f7c --- /dev/null +++ b/graphics/netpbm/patches/patch-ag @@ -0,0 +1,139 @@ +$NetBSD: patch-ag,v 1.1 1999/01/10 23:52:16 tron Exp $ + +--- pbm/pbmto10x.c.orig Mon Oct 4 10:10:42 1993 ++++ pbm/pbmto10x.c Sun Jan 10 23:48:40 1999 +@@ -1,6 +1,6 @@ + /* pbmto10x.c - read a portable bitmap and produce a Gemini 10X printer file + ** +-** Copyright (C) 1990 by Ken Yap ++** Copyright (C) 1990, 1994 by Ken Yap + ** + ** Permission to use, copy, modify, and distribute this software and its + ** documentation for any purpose and without fee is hereby granted, provided +@@ -8,6 +8,8 @@ + ** copyright notice and this permission notice appear in supporting + ** documentation. This software is provided "as is" without express or + ** implied warranty. ++** ++** Modified to shorten stripes and eliminate blank stripes. Dec 1994. + */ + + #include "pbm.h" +@@ -52,15 +54,40 @@ + } + + static void ++outstripe(stripe, sP, reschar) ++ register char *stripe, *sP; ++ register int reschar; ++{ ++ register int ncols; ++ ++ /* scan backwards, removing empty columns */ ++ while (sP != stripe) ++ if (*--sP != 0) ++ { ++ ++sP; ++ break; ++ } ++ ncols = sP - stripe; ++ if (ncols > 0) ++ { ++ printf("\033%c%c%c", reschar, ncols % 256, ncols / 256); ++ fwrite(stripe, sizeof(char), ncols, stdout); ++ } ++ putchar('\n'); /* flush buffer */ ++} ++ ++static void + res_60x72() + { + register int i, item, npins, row, col; + bit *bitrows[LOW_RES_ROWS], *bP[LOW_RES_ROWS]; ++ char *stripe, *sP; + ++ stripe = malloc(cols); + for (i = 0; i < LOW_RES_ROWS; ++i) + bitrows[i] = pbm_allocrow(cols); + printf("\033A\010"); /* '\n' = 8/72 */ +- for (row = 0; row < rows; row += LOW_RES_ROWS) ++ for (row = 0, sP = stripe; row < rows; row += LOW_RES_ROWS, sP = stripe) + { + if (row + LOW_RES_ROWS <= rows) + npins = LOW_RES_ROWS; +@@ -68,17 +95,18 @@ + npins = rows - row; + for (i = 0; i < npins; ++i) + pbm_readpbmrow(ifp, bP[i] = bitrows[i], cols, format); +- printf("\033K%c%c", cols % 256, cols / 256); + for (col = 0; col < cols; ++col) + { + item = 0; + for (i = 0; i < npins; ++i) + if (*(bP[i]++) == PBM_BLACK) + item |= 1 << (7 - i); +- putchar(item); ++ *sP++ = item; + } +- putchar('\n'); ++ outstripe(stripe, sP, 'K'); + } ++ printf("\033@"); ++ free(stripe); + } + + static void +@@ -86,11 +114,13 @@ + { + register int i, pin, item, npins, row, col; + bit *bitrows[HIGH_RES_ROWS], *bP[HIGH_RES_ROWS]; ++ char *stripe, *sP; + ++ stripe = malloc(cols); + for (i = 0; i < HIGH_RES_ROWS; ++i) + bitrows[i] = pbm_allocrow(cols); +- putchar('\033'); putchar('3'); putchar('\0'); +- for (row = 0; row < rows; row += HIGH_RES_ROWS) ++ printf("\0333\001"); /* \n = 1/144" */ ++ for (row = 0, sP = stripe; row < rows; row += HIGH_RES_ROWS, sP = stripe) + { + if (row + HIGH_RES_ROWS <= rows) + npins = HIGH_RES_ROWS; +@@ -98,7 +128,6 @@ + npins = rows - row; + for (i = 0; i < npins; ++i) + pbm_readpbmrow(ifp, bP[i] = bitrows[i], cols, format); +- printf("\033L%c%c", cols % 256, cols / 256); + for (col = 0; col < cols; ++col) + { + item = 0; +@@ -106,11 +135,10 @@ + for (pin = i = 0; i < npins; i += 2, ++pin) + if (*(bP[i]++) == PBM_BLACK) + item |= 1 << (7 - pin); +- putchar(item); ++ *sP++ = item; + } +- putchar('\n'); /* flush buffer */ +- printf("\033J\001"); /* 1/144 down */ +- printf("\033L%c%c", cols % 256, cols / 256); ++ outstripe(stripe, sP, 'L'); ++ sP = stripe; + for (col = 0; col < cols; ++col) + { + item = 0; +@@ -118,9 +146,11 @@ + for (i = 1, pin = 0; i < npins; i += 2, ++pin) + if (*(bP[i]++) == PBM_BLACK) + item |= 1 << (7 - pin); +- putchar(item); ++ *sP++ = item; + } +- putchar('\n'); /* flush buffer */ +- printf("\033J\017"); /* 15/144 down */ ++ outstripe(stripe, sP, 'L'); ++ printf("\033J\016"); /* 14/144 down, \n did 1/144 */ + } ++ printf("\033@"); ++ free(stripe); + } diff --git a/graphics/netpbm/patches/patch-ah b/graphics/netpbm/patches/patch-ah new file mode 100644 index 00000000000..7b595a5cf6d --- /dev/null +++ b/graphics/netpbm/patches/patch-ah @@ -0,0 +1,113 @@ +$NetBSD: patch-ah,v 1.1 1999/01/10 23:52:16 tron Exp $ + +--- pgm/Makefile.orig Fri Jan 28 11:14:02 1994 ++++ pgm/Makefile Mon Jan 11 00:18:46 1999 +@@ -18,14 +18,16 @@ + #CFLAGS = -g -O + LDFLAGS = -s + #LDFLAGS = +-INSTALLBINARIES = /usr/new/pbm +-INSTALLMANUALS1 = /usr/man/man1 ++INSTALLBINARIES = $(PREFIX)/bin ++INSTALLMANUALS1 = $(PREFIX)/man/man1 + SUFFIXMANUALS1 = 1 +-INSTALLMANUALS3 = /usr/man/man3 ++INSTALLMANUALS3 = $(PREFIX)/man/man3 + SUFFIXMANUALS3 = 3 +-INSTALLMANUALS5 = /usr/man/man5 ++INSTALLMANUALS5 = $(PREFIX)/man/man5 + SUFFIXMANUALS5 = 5 +-MANCP = cp ++MANCP = install -c -m 0644 ++INSTALLLIBS = $(PREFIX)/lib ++INSTALLDEFS = $(PREFIX)/include + + PBMDIR = ../pbm + INCLUDEPBM = -I$(PBMDIR) +@@ -37,12 +39,13 @@ + INCLUDE = -I.. $(INCLUDEPBM) + ALLCFLAGS = $(CFLAGS) $(INCLUDE) + LIBPGM = libpgm.a ++DEFPGM = pgm.h + + PORTBINARIES = asciitopgm bioradtopgm fstopgm hipstopgm \ +- lispmtopgm pbmtopgm pgmbentley pgmenhance pgmhist pgmkernel \ ++ lispmtopgm pbmtopgm pgmbentley pgmenhance pgmhist \ + pgmnoise pgmnorm pgmoil pgmramp pgmtofs pgmtolispm \ + pgmtopbm psidtopgm spottopgm +-MATHBINARIES = pgmcrater pgmedge pgmtexture rawtopgm ++MATHBINARIES = pgmcrater pgmedge pgmtexture rawtopgm pgmkernel + BINARIES = $(PORTBINARIES) $(MATHBINARIES) + + OBJECTS = asciitopgm.o bioradtopgm.o fstopgm.o hipstopgm.o \ +@@ -56,18 +59,19 @@ + MANUALS5 = pgm + + +-#all: binaries +-all: merge +-#install: install.bin +-install: install.merge ++all: binaries ++#all: merge ++install: install.bin ++#install: install.merge + + + binaries: $(BINARIES) + + install.bin: binaries + cd $(INSTALLBINARIES) ; rm -f $(BINARIES) +- cp $(BINARIES) $(INSTALLBINARIES) +- ++ install -c -s -m 0755 $(BINARIES) $(INSTALLBINARIES) ++ install -c -m 0644 $(LIBPGM) $(INSTALLLIBS) ++ install -c -m 0644 $(DEFPGM) $(INSTALLDEFS) + + merge: pgmmerge + pgmmerge: pgmmerge.c $(OBJECTS) $(LIBPGM) $(LIBPBM) +@@ -97,15 +101,15 @@ + + + # Rule for plain programs. +-$(PORTBINARIES): pgm.h $(DEFPBM) $(LIBPGM) $(LIBPBM) ++$(PORTBINARIES): $(DEFPGM) $(DEFPBM) $(LIBPGM) $(LIBPBM) + $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c $(LIBPGM) $(LIBPBM) + + # Rule for math-dependent programs. +-$(MATHBINARIES): pgm.h $(DEFPBM) $(LIBPGM) $(LIBPBM) ++$(MATHBINARIES): $(DEFPGM) $(DEFPBM) $(LIBPGM) $(LIBPBM) + $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c -lm $(LIBPGM) $(LIBPBM) + + # Rule for objects. +-$(OBJECTS): pgm.h $(DEFPBM) ++$(OBJECTS): $(DEFPGM) $(DEFPBM) + $(CC) $(ALLCFLAGS) "-Dmain=$*_main" -c $*.c + + # And libraries. +@@ -117,9 +121,9 @@ + ar rc $(LIBPGM) libpgm1.o libpgm2.o + -ranlib $(LIBPGM) + +-libpgm1.o: pgm.h $(DEFPBM) libpgm.h libpgm1.c ++libpgm1.o: $(DEFPGM) $(DEFPBM) lib$(DEFPGM) libpgm1.c + $(CC) $(ALLCFLAGS) -c libpgm1.c +-libpgm2.o: pgm.h $(DEFPBM) libpgm.h libpgm2.c $(DEFLIBPBM) ++libpgm2.o: $(DEFPGM) $(DEFPBM) lib$(DEFPGM) libpgm2.c $(DEFLIBPBM) + $(CC) $(ALLCFLAGS) -c libpgm2.c + + # Other dependencies. +@@ -134,7 +138,6 @@ + pgmedge pgmedge.o: pgmedge.c + pgmenhance pgmenhance.o: pgmenhance.c + pgmhist pgmhist.o: pgmhist.c +-pgmkernel pgmkernel.o: pgmkernel.c + pgmnoise pgmnoise.o: pgmnoise.c + pgmnorm pgmnorm.o: pgmnorm.c + pgmoil pgmoil.o: pgmoil.c +@@ -148,4 +151,4 @@ + spottopgm spottopgm.o: spottopgm.c + + clean: +- -rm -f *.o *.a *.cat *~ core $(BINARIES) pgmmerge ++ -rm -f *.o *.a *.cat *~ core *.core $(BINARIES) pgmmerge diff --git a/graphics/netpbm/patches/patch-bf b/graphics/netpbm/patches/patch-ai index 6e1085d92f2..2543f891b0d 100644 --- a/graphics/netpbm/patches/patch-bf +++ b/graphics/netpbm/patches/patch-ai @@ -1,7 +1,7 @@ -$NetBSD: patch-bf,v 1.2 1998/08/07 10:40:50 agc Exp $ +$NetBSD: patch-ai,v 1.1 1999/01/10 23:52:16 tron Exp $ ---- ./pgm/pgmmerge.c.orig Fri Jan 28 05:17:38 1994 -+++ ./pgm/pgmmerge.c Sat Aug 12 23:51:14 1995 +--- pgm/pgmmerge.c.orig Fri Jan 28 11:17:38 1994 ++++ pgm/pgmmerge.c Sun Jan 10 23:48:40 1999 @@ -29,6 +29,10 @@ { ++argv; diff --git a/graphics/netpbm/patches/patch-aj b/graphics/netpbm/patches/patch-aj new file mode 100644 index 00000000000..8ca3d6cfe41 --- /dev/null +++ b/graphics/netpbm/patches/patch-aj @@ -0,0 +1,170 @@ +$NetBSD: patch-aj,v 1.1 1999/01/10 23:52:16 tron Exp $ + +--- pnm/Makefile.orig Mon Jan 31 17:47:32 1994 ++++ pnm/Makefile Mon Jan 11 00:18:48 1999 +@@ -10,27 +10,29 @@ + # implied warranty. + + # Default values, usually overridden by top-level Makefile. +-#CC = cc +-CC = gcc -ansi -pedantic -fcombine-regs -fpcc-struct-return ++CC = gcc ++#CC = gcc -ansi -pedantic -fcombine-regs -fpcc-struct-return + #CFLAGS = -O +-CFLAGS = -g ++CFLAGS = -O2 + #CFLAGS = -g -O + TIFFDEF = -DLIBTIFF +-TIFFINC = -I../libtiff +-TIFFLIB = ../libtiff/libtiff.a ++TIFFINC = -I$(PREFIX)/include ++TIFFLIB = -L$(PREFIX)/lib -ltiff -ljpeg + TIFFBINARIES = tifftopnm pnmtotiff + TIFFOBJECTS = tifftopnm.o pnmtotiff.o +-#LDFLAGS = -s +-LDFLAGS = +-INSTALLBINARIES = /usr/new/pbm ++LDFLAGS = -s ++#LDFLAGS = ++INSTALLBINARIES = $(PREFIX)/bin + INSTALLSCRIPTS = $(INSTALLBINARIES) +-INSTALLMANUALS1 = /usr/man/man1 ++INSTALLMANUALS1 = $(PREFIX)/man/man1 + SUFFIXMANUALS1 = 1 +-INSTALLMANUALS3 = /usr/man/man3 ++INSTALLMANUALS3 = $(PREFIX)/man/man3 + SUFFIXMANUALS3 = 3 +-INSTALLMANUALS5 = /usr/man/man5 ++INSTALLMANUALS5 = $(PREFIX)/man/man5 + SUFFIXMANUALS5 = 5 +-MANCP = cp ++MANCP = install -c -m 0644 ++INSTALLLIBS = $(PREFIX)/lib ++INSTALLDEFS = $(PREFIX)/include + + PPMDIR = ../ppm + INCLUDEPPM = -I$(PPMDIR) +@@ -54,48 +56,52 @@ + INCLUDE = -I.. $(INCLUDEPPM) $(INCLUDEPGM) $(INCLUDEPBM) + ALLCFLAGS = $(CFLAGS) $(INCLUDE) $(TIFFDEF) $(TIFFINC) + LIBPNM = libpnm.a ++DEFPNM = pnm.h + + PORTBINARIES = fitstopnm giftopnm \ + pnmalias pnmarith pnmcat pnmcomp pnmconvol pnmcrop \ + pnmcut pnmdepth pnmenlarge pnmfile pnmflip pnmhistmap \ + pnminvert pnmnoraw pnmpad pnmpaste \ + pnmtile pnmtoddif pnmtofits pnmtops pnmtorast \ +- pnmtosgi pnmtosir pnmtoxwd \ +- rasttopnm sgitopnm sirtopnm xwdtopnm zeisstopnm ++ pnmtorle pnmtosgi pnmtosir pnmtoxwd \ ++ rasttopnm rletopnm sgitopnm sirtopnm xwdtopnm zeisstopnm \ ++ pnmsmooth pnmhisteq + MATHBINARIES = pnmgamma pnmnlfilt pnmrotate pnmscale pnmshear +-BINARIES = $(PORTBINARIES) $(MATHBINARIES) $(TIFFBINARIES) +-SCRIPTS = anytopnm pnmindex pnmmargin pnmsmooth pstopnm ++PNGBINARIES = pngtopnm pnmtopng ++BINARIES = $(PORTBINARIES) $(MATHBINARIES) $(PNGBINARIES) $(TIFFBINARIES) ++SCRIPTS = anytopnm pnmindex pnmmargin pstopnm + + PORTOBJECTS = fitstopnm.o giftopnm.o \ + pnmalias.o pnmarith.o pnmcat.o pnmcomp.o pnmconvol.o pnmcrop.o \ + pnmcut.o pnmdepth.o pnmenlarge.o pnmfile.o pnmflip.o pnmhistmap.o \ +- pnminvert.o pnmnoraw.o pnmpad.o pnmpaste.o \ ++ pnmhisteq.o pnminvert.o pnmnoraw.o pnmpad.o pnmpaste.o\ + pnmtile.o pnmtoddif.o pnmtofits.o pnmtops.o pnmtorast.o \ + pnmtosgi.o pnmtosir.o pnmtoxwd.o \ + rasttopnm.o sgitopnm.o sirtopnm.o xwdtopnm.o zeisstopnm.o \ ++ pnmsmooth.o pnmhisteq.o \ + pnmgamma.o pnmnlfilt.o pnmrotate.o pnmscale.o pnmshear.o +-OBJECTS = $(PORTOBJECTS) $(TIFFOBJECTS) ++OBJECTS = $(PORTOBJECTS) + + MANUALS1 = $(BINARIES) $(SCRIPTS) + MANUALS3 = libpnm + MANUALS5 = pnm + + +-#all: binaries +-all: merge +-#install: install.bin +-install: install.merge ++all: binaries ++#all: merge ++install: install.bin ++#install: install.merge + + + binaries: $(BINARIES) + + install.bin: binaries $(SCRIPTS) + cd $(INSTALLBINARIES) ; rm -f $(BINARIES) +- cp $(BINARIES) $(INSTALLBINARIES) ++ install -c -s -m 0755 $(BINARIES) $(INSTALLBINARIES) + cd $(INSTALLSCRIPTS) ; rm -f $(SCRIPTS) +- cp $(SCRIPTS) $(INSTALLSCRIPTS) +- cd $(INSTALLSCRIPTS) ; chmod +x $(SCRIPTS) +- ++ install -c -m 0755 $(SCRIPTS) $(INSTALLSCRIPTS) ++ install -c -m 0644 $(LIBPNM) $(INSTALLLIBS) ++ install -c -m 0644 $(DEFPNM) $(INSTALLDEFS) + + merge: pnmmerge + pnmmerge: pnmmerge.c $(OBJECTS) $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) +@@ -128,16 +134,22 @@ + + + # Rules for plain programs. +-$(PORTBINARIES) $(TIFFBINARIES): pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) $(TIFFLIB) +- $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) $(TIFFLIB) ++$(PORTBINARIES): $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) ++ $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) ++ ++$(PNGBINARIES): $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) ++ $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) -L${LOCALBASE}/lib -lpng -lz -lm ++ ++$(TIFFBINARIES): $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) ++ $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) $(TIFFLIB) -lm -lz + + # Rule for math-dependent programs. +-$(MATHBINARIES): pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) $(LIBPNM) \ ++$(MATHBINARIES): $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) $(LIBPNM) \ + $(LIBPPM) $(LIBPGM) $(LIBPBM) + $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c -lm $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) + + # Rule for objects. +-$(OBJECTS): pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) ++$(OBJECTS): $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) + $(CC) $(ALLCFLAGS) "-Dmain=$*_main" -c $*.c + + # And libraries. +@@ -153,15 +165,15 @@ + ar rc $(LIBPNM) libpnm1.o libpnm2.o libpnm3.o libpnm4.o + -ranlib $(LIBPNM) + +-libpnm1.o: pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm1.c ++libpnm1.o: $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm1.c + $(CC) $(ALLCFLAGS) -c libpnm1.c +-libpnm2.o: pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm2.c $(DEFLIBPPM) \ ++libpnm2.o: $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm2.c $(DEFLIBPPM) \ + $(DEFLIBPGM) $(DEFLIBPBM) + $(CC) $(ALLCFLAGS) -c libpnm2.c +-libpnm3.o: pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm3.c $(DEFLIBPPM) \ ++libpnm3.o: $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm3.c $(DEFLIBPPM) \ + $(DEFLIBPGM) $(DEFLIBPBM) + $(CC) $(ALLCFLAGS) -c libpnm3.c +-libpnm4.o: pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) rast.h libpnm4.c ++libpnm4.o: $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) rast.h libpnm4.c + $(CC) $(ALLCFLAGS) -c libpnm4.c + + # Other dependencies. +@@ -202,6 +214,8 @@ + tifftopnm tifftopnm.o: tifftopnm.c + xwdtopnm xwdtopnm.o: xwdtopnm.c x10wd.h x11wd.h + zeisstopnm zeisstopnm.o: zeisstopnm.c ++pnmhisteq pnmhisteq.o: pnmhisteq.c ++pnmsmooth pnmsmooth.o: pnmsmooth.c + + clean: +- -rm -f *.o *.a *.cat *~ core $(BINARIES) pnmmerge ++ -rm -f *.o *.a *.cat *~ core *.core $(BINARIES) pnmmerge diff --git a/graphics/netpbm/patches/patch-ak b/graphics/netpbm/patches/patch-ak new file mode 100644 index 00000000000..b0cc8d54b40 --- /dev/null +++ b/graphics/netpbm/patches/patch-ak @@ -0,0 +1,52 @@ +$NetBSD: patch-ak,v 1.1 1999/01/10 23:52:16 tron Exp $ + +--- pnm/anytopnm.orig Mon Oct 4 10:11:29 1993 ++++ pnm/anytopnm Sun Jan 10 23:48:40 1999 +@@ -53,7 +53,7 @@ + ;; + + *GIF* ) +- giftoppm "$file" ++ giftopnm "$file" + break + ;; + +@@ -82,6 +82,15 @@ + break + ;; + ++ *JPEG* | *JFIF* ) ++ djpeg "$file" ++ ;; ++ ++ *PNG* ) ++ pngtopnm "$file" ++ break ++ ;; ++ + * ) + # Can't figure out the file type from the magic number, + # try the extension. +@@ -130,7 +139,7 @@ + fitstopgm "$file" + ;; + *.gif | *.gif.* ) +- giftoppm "$file" ++ giftopnm "$file" + ;; + *.iff | *.iff.* | *.ilbm | *.ilbm.* ) + ilbmtoppm "$file" +@@ -168,6 +177,13 @@ + *.ybm | *.ybm.* | *.face | *.face.* ) + ybmtopbm "$file" + ;; ++ *.JPEG | *.jpeg | *.jpg | *.JPG ) ++ djpeg "$file" ++ ;; ++ *.png | *.PNG ) ++ pngtopnm "$file" ++ break ++ ;; + * ) + echo "$0: unknown file type" 1>&2 + exit 1 diff --git a/graphics/netpbm/patches/patch-bh b/graphics/netpbm/patches/patch-al index 62f00c32075..b2b74fbd244 100644 --- a/graphics/netpbm/patches/patch-bh +++ b/graphics/netpbm/patches/patch-al @@ -1,7 +1,7 @@ -$NetBSD: patch-bh,v 1.2 1998/08/07 10:40:51 agc Exp $ +$NetBSD: patch-al,v 1.1 1999/01/10 23:52:16 tron Exp $ ---- ./pnm/pnmarith.1.orig Sun Aug 13 00:08:22 1995 -+++ ./pnm/pnmarith.1 Sun Aug 13 00:08:46 1995 +--- pnm/pnmarith.1.orig Mon Oct 4 10:11:34 1993 ++++ pnm/pnmarith.1 Sun Jan 10 23:48:40 1999 @@ -4,7 +4,7 @@ pnmarith - perform arithmetic on two portable anymaps .SH SYNOPSIS diff --git a/graphics/netpbm/patches/patch-bi b/graphics/netpbm/patches/patch-am index 6af1e5632d0..8523cce6698 100644 --- a/graphics/netpbm/patches/patch-bi +++ b/graphics/netpbm/patches/patch-am @@ -1,7 +1,7 @@ -$NetBSD: patch-bi,v 1.2 1998/08/07 10:40:51 agc Exp $ +$NetBSD: patch-am,v 1.1 1999/01/10 23:52:16 tron Exp $ ---- ./pnm/pnmarith.c.orig Sun Aug 13 00:04:38 1995 -+++ ./pnm/pnmarith.c Sun Aug 13 00:08:04 1995 +--- pnm/pnmarith.c.orig Wed Jan 5 11:04:53 1994 ++++ pnm/pnmarith.c Sun Jan 10 23:48:40 1999 @@ -29,7 +29,8 @@ xelval maxval1, maxval2, maxval3; int argn, rows1, cols1, format1, rows2, cols2, format2, format3, row, col; diff --git a/graphics/netpbm/patches/patch-bj b/graphics/netpbm/patches/patch-an index b9d8e977f43..02ccdc4b805 100644 --- a/graphics/netpbm/patches/patch-bj +++ b/graphics/netpbm/patches/patch-an @@ -1,7 +1,7 @@ -$NetBSD: patch-bj,v 1.2 1998/08/07 10:40:51 agc Exp $ +$NetBSD: patch-an,v 1.1 1999/01/10 23:52:16 tron Exp $ ---- ./pnm/pnmconvol.c.orig Mon Oct 4 05:11:36 1993 -+++ ./pnm/pnmconvol.c Wed Jul 8 07:48:07 1998 +--- pnm/pnmconvol.c.orig Mon Oct 4 10:11:36 1993 ++++ pnm/pnmconvol.c Sun Jan 10 23:48:40 1999 @@ -1,5 +1,10 @@ /* pnmconvol.c - general MxN convolution on a portable anymap ** diff --git a/graphics/netpbm/patches/patch-bk b/graphics/netpbm/patches/patch-ao index bb876070dd8..ffcb99a443b 100644 --- a/graphics/netpbm/patches/patch-bk +++ b/graphics/netpbm/patches/patch-ao @@ -1,7 +1,7 @@ -$NetBSD: patch-bk,v 1.2 1998/08/07 10:40:51 agc Exp $ +$NetBSD: patch-ao,v 1.1 1999/01/10 23:52:16 tron Exp $ ---- /dev/null Thu Oct 16 09:27:24 1997 -+++ ./pnm/pnmhisteq.1 Sun Aug 13 00:13:48 1995 +--- pnm/pnmhisteq.1.orig Sun Jan 10 23:48:41 1999 ++++ pnm/pnmhisteq.1 Sun Jan 10 23:48:41 1999 @@ -0,0 +1,161 @@ +.TH pnmhisteq 1 "19 March 1995" +.IX "pnmhisteq command" diff --git a/graphics/netpbm/patches/patch-bl b/graphics/netpbm/patches/patch-ap index 22048ddc376..0c9d055b696 100644 --- a/graphics/netpbm/patches/patch-bl +++ b/graphics/netpbm/patches/patch-ap @@ -1,7 +1,7 @@ -$NetBSD: patch-bl,v 1.2 1998/08/07 10:40:51 agc Exp $ +$NetBSD: patch-ap,v 1.1 1999/01/10 23:52:16 tron Exp $ ---- /dev/null Thu Oct 16 09:27:24 1997 -+++ ./pnm/pnmhisteq.c Sun Aug 13 00:13:48 1995 +--- pnm/pnmhisteq.c.orig Sun Jan 10 23:48:41 1999 ++++ pnm/pnmhisteq.c Sun Jan 10 23:48:41 1999 @@ -0,0 +1,371 @@ +/* + pnmhisteq.c diff --git a/graphics/netpbm/patches/patch-bm b/graphics/netpbm/patches/patch-aq index fdbe584d4cd..d8f0eb0edde 100644 --- a/graphics/netpbm/patches/patch-bm +++ b/graphics/netpbm/patches/patch-aq @@ -1,7 +1,7 @@ -$NetBSD: patch-bm,v 1.2 1998/08/07 10:40:51 agc Exp $ +$NetBSD: patch-aq,v 1.1 1999/01/10 23:52:16 tron Exp $ ---- ./pnm/pnmmerge.c.orig Mon Jan 31 06:31:47 1994 -+++ ./pnm/pnmmerge.c Thu Oct 16 11:08:33 1997 +--- pnm/pnmmerge.c.orig Mon Jan 31 12:31:47 1994 ++++ pnm/pnmmerge.c Sun Jan 10 23:48:40 1999 @@ -30,6 +30,10 @@ { ++argv; diff --git a/graphics/netpbm/patches/patch-bn b/graphics/netpbm/patches/patch-ar index 8b7f995ab22..347cd4cba40 100644 --- a/graphics/netpbm/patches/patch-bn +++ b/graphics/netpbm/patches/patch-ar @@ -1,7 +1,7 @@ -$NetBSD: patch-bn,v 1.2 1998/08/07 10:40:51 agc Exp $ +$NetBSD: patch-ar,v 1.1 1999/01/10 23:52:17 tron Exp $ ---- ./pnm/pnmsmooth.1.orig Mon Oct 4 05:11:56 1993 -+++ ./pnm/pnmsmooth.1 Sun Aug 13 00:21:28 1995 +--- pnm/pnmsmooth.1.orig Mon Oct 4 10:11:56 1993 ++++ pnm/pnmsmooth.1 Sun Jan 10 23:48:40 1999 @@ -1,25 +1,42 @@ -.TH pnmsmooth 1 "13 January 1991" +.TH pnmsmooth 1 "4 December 1994" diff --git a/graphics/netpbm/patches/patch-bo b/graphics/netpbm/patches/patch-as index fb87f44bce0..71800b1e807 100644 --- a/graphics/netpbm/patches/patch-bo +++ b/graphics/netpbm/patches/patch-as @@ -1,7 +1,7 @@ -$NetBSD: patch-bo,v 1.2 1998/08/07 10:40:51 agc Exp $ +$NetBSD: patch-as,v 1.1 1999/01/10 23:52:17 tron Exp $ ---- /dev/null Thu Oct 16 09:27:24 1997 -+++ ./pnm/pnmsmooth.README Sun Aug 13 00:21:28 1995 +--- pnm/pnmsmooth.README.orig Sun Jan 10 23:48:41 1999 ++++ pnm/pnmsmooth.README Sun Jan 10 23:48:41 1999 @@ -0,0 +1,21 @@ +README for pnmsmooth.c 2.0 + diff --git a/graphics/netpbm/patches/patch-bp b/graphics/netpbm/patches/patch-at index e0e87edfe8c..3902cb6b144 100644 --- a/graphics/netpbm/patches/patch-bp +++ b/graphics/netpbm/patches/patch-at @@ -1,7 +1,7 @@ -$NetBSD: patch-bp,v 1.2 1998/08/07 10:40:51 agc Exp $ +$NetBSD: patch-at,v 1.1 1999/01/10 23:52:17 tron Exp $ ---- /dev/null Thu Oct 16 09:27:24 1997 -+++ ./pnm/pnmsmooth.c Sun Aug 13 00:21:29 1995 +--- pnm/pnmsmooth.c.orig Sun Jan 10 23:48:41 1999 ++++ pnm/pnmsmooth.c Sun Jan 10 23:48:41 1999 @@ -0,0 +1,171 @@ +/* pnmsmooth.c - smooth out an image by replacing each pixel with the +** average of its width x height neighbors. diff --git a/graphics/netpbm/patches/patch-bq b/graphics/netpbm/patches/patch-au index f36d63bb6e6..fef00e98404 100644 --- a/graphics/netpbm/patches/patch-bq +++ b/graphics/netpbm/patches/patch-au @@ -1,7 +1,7 @@ -$NetBSD: patch-bq,v 1.2 1998/08/07 10:40:51 agc Exp $ +$NetBSD: patch-au,v 1.1 1999/01/10 23:52:17 tron Exp $ ---- /dev/null Thu Oct 16 09:27:24 1997 -+++ ./pnm/pnmsmooth.orig Mon Oct 4 05:11:56 1993 +--- pnm/pnmsmooth.orig.orig Sun Jan 10 23:48:41 1999 ++++ pnm/pnmsmooth.orig Sun Jan 10 23:48:41 1999 @@ -0,0 +1,20 @@ +#!/bin/sh +# diff --git a/graphics/netpbm/patches/patch-br b/graphics/netpbm/patches/patch-av index 170617b221e..b2f9e253197 100644 --- a/graphics/netpbm/patches/patch-br +++ b/graphics/netpbm/patches/patch-av @@ -1,7 +1,7 @@ -$NetBSD: patch-br,v 1.2 1998/08/07 10:40:52 agc Exp $ +$NetBSD: patch-av,v 1.1 1999/01/10 23:52:17 tron Exp $ ---- ./pnm/pnmtotiff.c.orig Sun Aug 13 00:32:57 1995 -+++ ./pnm/pnmtotiff.c Sun Aug 13 00:34:21 1995 +--- pnm/pnmtotiff.c.orig Thu Jan 27 17:59:25 1994 ++++ pnm/pnmtotiff.c Sun Jan 10 23:48:40 1999 @@ -196,6 +196,7 @@ samplesperpixel = 1; bitspersample = pm_maxvaltobits( maxval ); diff --git a/graphics/netpbm/patches/patch-by b/graphics/netpbm/patches/patch-aw index 0ad42ccdbc6..8e5a8d770ef 100644 --- a/graphics/netpbm/patches/patch-by +++ b/graphics/netpbm/patches/patch-aw @@ -1,7 +1,7 @@ -$NetBSD: patch-by,v 1.2 1998/08/07 10:40:52 agc Exp $ +$NetBSD: patch-aw,v 1.1 1999/01/10 23:52:17 tron Exp $ ---- ./pnm/tifftopnm.c.orig Mon Oct 4 05:12:01 1993 -+++ ./pnm/tifftopnm.c Sun Aug 13 00:35:55 1995 +--- pnm/tifftopnm.c.orig Mon Oct 4 10:12:01 1993 ++++ pnm/tifftopnm.c Sun Jan 10 23:48:40 1999 @@ -54,7 +54,7 @@ int headerdump; register u_char sample; diff --git a/graphics/netpbm/patches/patch-ax b/graphics/netpbm/patches/patch-ax new file mode 100644 index 00000000000..cad3dd691a6 --- /dev/null +++ b/graphics/netpbm/patches/patch-ax @@ -0,0 +1,124 @@ +$NetBSD: patch-ax,v 1.1 1999/01/10 23:52:17 tron Exp $ + +--- ppm/Makefile.orig Mon Jan 31 17:44:34 1994 ++++ ppm/Makefile Mon Jan 11 00:18:52 1999 +@@ -10,22 +10,24 @@ + # implied warranty. + + # Default values, usually overridden by top-level Makefile. +-#CC = cc +-CC = gcc -ansi -pedantic -fcombine-regs -fpcc-struct-return ++CC = gcc ++#CC = gcc -ansi -pedantic -fcombine-regs -fpcc-struct-return + #CFLAGS = -O +-CFLAGS = -g ++CFLAGS = -O2 + #CFLAGS = -g -O +-#LDFLAGS = -s +-LDFLAGS = +-INSTALLBINARIES = /usr/new/pbm ++LDFLAGS = -s ++#LDFLAGS = ++INSTALLBINARIES = $(PREFIX)/bin + INSTALLSCRIPTS = $(INSTALLBINARIES) +-INSTALLMANUALS1 = /usr/man/mann ++INSTALLMANUALS1 = $(PREFIX)/man/man1 + SUFFIXMANUALS1 = 1 +-INSTALLMANUALS3 = /usr/man/mann ++INSTALLMANUALS3 = $(PREFIX)/man/man3 + SUFFIXMANUALS3 = 3 +-INSTALLMANUALS5 = /usr/man/mann ++INSTALLMANUALS5 = $(PREFIX)/man/man5 + SUFFIXMANUALS5 = 5 +-MANCP = cp ++MANCP = install -c -m 0644 ++INSTALLLIBS = $(PREFIX)/lib ++INSTALLDEFS = $(PREFIX)/include + + PGMDIR = ../pgm + INCLUDEPGM = -I$(PGMDIR) +@@ -43,6 +45,7 @@ + INCLUDE = -I.. $(INCLUDEPGM) $(INCLUDEPBM) + ALLCFLAGS = $(CFLAGS) $(INCLUDE) + LIBPPM = libppm.a ++DEFPPM = ppm.h + + PORTBINARIES = bmptoppm gouldtoppm hpcdtoppm ilbmtoppm imgtoppm \ + mtvtoppm pcxtoppm pgmtoppm pi1toppm picttoppm \ +@@ -85,21 +88,21 @@ + MANUALS5 = ppm + + +-#all: binaries +-all: merge +-#install: install.bin +-install: install.merge ++all: binaries ++#all: merge ++install: install.bin ++#install: install.merge + + + binaries: $(BINARIES) + + install.bin: binaries $(SCRIPTS) + cd $(INSTALLBINARIES) ; rm -f $(BINARIES) +- cp $(BINARIES) $(INSTALLBINARIES) ++ install -c -s -m 0755 $(BINARIES) $(INSTALLBINARIES) + cd $(INSTALLSCRIPTS) ; rm -f $(SCRIPTS) +- cp $(SCRIPTS) $(INSTALLSCRIPTS) +- cd $(INSTALLSCRIPTS) ; chmod +x $(SCRIPTS) +- ++ install -c -m 0755 $(SCRIPTS) $(INSTALLSCRIPTS) ++ install -c -m 0644 $(LIBPPM) $(INSTALLLIBS) ++ install -c -m 0644 $(DEFPPM) $(INSTALLDEFS) + + merge: ppmmerge + ppmmerge: ppmmerge.c $(OBJECTS) $(LIBPPM) $(LIBPGM) $(LIBPBM) +@@ -132,15 +135,15 @@ + + + # Rule for plain programs. +-$(PORTBINARIES): ppm.h $(DEFPGM) $(DEFPBM) $(LIBPPM) $(LIBPGM) $(LIBPBM) ++$(PORTBINARIES): $(DEFPPM) $(DEFPGM) $(DEFPBM) $(LIBPPM) $(LIBPGM) $(LIBPBM) + $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c $(LIBPPM) $(LIBPGM) $(LIBPBM) + + # Rule for math-dependent programs. +-$(MATHBINARIES): ppm.h $(DEFPGM) $(DEFPBM) $(LIBPPM) $(LIBPGM) $(LIBPBM) ++$(MATHBINARIES): $(DEFPPM) $(DEFPGM) $(DEFPBM) $(LIBPPM) $(LIBPGM) $(LIBPBM) + $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c -lm $(LIBPPM) $(LIBPGM) $(LIBPBM) + + # Rule for objects. +-$(OBJECTS): ppm.h $(DEFPGM) $(DEFPBM) ++$(OBJECTS): $(DEFPPM) $(DEFPGM) $(DEFPBM) + $(CC) $(ALLCFLAGS) "-Dmain=$*_main" -c $*.c + + # And libraries. +@@ -155,16 +158,16 @@ + libppm5.o bitio.o + -ranlib $(LIBPPM) + +-libppm1.o: ppm.h $(DEFPGM) $(DEFPBM) libppm.h libppm1.c ++libppm1.o: $(DEFPPM) $(DEFPGM) $(DEFPBM) libppm.h libppm1.c + $(CC) $(ALLCFLAGS) -c libppm1.c +-libppm2.o: ppm.h $(DEFPGM) $(DEFPBM) libppm.h libppm2.c $(DEFLIBPGM) \ ++libppm2.o: $(DEFPPM) $(DEFPGM) $(DEFPBM) libppm.h libppm2.c $(DEFLIBPGM) \ + $(DEFLIBPBM) + $(CC) $(ALLCFLAGS) -c libppm2.c +-libppm3.o: ppm.h $(DEFPGM) $(DEFPBM) ppmcmap.h libppm.h libppm3.c ++libppm3.o: $(DEFPPM) $(DEFPGM) $(DEFPBM) ppmcmap.h libppm.h libppm3.c + $(CC) $(ALLCFLAGS) -c libppm3.c +-libppm4.o: ppm.h $(DEFPGM) $(DEFPBM) libppm4.c ++libppm4.o: $(DEFPPM) $(DEFPGM) $(DEFPBM) libppm4.c + $(CC) $(ALLCFLAGS) -c libppm4.c +-libppm5.o: ppm.h $(DEFPGM) $(DEFPBM) ppmdraw.h libppm5.c ++libppm5.o: $(DEFPPM) $(DEFPGM) $(DEFPBM) ppmdraw.h libppm5.c + $(CC) $(ALLCFLAGS) -c libppm5.c + bitio.o: ../pbmplus.h bitio.c + $(CC) $(ALLCFLAGS) -c bitio.c +@@ -235,4 +238,4 @@ + yuvsplittoppm yuvsplittoppm.o: yuvsplittoppm.c + + clean: +- -rm -f *.o *.a *.cat *~ core $(BINARIES) ppmmerge ++ -rm -f *.o *.a *.cat *~ core *.core $(BINARIES) ppmmerge diff --git a/graphics/netpbm/patches/patch-bs b/graphics/netpbm/patches/patch-ay index b4c70ddb5bd..6f966cf8cdf 100644 --- a/graphics/netpbm/patches/patch-bs +++ b/graphics/netpbm/patches/patch-ay @@ -1,7 +1,7 @@ -$NetBSD: patch-bs,v 1.2 1998/08/07 10:40:52 agc Exp $ +$NetBSD: patch-ay,v 1.1 1999/01/10 23:52:17 tron Exp $ ---- ./ppm/ppm.5.orig Mon Oct 4 05:12:19 1993 -+++ ./ppm/ppm.5 Sat Jul 20 21:53:06 1996 +--- ppm/ppm.5.orig Mon Oct 4 10:12:19 1993 ++++ ppm/ppm.5 Sun Jan 10 23:48:41 1999 @@ -73,7 +73,7 @@ it will automatically fall back on the slower but more general plain format. diff --git a/graphics/netpbm/patches/patch-bt b/graphics/netpbm/patches/patch-az index 9ca7c970849..fda081072d7 100644 --- a/graphics/netpbm/patches/patch-bt +++ b/graphics/netpbm/patches/patch-az @@ -1,7 +1,7 @@ -$NetBSD: patch-bt,v 1.2 1998/08/07 10:40:52 agc Exp $ +$NetBSD: patch-az,v 1.1 1999/01/10 23:52:17 tron Exp $ ---- ./ppm/ppmmerge.c.orig Mon Jan 31 11:44:31 1994 -+++ ./ppm/ppmmerge.c Sat Aug 12 23:51:35 1995 +--- ppm/ppmmerge.c.orig Mon Jan 31 17:44:31 1994 ++++ ppm/ppmmerge.c Sun Jan 10 23:48:41 1999 @@ -29,6 +29,10 @@ { ++argv; diff --git a/graphics/netpbm/patches/patch-ba b/graphics/netpbm/patches/patch-ba index 3cdf803d80a..b44305fd3d1 100644 --- a/graphics/netpbm/patches/patch-ba +++ b/graphics/netpbm/patches/patch-ba @@ -1,52 +1,13 @@ -$NetBSD: patch-ba,v 1.2 1998/08/07 10:40:50 agc Exp $ +$NetBSD: patch-ba,v 1.3 1999/01/10 23:52:17 tron Exp $ ---- ./pnm/anytopnm.orig Mon Oct 4 05:11:29 1993 -+++ ./pnm/anytopnm Sat Jul 20 22:19:05 1996 -@@ -53,7 +53,7 @@ - ;; - - *GIF* ) -- giftoppm "$file" -+ giftopnm "$file" - break - ;; - -@@ -82,6 +82,15 @@ - break - ;; - -+ *JPEG* | *JFIF* ) -+ djpeg "$file" -+ ;; -+ -+ *PNG* ) -+ pngtopnm "$file" -+ break -+ ;; -+ - * ) - # Can't figure out the file type from the magic number, - # try the extension. -@@ -130,7 +139,7 @@ - fitstopgm "$file" - ;; - *.gif | *.gif.* ) -- giftoppm "$file" -+ giftopnm "$file" - ;; - *.iff | *.iff.* | *.ilbm | *.ilbm.* ) - ilbmtoppm "$file" -@@ -168,6 +177,13 @@ - *.ybm | *.ybm.* | *.face | *.face.* ) - ybmtopbm "$file" - ;; -+ *.JPEG | *.jpeg | *.jpg | *.JPG ) -+ djpeg "$file" -+ ;; -+ *.png | *.PNG ) -+ pngtopnm "$file" -+ break -+ ;; - * ) - echo "$0: unknown file type" 1>&2 - exit 1 +--- ppm/ppmtogif.1.orig Fri Nov 12 10:18:30 1993 ++++ ppm/ppmtogif.1 Sun Jan 10 23:48:41 1999 +@@ -54,7 +54,7 @@ + .PP + All flags can be abbreviated to their shortest unique prefix. + .SH "SEE ALSO" +-giftoppm(1), ppmquant(1), ppm(5) ++giftopnm(1), ppmquant(1), ppm(5) + .SH AUTHOR + Based on GIFENCOD by David Rowley <mgardi@watdcsu.waterloo.edu>. + Lempel-Ziv compression based on "compress". diff --git a/graphics/netpbm/patches/patch-bb b/graphics/netpbm/patches/patch-bb index 83762195dc1..e978ebcbe86 100644 --- a/graphics/netpbm/patches/patch-bb +++ b/graphics/netpbm/patches/patch-bb @@ -1,13 +1,13 @@ -$NetBSD: patch-bb,v 1.2 1998/08/07 10:40:50 agc Exp $ +$NetBSD: patch-bb,v 1.3 1999/01/10 23:52:17 tron Exp $ ---- ./pbm/libpbm1.c.orig Mon Jan 10 12:37:22 1994 -+++ ./pbm/libpbm1.c Sun Aug 13 00:03:56 1995 -@@ -132,7 +132,7 @@ - if ( isupper( c1 ) ) - c1 = tolower( c1 ); - if ( isupper( c2 ) ) -- c1 = tolower( c2 ); -+ c2 = tolower( c2 ); - if ( c1 != c2 ) - return 0; - } +--- ppm/ppmtoicr.1.orig Mon Oct 4 10:12:38 1993 ++++ ppm/ppmtoicr.1 Sun Jan 10 23:48:41 1999 +@@ -83,7 +83,7 @@ + the displayed image by a factor of 2, and + run-length encode the data: + .nf +- giftoppm giffile | ppmtoicr -w giffile -r -e 2 ++ giftopnm giffile | ppmtoicr -w giffile -r -e 2 + .fi + .SH BUGS + .PP diff --git a/graphics/netpbm/patches/patch-bc b/graphics/netpbm/patches/patch-bc index b961d918bc8..8b2e798b9f3 100644 --- a/graphics/netpbm/patches/patch-bc +++ b/graphics/netpbm/patches/patch-bc @@ -1,15 +1,29 @@ -$NetBSD: patch-bc,v 1.2 1998/08/07 10:40:50 agc Exp $ +$NetBSD: patch-bc,v 1.3 1999/01/10 23:52:17 tron Exp $ ---- ./pbm/pbmmerge.c.orig Wed Nov 3 04:28:55 1993 -+++ ./pbm/pbmmerge.c Sat Aug 12 23:51:57 1995 -@@ -29,6 +29,10 @@ - { - ++argv; - --argc; -+ if(!*argv) { -+ fprintf(stderr, "Usage: pbmmerge pbm_program_name [args ...]\n"); -+ exit(1); -+ } - goto again; - } - +--- ppm/ppmtoxpm.1.orig Mon Jan 31 12:49:48 1994 ++++ ppm/ppmtoxpm.1 Sun Jan 10 23:48:41 1999 +@@ -8,20 +8,20 @@ + Produces X11 pixmap (version 3) as output which + can be loaded directly by the XPM library. + .PP +-The \fB-name\fP option allows one to specify the prefix string which is printed ++The \fB-name\f option allows one to specify the prefix string which is printed + in the resulting XPM output. If not specified, will default to the + filename (without extension) of the <ppmfile> argument. +-If \fB-name\fP is not specified and <ppmfile> ++If \fB-name\f is not specified and <ppmfile> + is not specified (i.e. piped input), the prefix string will default to + the string "noname". + .PP +-The \fB-rgb\fP option allows one to specify an X11 rgb text file for the ++The \fB-rgb\f option allows one to specify an X11 rgb text file for the + lookup of color name mnemonics. This rgb text file is typically the + /usr/lib/X11/rgb.txt of the MIT X11 distribution, but any file using the + same format may be used. When specified and + a RGB value from the ppm input matches a RGB value from the <rgb-textfile>, + then the corresponding color name mnemonic is printed in the XPM's colormap. +-If \fB-rgb\fP is not specified, or if the RGB values don't match, then the color ++If \fB-rgb\f is not specified, or if the RGB values don't match, then the color + will be printed with the #RGB, #RRGGBB, #RRRGGGBBB, or #RRRRGGGGBBBB + hexadecimal format. + .PP diff --git a/graphics/netpbm/patches/patch-bd b/graphics/netpbm/patches/patch-bd index 19693c3924f..38cbb0b5da1 100644 --- a/graphics/netpbm/patches/patch-bd +++ b/graphics/netpbm/patches/patch-bd @@ -1,18 +1,213 @@ -$NetBSD: patch-bd,v 1.2 1998/08/07 10:40:50 agc Exp $ +$NetBSD: patch-bd,v 1.3 1999/01/10 23:52:17 tron Exp $ ---- ./pbm/pbmtext.c.orig Wed Oct 27 03:27:04 1993 -+++ ./pbm/pbmtext.c Sat Jul 20 21:48:12 1996 -@@ -105,10 +105,12 @@ - else - { /* Read text from stdin. */ - lines = 0; -- while ( gets( buf ) != NULL ) -+ while ( fgets( buf, sizeof(buf), stdin ) != NULL ) - { - int l; -+ char *nl = strchr(buf, '\n'); - -+ if (nl) *nl = 0; - fix_control_chars( buf ); - l = strlen( buf ); - if ( lines >= maxlines ) +--- ppm/ppmtoxpm.c.orig Mon Jan 31 08:44:41 1994 ++++ ppm/ppmtoxpm.c Sun Jan 10 23:48:41 1999 +@@ -27,11 +27,25 @@ + ** + ** - lowercase conversion of RGB names def'ed out, + ** considered harmful. ++** ++** Michael Pall (pall@rz.uni-karlsruhe.de) - 29 Nov 93: ++** - Use the algorithm from xpm-lib for pixel encoding ++** (base 93 not base 28 -> saves a lot of space for colorful xpms) + */ + ++#include <stdio.h> ++#include <ctype.h> + #include "ppm.h" + #include "ppmcmap.h" + ++#if defined(SYSV) || defined(SVR4) ++#include <string.h> ++#ifndef index ++#define index strchr ++#endif ++#else /* SYSV */ ++#include <strings.h> ++#endif /* SYSV */ + + /* Max number of colors allowed in ppm input. */ + #define MAXCOLORS 256 +@@ -39,15 +53,19 @@ + /* Max number of rgb mnemonics allowed in rgb text file. */ + #define MAX_RGBNAMES 1024 + +-/* Lower bound and upper bound of character-pixels printed in XPM output. +- Be careful, don't want the character '"' in this range. */ +-/*#define LOW_CHAR '#' <-- minimum ascii character allowed */ +-/*#define HIGH_CHAR '~' <-- maximum ascii character allowed */ +-#define LOW_CHAR '`' +-#define HIGH_CHAR 'z' ++#define MAXPRINTABLE 92 /* number of printable ascii chars ++ * minus \ and " for string compat ++ * and ? to avoid ANSI trigraphs. */ ++ ++static char *printable = ++" .XoO+@#$%&*=-;:>,<1234567890qwertyuipasdfghjklzxcvbnmMNBVCZ\ ++ASDFGHJKLPIUYTREWQ!~^/()_`'][{}|"; ++ + + #define max(a,b) ((a) > (b) ? (a) : (b)) + ++void read_rgb_names(); /* forward reference */ ++void gen_cmap(); /* forward reference */ + + typedef struct { /* rgb values and ascii names (from + * rgb text file) */ +@@ -62,17 +80,8 @@ + * mnemonic or #rgb value */ + } cixel_map; + +- +-/* prototypes/forward reference */ +-static void read_rgb_names ARGS((char *, rgb_names *, int *)); +-static char * gen_numstr ARGS((int, int, int)); +-static void gen_cmap ARGS((colorhist_vector, int, pixval, int, rgb_names *, int, cixel_map *, int *)); +- +- + pixel **pixels; + +- +-int + main(argc, argv) + int argc; + char *argv[]; +@@ -88,11 +97,11 @@ + + /* Used for rgb value -> rgb mnemonic mapping */ + int map_rgb_names = 0; +- rgb_names *rgbn; /* rgb_names rgbn[MAX_RGBNAMES]; */ ++ rgb_names rgbn[MAX_RGBNAMES]; + int rgbn_max; + + /* Used for rgb value -> character-pixel string mapping */ +- cixel_map *cmap; /* cixel_map cmap[MAXCOLORS]; */ ++ cixel_map cmap[MAXCOLORS]; + int charspp; /* chars per pixel */ + + char out_name[100], rgb_fname[100], *cp; +@@ -188,17 +197,9 @@ + * If a rgb text file was specified, read in the rgb mnemonics. Does not + * return if fatal error occurs. + */ +- rgbn = (rgb_names *) malloc(MAX_RGBNAMES * sizeof(rgb_names)); +- if (rgbn == (rgb_names *) NULL) +- pm_error("out of memory"); +- + if (map_rgb_names) + read_rgb_names(rgb_fname, rgbn, &rgbn_max); + +- cmap = (cixel_map *)malloc(ncolors * sizeof(cixel_map)); +- if (cmap == (cixel_map *) NULL) +- pm_error("out of memory"); +- + /* Now generate the character-pixel colormap table. */ + gen_cmap(chv, ncolors, maxval, map_rgb_names, rgbn, rgbn_max, + cmap, &charspp); +@@ -231,12 +232,12 @@ + /* This routine reads a rgb text file. It stores the rgb values (0->65535) + and the rgb mnemonics (malloc'ed) into the "rgbn" array. Returns the + number of entries stored in "rgbn_max". */ +-static + void + read_rgb_names(rgb_fname, rgbn, rgbn_max) + char *rgb_fname; +- rgb_names *rgbn; +- int *rgbn_max; ++ rgb_names rgbn[MAX_RGBNAMES]; ++int *rgbn_max; ++ + { + FILE *rgbf; + int i, items, red, green, blue; +@@ -303,16 +304,16 @@ + } /* read_rgb_names */ + + /*---------------------------------------------------------------------------*/ +-/* Given a number and a base, (base == HIGH_CHAR-LOW_CHAR+1), this routine ++/* Given a number and a base (MAXPRINTABLE), this routine + prints the number into a malloc'ed string and returns it. The length of + the string is specified by "digits". The ascii characters of the printed +- number range from LOW_CHAR to HIGH_CHAR. The string is LOW_CHAR filled, +- (e.g. if LOW_CHAR==0, HIGH_CHAR==1, digits==5, i=3, routine would return +- the malloc'ed string "00011"). */ +-static ++ number range from printable[0] to printable[MAXPRINTABLE]. The string is ++ printable[0] filled, (e.g. if printable[0]==0, printable[1]==1, ++ MAXPRINTABLE==2, digits==5, i=3, routine would return the malloc'ed ++ string "00011"). */ + char * +-gen_numstr(i, base, digits) +- int i, base, digits; ++gen_numstr(i, digits) ++ int i, digits; + { + char *str, *p; + int d; +@@ -325,9 +326,9 @@ + p = str + digits; + *p-- = '\0'; /* nul terminate string */ + while (p >= str) { +- d = i % base; +- i /= base; +- *p-- = (char) ((int) LOW_CHAR + d); ++ d = i % MAXPRINTABLE; ++ i /= MAXPRINTABLE; ++ *p-- = printable[d]; + } + + return str; +@@ -336,7 +337,6 @@ + + /*---------------------------------------------------------------------------*/ + /* This routine generates the character-pixel colormap table. */ +-static + void + gen_cmap(chv, ncolors, maxval, map_rgb_names, rgbn, rgbn_max, + cmap, charspp) +@@ -348,16 +348,16 @@ + * == unsigned short) */ + int map_rgb_names; /* == 1 if mapping rgb values to rgb + * mnemonics */ +- rgb_names *rgbn; /* rgb mnemonics from rgb text file */ ++ rgb_names rgbn[MAX_RGBNAMES]; /* rgb mnemonics from rgb text file */ + int rgbn_max; /* number of rgb mnemonics in table */ + + /* output: */ +-cixel_map *cmap; /* pixel strings and ascii rgb ++cixel_map cmap[MAXCOLORS]; /* pixel strings and ascii rgb + * colors */ + int *charspp; /* characters per pixel */ + + { +- int i, j, base, cpp, mval, red, green, blue, r, g, b, matched; ++ int i, j, cpp, mval, red, green, blue, r, g, b, matched; + char *str; + + /* +@@ -365,9 +365,8 @@ + * to be forced to link with libm.a, so using a division loop rather + * than a log function. + */ +- base = (int) HIGH_CHAR - (int) LOW_CHAR + 1; + for (cpp = 0, j = ncolors; j; cpp++) +- j /= base; ++ j /= MAXPRINTABLE; + *charspp = cpp; + + /* +@@ -392,10 +391,11 @@ + + /* + * The character-pixel string is simply a printed number in base +- * "base" where the digits of the number range from LOW_CHAR to +- * HIGH_CHAR and the printed length of the number is "cpp". ++ * MAXPRINTABLE where the digits of the number range from ++ * printable[0] .. printable[MAXPRINTABLE-1] and the printed length ++ * of the number is "cpp". + */ +- cmap[i].cixel = gen_numstr(i, base, cpp); ++ cmap[i].cixel = gen_numstr(i, cpp); + + /* Fetch the rgb value of the current colormap entry. */ + red = PPM_GETR(chv[i].color); diff --git a/graphics/netpbm/patches/patch-be b/graphics/netpbm/patches/patch-be index 7b7690ec188..be45b21fd72 100644 --- a/graphics/netpbm/patches/patch-be +++ b/graphics/netpbm/patches/patch-be @@ -1,139 +1,53 @@ -$NetBSD: patch-be,v 1.2 1998/08/07 10:40:50 agc Exp $ +$NetBSD: patch-be,v 1.3 1999/01/10 23:52:17 tron Exp $ ---- ./pbm/pbmto10x.c.orig Mon Oct 4 05:10:42 1993 -+++ ./pbm/pbmto10x.c Sat Aug 12 23:36:40 1995 -@@ -1,6 +1,6 @@ - /* pbmto10x.c - read a portable bitmap and produce a Gemini 10X printer file - ** --** Copyright (C) 1990 by Ken Yap -+** Copyright (C) 1990, 1994 by Ken Yap - ** - ** Permission to use, copy, modify, and distribute this software and its - ** documentation for any purpose and without fee is hereby granted, provided -@@ -8,6 +8,8 @@ - ** copyright notice and this permission notice appear in supporting - ** documentation. This software is provided "as is" without express or - ** implied warranty. -+** -+** Modified to shorten stripes and eliminate blank stripes. Dec 1994. - */ +--- ppm/xpmtoppm.c.orig Mon Jan 31 08:42:05 1994 ++++ ppm/xpmtoppm.c Sun Jan 10 23:48:41 1999 +@@ -30,9 +30,8 @@ - #include "pbm.h" -@@ -52,15 +54,40 @@ - } + #include "ppm.h" - static void -+outstripe(stripe, sP, reschar) -+ register char *stripe, *sP; -+ register int reschar; +-static void ReadXPMFile ARGS((FILE *stream, int *widthP, int *heightP, +- int *ncolorsP, int *chars_per_pixelP, pixel **colorsP, int **dataP)); +-static void getline ARGS((char *line, int size, FILE *stream)); ++void ReadXPMFile(); ++static void getline(); + + /* number of xpmColorKeys */ + #define NKEYS 5 +@@ -46,7 +45,27 @@ + "c", /* key #5: color visual */ + }; + +-int ++#ifdef NEED_STRSTR ++/* for systems which do not provide it */ ++static char * ++strstr(s1, s2) ++ char *s1, *s2; +{ -+ register int ncols; ++ int ls2 = strlen(s2); + -+ /* scan backwards, removing empty columns */ -+ while (sP != stripe) -+ if (*--sP != 0) -+ { -+ ++sP; -+ break; -+ } -+ ncols = sP - stripe; -+ if (ncols > 0) -+ { -+ printf("\033%c%c%c", reschar, ncols % 256, ncols / 256); -+ fwrite(stripe, sizeof(char), ncols, stdout); -+ } -+ putchar('\n'); /* flush buffer */ ++ if (ls2 == 0) ++ return (s1); ++ while (strlen(s1) >= ls2) { ++ if (strncmp(s1, s2, ls2) == 0) ++ return (s1); ++ s1++; ++ } ++ return (0); +} + -+static void - res_60x72() - { - register int i, item, npins, row, col; - bit *bitrows[LOW_RES_ROWS], *bP[LOW_RES_ROWS]; -+ char *stripe, *sP; - -+ stripe = malloc(cols); - for (i = 0; i < LOW_RES_ROWS; ++i) - bitrows[i] = pbm_allocrow(cols); - printf("\033A\010"); /* '\n' = 8/72 */ -- for (row = 0; row < rows; row += LOW_RES_ROWS) -+ for (row = 0, sP = stripe; row < rows; row += LOW_RES_ROWS, sP = stripe) - { - if (row + LOW_RES_ROWS <= rows) - npins = LOW_RES_ROWS; -@@ -68,17 +95,18 @@ - npins = rows - row; - for (i = 0; i < npins; ++i) - pbm_readpbmrow(ifp, bP[i] = bitrows[i], cols, format); -- printf("\033K%c%c", cols % 256, cols / 256); - for (col = 0; col < cols; ++col) - { - item = 0; - for (i = 0; i < npins; ++i) - if (*(bP[i]++) == PBM_BLACK) - item |= 1 << (7 - i); -- putchar(item); -+ *sP++ = item; - } -- putchar('\n'); -+ outstripe(stripe, sP, 'K'); - } -+ printf("\033@"); -+ free(stripe); - } ++#endif ++ ++void + main(argc, argv) + int argc; + char *argv[]; +@@ -89,7 +108,6 @@ - static void -@@ -86,11 +114,13 @@ - { - register int i, pin, item, npins, row, col; - bit *bitrows[HIGH_RES_ROWS], *bP[HIGH_RES_ROWS]; -+ char *stripe, *sP; + #define MAX_LINE 2048 -+ stripe = malloc(cols); - for (i = 0; i < HIGH_RES_ROWS; ++i) - bitrows[i] = pbm_allocrow(cols); -- putchar('\033'); putchar('3'); putchar('\0'); -- for (row = 0; row < rows; row += HIGH_RES_ROWS) -+ printf("\0333\001"); /* \n = 1/144" */ -+ for (row = 0, sP = stripe; row < rows; row += HIGH_RES_ROWS, sP = stripe) - { - if (row + HIGH_RES_ROWS <= rows) - npins = HIGH_RES_ROWS; -@@ -98,7 +128,6 @@ - npins = rows - row; - for (i = 0; i < npins; ++i) - pbm_readpbmrow(ifp, bP[i] = bitrows[i], cols, format); -- printf("\033L%c%c", cols % 256, cols / 256); - for (col = 0; col < cols; ++col) - { - item = 0; -@@ -106,11 +135,10 @@ - for (pin = i = 0; i < npins; i += 2, ++pin) - if (*(bP[i]++) == PBM_BLACK) - item |= 1 << (7 - pin); -- putchar(item); -+ *sP++ = item; - } -- putchar('\n'); /* flush buffer */ -- printf("\033J\001"); /* 1/144 down */ -- printf("\033L%c%c", cols % 256, cols / 256); -+ outstripe(stripe, sP, 'L'); -+ sP = stripe; - for (col = 0; col < cols; ++col) - { - item = 0; -@@ -118,9 +146,11 @@ - for (i = 1, pin = 0; i < npins; i += 2, ++pin) - if (*(bP[i]++) == PBM_BLACK) - item |= 1 << (7 - pin); -- putchar(item); -+ *sP++ = item; - } -- putchar('\n'); /* flush buffer */ -- printf("\033J\017"); /* 15/144 down */ -+ outstripe(stripe, sP, 'L'); -+ printf("\033J\016"); /* 14/144 down, \n did 1/144 */ - } -+ printf("\033@"); -+ free(stripe); - } +-static + void + ReadXPMFile(stream, widthP, heightP, ncolorsP, + chars_per_pixelP, colorsP, dataP) diff --git a/graphics/netpbm/patches/patch-bg b/graphics/netpbm/patches/patch-bg deleted file mode 100644 index 30a182c1c66..00000000000 --- a/graphics/netpbm/patches/patch-bg +++ /dev/null @@ -1,38 +0,0 @@ -$NetBSD: patch-bg,v 1.2 1998/08/07 10:40:50 agc Exp $ - ---- ./pnm/Makefile.orig Tue Jul 7 22:02:33 1998 -+++ ./pnm/Makefile Wed Jul 8 07:43:20 1998 -@@ -61,19 +61,21 @@ - pnminvert pnmnoraw pnmpad pnmpaste \ - pnmtile pnmtoddif pnmtofits pnmtops pnmtorast \ - pnmtorle pnmtosgi pnmtosir pnmtoxwd \ -- rasttopnm rletopnm sgitopnm sirtopnm xwdtopnm zeisstopnm -+ rasttopnm rletopnm sgitopnm sirtopnm xwdtopnm zeisstopnm \ -+ pnmsmooth pnmhisteq - MATHBINARIES = pnmgamma pnmnlfilt pnmrotate pnmscale pnmshear - PNGBINARIES = pngtopnm pnmtopng - BINARIES = $(PORTBINARIES) $(MATHBINARIES) $(PNGBINARIES) $(TIFFBINARIES) --SCRIPTS = anytopnm pnmindex pnmmargin pnmsmooth pstopnm -+SCRIPTS = anytopnm pnmindex pnmmargin pstopnm - - PORTOBJECTS = fitstopnm.o giftopnm.o \ - pnmalias.o pnmarith.o pnmcat.o pnmcomp.o pnmconvol.o pnmcrop.o \ - pnmcut.o pnmdepth.o pnmenlarge.o pnmfile.o pnmflip.o pnmhistmap.o \ -- pnminvert.o pnmnoraw.o pnmpad.o pnmpaste.o \ -+ pnmhisteq.o pnminvert.o pnmnoraw.o pnmpad.o pnmpaste.o\ - pnmtile.o pnmtoddif.o pnmtofits.o pnmtops.o pnmtorast.o \ - pnmtosgi.o pnmtosir.o pnmtoxwd.o \ - rasttopnm.o sgitopnm.o sirtopnm.o xwdtopnm.o zeisstopnm.o \ -+ pnmsmooth.o pnmhisteq.o \ - pnmgamma.o pnmnlfilt.o pnmrotate.o pnmscale.o pnmshear.o - OBJECTS = $(PORTOBJECTS) - -@@ -209,6 +211,8 @@ - tifftopnm tifftopnm.o: tifftopnm.c - xwdtopnm xwdtopnm.o: xwdtopnm.c x10wd.h x11wd.h - zeisstopnm zeisstopnm.o: zeisstopnm.c -+pnmhisteq pnmhisteq.o: pnmhisteq.c -+pnmsmooth pnmsmooth.o: pnmsmooth.c - - clean: - -rm -f *.o *.a *.cat *~ core $(BINARIES) pnmmerge diff --git a/graphics/netpbm/patches/patch-bu b/graphics/netpbm/patches/patch-bu deleted file mode 100644 index 14b80d88c9f..00000000000 --- a/graphics/netpbm/patches/patch-bu +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-bu,v 1.2 1998/08/07 10:40:52 agc Exp $ - ---- ./ppm/ppmtogif.1.orig Fri Nov 12 04:18:30 1993 -+++ ./ppm/ppmtogif.1 Sat Jul 20 21:54:02 1996 -@@ -54,7 +54,7 @@ - .PP - All flags can be abbreviated to their shortest unique prefix. - .SH "SEE ALSO" --giftoppm(1), ppmquant(1), ppm(5) -+giftopnm(1), ppmquant(1), ppm(5) - .SH AUTHOR - Based on GIFENCOD by David Rowley <mgardi@watdcsu.waterloo.edu>. - Lempel-Ziv compression based on "compress". diff --git a/graphics/netpbm/patches/patch-bv b/graphics/netpbm/patches/patch-bv deleted file mode 100644 index 47954ed6feb..00000000000 --- a/graphics/netpbm/patches/patch-bv +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-bv,v 1.2 1998/08/07 10:40:52 agc Exp $ - ---- ./ppm/ppmtoicr.1.orig Mon Oct 4 05:12:38 1993 -+++ ./ppm/ppmtoicr.1 Sat Jul 20 21:54:58 1996 -@@ -83,7 +83,7 @@ - the displayed image by a factor of 2, and - run-length encode the data: - .nf -- giftoppm giffile | ppmtoicr -w giffile -r -e 2 -+ giftopnm giffile | ppmtoicr -w giffile -r -e 2 - .fi - .SH BUGS - .PP diff --git a/graphics/netpbm/patches/patch-bw b/graphics/netpbm/patches/patch-bw deleted file mode 100644 index a28b12a6fbd..00000000000 --- a/graphics/netpbm/patches/patch-bw +++ /dev/null @@ -1,29 +0,0 @@ -$NetBSD: patch-bw,v 1.2 1998/08/07 10:40:52 agc Exp $ - ---- ./ppm/ppmtoxpm.1.orig Mon Jan 31 06:49:48 1994 -+++ ./ppm/ppmtoxpm.1 Fri Aug 18 05:30:35 1995 -@@ -8,20 +8,20 @@ - Produces X11 pixmap (version 3) as output which - can be loaded directly by the XPM library. - .PP --The \fB-name\fP option allows one to specify the prefix string which is printed -+The \fB-name\f option allows one to specify the prefix string which is printed - in the resulting XPM output. If not specified, will default to the - filename (without extension) of the <ppmfile> argument. --If \fB-name\fP is not specified and <ppmfile> -+If \fB-name\f is not specified and <ppmfile> - is not specified (i.e. piped input), the prefix string will default to - the string "noname". - .PP --The \fB-rgb\fP option allows one to specify an X11 rgb text file for the -+The \fB-rgb\f option allows one to specify an X11 rgb text file for the - lookup of color name mnemonics. This rgb text file is typically the - /usr/lib/X11/rgb.txt of the MIT X11 distribution, but any file using the - same format may be used. When specified and - a RGB value from the ppm input matches a RGB value from the <rgb-textfile>, - then the corresponding color name mnemonic is printed in the XPM's colormap. --If \fB-rgb\fP is not specified, or if the RGB values don't match, then the color -+If \fB-rgb\f is not specified, or if the RGB values don't match, then the color - will be printed with the #RGB, #RRGGBB, #RRRGGGBBB, or #RRRRGGGGBBBB - hexadecimal format. - .PP diff --git a/graphics/netpbm/patches/patch-bx b/graphics/netpbm/patches/patch-bx deleted file mode 100644 index b61bd99c212..00000000000 --- a/graphics/netpbm/patches/patch-bx +++ /dev/null @@ -1,213 +0,0 @@ -$NetBSD: patch-bx,v 1.2 1998/08/07 10:40:52 agc Exp $ - ---- ./ppm/ppmtoxpm.c.orig Mon Jan 31 02:44:41 1994 -+++ ./ppm/ppmtoxpm.c Fri Aug 18 05:30:36 1995 -@@ -27,11 +27,25 @@ - ** - ** - lowercase conversion of RGB names def'ed out, - ** considered harmful. -+** -+** Michael Pall (pall@rz.uni-karlsruhe.de) - 29 Nov 93: -+** - Use the algorithm from xpm-lib for pixel encoding -+** (base 93 not base 28 -> saves a lot of space for colorful xpms) - */ - -+#include <stdio.h> -+#include <ctype.h> - #include "ppm.h" - #include "ppmcmap.h" - -+#if defined(SYSV) || defined(SVR4) -+#include <string.h> -+#ifndef index -+#define index strchr -+#endif -+#else /* SYSV */ -+#include <strings.h> -+#endif /* SYSV */ - - /* Max number of colors allowed in ppm input. */ - #define MAXCOLORS 256 -@@ -39,15 +53,19 @@ - /* Max number of rgb mnemonics allowed in rgb text file. */ - #define MAX_RGBNAMES 1024 - --/* Lower bound and upper bound of character-pixels printed in XPM output. -- Be careful, don't want the character '"' in this range. */ --/*#define LOW_CHAR '#' <-- minimum ascii character allowed */ --/*#define HIGH_CHAR '~' <-- maximum ascii character allowed */ --#define LOW_CHAR '`' --#define HIGH_CHAR 'z' -+#define MAXPRINTABLE 92 /* number of printable ascii chars -+ * minus \ and " for string compat -+ * and ? to avoid ANSI trigraphs. */ -+ -+static char *printable = -+" .XoO+@#$%&*=-;:>,<1234567890qwertyuipasdfghjklzxcvbnmMNBVCZ\ -+ASDFGHJKLPIUYTREWQ!~^/()_`'][{}|"; -+ - - #define max(a,b) ((a) > (b) ? (a) : (b)) - -+void read_rgb_names(); /* forward reference */ -+void gen_cmap(); /* forward reference */ - - typedef struct { /* rgb values and ascii names (from - * rgb text file) */ -@@ -62,17 +80,8 @@ - * mnemonic or #rgb value */ - } cixel_map; - -- --/* prototypes/forward reference */ --static void read_rgb_names ARGS((char *, rgb_names *, int *)); --static char * gen_numstr ARGS((int, int, int)); --static void gen_cmap ARGS((colorhist_vector, int, pixval, int, rgb_names *, int, cixel_map *, int *)); -- -- - pixel **pixels; - -- --int - main(argc, argv) - int argc; - char *argv[]; -@@ -88,11 +97,11 @@ - - /* Used for rgb value -> rgb mnemonic mapping */ - int map_rgb_names = 0; -- rgb_names *rgbn; /* rgb_names rgbn[MAX_RGBNAMES]; */ -+ rgb_names rgbn[MAX_RGBNAMES]; - int rgbn_max; - - /* Used for rgb value -> character-pixel string mapping */ -- cixel_map *cmap; /* cixel_map cmap[MAXCOLORS]; */ -+ cixel_map cmap[MAXCOLORS]; - int charspp; /* chars per pixel */ - - char out_name[100], rgb_fname[100], *cp; -@@ -188,17 +197,9 @@ - * If a rgb text file was specified, read in the rgb mnemonics. Does not - * return if fatal error occurs. - */ -- rgbn = (rgb_names *) malloc(MAX_RGBNAMES * sizeof(rgb_names)); -- if (rgbn == (rgb_names *) NULL) -- pm_error("out of memory"); -- - if (map_rgb_names) - read_rgb_names(rgb_fname, rgbn, &rgbn_max); - -- cmap = (cixel_map *)malloc(ncolors * sizeof(cixel_map)); -- if (cmap == (cixel_map *) NULL) -- pm_error("out of memory"); -- - /* Now generate the character-pixel colormap table. */ - gen_cmap(chv, ncolors, maxval, map_rgb_names, rgbn, rgbn_max, - cmap, &charspp); -@@ -231,12 +232,12 @@ - /* This routine reads a rgb text file. It stores the rgb values (0->65535) - and the rgb mnemonics (malloc'ed) into the "rgbn" array. Returns the - number of entries stored in "rgbn_max". */ --static - void - read_rgb_names(rgb_fname, rgbn, rgbn_max) - char *rgb_fname; -- rgb_names *rgbn; -- int *rgbn_max; -+ rgb_names rgbn[MAX_RGBNAMES]; -+int *rgbn_max; -+ - { - FILE *rgbf; - int i, items, red, green, blue; -@@ -303,16 +304,16 @@ - } /* read_rgb_names */ - - /*---------------------------------------------------------------------------*/ --/* Given a number and a base, (base == HIGH_CHAR-LOW_CHAR+1), this routine -+/* Given a number and a base (MAXPRINTABLE), this routine - prints the number into a malloc'ed string and returns it. The length of - the string is specified by "digits". The ascii characters of the printed -- number range from LOW_CHAR to HIGH_CHAR. The string is LOW_CHAR filled, -- (e.g. if LOW_CHAR==0, HIGH_CHAR==1, digits==5, i=3, routine would return -- the malloc'ed string "00011"). */ --static -+ number range from printable[0] to printable[MAXPRINTABLE]. The string is -+ printable[0] filled, (e.g. if printable[0]==0, printable[1]==1, -+ MAXPRINTABLE==2, digits==5, i=3, routine would return the malloc'ed -+ string "00011"). */ - char * --gen_numstr(i, base, digits) -- int i, base, digits; -+gen_numstr(i, digits) -+ int i, digits; - { - char *str, *p; - int d; -@@ -325,9 +326,9 @@ - p = str + digits; - *p-- = '\0'; /* nul terminate string */ - while (p >= str) { -- d = i % base; -- i /= base; -- *p-- = (char) ((int) LOW_CHAR + d); -+ d = i % MAXPRINTABLE; -+ i /= MAXPRINTABLE; -+ *p-- = printable[d]; - } - - return str; -@@ -336,7 +337,6 @@ - - /*---------------------------------------------------------------------------*/ - /* This routine generates the character-pixel colormap table. */ --static - void - gen_cmap(chv, ncolors, maxval, map_rgb_names, rgbn, rgbn_max, - cmap, charspp) -@@ -348,16 +348,16 @@ - * == unsigned short) */ - int map_rgb_names; /* == 1 if mapping rgb values to rgb - * mnemonics */ -- rgb_names *rgbn; /* rgb mnemonics from rgb text file */ -+ rgb_names rgbn[MAX_RGBNAMES]; /* rgb mnemonics from rgb text file */ - int rgbn_max; /* number of rgb mnemonics in table */ - - /* output: */ --cixel_map *cmap; /* pixel strings and ascii rgb -+cixel_map cmap[MAXCOLORS]; /* pixel strings and ascii rgb - * colors */ - int *charspp; /* characters per pixel */ - - { -- int i, j, base, cpp, mval, red, green, blue, r, g, b, matched; -+ int i, j, cpp, mval, red, green, blue, r, g, b, matched; - char *str; - - /* -@@ -365,9 +365,8 @@ - * to be forced to link with libm.a, so using a division loop rather - * than a log function. - */ -- base = (int) HIGH_CHAR - (int) LOW_CHAR + 1; - for (cpp = 0, j = ncolors; j; cpp++) -- j /= base; -+ j /= MAXPRINTABLE; - *charspp = cpp; - - /* -@@ -392,10 +391,11 @@ - - /* - * The character-pixel string is simply a printed number in base -- * "base" where the digits of the number range from LOW_CHAR to -- * HIGH_CHAR and the printed length of the number is "cpp". -+ * MAXPRINTABLE where the digits of the number range from -+ * printable[0] .. printable[MAXPRINTABLE-1] and the printed length -+ * of the number is "cpp". - */ -- cmap[i].cixel = gen_numstr(i, base, cpp); -+ cmap[i].cixel = gen_numstr(i, cpp); - - /* Fetch the rgb value of the current colormap entry. */ - red = PPM_GETR(chv[i].color); diff --git a/graphics/netpbm/patches/patch-bz b/graphics/netpbm/patches/patch-bz deleted file mode 100644 index 16dcd660749..00000000000 --- a/graphics/netpbm/patches/patch-bz +++ /dev/null @@ -1,53 +0,0 @@ -$NetBSD: patch-bz,v 1.2 1998/08/07 10:40:52 agc Exp $ - ---- ./ppm/xpmtoppm.c.orig Mon Jan 31 02:42:05 1994 -+++ ./ppm/xpmtoppm.c Fri Aug 18 05:30:36 1995 -@@ -30,9 +30,8 @@ - - #include "ppm.h" - --static void ReadXPMFile ARGS((FILE *stream, int *widthP, int *heightP, -- int *ncolorsP, int *chars_per_pixelP, pixel **colorsP, int **dataP)); --static void getline ARGS((char *line, int size, FILE *stream)); -+void ReadXPMFile(); -+static void getline(); - - /* number of xpmColorKeys */ - #define NKEYS 5 -@@ -46,7 +45,27 @@ - "c", /* key #5: color visual */ - }; - --int -+#ifdef NEED_STRSTR -+/* for systems which do not provide it */ -+static char * -+strstr(s1, s2) -+ char *s1, *s2; -+{ -+ int ls2 = strlen(s2); -+ -+ if (ls2 == 0) -+ return (s1); -+ while (strlen(s1) >= ls2) { -+ if (strncmp(s1, s2, ls2) == 0) -+ return (s1); -+ s1++; -+ } -+ return (0); -+} -+ -+#endif -+ -+void - main(argc, argv) - int argc; - char *argv[]; -@@ -89,7 +108,6 @@ - - #define MAX_LINE 2048 - --static - void - ReadXPMFile(stream, widthP, heightP, ncolorsP, - chars_per_pixelP, colorsP, dataP) |