diff options
author | Akinori MUSHA <knu@FreeBSD.org> | 2000-04-27 11:28:19 +0000 |
---|---|---|
committer | Akinori MUSHA <knu@FreeBSD.org> | 2000-04-27 11:28:19 +0000 |
commit | 4676671d3d9a37404c432897ebb8cc28859f8b36 (patch) | |
tree | d74ac30313ff78c41addeb527fd2db8bbd014572 | |
parent | Update to 0.4.0. (diff) |
Get shhopt library statically linked to each executable, driving it
out of the shared library.
PR: ports/18016
Submitted by: KATO Tsuguru <tkato@prontomail.ne.jp>
Notes
Notes:
svn path=/head/; revision=28036
-rw-r--r-- | graphics/netpbm/files/patch-aj | 53 | ||||
-rw-r--r-- | graphics/netpbm/files/patch-bf | 19 | ||||
-rw-r--r-- | graphics/netpbm/files/patch-bg | 19 | ||||
-rw-r--r-- | graphics/netpbm/files/patch-bk | 20 | ||||
-rw-r--r-- | graphics/netpbm/files/patch-bl | 33 | ||||
-rw-r--r-- | graphics/netpbm/files/patch-bm | 30 | ||||
-rw-r--r-- | graphics/netpbm/files/patch-bo | 43 | ||||
-rw-r--r-- | graphics/netpbm/files/patch-bp | 38 | ||||
-rw-r--r-- | graphics/netpbm/files/patch-bq | 35 |
9 files changed, 274 insertions, 16 deletions
diff --git a/graphics/netpbm/files/patch-aj b/graphics/netpbm/files/patch-aj index 8528e3c9bb90..0c4acf838a2b 100644 --- a/graphics/netpbm/files/patch-aj +++ b/graphics/netpbm/files/patch-aj @@ -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 --git a/graphics/netpbm/files/patch-bf b/graphics/netpbm/files/patch-bf index f08de2f5a03d..533a0a58da51 100644 --- a/graphics/netpbm/files/patch-bf +++ b/graphics/netpbm/files/patch-bf @@ -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 --git a/graphics/netpbm/files/patch-bg b/graphics/netpbm/files/patch-bg index 9d0f90d57423..87b21255dd36 100644 --- a/graphics/netpbm/files/patch-bg +++ b/graphics/netpbm/files/patch-bg @@ -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 --git a/graphics/netpbm/files/patch-bk b/graphics/netpbm/files/patch-bk new file mode 100644 index 000000000000..ee96595bbca3 --- /dev/null +++ b/graphics/netpbm/files/patch-bk @@ -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 --git a/graphics/netpbm/files/patch-bl b/graphics/netpbm/files/patch-bl new file mode 100644 index 000000000000..053d1704028a --- /dev/null +++ b/graphics/netpbm/files/patch-bl @@ -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 --git a/graphics/netpbm/files/patch-bm b/graphics/netpbm/files/patch-bm new file mode 100644 index 000000000000..a9f58ef809b8 --- /dev/null +++ b/graphics/netpbm/files/patch-bm @@ -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 --git a/graphics/netpbm/files/patch-bo b/graphics/netpbm/files/patch-bo new file mode 100644 index 000000000000..518c022487fe --- /dev/null +++ b/graphics/netpbm/files/patch-bo @@ -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 --git a/graphics/netpbm/files/patch-bp b/graphics/netpbm/files/patch-bp new file mode 100644 index 000000000000..0058d45925c1 --- /dev/null +++ b/graphics/netpbm/files/patch-bp @@ -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 --git a/graphics/netpbm/files/patch-bq b/graphics/netpbm/files/patch-bq new file mode 100644 index 000000000000..1fdc152d1c5e --- /dev/null +++ b/graphics/netpbm/files/patch-bq @@ -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) |