RHEL 9.0.0 Alpha bootstrap

The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/netpbm#e8ffa0347758e32b9e9c4c788e808f5cd727ed46
This commit is contained in:
Petr Šabata 2020-10-15 21:00:58 +02:00
parent fca5ef3714
commit e82e7c83f6
24 changed files with 14935 additions and 0 deletions

19
.gitignore vendored
View File

@ -0,0 +1,19 @@
/netpbm-10.61.02.tar.xz
/netpbm-10.66.02.tar.xz
/netpbm-10.71.02.tar.xz
/netpbm-10.75.99.tar.xz
/netpbm-10.76.00.tar.xz
/netpbm-10.77.00.tar.xz
/netpbm-10.78.00.tar.xz
/netpbm-10.79.00.tar.xz
/netpbm-10.80.00.tar.xz
/netpbm-10.81.00.tar.xz
/netpbm-10.82.00.tar.xz
/netpbm-10.83.01.tar.xz
/netpbm-10.84.03.tar.xz
/netpbm-10.86.00.tar.xz
/netpbm-10.87.00.tar.xz
/netpbm-10.88.00.tar.xz
/netpbm-10.89.00.tar.xz
/netpbm-10.90.00.tar.xz
/netpbm-10.92.00.tar.xz

View File

@ -0,0 +1,19 @@
diff --git a/converter/other/pstopnm.c b/converter/other/pstopnm.c
index f534265..2ab48ab 100644
--- a/converter/other/pstopnm.c
+++ b/converter/other/pstopnm.c
@@ -896,11 +896,11 @@ execGhostscript(int const inputPipeFd,
ghostscriptProg, arg0,
deviceopt, outfileopt, gopt, ropt, textalphabitsopt,
"-q", "-dNOPAUSE",
- "-dSAFER", "-");
+ "-dPARANOIDSAFER", "-");
}
- execl(ghostscriptProg, arg0, deviceopt, outfileopt, gopt, ropt,
- textalphabitsopt, "-q", "-dNOPAUSE", "-dSAFER", "-", NULL);
+ execl(ghostscriptProg, arg0, deviceopt, outfileopt, gopt, ropt, "-q",
+ "-dNOPAUSE", "-dPARANOIDSAFER", "-", NULL);
pm_error("execl() of Ghostscript ('%s') failed, errno=%d (%s)",
ghostscriptProg, errno, strerror(errno));

View File

@ -0,0 +1,26 @@
diff -urNp old/converter/other/svgtopam.c new/converter/other/svgtopam.c
--- old/converter/other/svgtopam.c 2017-02-08 12:11:02.593690917 +0100
+++ new/converter/other/svgtopam.c 2017-02-08 13:49:38.319029371 +0100
@@ -771,12 +771,17 @@ createCanvas(unsigned int const width,
MALLOCVAR_NOFAIL(canvasP);
- canvasP->width = width;
- canvasP->height = height;
- canvasP->pixels = ppm_allocarray(width, height);
- canvasP->maxval = maxval;
+ if(canvasP != NULL){
+ canvasP->width = width;
+ canvasP->height = height;
+ canvasP->pixels = ppm_allocarray(width, height);
+ canvasP->maxval = maxval;
+
+ *canvasPP = canvasP;
+ } else {
+ pm_error("can't allocate memory for canvas");
+ }
- *canvasPP = canvasP;
}

13
netpbm-bmptopnm.patch Normal file
View File

@ -0,0 +1,13 @@
diff --git a/converter/other/bmptopnm.c b/converter/other/bmptopnm.c
index 3f66634..ca4f944 100644
--- a/converter/other/bmptopnm.c
+++ b/converter/other/bmptopnm.c
@@ -1494,7 +1494,7 @@ readBmp(FILE * const ifP,
unsigned int * const cmapSizeP,
bool const verbose) {
- xel * colormap; /* malloc'ed */
+ xel * colormap = NULL; /* malloc'ed */
unsigned int pos;
/* Current byte position in the BMP file */

21
netpbm-cmuwtopbm.patch Normal file
View File

@ -0,0 +1,21 @@
diff -up netpbm-10.61.01/converter/pbm/cmuwmtopbm.c.cmuwtopbmfix netpbm-10.61.01/converter/pbm/cmuwmtopbm.c
--- netpbm-10.61.01/converter/pbm/cmuwmtopbm.c.cmuwtopbmfix 2013-01-02 18:39:57.000000000 +0100
+++ netpbm-10.61.01/converter/pbm/cmuwmtopbm.c 2013-01-03 05:41:36.024984241 +0100
@@ -18,7 +18,7 @@
This program does not check the pad bits at the end of each row.
*/
-
+#include <stdint.h>
#include "pbm.h"
/*--------------------------
@@ -42,7 +42,7 @@ readCmuwmHeader(FILE * const ifP
"CMU window manager header EOF / read error";
uint32_t const cmuwmMagic = 0xf10040bb;
- long l;
+ uint32_t l;
short s;
int rc;

129
netpbm-docfix.patch Normal file
View File

@ -0,0 +1,129 @@
diff --git a/converter/pbm/pbmtoepson.c b/converter/pbm/pbmtoepson.c
index 122a438..5d67746 100644
--- a/converter/pbm/pbmtoepson.c
+++ b/converter/pbm/pbmtoepson.c
@@ -75,7 +75,7 @@ parseCommandLine(int argc,
&dpiSpec, 0);
OPTENT3(0, "adjacent", OPT_FLAG, NULL,
&adjacentSpec, 0);
- OPTENT3(0, "nonadjacent", OPT_FLAG, NULL,
+ OPTENT3(0, "noadjacent", OPT_FLAG, NULL,
&nonadjacentSpec, 0);
opt.opt_table = option_def;
diff --git a/userguide/cameratopam.html b/userguide/cameratopam.html
index b50bfeb..3af9008 100644
--- a/userguide/cameratopam.html
+++ b/userguide/cameratopam.html
@@ -24,10 +24,10 @@ cameratopam - convert raw camera image to PAM
[<b>-balance_camera</b>]
[<b>-red_scale=</b><i>float</i>]
[<b>-blue_scale=</b><i>float</i>]
-[<b>-brightness=</b><i>fraction</i>]
+[<b>-bright=</b><i>fraction</i>]
[<b>-no_clip_color</b>]
[<b>-rgb</b>]
-[<b>-secondary</b>]
+[<b>-use_secondary</b>]
[<b>-linear</b>]
[<b>-verbose</b>]
@@ -110,7 +110,7 @@ the default.
<dd>Further adjust the color balance by multiplying the red and blue
channels by these values. Both default to 1.0.
-<dt><b>-brightness=</b><i>float</i>
+<dt><b>-bright=</b><i>float</i>
<dd>Change the output brightness. Default is 1.0.
@@ -118,14 +118,14 @@ channels by these values. Both default to 1.0.
<dd>By default, <b>cameratoapm</b> clips all colors to prevent pink
hues in the highlights. Combine this option with
-<b>-brightness=0.25</b> to leave the image data completely unclipped.
+<b>-bright=0.25</b> to leave the image data completely unclipped.
<dt><b>-rgb</b>
<dd>Write raw camera colors to the output file. By default,
<b>cameratoapm</b> converts to sRGB colorspace.
-<dt><b>-secondary</b>
+<dt><b>-use_secondary</b>
<dd>For cameras based on the Fuji Super CCD SR, this option causes
<b>cameratopam</b> to use the secondary sensors, in effect
diff --git a/userguide/fiascotopnm.html b/userguide/fiascotopnm.html
index c33f701..fa84441 100644
--- a/userguide/fiascotopnm.html
+++ b/userguide/fiascotopnm.html
@@ -56,7 +56,7 @@ the output file(s) are written to the first (writable) directory of
this list. Otherwise, the current directory is used to store the
output file(s).
-<dt><b>-z</b>, <b>--fast</b>
+<dt><b>-r</b>, <b>--fast</b>
<dd>
Decompress images in the 4:2:0 format; i.e., each chroma channel is
decompressed to an image of halved width and height. Use this option
@@ -88,7 +88,7 @@ given amount <i>N</i>. <i>N</i> is 1 (minimum) to 100 (maximum); default
is 70. When <i>N</i>=0, then the smoothing amount specified in the
FIASCO file is used (defined by the FIASCO coder).
-<dt><b>-F</b> <i>N</i>, <b>--fps=</b><i>N</i>
+<dt><b>-F</b> <i>N</i>, <b>--framerate=</b><i>N</i>
<dd>
Set number of frames per second to <i>N</i>. When using this option,
the frame rate specified in the FIASCO file is overridden.
@@ -118,13 +118,8 @@ following methods (in the specified order):
<li>--config=<i>name</i>
</ol>
-<dt><b>-h</b>, <b>--info</b>
-<dd>
-Print brief help, then exit.
-
-<dt><b>-H</b>, <b>--help</b>
-<dd>
-Print detailed help, then exit.
+<dt><b>-h</b>, <b>--help</b>
+Print help, then exit.
</dl>
diff --git a/userguide/pamperspective.html b/userguide/pamperspective.html
index 018f18a..13073d2 100644
--- a/userguide/pamperspective.html
+++ b/userguide/pamperspective.html
@@ -223,7 +223,7 @@ default rectangle as the "frame." The visible part is always
a rectangle the axes of which are parallel to those of the frame.
<p>The frame options are additive. All the parts of the image
-specified by either margin options, <b>--include_frame</b>, or
+specified by either margin options, <b>--frame_include</b>, or
<b>--include</b> (or their defaults) are in the visible part. The
visible part is the smallest possible rectangle that contains the
parts specified those three ways.
diff --git a/userguide/pbmtoepson.html b/userguide/pbmtoepson.html
index baacf7b..e74a7fe 100644
--- a/userguide/pbmtoepson.html
+++ b/userguide/pbmtoepson.html
@@ -16,7 +16,7 @@ pbmtoepson - convert a PBM image into Epson printer graphics
[<b>-dpi=</b><i>n</i>]
[<b>-protocol=</b>{<b>escp9</b>|<b>escp</b>}]
[<b>-adjacent</b>]
-[<b>-nonadjacent</b>]
+[<b>-noadjacent</b>]
[<i>pbmfile</i>]
@@ -75,7 +75,7 @@ print density for you consistent with your other options.
<p>This option was new in Netpbm 10.23 (July 2004).
<dt><b>-adjacent</b>
-<dt><b>-nonadjacent</b>
+<dt><b>-noadjacent</b>
<dd>These options determine whether the output uses "adjacent dot
printing" or not, whatever that is.

22
netpbm-gcc4.patch Normal file
View File

@ -0,0 +1,22 @@
diff -up netpbm-10.58.01/lib/pm.h.gcc4 netpbm-10.58.01/lib/pm.h
--- netpbm-10.58.01/lib/pm.h.gcc4 2012-04-09 19:08:08.885137097 +0200
+++ netpbm-10.58.01/lib/pm.h 2012-04-09 19:08:08.894136984 +0200
@@ -18,6 +18,7 @@
#include <sys/types.h>
#include <ctype.h>
#include <stdio.h>
+#include <string.h>
#include <errno.h>
#include <setjmp.h>
#include <sys/stat.h>
diff -up netpbm-10.58.01/urt/rle.h.gcc4 netpbm-10.58.01/urt/rle.h
--- netpbm-10.58.01/urt/rle.h.gcc4 2012-04-09 19:08:08.000000000 +0200
+++ netpbm-10.58.01/urt/rle.h 2012-04-09 19:08:39.137758887 +0200
@@ -34,6 +34,7 @@
#define RLE_H
#include <stdio.h> /* Declare FILE. */
+#include <string.h>
enum rle_dispatch {
NO_DISPATCH = -1,

13
netpbm-glibc.patch Normal file
View File

@ -0,0 +1,13 @@
--- netpbm-10.35/converter/other/pnmtotiffcmyk.c.glibc 2006-09-18 12:20:06.000000000 +0200
+++ netpbm-10.35/converter/other/pnmtotiffcmyk.c 2007-08-23 09:18:30.000000000 +0200
@@ -974,8 +974,8 @@ int main( int argc, char **argv ) {
if ( (err = parseOpts( argc, argv, rt )) ) goto exit ;
- if ( (err = rt->in->open( rt->in, rt )) ) goto exit ;
- if ( (err = rt->out->open( rt->out, rt )) ) goto exit ;
+ if ( (err = (rt->in->open)( rt->in, rt )) ) goto exit ;
+ if ( (err = (rt->out->open)( rt->out, rt )) ) goto exit ;
while ( rt->in->hasMore( rt->in ) ) {
if ( (err = rt->in->next( rt->in, &r, &g, &b )) ) goto exit ;

62
netpbm-jasper.patch Normal file
View File

@ -0,0 +1,62 @@
diff -urNp a/config.mk.in b/config.mk.in
--- a/config.mk.in 2018-11-21 12:46:22.044790058 +0100
+++ b/config.mk.in 2018-11-22 13:13:10.260123268 +0100
@@ -128,7 +128,7 @@ INSTALL = $(SRCDIR)/buildtools/install.s
# STRIPFLAG is the option you pass to the above install program to make it
# strip unnecessary information out of binaries.
-STRIPFLAG = -s
+STRIPFLAG =
# If you don't want to strip the binaries, just leave it null:
#STRIPFLAG =
@@ -482,12 +482,12 @@ JBIGLIB = $(INTERNAL_JBIGLIB)
JBIGHDR_DIR = $(INTERNAL_JBIGHDR_DIR)
# The Jasper JPEG-2000 image compression library (aka JasPer):
-JASPERLIB = $(INTERNAL_JASPERLIB)
-JASPERHDR_DIR = $(INTERNAL_JASPERHDR_DIR)
+JASPERLIB = ""
+JASPERHDR_DIR = "/usr/include/jasper"
# JASPERDEPLIBS is the libraries (-l options or file names) on which
# The Jasper library depends -- i.e. what you have to link into any
# executable that links in the Jasper library.
-JASPERDEPLIBS =
+JASPERDEPLIBS = -ljasper
#JASPERDEPLIBS = -ljpeg
# And the Utah Raster Toolkit (aka URT aka RLE) library:
diff -urNp a/converter/other/jbig/Makefile b/converter/other/jbig/Makefile
--- a/converter/other/jbig/Makefile 2018-11-21 12:46:22.075789920 +0100
+++ b/converter/other/jbig/Makefile 2018-11-22 13:13:40.837969056 +0100
@@ -11,8 +11,9 @@ include $(BUILDDIR)/config.mk
# INTERNAL_JBIGLIB must be relative to the current directory, because it
# may end up in MERGE_OBJECTS, which must be relative.
-INTERNAL_JBIGLIB = libjbig/libjbig.a
-INTERNAL_JBIGHDR_DIR = $(SRCDIR)/$(SUBDIR)/libjbig/include
+INTERNAL_JBIGLIB =
+INTERNAL_JBIGHDR_DIR = /usr/include
+#INTERNAL_JBIGHDR_DIR = $(SRCDIR)/$(SUBDIR)/libjbig/include
EXTERN_INCLUDES =
ifneq ($(JBIGHDR_DIR),NONE)
@@ -35,7 +36,6 @@ SCRIPTS =
ifeq ($(JBIGLIB),$(INTERNAL_JBIGLIB))
JBIGLIB_DEP = $(JBIGLIB)
- SUBDIRS += libjbig
else
# It's not our internal version; user's on his own to make sure it's built
endif
@@ -49,10 +49,3 @@ include $(SRCDIR)/common.mk
$(BINARIES): %: %.o $(JBIGLIB_DEP) $(LIBOPT)
$(BINARIES): LDFLAGS_TARGET = $(shell $(LIBOPT) $(JBIGLIB))
-
-$(INTERNAL_JBIGLIB): $(BUILDDIR)/$(SUBDIR)/libjbig FORCE
- $(MAKE) -f $(SRCDIR)/$(SUBDIR)/libjbig/Makefile \
- -C $(dir $@) $(notdir $@)
-
-.PHONY: FORCE
-FORCE:

48
netpbm-libdir-so.patch Normal file
View File

@ -0,0 +1,48 @@
diff --git a/lib/Makefile b/lib/Makefile
index bc758df..7f51b41 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -221,7 +221,7 @@ libpm.o: compile.h
.PHONY: install.lib
ifeq ($(NETPBMLIBTYPE),unixshared)
# install a Unix-style shared library
-install.lib: $(PKGDIR)/lib $(PKGDIR)/sharedlink
+install.lib: $(PKGDIR)/lib
cd $(PKGDIR)/lib ; rm -f libnetpbm.$(NETPBMLIBSUFFIX).$(MAJ).*
$(INSTALL) -c -m $(INSTALL_PERM_LIBD) \
libnetpbm.$(NETPBMLIBSUFFIX).$(MAJ).$(MIN) $(PKGDIR)/lib/
@@ -263,27 +263,26 @@ $(INTERFACE_HEADERS:%=%_installhdr): $(PKGDIR)/include/netpbm
$(SRCDIR)/lib/$(@:%_installhdr=%) $(PKGDIR)/include/netpbm/
.PHONY: install.staticlib
-install.staticlib: $(PKGDIR)/staticlink
+install.staticlib: $(PKGDIR)/lib
$(INSTALL) -c -m $(INSTALL_PERM_LIBS) libnetpbm.$(STATICLIBSUFFIX) \
- $(PKGDIR)/staticlink
+ $(PKGDIR)/lib
# Install a shared library stub -- the ".so" file used at link time to
# prepare a program for dynamically linking a library at run time
.PHONY: install.sharedlibstub
-install.sharedlibstub: $(PKGDIR)/sharedlink
+install.sharedlibstub: $(PKGDIR)/lib
ifeq ($(NETPBMLIBTYPE),unixshared)
# install the link-time (.so) links to the runtime libraries
- cd $(PKGDIR)/sharedlink ; \
+ cd $(PKGDIR)/lib ; \
rm -f libnetpbm.$(NETPBMLIBSUFFIX); \
- $(SYMLINK) ../lib/libnetpbm.$(NETPBMLIBSUFFIX).$(MAJ) \
+ $(SYMLINK) libnetpbm.$(NETPBMLIBSUFFIX).$(MAJ) \
libnetpbm.$(NETPBMLIBSUFFIX)
endif
ifeq ($(NETPBMLIBTYPE),dll)
- $(INSTALL) -c -m $(INSTALL_PERM_LIBS) libnetpbm.dll.a \
- $(PKGDIR)/sharedlink
+ $(INSTALL) -c -m $(INSTALL_PERM_LIBS) libnetpbm.dll.a $(PKGDIR)/link
endif
ifeq ($(NETPBMLIBTYPE),dylib)
- cd $(PKGDIR)/sharedlink/ ; \
+ cd $(PKGDIR)/link/ ; \
rm -f libnetpbm.dylib; \
$(SYMLINK) ../lib/libnetpbm.$(MAJ).$(MIN).dylib libnetpbm.dylib
endif

1465
netpbm-manfix.patch Normal file

File diff suppressed because it is too large Load Diff

1348
netpbm-manual-pages.patch Normal file

File diff suppressed because it is too large Load Diff

11
netpbm-multilib.patch Normal file
View File

@ -0,0 +1,11 @@
diff -up netpbm-10.47.04/buildtools/endiangen.c.multilib netpbm-10.47.04/buildtools/endiangen.c
--- netpbm-10.47.04/buildtools/endiangen.c.multilib 2009-10-21 13:38:54.000000000 +0200
+++ netpbm-10.47.04/buildtools/endiangen.c 2009-10-21 14:35:58.000000000 +0200
@@ -87,7 +87,6 @@ main(int argc, char **argv) {
byteOrder() == ENDIAN_LITTLE ? "LITTLE_ENDIAN" : "BIG_ENDIAN");
printf("#endif\n");
printf("\n");
- printf("#define BITS_PER_LONG %u\n", bitsPerLong());
return 0;
}

238
netpbm-pamtojpeg2k.patch Normal file
View File

@ -0,0 +1,238 @@
diff --git a/converter/other/jpeg2000/pamtojpeg2k.c b/converter/other/jpeg2000/pamtojpeg2k.c
index 4d73316..a53573f 100644
--- a/converter/other/jpeg2000/pamtojpeg2k.c
+++ b/converter/other/jpeg2000/pamtojpeg2k.c
@@ -98,7 +98,7 @@ parseCommandLine(int argc, char ** argv,
char * modeOpt;
unsigned int option_def_index;
-
+
MALLOCARRAY_NOFAIL(option_def, 100);
option_def_index = 0; /* incremented by OPTENTRY */
@@ -134,25 +134,25 @@ parseCommandLine(int argc, char ** argv,
&numrlvlsSpec, 0);
OPTENT3(0, "numgbits", OPT_UINT, &cmdlineP->numgbits,
&numgbitsSpec, 0);
- OPTENT3(0, "nomct", OPT_FLAG, NULL,
+ OPTENT3(0, "nomct", OPT_FLAG, NULL,
&cmdlineP->nomct, 0);
- OPTENT3(0, "sop", OPT_FLAG, NULL,
+ OPTENT3(0, "sop", OPT_FLAG, NULL,
&cmdlineP->sop, 0);
- OPTENT3(0, "eph", OPT_FLAG, NULL,
+ OPTENT3(0, "eph", OPT_FLAG, NULL,
&cmdlineP->eph, 0);
- OPTENT3(0, "lazy", OPT_FLAG, NULL,
+ OPTENT3(0, "lazy", OPT_FLAG, NULL,
&cmdlineP->lazy, 0);
- OPTENT3(0, "termall", OPT_FLAG, NULL,
+ OPTENT3(0, "termall", OPT_FLAG, NULL,
&cmdlineP->termall, 0);
- OPTENT3(0, "segsym", OPT_FLAG, NULL,
+ OPTENT3(0, "segsym", OPT_FLAG, NULL,
&cmdlineP->segsym, 0);
- OPTENT3(0, "vcausal", OPT_FLAG, NULL,
+ OPTENT3(0, "vcausal", OPT_FLAG, NULL,
&cmdlineP->vcausal, 0);
- OPTENT3(0, "pterm", OPT_FLAG, NULL,
+ OPTENT3(0, "pterm", OPT_FLAG, NULL,
&cmdlineP->pterm, 0);
- OPTENT3(0, "resetprob", OPT_FLAG, NULL,
+ OPTENT3(0, "resetprob", OPT_FLAG, NULL,
&cmdlineP->resetprob, 0);
- OPTENT3(0, "verbose", OPT_FLAG, NULL,
+ OPTENT3(0, "verbose", OPT_FLAG, NULL,
&cmdlineP->verbose, 0);
OPTENT3(0, "debuglevel", OPT_UINT, &cmdlineP->debuglevel,
&debuglevelSpec, 0);
@@ -223,7 +223,7 @@ parseCommandLine(int argc, char ** argv,
cmdlineP->inputFilename = strdup("-"); /* he wants stdin */
else if (argc - 1 == 1)
cmdlineP->inputFilename = strdup(argv[1]);
- else
+ else
pm_error("Too many arguments. The only argument accepted\n"
"is the input file specification");
@@ -232,7 +232,7 @@ parseCommandLine(int argc, char ** argv,
static void
-createJasperRaster(struct pam * const inpamP,
+createJasperRaster(struct pam * const inpamP,
jas_image_t * const jasperP) {
/*----------------------------------------------------------------------------
Create the raster in the *jasperP object, reading the raster from the
@@ -254,7 +254,7 @@ createJasperRaster(struct pam * const inpamP,
if (matrix[plane] == NULL)
pm_error("Unable to create matrix for plane %u. "
"jas_matrix_create() failed.", plane);
- }
+ }
tuplerow = pnm_allocpamrow(inpamP);
jasperMaxval = pm_bitstomaxval(pm_maxvaltobits(inpamP->maxval));
@@ -271,7 +271,7 @@ createJasperRaster(struct pam * const inpamP,
unsigned int jasperSample;
if (oddMaxval)
- jasperSample = tuplerow[col][plane] *
+ jasperSample = tuplerow[col][plane] *
jasperMaxval / inpamP->maxval;
else
jasperSample = tuplerow[col][plane];
@@ -279,16 +279,16 @@ createJasperRaster(struct pam * const inpamP,
jas_matrix_set(matrix[plane], 0, col, jasperSample);
}
}
- {
+ {
unsigned int plane;
for (plane = 0; plane < inpamP->depth; ++plane) {
int rc;
- rc = jas_image_writecmpt(jasperP, plane, 0, row,
+ rc = jas_image_writecmpt(jasperP, plane, 0, row,
inpamP->width, 1,
matrix[plane]);
if (rc != 0)
- pm_error("jas_image_writecmpt() of plane %u failed.",
+ pm_error("jas_image_writecmpt() of plane %u failed.",
plane);
}
}
@@ -297,14 +297,14 @@ createJasperRaster(struct pam * const inpamP,
pnm_freepamrow(tuplerow);
for (plane = 0; plane < inpamP->depth; ++plane)
jas_matrix_destroy(matrix[plane]);
-
+
free(matrix);
}
static void
-createJasperImage(struct pam * const inpamP,
+createJasperImage(struct pam * const inpamP,
jas_image_t ** const jasperPP) {
jas_image_cmptparm_t * cmptparms;
@@ -322,7 +322,7 @@ createJasperImage(struct pam * const inpamP,
cmptparms[plane].prec = pm_maxvaltobits(inpamP->maxval);
cmptparms[plane].sgnd = 0;
}
- *jasperPP =
+ *jasperPP =
jas_image_create(inpamP->depth, cmptparms, JAS_CLRSPC_UNKNOWN);
if (*jasperPP == NULL)
pm_error("Unable to create jasper image structure. "
@@ -371,7 +371,7 @@ convertToJasperImage(struct pam * const inpamP,
static void
-writeJpc(jas_image_t * const jasperP,
+writeJpc(jas_image_t * const jasperP,
struct cmdlineInfo const cmdline,
FILE * const ofP) {
@@ -383,8 +383,8 @@ writeJpc(jas_image_t * const jasperP,
/* Note: ilyrrates is a hack because we're too lazy to properly parse
command line options to get the information and then compose
- a proper input to Jasper. So the user can screw things up by
- specifying garbage for the -ilyrrates option
+ a proper input to Jasper. So the user can screw things up by
+ specifying garbage for the -ilyrrates option
*/
if (strlen(cmdline.ilyrrates) > 0)
pm_asprintf(&ilyrratesOpt, "ilyrrates=%s", cmdline.ilyrrates);
@@ -410,7 +410,7 @@ writeJpc(jas_image_t * const jasperP,
*/
rateOpt[0] = '\0';
}
- pm_asprintf(&options,
+ pm_asprintf(&options,
"imgareatlx=%u "
"imgareatly=%u "
"tilegrdtlx=%u "
@@ -428,7 +428,7 @@ writeJpc(jas_image_t * const jasperP,
"numrlvls=%u "
"numgbits=%u "
"%s %s %s %s %s %s %s %s %s",
-
+
cmdline.imgareatlx,
cmdline.imgareatly,
cmdline.tilegrdtlx,
@@ -471,8 +471,8 @@ writeJpc(jas_image_t * const jasperP,
pm_message("Using Jasper to encode to 'jpc' format with options "
"'%s'", options);
- rc = jas_image_encode(jasperP, outStreamP,
- jas_image_strtofmt((char*)"jpc"),
+ rc = jas_image_encode(jasperP, outStreamP,
+ jas_image_strtofmt((char*)"jpc"),
(char *)options);
if (rc != 0)
pm_error("jas_image_encode() failed to encode the JPEG 2000 "
@@ -484,11 +484,11 @@ writeJpc(jas_image_t * const jasperP,
int rc;
rc = jas_stream_close(outStreamP);
-
+
if (rc != 0)
pm_error("Failed to close output stream, "
"jas_stream_close() rc = %d", rc);
- }
+ }
jas_image_clearfmts();
@@ -506,33 +506,31 @@ main(int argc, char **argv)
jas_image_t * jasperP;
pnm_init(&argc, argv);
-
+
parseCommandLine(argc, argv, &cmdline);
-
- {
+
+ {
int rc;
-
+
rc = jas_init();
if ( rc != 0 )
pm_error("Failed to initialize Jasper library. "
"jas_init() returns rc %d", rc );
}
-
+
jas_setdbglevel(cmdline.debuglevel);
-
+
ifP = pm_openr(cmdline.inputFilename);
-
+
pnm_readpaminit(ifP, &inpam, PAM_STRUCT_SIZE(tuple_type));
-
+
convertToJasperImage(&inpam, &jasperP);
-
+
writeJpc(jasperP, cmdline, stdout);
-
+
jas_image_destroy(jasperP);
pm_close(ifP);
- pm_close(stdout);
-
return 0;
}

57
netpbm-ppmfadeusage.patch Normal file
View File

@ -0,0 +1,57 @@
diff -urNp old/editor/ppmfade new/editor/ppmfade
--- old/editor/ppmfade 2017-11-01 11:47:49.869611402 +0100
+++ new/editor/ppmfade 2017-11-01 11:53:25.524973342 +0100
@@ -84,7 +84,7 @@ for ($n = 0; $n < @ARGV; $n++) {
if (-e $first_file) {
} else {
print "I can't find first file '$first_file'\n";
- exit 20;
+ exit 1;
}
} elsif ($ARGV[$n] eq "-l") {
$n++;
@@ -92,7 +92,7 @@ for ($n = 0; $n < @ARGV; $n++) {
if (-e $last_file) {
} else {
print "I can't find last file '$last_file'\n";
- exit 20;
+ exit 1;
}
} elsif ($ARGV[$n] eq "-base") {
$n++;
@@ -113,9 +113,12 @@ for ($n = 0; $n < @ARGV; $n++) {
$mode = $BLOCK;
} elsif ("$ARGV[$n]" eq "-mix") {
$mode = $MIX;
+ } elsif ($ARGV[$n] eq "-help" || $ARGV[$n] eq "--help" || $ARGV[$n] eq "-h") {
+ print "ppmfade: Use 'man ppmfade' for help.\n";
+ exit 1;
} else {
print "Unknown argument: $ARGV[$n]\n";
- exit 100;
+ exit 1;
}
}
#
@@ -134,18 +137,18 @@ if ($first_file ne "undefined") {
$width = $1; $height = $2;
} else {
print("Unrecognized results from pnmfile on $first_file.\n");
- exit(50);
+ exit 1;
}
} elsif ($last_file ne "undefined") {
if ((`pnmfile $last_file` =~ m{\b(\d+)\sby\s(\d+)} )) {
$width = $1; $height = $2;
} else {
print("Unrecognized results from pnmfile on $first_file.\n");
- exit(50);
+ exit 1;
}
} else {
print("ppmfade: You must specify -f or -l (or both)\n");
- exit(90);
+ exit 1;
}
print("Frames are " . $width . "W x " . $height . "H\n");

9
netpbm-python3.patch Normal file
View File

@ -0,0 +1,9 @@
diff -urNp old/buildtools/makeman new/buildtools/makeman
--- old/buildtools/makeman 2018-01-03 12:15:55.000000000 +0100
+++ new/buildtools/makeman 2018-02-26 14:18:39.993760106 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# makeman -- compile netpbm's stereotyped HTML to troff markup
#

9636
netpbm-security-code.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,267 @@
diff --git a/editor/ppmfade b/editor/ppmfade
index dcd7bf2..5091651 100755
--- a/editor/ppmfade
+++ b/editor/ppmfade
@@ -40,6 +40,7 @@ exec perl -w -x -S -- "$0" "$@"
#
##############################################################################
use strict;
+use File::Temp "tempdir";
sub doVersionHack($) {
my ($argvR) = @_;
@@ -149,20 +150,26 @@ if ($first_file ne "undefined") {
print("Frames are " . $width . "W x " . $height . "H\n");
+#
+# We create a tmp-directory right here
+#
+my $tmpdir = tempdir("ppmfade.XXXXXX", CLEANUP => 1);
+
+
if ($first_file eq "undefined") {
print "Fading from black to ";
- system("ppmmake \\#000 $width $height >junk1$$.ppm");
+ system("ppmmake \\#000 $width $height >$tmpdir/junk1$$.ppm");
} else {
print "Fading from $first_file to ";
- system("cp", $first_file, "junk1$$.ppm");
+ system("cp", $first_file, "$tmpdir/junk1$$.ppm");
}
if ($last_file eq "undefined") {
print "black.\n";
- system("ppmmake \\#000 $width $height >junk2$$.ppm");
+ system("ppmmake \\#000 $width $height >$tmpdir/junk2$$.ppm");
} else {
print "$last_file\n";
- system("cp", $last_file, "junk2$$.ppm");
+ system("cp", $last_file, "$tmpdir/junk2$$.ppm");
}
#
@@ -170,14 +177,14 @@ if ($last_file eq "undefined") {
#
# Here's what our temporary files are:
-# junk1$$.ppm: The original (fade-from) image
-# junk2$$.ppm: The target (fade-from) image
-# junk3$$.ppm: The frame of the fade for the current iteration of the
-# the for loop.
-# junk1a$$.ppm: If the fade involves a ppmmix sequence from one intermediate
-# image to another, this is the first frame of that
-# sequence.
-# junk2a$$.ppm: This is the last frame of the above-mentioned ppmmix sequence
+# $tmpdir/junk1$$.ppm: The original (fade-from) image
+# $tmpdir/junk2$$.ppm: The target (fade-from) image
+# $tmpdir/junk3$$.ppm: The frame of the fade for the current iteration of the
+# the for loop.
+# $tmpdir/junk1a$$.ppm: If the fade involves a ppmmix sequence from one intermediate
+# image to another, this is the first frame of that
+# sequence.
+# $tmpdir/junk2a$$.ppm: This is the last frame of the above-mentioned ppmmix sequence
my $i; # Frame number
for ($i = 1; $i <= $nframes; $i++) {
@@ -185,147 +192,147 @@ for ($i = 1; $i <= $nframes; $i++) {
if ($mode eq $SPREAD) {
if ($i <= 10) {
my $n = $spline20[$i] * 100;
- system("ppmspread $n junk1$$.ppm >junk3$$.ppm");
+ system("ppmspread $n $tmpdir/junk1$$.ppm >$tmpdir/junk3$$.ppm");
} elsif ($i <= 20) {
my $n;
$n = $spline20[$i] * 100;
- system("ppmspread $n junk1$$.ppm >junk1a$$.ppm");
+ system("ppmspread $n $tmpdir/junk1$$.ppm >$tmpdir/junk1a$$.ppm");
$n = (1-$spline20[$i-10]) * 100;
- system("ppmspread $n junk2$$.ppm >junk2a$$.ppm");
+ system("ppmspread $n $tmpdir/junk2$$.ppm >$tmpdir/junk2a$$.ppm");
$n = $spline10[$i-10];
- system("ppmmix $n junk1a$$.ppm junk2a$$.ppm >junk3$$.ppm");
+ system("ppmmix $n $tmpdir/junk1a$$.ppm $tmpdir/junk2a$$.ppm >$tmpdir/junk3$$.ppm");
} else {
my $n = (1-$spline20[$i-10])*100;
- system("ppmspread $n junk2$$.ppm >junk3$$.ppm");
+ system("ppmspread $n $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm");
}
} elsif ($mode eq $SHIFT) {
if ($i <= 10) {
my $n = $spline20[$i] * 100;
- system("ppmshift $n junk1$$.ppm >junk3$$.ppm");
+ system("ppmshift $n $tmpdir/junk1$$.ppm >$tmpdir/junk3$$.ppm");
} elsif ($i <= 20) {
my $n;
$n = $spline20[$i] * 100;
- system("ppmshift $n junk1$$.ppm >junk1a$$.ppm");
+ system("ppmshift $n $tmpdir/junk1$$.ppm >$tmpdir/junk1a$$.ppm");
$n = (1-$spline20[$i-10])*100;
- system("ppmshift $n junk2$$.ppm >junk2a$$.ppm");
+ system("ppmshift $n $tmpdir/junk2$$.ppm >$tmpdir/junk2a$$.ppm");
$n = $spline10[$i-10];
- system("ppmmix $n junk1a$$.ppm junk2a$$.ppm >junk3$$.ppm");
+ system("ppmmix $n $tmpdir/junk1a$$.ppm $tmpdir/junk2a$$.ppm >$tmpdir/junk3$$.ppm");
} else {
my $n = (1-$spline20[$i-10]) * 100;
- system("ppmshift $n junk2$$.ppm >junk3$$.ppm");
+ system("ppmshift $n $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm");
}
} elsif ($mode eq $RELIEF) {
if ($i == 1) {
- system("ppmrelief junk1$$.ppm >junk1r$$.ppm");
+ system("ppmrelief $tmpdir/junk1$$.ppm >$tmpdir/junk1r$$.ppm");
}
if ($i <= 10) {
my $n = $spline10[$i];
- system("ppmmix $n junk1$$.ppm junk1r$$.ppm >junk3$$.ppm");
+ system("ppmmix $n $tmpdir/junk1$$.ppm $tmpdir/junk1r$$.ppm >$tmpdir/junk3$$.ppm");
} elsif ($i <= 20) {
my $n = $spline10[$i-10];
- system("ppmmix $n junk1r$$.ppm junk2r$$.ppm >junk3$$.ppm");
+ system("ppmmix $n $tmpdir/junk1r$$.ppm $tmpdir/junk2r$$.ppm >$tmpdir/junk3$$.ppm");
} else {
my $n = $spline10[$i-20];
- system("ppmmix $n junk2r$$.ppm junk2$$.ppm >junk3$$.ppm");
+ system("ppmmix $n $tmpdir/junk2r$$.ppm $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm");
}
if ($i == 10) {
- system("ppmrelief junk2$$.ppm >junk2r$$.ppm");
+ system("ppmrelief $tmpdir/junk2$$.ppm >$tmpdir/junk2r$$.ppm");
}
} elsif ($mode eq $OIL) {
if ($i == 1) {
- system("ppmtopgm junk1$$.ppm | pgmoil >junko$$.ppm");
- system("rgb3toppm junko$$.ppm junko$$.ppm junko$$.ppm " .
- ">junk1o$$.ppm");
+ system("ppmtopgm $tmpdir/junk1$$.ppm | pgmoil >$tmpdir/junko$$.ppm");
+ system("rgb3toppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm " .
+ ">$tmpdir/junk1o$$.ppm");
}
if ($i <= 10) {
my $n = $spline10[$i];
- system("ppmmix $n junk1$$.ppm junk1o$$.ppm >junk3$$.ppm");
+ system("ppmmix $n $tmpdir/junk1$$.ppm $tmpdir/junk1o$$.ppm >$tmpdir/junk3$$.ppm");
} elsif ($i <= 20) {
my $n = $spline10[$i-10];
- system("ppmmix $n junk1o$$.ppm junk2o$$.ppm >junk3$$.ppm");
+ system("ppmmix $n $tmpdir/junk1o$$.ppm $tmpdir/junk2o$$.ppm >$tmpdir/junk3$$.ppm");
} else {
my $n = $spline10[$i-20];
- system("ppmmix $n junk2o$$.ppm junk2$$.ppm >junk3$$.ppm");
+ system("ppmmix $n $tmpdir/junk2o$$.ppm $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm");
}
if ($i == 10) {
- system("ppmtopgm junk2$$.ppm | pgmoil >junko$$.ppm");
- system("rgb3toppm junko$$.ppm junko$$.ppm junko$$.ppm " .
- ">junk2o$$.ppm");
+ system("ppmtopgm $tmpdir/junk2$$.ppm | pgmoil >$tmpdir/junko$$.ppm");
+ system("rgb3toppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm " .
+ ">$tmpdir/junk2o$$.ppm");
}
} elsif ($mode eq $EDGE) {
if ($i == 1) {
- system("ppmtopgm junk1$$.ppm | pgmedge >junko$$.ppm");
- system("rgb3toppm junko$$.ppm junko$$.ppm junko$$.ppm " .
- ">junk1o$$.ppm");
+ system("ppmtopgm $tmpdir/junk1$$.ppm | pgmedge >$tmpdir/junko$$.ppm");
+ system("rgb3toppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm " .
+ ">$tmpdir/junk1o$$.ppm");
}
if ($i <= 10) {
my $n = $spline10[$i];
- system("ppmmix $n junk1$$.ppm junk1o$$.ppm >junk3$$.ppm");
+ system("ppmmix $n $tmpdir/junk1$$.ppm $tmpdir/junk1o$$.ppm >$tmpdir/junk3$$.ppm");
} elsif ($i <= 20) {
my $n = $spline10[$i-10];
- system("ppmmix $n junk1o$$.ppm junk2o$$.ppm >junk3$$.ppm");
+ system("ppmmix $n $tmpdir/junk1o$$.ppm $tmpdir/junk2o$$.ppm >$tmpdir/junk3$$.ppm");
} else {
my $n = $spline10[$i-20];
- system("ppmmix $n junk2o$$.ppm junk2$$.ppm >junk3$$.ppm");
+ system("ppmmix $n $tmpdir/junk2o$$.ppm $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm");
}
if ($i == 10) {
- system("ppmtopgm junk2$$.ppm | pgmedge >junko$$.ppm");
- system("rgb3toppm junko$$.ppm junko$$.ppm junko$$.ppm " .
- ">junk2o$$.ppm");
+ system("ppmtopgm $tmpdir/junk2$$.ppm | pgmedge >$tmpdir/junko$$.ppm");
+ system("rgb3toppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm " .
+ ">$tmpdir/junk2o$$.ppm");
}
} elsif ($mode eq $BENTLEY) {
if ($i == 1) {
- system("ppmtopgm junk1$$.ppm | pgmbentley >junko$$.ppm");
- system("rgb3toppm junko$$.ppm junko$$.ppm junko$$.ppm " .
- ">junk1o$$.ppm");
+ system("ppmtopgm $tmpdir/junk1$$.ppm | pgmbentley >$tmpdir/junko$$.ppm");
+ system("rgb3toppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm " .
+ ">$tmpdir/junk1o$$.ppm");
}
if ($i <= 10) {
my $n = $spline10[$i];
- system("ppmmix $n junk1$$.ppm junk1o$$.ppm >junk3$$.ppm");
+ system("ppmmix $n $tmpdir/junk1$$.ppm $tmpdir/junk1o$$.ppm >$tmpdir/junk3$$.ppm");
} elsif ($i <= 20) {
my $n = $spline10[$i-10];
- system("ppmmix $n junk1o$$.ppm junk2o$$.ppm >junk3$$.ppm");
+ system("ppmmix $n $tmpdir/junk1o$$.ppm $tmpdir/junk2o$$.ppm >$tmpdir/junk3$$.ppm");
} else {
my $n = $spline10[$i-20];
- system("ppmmix $n junk2o$$.ppm junk2$$.ppm >junk3$$.ppm");
+ system("ppmmix $n $tmpdir/junk2o$$.ppm $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm");
}
if ($i == 10) {
- system("ppmtopgm junk2$$.ppm | pgmbentley >junko$$.ppm");
- system("rgb3toppm junko$$.ppm junko$$.ppm junko$$.ppm " .
- ">junk2o$$.ppm");
+ system("ppmtopgm $tmpdir/junk2$$.ppm | pgmbentley >$tmpdir/junko$$.ppm");
+ system("rgb3toppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm " .
+ ">$tmpdir/junk2o$$.ppm");
}
} elsif ($mode eq $BLOCK) {
if ($i <= 10) {
my $n = 1 - 1.9*$spline20[$i];
- system("pamscale $n junk1$$.ppm | " .
- "pamscale -width $width -height $height >junk3$$.ppm");
+ system("pamscale $n $tmpdir/junk1$$.ppm | " .
+ "pamscale -width $width -height $height >$tmpdir/junk3$$.ppm");
} elsif ($i <= 20) {
my $n = $spline10[$i-10];
- system("ppmmix $n junk1a$$.ppm junk2a$$.ppm >junk3$$.ppm");
+ system("ppmmix $n $tmpdir/junk1a$$.ppm $tmpdir/junk2a$$.ppm >$tmpdir/junk3$$.ppm");
} else {
my $n = 1 - 1.9*$spline20[31-$i];
- system("pamscale $n junk2$$.ppm | " .
- "pamscale -width $width -height $height >junk3$$.ppm");
+ system("pamscale $n $tmpdir/junk2$$.ppm | " .
+ "pamscale -width $width -height $height >$tmpdir/junk3$$.ppm");
}
if ($i == 10) {
- system("cp", "junk3$$.ppm", "junk1a$$.ppm");
- system("pamscale $n junk2$$.ppm | " .
- "pamscale -width $width -height $height >junk2a$$.ppm");
+ system("cp", "$tmpdir/junk3$$.ppm", "$tmpdir/junk1a$$.ppm");
+ system("pamscale $n $tmpdir/junk2$$.ppm | " .
+ "pamscale -width $width -height $height >$tmpdir/junk2a$$.ppm");
}
} elsif ($mode eq $MIX) {
my $fade_factor = sqrt(1/($nframes-$i+1));
- system("ppmmix $fade_factor junk1$$.ppm junk2$$.ppm >junk3$$.ppm");
+ system("ppmmix $fade_factor $tmpdir/junk1$$.ppm $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm");
} else {
print("Internal error: impossible mode value '$mode'\n");
}
my $outfile = sprintf("%s.%04d.ppm", $base_name, $i);
- system("cp", "junk3$$.ppm", $outfile);
+ system("cp", "$tmpdir/junk3$$.ppm", $outfile);
}
#
# Clean up shop.
#
-system("rm junk*$$.ppm");
+system("rm $tmpdir/junk*$$.ppm");
exit(0);

21
netpbm-time.patch Normal file
View File

@ -0,0 +1,21 @@
diff -up netpbm-10.47.05/converter/other/fiasco/config.h.time netpbm-10.47.05/converter/other/fiasco/config.h
--- netpbm-10.47.05/converter/other/fiasco/config.h.time 2009-12-10 08:34:36.000000000 +0100
+++ netpbm-10.47.05/converter/other/fiasco/config.h 2009-12-10 08:43:54.000000000 +0100
@@ -19,7 +19,7 @@
#define STDC_HEADERS 1
/* Define if you can safely include both <sys/time.h> and <time.h>. */
-#define TIME_WITH_SYS_TIME 1
+/* #undef TIME_WITH_SYS_TIME */
/* Define if the X Window System is missing or not being used. */
#define X_DISPLAY_MISSING 1
@@ -75,7 +75,7 @@
#define HAVE_STRING_H 1
/* Define if you have the <sys/time.h> header file. */
-#define HAVE_SYS_TIME_H 1
+/* #undef HAVE_SYS_TIME_H */
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1

150
netpbm-userguide.patch Normal file
View File

@ -0,0 +1,150 @@
diff --git a/userguide/pammixmulti.html b/userguide/pammixmulti.html
index 97cf412..d2a2ba0 100755
--- a/userguide/pammixmulti.html
+++ b/userguide/pammixmulti.html
@@ -2,13 +2,13 @@
<html><head><title>Pammixmulti User Manual</title></head>
<body>
<h1>pammixmulti</h1>
-Updated: 18 November 2018<br>
-<br>
+
+Updated: 18 November 2018<br />
<a href="#index">Table Of Contents</a>
-<h2>NAME</h2>
-<p>pammixmulti - blend together multiple PAM images
+<h2 id="name">NAME</h2>
+<p>pammixmulti - blend together multiple PAM images</p>
<h2 id="synopsis">SYNOPSIS</h2>
@@ -22,11 +22,11 @@ Updated: 18 November 2018<br>
<p>Minimum unique abbreviation of an option is acceptable. You can use a
single hyphen instead of double hyphens to denote options. You can use white
space in place of the equals sign to separate an option name from its
-value.
+value.</p>
<h2 id="description">DESCRIPTION</h2>
-<p>This file is part of <a href="index.html">Netpbm</a>.
+<p>This file is part of <a href="index.html">Netpbm</a>.</p>
<p><b>pammixmulti</b> mixes two or more images to produce a new image. The
program provides multiple ways to interpret "mix."
@@ -37,7 +37,7 @@ program provides multiple ways to interpret "mix."
<p>In addition to the options common to all programs based on libnetpbm
(most notably <b>-quiet</b>, see <a href="index.html#commonoptions">
Common Options</a>), <b>pammixmulti</b> recognizes the following
-command line options:
+command line options:</p>
<dl compact>
<dt><b>--blend</b>=average|random|mask</dt>
@@ -50,7 +50,7 @@ output is produced by selecting the corresponding pixel from one of the input
images, chosen at random on a per-pixel basis. With
<b>--blend</b>=<code>mask</code>, each pixel in the output is produced by a
weighted average of the corresponding pixels from all the input images based
-on the grayscale level of an additional mask image.
+on the grayscale level of an additional mask image.</p>
</dd>
<dt><b>--maskfile</b>=<i>filename</i></dt>
@@ -60,7 +60,7 @@ grayscale mask file to control the blending of each pixel. (If the file is
not grayscale, the first channel is treated as gray). Where the mask file is
black, the first image is selected. Where the mask file is white, the last
image is selected. Intermediate levels of gray select intermediate
-images.
+images.</p>
</dd>
<dt><b>--stdev</b>=<i>number</i></dt>
@@ -77,7 +77,7 @@ that includes roughly equal amounts of the corresponding pixel from images 1
and 2 but less of the corresponding pixel from image 3. As <i>number</i>
tends towards the number of input images (going beyond that has diminishing
impact), the output tends to look more
-like <b>--blend</b>=average. <i>number</i> defaults to 0.25.
+like <b>--blend</b>=average. <i>number</i> defaults to 0.25.</p>
</dd>
<dt><b>--randomseed</b> <i>integer</i>
@@ -91,39 +91,39 @@ like <b>--blend</b>=average. <i>number</i> defaults to 0.25.
<h2 id="arguments">ARGUMENTS</h2>
-<p>You supply the names of the files to mix as non-option arguments.
+<p>You supply the names of the files to mix as non-option arguments.</p>
<h2 id="examples">EXAMPLES</h2>
-<p>Average a bunch of PPM images to produce a new PAM image:
+<p>Average a bunch of PPM images to produce a new PAM image:</p>
<pre><code>
pammixmulti input*.ppm &gt;output.ppm
</code></pre>
<p>Mix these same images by taking each pixel from a randomly selected input
-image:
+image:</p>
<pre><code>
pammixmulti --blend=random input*.ppm &gt;output.ppm
</code></pre>
<p>Use a mask image to control the fading among input images on a
-pixel-by-pixel basis:
+pixel-by-pixel basis:</p>
<pre><code>
pammixmulti --blend=mask --maskfile=mask.pgm &gt;output.pam \
one.pam two.pam three.pam four.pam
</code></pre>
-<p>Do the same but with more abrupt transitions:
+<p>Do the same but with more abrupt transitions:</p>
<pre><code>
pammixmulti --blend=mask --maskfile=mask.pgm --stdev=0.0 &gt;output.pam \
one.pam two.pam three.pam four.pam
</code></pre>
-<p>and now with more gradual transitions:
+<p>and now with more gradual transitions:</p>
<pre><code>
pammixmulti --blend=mask --maskfile=mask.pgm --stdev=1.0 &gt;output.pam \
@@ -138,7 +138,7 @@ pixel-by-pixel basis:
<h2 id="author">AUTHOR</h2>
-<p>Copyright 2018 Scott Pakin, scott+pbm@pakin.org.
+<p>Copyright 2018 Scott Pakin, scott+pbm@pakin.org.</p>
<h2 id="seealso">SEE ALSO</h2>
@@ -152,14 +152,14 @@ pixel-by-pixel basis:
<h2 id="index">Table Of Contents</h2>
<ul>
-<li><a href="#synopsis">SYNOPSIS</a>
-<li><a href="#description">DESCRIPTION</a>
-<li><a href="#options">OPTIONS</a>
-<li><a href="#arguments">ARGUMENTS</a>
-<li><a href="#examples">EXAMPLES</a>
-<li><a href="#history">HISTORY</a>
-<li><a href="#author">AUTHOR</a>
-<li><a href="#seealso">SEE ALSO</a>
+<li><a href="#synopsis">SYNOPSIS</a></li>
+<li><a href="#description">DESCRIPTION</a></li>
+<li><a href="#options">OPTIONS</a></li>
+<li><a href="#arguments">ARGUMENTS</a></li>
+<li><a href="#examples">EXAMPLES</a></li>
+<li><a href="#history">HISTORY</a></li>
+<li><a href="#author">AUTHOR</a></li>
+<li><a href="#seealso">SEE ALSO</a></li>
</ul>
</body>

11
netpbm-xwdfix.patch Normal file
View File

@ -0,0 +1,11 @@
--- netpbm-10.35/converter/other/xwdtopnm.c.xwdfix 2006-09-18 13:24:50.000000000 +0200
+++ netpbm-10.35/converter/other/xwdtopnm.c 2006-09-18 13:27:26.000000000 +0200
@@ -945,7 +945,7 @@ getpix(pixelReader * const rdrP) {
unsigned long const bitsToTakeMask = lsbmask[nBitsToTake];
/* E.g. if nbitsToTake is 4, this is 0x0000000F */
- unsigned long bitsToTake;
+ unsigned int bitsToTake;
/* The actual bits we take, in the 'nBitsToTake' low bits */
assert(nBitsToTake <= 32);

1319
netpbm.spec Normal file

File diff suppressed because it is too large Load Diff

30
netpbm2tar.sh Executable file
View File

@ -0,0 +1,30 @@
#!/bin/bash
# Source0 is prepared by
# svn checkout https://svn.code.sf.net/p/netpbm/code/advanced netpbm-%{version}
# svn checkout https://svn.code.sf.net/p/netpbm/code/userguide netpbm-%{version}/userguide
# svn checkout https://svn.code.sf.net/p/netpbm/code/trunk/test netpbm-%{version}/test
# and removing the .svn directories ( find -name "\.svn" -type d -print0 | xargs -0 rm -rf )
VERSION=$1
if [[ -z $VERSION ]]; then
echo "Version is missing as argument"
exit 1
fi
NETPBM_NAME="netpbm-$VERSION"
TEMP_DIR="/var/tmp/netpbm"
TARBALL="$TEMP_DIR/$NETPBM_NAME.tar.xz"
mkdir -p $TEMP_DIR
pushd $TEMP_DIR
svn checkout https://svn.code.sf.net/p/netpbm/code/advanced $NETPBM_NAME
svn checkout https://svn.code.sf.net/p/netpbm/code/userguide $NETPBM_NAME/userguide
svn checkout https://svn.code.sf.net/p/netpbm/code/trunk/test $NETPBM_NAME/test
find -name '\.svn' -type d -print0 | xargs -0 rm -rf
tar -cJvf $NETPBM_NAME.tar.xz $NETPBM_NAME
rm -rf $NETPBM_NAME/
popd
if [[ -f "$TARBALL" ]]; then
cp $TARBALL .
rm $TARBALL
fi
exit 0

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (netpbm-10.92.00.tar.xz) = 8737c7c644029fc256eb645a8dda3be6a9f2cf23c1634877f6bc6e7f5b5a453db5eae116a2dcde47e15dd3faf5816a01eb0185545d7acdabd475886924cb16c4