Date: Fri, 14 Apr 2000 19:05:17 -0700 (PDT) From: tkato@prontomail.ne.jp To: freebsd-gnats-submit@FreeBSD.org Subject: ports/18016: Update port: graphics/netpbm Message-ID: <200004150205.TAA09985@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 18016 >Category: ports >Synopsis: Update port: graphics/netpbm >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Apr 14 19:10:01 PDT 2000 >Closed-Date: >Last-Modified: >Originator: KATO Tsuguru >Release: 4.0-RELEASE i386 >Organization: >Environment: >Description: - Remove functions provided by shhopt library from base system New file: patches/patch-bk patches/patch-bl patches/patch-bm patches/patch-bn patches/patch-bo patches/patch-bp patches/patch-bq >How-To-Repeat: >Fix: diff -urN /usr/ports/graphics/netpbm/patches/patch-aj graphics/netpbm/patches/patch-aj --- /usr/ports/graphics/netpbm/patches/patch-aj Fri Apr 7 19:00:24 2000 +++ graphics/netpbm/patches/patch-aj Sat Apr 15 08:00:00 2000 @@ -1,5 +1,5 @@ ---- pbmplus.h.orig Fri Mar 24 09:08:33 2000 -+++ pbmplus.h Sat Apr 1 10:32:36 2000 +--- pbmplus.h.orig Tue Apr 4 02:34:36 2000 ++++ pbmplus.h Sat Apr 15 08:00:00 2000 @@ -24,6 +24,9 @@ #include <errno.h> #endif @@ -28,7 +28,7 @@ /*#define RGB_DB "/usr/openwin/lib/rgb.txt"*/ #ifdef VMS #define RGB_DB "PBMplus_Dir:RGB.TXT" -@@ -117,11 +120,13 @@ +@@ -117,6 +120,7 @@ #ifndef VMS #include <unistd.h> #endif @@ -36,9 +36,52 @@ extern int atoi(); extern void exit(); #ifndef __osf__ - extern long time(); +@@ -124,6 +128,7 @@ extern int write(); -+#endif #endif #endif ++#endif + + /* CONFIGURE: On most BSD systems, malloc() gets declared in stdlib.h, on + ** system V, it gets declared in malloc.h. On some systems, malloc.h +@@ -264,40 +269,6 @@ + int pm_readlittlelong ARGS(( FILE* in, long* lP )); + int pm_writelittlelong ARGS(( FILE* out, long l )); + +- +-/* Command line option parsing */ +-#include "pbmplus.h" +-/* Shhopt is Sverre Huseby's command line parsing package, which makes +- writing command parsing code quick and error free. Some of the Netpbm +- programs use it. +-*/ +-#include "shhopt.h" +- +-void pm_optParseOptions(int *argc, char *argv[], +- optStruct opt[], int allowNegNum); +-/* Use pm_optParseOptions instead of optParseOptions in order to use the +- shared Netpbm libraries +-*/ +- +-/* You can use OPTENTRY to assign a value to a dynamically or automatically +- allocated optStruct structure with minimal typing and easy readability. +- +- Here is an example: +- +- unsigned int option_def_index = 0; +- optStruct *option_def = malloc(100*sizeof(optStruct)); +- OPTENTRY('h', "help", OPT_FLAG, &help_flag, 0); +- OPTENTRY(0, "alphaout", OPT_STRING, &alpha_filename, 0); +-*/ +- +-#define OPTENTRY(shortvalue,longvalue,typevalue,outputvalue,flagvalue) {\ +- option_def[option_def_index].shortName = (shortvalue); \ +- option_def[option_def_index].longName = (longvalue); \ +- option_def[option_def_index].type = (typevalue); \ +- option_def[option_def_index].arg = (outputvalue); \ +- option_def[option_def_index].flags = (flagvalue); \ +- option_def[++option_def_index].type = OPT_END; \ +- } + + /* Compatibility stuff */ diff -urN /usr/ports/graphics/netpbm/patches/patch-bf graphics/netpbm/patches/patch-bf --- /usr/ports/graphics/netpbm/patches/patch-bf Sun Apr 9 15:47:32 2000 +++ graphics/netpbm/patches/patch-bf Sat Apr 15 08:00:00 2000 @@ -1,5 +1,5 @@ --- pnm/Makefile.orig Tue Apr 4 04:38:37 2000 -+++ pnm/Makefile Sat Apr 8 12:00:00 2000 ++++ pnm/Makefile Sat Apr 15 08:00:00 2000 @@ -32,6 +32,8 @@ NETPBMLIBS = $(LIBPNM) \ @@ -17,16 +17,20 @@ MANUALS1 = $(BINARIES) $(SCRIPTS) MANUALS3 = libpnm -@@ -104,44 +107,47 @@ +@@ -103,45 +106,49 @@ + PHONY: merge merge: $(MERGENAME) $(NOMERGEBINARIES) - tifftopnm pnmtotiff: %: %.o $(NETPBMLIBS) $(TIFFLIB_DIR)/libtiff.so +-tifftopnm pnmtotiff: %: %.o $(NETPBMLIBS) $(TIFFLIB_DIR)/libtiff.so - $(LD) $(LDFLAGS) -o $@ $@.o $(NETPBMLIBS) -L$(TIFFLIB_DIR) -ltiff \ -+ $(LD) $(LDFLAGS) -o $@ $@.o $(NETPBMLD) -lm -L$(TIFFLIB_DIR) -ltiff \ - $(JPEGLD) $(CDEBUG) +- $(JPEGLD) $(CDEBUG) ++tifftopnm: %: %.o $(NETPBMLIBS) $(TIFFLIB_DIR)/libtiff.so ++ $(LD) $(LDFLAGS) -o $@ $@.o $(NETPBMLD) ../shhopt/libshhopt.a \ ++ -lm -L$(TIFFLIB_DIR) -ltiff $(JPEGLD) $(CDEBUG) - pnmtotiffcmyk: %: %.o $(NETPBMLIBS) $(TIFFLIB_DIR)/libtiff.so +-pnmtotiffcmyk: %: %.o $(NETPBMLIBS) $(TIFFLIB_DIR)/libtiff.so - $(LD) $(LDFLAGS) -o $@ $@.o $(NETPBMLIBS) -lm -L$(TIFFLIB_DIR) -ltiff \ ++pnmtotiff pnmtotiffcmyk: %: %.o $(NETPBMLIBS) $(TIFFLIB_DIR)/libtiff.so + $(LD) $(LDFLAGS) -o $@ $@.o $(NETPBMLD) -lm -L$(TIFFLIB_DIR) -ltiff \ $(JPEGLD) $(CDEBUG) @@ -47,7 +51,8 @@ jpegtopnm: %: %.o $(NETPBMLIBS) - $(LD) $(LDFLAGS) -o $@ $@.o $(NETPBMLIBS) $(JPEGLD) -lm $(CDEBUG) -+ $(LD) $(LDFLAGS) -o $@ $@.o $(NETPBMLD) $(JPEGLD) -lm $(CDEBUG) ++ $(LD) $(LDFLAGS) -o $@ $@.o $(NETPBMLD) ../shhopt/libshhopt.a \ ++ $(JPEGLD) -lm $(CDEBUG) # Rule for objects. $(OBJECTS) $(LIBOBJECTS): %.o: %.c diff -urN /usr/ports/graphics/netpbm/patches/patch-bg graphics/netpbm/patches/patch-bg --- /usr/ports/graphics/netpbm/patches/patch-bg Sun Apr 9 15:47:33 2000 +++ graphics/netpbm/patches/patch-bg Sat Apr 15 08:00:00 2000 @@ -1,5 +1,5 @@ --- ppm/Makefile.orig Tue Apr 4 04:53:40 2000 -+++ ppm/Makefile Sat Apr 8 12:00:00 2000 ++++ ppm/Makefile Sat Apr 15 08:00:00 2000 @@ -19,8 +19,15 @@ endif @@ -16,11 +16,18 @@ PORTBINARIES = bmptoppm eyuvtoppm gouldtoppm hpcdtoppm ilbmtoppm imgtoppm \ mtvtoppm pcxtoppm pgmtoppm pi1toppm picttoppm \ pjtoppm \ -@@ -40,6 +47,7 @@ +@@ -34,12 +41,13 @@ + ppmtotga ppmtouil ppmtoxpm ppmtoyuv \ + ppmtoyuvsplit \ + qrttoppm rawtoppm rgb3toppm sldtoppm spctoppm \ +- sputoppm tgatoppm ximtoppm xpmtoppm xvminitoppm \ ++ sputoppm xpmtoppm xvminitoppm \ + yuvtoppm yuvsplittoppm + # We don't build vidtoppm by default, because it requires special libraries # and there is no known requirement for vidtoppm. -+NOMERGEBINARIES = ++NOMERGEBINARIES = tgatoppm ximtoppm ifneq ($(JPEGLIB_DIR), NONE) ifneq ($(JPEGHDR_DIR), NONE) NOMERGEBINARIES += ppmtojpeg @@ -41,7 +48,7 @@ .PHONY: all all: $(BINARIES) -@@ -72,29 +81,31 @@ +@@ -72,29 +81,35 @@ # Rules for plain programs. $(PORTBINARIES): %: %.o $(NETPBMLIBS) @@ -57,6 +64,10 @@ -ppmtojpeg: %: %.o $(NETPBMLIBS) - $(LD) $(LDFLAGS) -o $@ $@.o $(NETPBMLIBS) \ - -L $(JPEGLIB_DIR) -ljpeg $(CDEBUG) ++tgatoppm ximtoppm: %: %.o $(NETPBMLIBS) ../shhopt/libshhopt.a ++ $(LD) $(LDFLAGS) -o $@ $@.o $(NETPBMLD) ../shhopt/libshhopt.a \ ++ $(CDEBUG) ++ +ppmtojpeg: %: %.o $(NETPBMLIBS) ../shhopt/libshhopt.a + $(LD) $(LDFLAGS) -o $@ $@.o $(NETPBMLD) ../shhopt/libshhopt.a \ + $(JPEGLD) $(CDEBUG) diff -urN /usr/ports/graphics/netpbm/patches/patch-bk graphics/netpbm/patches/patch-bk --- /usr/ports/graphics/netpbm/patches/patch-bk Thu Jan 1 09:00:00 1970 +++ graphics/netpbm/patches/patch-bk Sat Apr 15 08:00:00 2000 @@ -0,0 +1,20 @@ +--- pbm/libpbm1.c.orig Tue Apr 4 02:32:49 2000 ++++ pbm/libpbm1.c Sat Apr 15 08:00:00 2000 +@@ -141,17 +141,6 @@ + } + + +-/* Wrapper for Shhopt, to get it into the shared library */ +- +-void +-pm_optParseOptions(int *argc, char *argv[], +- optStruct opt[], int allowNegNum) { +- +- optParseOptions(argc, argv, opt, allowNegNum); +- +-} +- +- + /* Log base two hacks. */ + + int diff -urN /usr/ports/graphics/netpbm/patches/patch-bl graphics/netpbm/patches/patch-bl --- /usr/ports/graphics/netpbm/patches/patch-bl Thu Jan 1 09:00:00 1970 +++ graphics/netpbm/patches/patch-bl Sat Apr 15 08:00:00 2000 @@ -0,0 +1,33 @@ +--- pnm/jpegtopnm.c.orig Tue Apr 4 03:09:33 2000 ++++ pnm/jpegtopnm.c Sat Apr 15 08:00:00 2000 +@@ -31,6 +31,7 @@ + #include <stdio.h> + #include <errno.h> + #include <jpeglib.h> ++#include "shhopt.h" + #include "pnm.h" + + #define EXIT_WARNING 2 /* Goes with EXIT_FAILURE, EXIT_SUCCESS in stdlib.h */ +@@ -100,12 +101,22 @@ + char ** const argv_parse = malloc(argc*sizeof(char *)); + /* argv, except we modify it as we parse */ + ++ /* Create the OptStruct structure describing our options */ ++ #define OPTENTRY(shortvalue,longvalue,typevalue,outputvalue,flagvalue) {\ ++ option_def[option_def_index].shortName = (shortvalue); \ ++ option_def[option_def_index].longName = (longvalue); \ ++ option_def[option_def_index].type = (typevalue); \ ++ option_def[option_def_index].arg = (outputvalue); \ ++ option_def[option_def_index].flags = (flagvalue); \ ++ option_def_index++; \ ++ } + option_def_index = 0; /* incremented by OPTENTRY */ + OPTENTRY(0, "verbose", OPT_FLAG, &cmdline_p->verbose, 0); + OPTENTRY(0, "dct", OPT_STRING, &dctval, 0); + OPTENTRY(0, "maxmemory", OPT_STRING, &maxmemory, 0); + OPTENTRY(0, "nosmooth", OPT_FLAG, &cmdline_p->nosmooth, 0); + OPTENTRY(0, "tracelevel", OPT_UINT, &cmdline_p->trace_level, 0); ++ option_def[option_def_index].type = OPT_END; + + /* Set the defaults */ + cmdline_p->verbose = FALSE; diff -urN /usr/ports/graphics/netpbm/patches/patch-bm graphics/netpbm/patches/patch-bm --- /usr/ports/graphics/netpbm/patches/patch-bm Thu Jan 1 09:00:00 1970 +++ graphics/netpbm/patches/patch-bm Sat Apr 15 08:00:00 2000 @@ -0,0 +1,30 @@ +--- pnm/tifftopnm.c.orig Tue Apr 4 03:10:27 2000 ++++ pnm/tifftopnm.c Sat Apr 15 08:00:00 2000 +@@ -35,6 +35,7 @@ + */ + + #include <string.h> ++#include "shhopt.h" + #include "pnm.h" + #ifdef VMS + #ifdef SYSV +@@ -512,9 +513,19 @@ + */ + unsigned int option_def_index; + ++ /* Create the OptStruct structure describing our options */ ++ #define OPTENTRY(shortvalue,longvalue,typevalue,outputvalue,flagvalue) {\ ++ option_def[option_def_index].shortName = (shortvalue); \ ++ option_def[option_def_index].longName = (longvalue); \ ++ option_def[option_def_index].type = (typevalue); \ ++ option_def[option_def_index].arg = (outputvalue); \ ++ option_def[option_def_index].flags = (flagvalue); \ ++ option_def_index++; \ ++ } + option_def_index = 0; /* incremented by OPTENTRY */ + OPTENTRY('h', "headerdump", OPT_FLAG, &cmdline_p->headerdump, 0); + OPTENTRY(0, "alphaout", OPT_STRING, &cmdline_p->alpha_filename, 0); ++ option_def[option_def_index].type = OPT_END; + + /* Set the defaults */ + cmdline_p->headerdump = 0; diff -urN /usr/ports/graphics/netpbm/patches/patch-bn graphics/netpbm/patches/patch-bn --- /usr/ports/graphics/netpbm/patches/patch-bn Thu Jan 1 09:00:00 1970 +++ graphics/netpbm/patches/patch-bn Sat Apr 15 08:00:00 2000 @@ -0,0 +1,11 @@ +--- ppm/ppmmerge.c.orig Thu Mar 30 06:00:40 2000 ++++ ppm/ppmmerge.c Sat Apr 15 08:00:00 2000 +@@ -97,8 +97,6 @@ + TRY("sldtoppm", sldtoppm_main); + TRY("spctoppm", spctoppm_main); + TRY("sputoppm", sputoppm_main); +- TRY("tgatoppm", tgatoppm_main); +- TRY("ximtoppm", ximtoppm_main); + TRY("xpmtoppm", xpmtoppm_main); + TRY("xvminitoppm", xvminitoppm_main); + TRY("yuvtoppm", yuvtoppm_main); diff -urN /usr/ports/graphics/netpbm/patches/patch-bo graphics/netpbm/patches/patch-bo --- /usr/ports/graphics/netpbm/patches/patch-bo Thu Jan 1 09:00:00 1970 +++ graphics/netpbm/patches/patch-bo Sat Apr 15 08:00:00 2000 @@ -0,0 +1,43 @@ +--- ppm/ppmtojpeg.c.orig Tue Apr 4 02:33:00 2000 ++++ ppm/ppmtojpeg.c Sat Apr 15 08:00:00 2000 +@@ -29,6 +29,7 @@ + #include <errno.h> + #include <stdio.h> + #include <jpeglib.h> ++#include "shhopt.h" + #include "ppm.h" + + #define EXIT_WARNING 2 /* Goes with EXIT_SUCCESS, EXIT_FAILURE in stdlib.h */ +@@ -324,6 +325,15 @@ + char ** const argv_parse = malloc(argc*sizeof(char *)); + /* argv, except we modify it as we parse */ + ++ /* Create the OptStruct structure describing our options */ ++ #define OPTENTRY(shortvalue,longvalue,typevalue,outputvalue,flagvalue) {\ ++ option_def[option_def_index].shortName = (shortvalue); \ ++ option_def[option_def_index].longName = (longvalue); \ ++ option_def[option_def_index].type = (typevalue); \ ++ option_def[option_def_index].arg = (outputvalue); \ ++ option_def[option_def_index].flags = (flagvalue); \ ++ option_def_index++; \ ++ } + option_def_index = 0; /* incremented by OPTENTRY */ + OPTENTRY(0, "verbose", OPT_FLAG, &cmdline_p->verbose, 0); + OPTENTRY(0, "quality", OPT_UINT, &cmdline_p->quality, 0); +@@ -343,6 +353,7 @@ + OPTENTRY(0, "optimize", OPT_FLAG, &cmdline_p->optimize, 0); + OPTENTRY(0, "optimise", OPT_FLAG, &cmdline_p->optimize, 0); + OPTENTRY(0, "restart", OPT_STRING, &restart, 0); ++ option_def[option_def_index].type = OPT_END; + + /* Set the defaults */ + cmdline_p->verbose = FALSE; +@@ -366,7 +377,7 @@ + argc_parse = argc; + for (i=0; i < argc; i++) argv_parse[i] = argv[i]; + +- pm_optParseOptions(&argc_parse, argv_parse, option_def, 0); ++ optParseOptions(&argc_parse, argv_parse, option_def, 0); + /* Uses and sets argc_parse, argv_parse and all of *cmdline_p. */ + + if (argc_parse - 1 == 0) diff -urN /usr/ports/graphics/netpbm/patches/patch-bp graphics/netpbm/patches/patch-bp --- /usr/ports/graphics/netpbm/patches/patch-bp Thu Jan 1 09:00:00 1970 +++ graphics/netpbm/patches/patch-bp Sat Apr 15 08:00:00 2000 @@ -0,0 +1,38 @@ +--- ppm/tgatoppm.c.orig Tue Apr 4 03:08:32 2000 ++++ ppm/tgatoppm.c Sat Apr 15 08:00:00 2000 +@@ -13,6 +13,7 @@ + */ + + #include <string.h> ++#include "shhopt.h" + #include "ppm.h" + #include "pgm.h" + #include "tga.h" +@@ -431,16 +432,26 @@ + */ + unsigned int option_def_index; + ++ /* Create the OptStruct structure describing our options */ ++ #define OPTENTRY(shortvalue,longvalue,typevalue,outputvalue,flagvalue) {\ ++ option_def[option_def_index].shortName = (shortvalue); \ ++ option_def[option_def_index].longName = (longvalue); \ ++ option_def[option_def_index].type = (typevalue); \ ++ option_def[option_def_index].arg = (outputvalue); \ ++ option_def[option_def_index].flags = (flagvalue); \ ++ option_def_index++; \ ++ } + option_def_index = 0; /* incremented by OPTENTRY */ + OPTENTRY(0, "headerdump", OPT_FLAG, &cmdline_p->headerdump, 0); + OPTENTRY('d', "debug", OPT_FLAG, &cmdline_p->headerdump, 0); + OPTENTRY(0, "alphaout", OPT_STRING, &cmdline_p->alpha_filename, 0); ++ option_def[option_def_index].type = OPT_END; + + /* Set the defaults */ + cmdline_p->headerdump = 0; + cmdline_p->alpha_filename = NULL; + +- pm_optParseOptions(&argc, argv, option_def, 0); ++ optParseOptions(&argc, argv, option_def, 0); + /* Uses and sets argc, argv, and all of *cmdline_p. */ + + if (argc - 1 == 0) diff -urN /usr/ports/graphics/netpbm/patches/patch-bq graphics/netpbm/patches/patch-bq --- /usr/ports/graphics/netpbm/patches/patch-bq Thu Jan 1 09:00:00 1970 +++ graphics/netpbm/patches/patch-bq Sat Apr 15 08:00:00 2000 @@ -0,0 +1,35 @@ +--- ppm/ximtoppm.c.orig Tue Apr 4 03:09:06 2000 ++++ ppm/ximtoppm.c Sat Apr 15 08:00:00 2000 +@@ -11,6 +11,7 @@ + */ + + #include <string.h> ++#include "shhopt.h" + #include "ppm.h" + #include "xim.h" + +@@ -418,13 +419,23 @@ + */ + unsigned int option_def_index; + ++ /* Create the OptStruct structure describing our options */ ++ #define OPTENTRY(shortvalue,longvalue,typevalue,outputvalue,flagvalue) {\ ++ option_def[option_def_index].shortName = (shortvalue); \ ++ option_def[option_def_index].longName = (longvalue); \ ++ option_def[option_def_index].type = (typevalue); \ ++ option_def[option_def_index].arg = (outputvalue); \ ++ option_def[option_def_index].flags = (flagvalue); \ ++ option_def_index++; \ ++ } + option_def_index = 0; /* incremented by OPTENTRY */ + OPTENTRY(0, "alphaout", OPT_STRING, &cmdline_p->alpha_filename, 0); ++ option_def[option_def_index].type = OPT_END; + + /* Set the defaults */ + cmdline_p->alpha_filename = NULL; + +- pm_optParseOptions(&argc, argv, option_def, 0); ++ optParseOptions(&argc, argv, option_def, 0); + /* Uses and sets argc, argv, and all of *cmdline_p. */ + + if (argc - 1 == 0) >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200004150205.TAA09985>