import netpbm-10.82.00-6.el8
This commit is contained in:
commit
3a51b6f630
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
SOURCES/netpbm-10.82.00.tar.xz
|
1
.netpbm.metadata
Normal file
1
.netpbm.metadata
Normal file
@ -0,0 +1 @@
|
||||
a33148501a050c578d0f48976a1117984bc0fe49 SOURCES/netpbm-10.82.00.tar.xz
|
17
SOURCES/netpbm-CAN-2005-2471.patch
Normal file
17
SOURCES/netpbm-CAN-2005-2471.patch
Normal file
@ -0,0 +1,17 @@
|
||||
diff -up netpbm-10.56.03/converter/other/pstopnm.c.CAN-2005-2471 netpbm-10.56.03/converter/other/pstopnm.c
|
||||
--- netpbm-10.56.03/converter/other/pstopnm.c.CAN-2005-2471 2011-11-09 09:18:00.000000000 +0100
|
||||
+++ netpbm-10.56.03/converter/other/pstopnm.c 2011-11-11 11:43:51.827409226 +0100
|
||||
@@ -747,11 +747,11 @@ execGhostscript(int const input
|
||||
ghostscriptProg, arg0,
|
||||
deviceopt, outfileopt, gopt, ropt, textalphabitsopt,
|
||||
"-q", "-dNOPAUSE",
|
||||
- "-dSAFER", "-");
|
||||
+ "-dPARANOIDSAFER", "-");
|
||||
}
|
||||
|
||||
execl(ghostscriptProg, arg0, deviceopt, outfileopt, gopt, ropt, "-q",
|
||||
- "-dNOPAUSE", "-dSAFER", "-", NULL);
|
||||
+ "-dNOPAUSE", "-dPARANOIDSAFER", "-", NULL);
|
||||
|
||||
pm_error("execl() of Ghostscript ('%s') failed, errno=%d (%s)",
|
||||
ghostscriptProg, errno, strerror(errno));
|
26
SOURCES/netpbm-CVE-2017-2587.patch
Normal file
26
SOURCES/netpbm-CVE-2017-2587.patch
Normal 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;
|
||||
}
|
||||
|
||||
|
24
SOURCES/netpbm-annocheck.patch
Normal file
24
SOURCES/netpbm-annocheck.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff -urNp a/buildtools/Makefile b/buildtools/Makefile
|
||||
--- a/buildtools/Makefile 2018-09-24 11:36:56.173535757 +0200
|
||||
+++ b/buildtools/Makefile 2018-09-24 11:40:09.537553859 +0200
|
||||
@@ -44,7 +44,7 @@ genfontc:%:%.o $(NETPBMLIB)
|
||||
$(LD_FOR_BUILD) -o $@ $(LDFLAGS_FOR_BUILD) $< $(NETPBMLIB)
|
||||
|
||||
$(BUILDPROGS):%:%.o
|
||||
- $(LD_FOR_BUILD) -o $@ $(LDFLAGS_FOR_BUILD) $<
|
||||
+ $(LD_FOR_BUILD) -o $@ $(LDFLAGSPRE) $<
|
||||
|
||||
distclean clean: cleanlocal
|
||||
.PHONY: cleanlocal
|
||||
diff -urNp a/test/Makefile b/test/Makefile
|
||||
--- a/test/Makefile 2018-09-24 11:36:56.211535549 +0200
|
||||
+++ b/test/Makefile 2018-09-24 12:40:56.440812065 +0200
|
||||
@@ -18,7 +18,7 @@ testrandom.o: testrandom.c
|
||||
$(CC_FOR_BUILD) -c -o $@ $(CFLAGS_FOR_BUILD) $<
|
||||
|
||||
testrandom: testrandom.o
|
||||
- $(LD_FOR_BUILD) -o $@ $(LDFLAGS_FOR_BUILD) $<
|
||||
+ $(LD_FOR_BUILD) -o $@ $(LDFLAGSPRE) $<
|
||||
|
||||
RAND_VARIETY ?= $(shell ./testrandom -x)
|
||||
|
11
SOURCES/netpbm-bmptopnm.patch
Normal file
11
SOURCES/netpbm-bmptopnm.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- netpbm-10.35/converter/other/bmptopnm.c.bmptopnm 2007-01-29 13:08:46.000000000 +0100
|
||||
+++ netpbm-10.35/converter/other/bmptopnm.c 2007-01-29 13:32:21.000000000 +0100
|
||||
@@ -1262,7 +1262,7 @@ readBmp(FILE * const ifP,
|
||||
xel ** const colormapP,
|
||||
bool const verbose) {
|
||||
|
||||
- xel * colormap; /* malloc'ed */
|
||||
+ xel * colormap = NULL; /* malloc'ed */
|
||||
unsigned int pos;
|
||||
/* Current byte position in the BMP file */
|
||||
|
21
SOURCES/netpbm-cmuwtopbm.patch
Normal file
21
SOURCES/netpbm-cmuwtopbm.patch
Normal 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;
|
||||
|
351
SOURCES/netpbm-covscan.patch
Normal file
351
SOURCES/netpbm-covscan.patch
Normal file
@ -0,0 +1,351 @@
|
||||
diff -urNp a/converter/other/fiasco/lib/error.c b/converter/other/fiasco/lib/error.c
|
||||
--- a/converter/other/fiasco/lib/error.c 2018-09-26 11:45:35.787418476 +0200
|
||||
+++ b/converter/other/fiasco/lib/error.c 2018-09-27 08:35:35.051707228 +0200
|
||||
@@ -89,8 +89,10 @@ set_error(const char *format, ...) {
|
||||
} else if (*str == 'c') {
|
||||
(void)va_arg(args, int);
|
||||
len += 1;
|
||||
- } else
|
||||
+ } else {
|
||||
+ va_end(args);
|
||||
return;
|
||||
+ }
|
||||
++str;
|
||||
}
|
||||
va_end(args);
|
||||
@@ -204,8 +206,10 @@ warning (const char *format, ...)
|
||||
|
||||
VA_START (args, format);
|
||||
|
||||
- if (verboselevel == FIASCO_NO_VERBOSITY)
|
||||
+ if (verboselevel == FIASCO_NO_VERBOSITY) {
|
||||
+ va_end (args);
|
||||
return;
|
||||
+ }
|
||||
|
||||
fprintf (stderr, "Warning: ");
|
||||
vfprintf (stderr, format, args);
|
||||
@@ -224,8 +228,10 @@ message (const char *format, ...)
|
||||
|
||||
VA_START (args, format);
|
||||
|
||||
- if (verboselevel == FIASCO_NO_VERBOSITY)
|
||||
+ if (verboselevel == FIASCO_NO_VERBOSITY) {
|
||||
+ va_end(args);
|
||||
return;
|
||||
+ }
|
||||
|
||||
vfprintf (stderr, format, args);
|
||||
fputc ('\n', stderr);
|
||||
@@ -242,8 +248,10 @@ debug_message (const char *format, ...)
|
||||
|
||||
VA_START (args, format);
|
||||
|
||||
- if (verboselevel < FIASCO_ULTIMATE_VERBOSITY)
|
||||
+ if (verboselevel < FIASCO_ULTIMATE_VERBOSITY) {
|
||||
+ va_end (args);
|
||||
return;
|
||||
+ }
|
||||
|
||||
fprintf (stderr, "*** ");
|
||||
vfprintf (stderr, format, args);
|
||||
@@ -261,8 +269,10 @@ info (const char *format, ...)
|
||||
|
||||
VA_START (args, format);
|
||||
|
||||
- if (verboselevel == FIASCO_NO_VERBOSITY)
|
||||
+ if (verboselevel == FIASCO_NO_VERBOSITY) {
|
||||
+ va_end (args);
|
||||
return;
|
||||
+ }
|
||||
|
||||
vfprintf (stderr, format, args);
|
||||
fflush (stderr);
|
||||
diff -urNp a/converter/other/gemtopnm.c b/converter/other/gemtopnm.c
|
||||
--- a/converter/other/gemtopnm.c 2018-09-26 11:45:35.791418469 +0200
|
||||
+++ b/converter/other/gemtopnm.c 2018-09-27 08:36:51.058648634 +0200
|
||||
@@ -101,10 +101,11 @@ main(argc, argv)
|
||||
|
||||
if (planes == 1)
|
||||
type = PBM_TYPE;
|
||||
- else
|
||||
+ else
|
||||
type = PPM_TYPE;
|
||||
|
||||
- pnm_writepnminit( stdout, cols, rows, MAXVAL, type, 0 );
|
||||
+ pnm_writepnminit( stdout, cols, rows, MAXVAL, type, 0 );
|
||||
+
|
||||
|
||||
overflow_add(cols, padright);
|
||||
{
|
||||
diff -urNp a/converter/other/jbig/jbigtopnm.c b/converter/other/jbig/jbigtopnm.c
|
||||
--- a/converter/other/jbig/jbigtopnm.c 2018-09-26 11:45:35.779418489 +0200
|
||||
+++ b/converter/other/jbig/jbigtopnm.c 2018-09-26 12:30:12.498686400 +0200
|
||||
@@ -279,6 +279,7 @@ int main (int argc, char **argv)
|
||||
}
|
||||
|
||||
pm_close(fout);
|
||||
+ pm_close(fin);
|
||||
|
||||
jbg_dec_free(&s);
|
||||
|
||||
diff -urNp a/converter/other/jbig/libjbig/jbig.c b/converter/other/jbig/libjbig/jbig.c
|
||||
--- a/converter/other/jbig/libjbig/jbig.c 2018-09-26 11:45:35.779418489 +0200
|
||||
+++ b/converter/other/jbig/libjbig/jbig.c 2018-09-26 12:32:47.179520102 +0200
|
||||
@@ -887,7 +887,7 @@ void jbg_enc_options(struct jbg_enc_stat
|
||||
if (order >= 0 && order <= 0x0f) s->order = order;
|
||||
if (options >= 0) s->options = options;
|
||||
if (l0 > 0) s->l0 = l0;
|
||||
- if (mx >= 0 && my < 128) s->mx = mx;
|
||||
+ if (mx >= 0 && mx < 128) s->mx = mx;
|
||||
if (my >= 0 && my < 256) s->my = my;
|
||||
|
||||
return;
|
||||
diff -urNp a/converter/other/jpeg2000/jpeg2ktopam.c b/converter/other/jpeg2000/jpeg2ktopam.c
|
||||
--- a/converter/other/jpeg2000/jpeg2ktopam.c 2018-09-26 11:45:35.774418498 +0200
|
||||
+++ b/converter/other/jpeg2000/jpeg2ktopam.c 2018-09-26 12:47:13.369571321 +0200
|
||||
@@ -135,11 +135,11 @@ readJ2k(const char * const inputFilena
|
||||
|
||||
jasperP = jas_image_decode(instreamP, jas_image_getfmt(instreamP),
|
||||
(char*)options);
|
||||
- if (jasperP == NULL)
|
||||
+ if (jasperP == NULL) {
|
||||
pm_error("Unable to interpret JPEG-2000 input. "
|
||||
"The Jasper library jas_image_decode() subroutine failed.");
|
||||
-
|
||||
- jas_stream_close(instreamP);
|
||||
+ }
|
||||
+ jas_stream_close(instreamP);
|
||||
|
||||
*jasperPP = jasperP;
|
||||
}
|
||||
diff -urNp a/converter/other/jpeg2000/libjasper/jpc/jpc_util.c b/converter/other/jpeg2000/libjasper/jpc/jpc_util.c
|
||||
--- a/converter/other/jpeg2000/libjasper/jpc/jpc_util.c 2018-09-26 11:45:35.774418498 +0200
|
||||
+++ b/converter/other/jpeg2000/libjasper/jpc/jpc_util.c 2018-09-26 12:50:30.121353853 +0200
|
||||
@@ -151,7 +151,7 @@ int jpc_atoaf(const char *s, int *numval
|
||||
if ((cp = strtok(buf, delim))) {
|
||||
++n;
|
||||
while ((cp = strtok(0, delim))) {
|
||||
- if (cp != '\0') {
|
||||
+ if (*cp != '\0') {
|
||||
++n;
|
||||
}
|
||||
}
|
||||
@@ -169,7 +169,7 @@ int jpc_atoaf(const char *s, int *numval
|
||||
vs[n] = atof(cp);
|
||||
++n;
|
||||
while ((cp = strtok(0, delim))) {
|
||||
- if (cp != '\0') {
|
||||
+ if (*cp != '\0') {
|
||||
vs[n] = atof(cp);
|
||||
++n;
|
||||
}
|
||||
diff -urNp a/converter/other/jpeg2000/pamtojpeg2k.c b/converter/other/jpeg2000/pamtojpeg2k.c
|
||||
--- a/converter/other/jpeg2000/pamtojpeg2k.c 2018-09-26 11:45:35.774418498 +0200
|
||||
+++ b/converter/other/jpeg2000/pamtojpeg2k.c 2018-09-26 12:52:06.202247510 +0200
|
||||
@@ -355,7 +355,7 @@ convertToJasperImage(struct pam * cons
|
||||
JAS_IMAGE_CT_COLOR(JAS_IMAGE_CT_RGB_B));
|
||||
}
|
||||
} else {
|
||||
- if (strncmp(inpamP->tuple_type, "GRAYSCALE", 9 == 0) ||
|
||||
+ if (strncmp(inpamP->tuple_type, "GRAYSCALE", 9) == 0 ||
|
||||
strncmp(inpamP->tuple_type, "BLACKANDWHITE", 13) == 0) {
|
||||
jas_image_setclrspc(jasperP, JAS_CLRSPC_GENGRAY);
|
||||
jas_image_setcmpttype(jasperP, 0,
|
||||
diff -urNp a/converter/pbm/pbmtoln03.c b/converter/pbm/pbmtoln03.c
|
||||
--- a/converter/pbm/pbmtoln03.c 2018-09-26 11:45:35.769418507 +0200
|
||||
+++ b/converter/pbm/pbmtoln03.c 2018-09-26 13:15:36.205121268 +0200
|
||||
@@ -80,22 +80,25 @@ output_sixel_record (unsigned char * rec
|
||||
/* Do an encoding */
|
||||
record[j++] = '!' ;
|
||||
sprintf (repeated_str, "%d", i - start_repeat) ;
|
||||
- for (p = repeated_str ; *p ; p++)
|
||||
+ for (p = repeated_str ; *p ; p++) {
|
||||
record[j++] = *p ;
|
||||
- record[j++] = last_char ; }
|
||||
+ }
|
||||
+ record[j++] = last_char ;
|
||||
|
||||
- else {
|
||||
+ } else {
|
||||
for (k = 0 ; k < repeated ; k++)
|
||||
- record[j++] = last_char ; }
|
||||
+ record[j++] = last_char ;
|
||||
+ }
|
||||
|
||||
start_repeat = i ;
|
||||
- last_char = record[i] ; }
|
||||
+ last_char = record[i] ;
|
||||
}
|
||||
+ }
|
||||
|
||||
fwrite ((char *) record, j, 1, stdout) ;
|
||||
putchar ('-') ; /* DECGNL (graphics new-line) */
|
||||
putchar ('\n') ;
|
||||
- }
|
||||
+}
|
||||
|
||||
|
||||
static void
|
||||
diff -urNp a/converter/pbm/pbmtomacp.c b/converter/pbm/pbmtomacp.c
|
||||
--- a/converter/pbm/pbmtomacp.c 2018-09-26 11:45:35.769418507 +0200
|
||||
+++ b/converter/pbm/pbmtomacp.c 2018-09-26 14:47:55.085913872 +0200
|
||||
@@ -177,7 +177,7 @@ calculateCropPad(struct CmdlineInfo
|
||||
pm_message("Specified -bottom value %u is beyond edge of "
|
||||
"input image", cmdline.bottom);
|
||||
|
||||
- bottom = MIN3(cmdline.bottom, rows - 1, top + MACP_ROWS - 1);
|
||||
+ bottom = MIN3(cmdline.bottom, rows - 1, top + MACP_ROWS - 1);
|
||||
} else
|
||||
bottom = MIN(rows - 1, top + MACP_ROWS - 1);
|
||||
|
||||
diff -urNp a/converter/pbm/pbmtoppa/pbm.c b/converter/pbm/pbmtoppa/pbm.c
|
||||
--- a/converter/pbm/pbmtoppa/pbm.c 2018-09-26 11:45:35.769418507 +0200
|
||||
+++ b/converter/pbm/pbmtoppa/pbm.c 2018-09-26 14:49:51.956959516 +0200
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
+#include "ppm.h"
|
||||
#include "ppapbm.h"
|
||||
|
||||
int make_pbm_stat(pbm_stat* pbm,FILE* fptr)
|
||||
diff -urNp a/converter/ppm/pjtoppm.c b/converter/ppm/pjtoppm.c
|
||||
--- a/converter/ppm/pjtoppm.c 2018-09-26 11:45:35.797418458 +0200
|
||||
+++ b/converter/ppm/pjtoppm.c 2018-09-26 14:52:41.300937179 +0200
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
|
||||
#include "ppm.h"
|
||||
+#include "pm.h"
|
||||
#include "mallocvar.h"
|
||||
|
||||
static char usage[] = "[paintjetfile]";
|
||||
diff -urNp a/converter/ppm/ppmtomitsu.c b/converter/ppm/ppmtomitsu.c
|
||||
--- a/converter/ppm/ppmtomitsu.c 2018-09-26 11:45:35.797418458 +0200
|
||||
+++ b/converter/ppm/ppmtomitsu.c 2018-09-26 14:56:09.837804961 +0200
|
||||
@@ -651,9 +651,10 @@ main(int argc, char * argv[]) {
|
||||
dpi300 = TRUE;
|
||||
else if (pm_keymatch(argv[argn], "-tiny", 2))
|
||||
tiny = TRUE;
|
||||
- else
|
||||
+ else
|
||||
pm_usage(usage);
|
||||
- ++argn;
|
||||
+
|
||||
+ ++argn;
|
||||
}
|
||||
|
||||
if (argn < argc) {
|
||||
diff -urNp a/converter/ppm/tgatoppm.c b/converter/ppm/tgatoppm.c
|
||||
--- a/converter/ppm/tgatoppm.c 2018-09-26 11:45:35.795418462 +0200
|
||||
+++ b/converter/ppm/tgatoppm.c 2018-09-26 15:03:12.084322787 +0200
|
||||
@@ -168,8 +168,8 @@ get_pixel(FILE * const ifP, pixel * dest
|
||||
Red = getbyte( ifP );
|
||||
if ( Size == 32 )
|
||||
Alpha = getbyte( ifP );
|
||||
- else
|
||||
- Alpha = 0;
|
||||
+ else
|
||||
+ Alpha = 0;
|
||||
l = 0;
|
||||
break;
|
||||
|
||||
diff -urNp a/converter/ppm/xpmtoppm.c b/converter/ppm/xpmtoppm.c
|
||||
--- a/converter/ppm/xpmtoppm.c 2018-09-26 11:45:35.795418462 +0200
|
||||
+++ b/converter/ppm/xpmtoppm.c 2018-09-26 15:09:39.763747185 +0200
|
||||
@@ -941,8 +941,8 @@ convertRaster(FILE * cons
|
||||
if (imageOutFileP)
|
||||
ppm_writeppmrow(imageOutFileP,
|
||||
pixrow, cols, PPM_MAXMAXVAL, 0);
|
||||
- if (alphaOutFileP)
|
||||
- pbm_writepbmrow(alphaOutFileP, alpharow, cols, 0);
|
||||
+ if (alphaOutFileP)
|
||||
+ pbm_writepbmrow(alphaOutFileP, alpharow, cols, 0);
|
||||
}
|
||||
|
||||
pbm_freerow(alpharow);
|
||||
diff -urNp a/editor/pnmconvol.c b/editor/pnmconvol.c
|
||||
--- a/editor/pnmconvol.c 2018-09-26 11:45:35.758418526 +0200
|
||||
+++ b/editor/pnmconvol.c 2018-09-26 15:25:06.963058646 +0200
|
||||
@@ -733,7 +733,7 @@ parsePlaneFileLine(const char * const
|
||||
"-matrix value is not a valid floating point "
|
||||
"number", colCt, line);
|
||||
|
||||
- ++colCt;
|
||||
+ ++colCt;
|
||||
}
|
||||
pm_strfree(token);
|
||||
}
|
||||
diff -urNp a/generator/pbmtext.c b/generator/pbmtext.c
|
||||
--- a/generator/pbmtext.c 2018-09-26 11:45:35.727418580 +0200
|
||||
+++ b/generator/pbmtext.c 2018-09-26 15:29:14.618407929 +0200
|
||||
@@ -404,7 +404,7 @@ fixControlChars(const PM_WCHAR * const
|
||||
output[outCursor++] = L' ';
|
||||
} else if (currentChar > fontP->maxglyph ||
|
||||
!fontP->glyph[currentChar]) {
|
||||
- if (currentChar > PM_FONT2_MAXGLYPH)
|
||||
+ if (currentChar > PM_FONT2_MAXGLYPH){
|
||||
pm_message("code point %X is beyond what this program "
|
||||
"can handle. Max=%X",
|
||||
(unsigned int)currentChar, PM_FONT2_MAXGLYPH);
|
||||
@@ -420,15 +420,15 @@ fixControlChars(const PM_WCHAR * const
|
||||
(unsigned int) currentChar );
|
||||
output[outCursor++] = ' ';
|
||||
}
|
||||
+ }
|
||||
} else
|
||||
output[outCursor++] = input[inCursor];
|
||||
-
|
||||
+
|
||||
assert(outCursor <= outputSize);
|
||||
}
|
||||
output[outCursor++] = L'\0';
|
||||
|
||||
assert(outCursor <= outputSize);
|
||||
-
|
||||
*outputP = output;
|
||||
}
|
||||
|
||||
diff -urNp a/lib/libpm.c b/lib/libpm.c
|
||||
--- a/lib/libpm.c 2018-09-26 11:45:35.768418509 +0200
|
||||
+++ b/lib/libpm.c 2018-09-27 08:20:50.933203723 +0200
|
||||
@@ -437,9 +437,10 @@ pm_maxvaltobits(int const maxval) {
|
||||
return 15;
|
||||
else if ( (long) maxval <= 65535L )
|
||||
return 16;
|
||||
- else
|
||||
+ else {
|
||||
pm_error( "maxval of %d is too large!", maxval );
|
||||
return -1; /* Should never come here */
|
||||
+ }
|
||||
}
|
||||
|
||||
int
|
||||
diff -urNp a/other/pamfix.c b/other/pamfix.c
|
||||
--- a/other/pamfix.c 2018-09-26 11:45:35.755418531 +0200
|
||||
+++ b/other/pamfix.c 2018-09-27 08:23:00.923166374 +0200
|
||||
@@ -184,7 +184,7 @@ clipPamRow(const struct pam * const pamP
|
||||
"image maxval of %lu",
|
||||
row, col, plane, tuplerow[col][plane],
|
||||
pamP->maxval);
|
||||
- tuplerow[col][plane] = pamP->maxval;
|
||||
+ tuplerow[col][plane] = pamP->maxval;
|
||||
}
|
||||
}
|
||||
}
|
||||
diff -urNp a/other/pnmcolormap.c b/other/pnmcolormap.c
|
||||
--- a/other/pnmcolormap.c 2018-09-26 11:45:35.756418529 +0200
|
||||
+++ b/other/pnmcolormap.c 2018-09-27 08:28:57.053986251 +0200
|
||||
@@ -838,9 +838,10 @@ colormapToSquare(struct pam * const pamP
|
||||
unsigned int const intsqrt = (int)sqrt((float)colormap.size);
|
||||
if (intsqrt * intsqrt == colormap.size)
|
||||
pamP->width = intsqrt;
|
||||
- else
|
||||
+ else {
|
||||
pamP->width = intsqrt + 1;
|
||||
overflow_add(intsqrt, 1);
|
||||
+ }
|
||||
}
|
||||
{
|
||||
unsigned int const intQuotient = colormap.size / pamP->width;
|
124
SOURCES/netpbm-docfix.patch
Normal file
124
SOURCES/netpbm-docfix.patch
Normal file
@ -0,0 +1,124 @@
|
||||
diff -urNp old/userguide/cameratopam.html new/userguide/cameratopam.html
|
||||
--- old/userguide/cameratopam.html 2017-09-05 09:05:16.000000000 +0200
|
||||
+++ new/userguide/cameratopam.html 2017-09-05 13:16:33.622352535 +0200
|
||||
@@ -25,10 +25,10 @@ cameratopam - convert raw camera image t
|
||||
[<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>]
|
||||
|
||||
@@ -106,7 +106,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.
|
||||
|
||||
@@ -114,14 +114,14 @@ channels by these values. Both default
|
||||
|
||||
<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 -urNp old/userguide/fiascotopnm.html new/userguide/fiascotopnm.html
|
||||
--- old/userguide/fiascotopnm.html 2017-09-05 09:05:16.000000000 +0200
|
||||
+++ new/userguide/fiascotopnm.html 2017-09-05 13:32:51.810458154 +0200
|
||||
@@ -51,7 +51,7 @@ the output file(s) are written to the fi
|
||||
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
|
||||
@@ -83,7 +83,7 @@ given amount <I>N</I>. <I>N</I> is 1 (mi
|
||||
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.
|
||||
@@ -113,13 +113,8 @@ following methods (in the specified orde
|
||||
<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 -urNp old/userguide/pamperspective.html new/userguide/pamperspective.html
|
||||
--- old/userguide/pamperspective.html 2017-09-05 09:05:16.000000000 +0200
|
||||
+++ new/userguide/pamperspective.html 2017-09-05 13:23:15.869997105 +0200
|
||||
@@ -220,7 +220,7 @@ default rectangle as the "frame." The vi
|
||||
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 -urNp old/converter/pbm/pbmtoepson.c new/converter/pbm/pbmtoepson.c
|
||||
--- old/converter/pbm/pbmtoepson.c 2018-01-04 14:26:14.740024843 +0100
|
||||
+++ new/converter/pbm/pbmtoepson.c 2018-01-04 14:28:47.970518766 +0100
|
||||
@@ -75,7 +75,7 @@ parseCommandLine(int ar
|
||||
&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 -urNp old/userguide/pbmtoepson.html new/userguide/pbmtoepson.html
|
||||
--- old/userguide/pbmtoepson.html 2018-01-04 14:26:14.586024719 +0100
|
||||
+++ new/userguide/pbmtoepson.html 2018-01-04 14:27:56.466847698 +0100
|
||||
@@ -18,7 +18,7 @@ pbmtoepson - convert a PBM image into Ep
|
||||
[<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>]
|
||||
|
||||
@@ -74,7 +74,7 @@ print density for you consistent with yo
|
||||
<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.
|
12
SOURCES/netpbm-fiasco-overflow.patch
Normal file
12
SOURCES/netpbm-fiasco-overflow.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up netpbm-10.47.09/converter/other/fiasco/lib/image.h.fiasco-overflow netpbm-10.47.09/converter/other/fiasco/lib/image.h
|
||||
--- netpbm-10.47.09/converter/other/fiasco/lib/image.h.fiasco-overflow 2010-01-25 09:00:48.000000000 +0100
|
||||
+++ netpbm-10.47.09/converter/other/fiasco/lib/image.h 2010-01-27 10:29:48.000000000 +0100
|
||||
@@ -29,7 +29,7 @@ typedef struct image
|
||||
* Image data
|
||||
*/
|
||||
{
|
||||
- char id [7];
|
||||
+ char id [8];
|
||||
unsigned reference_count;
|
||||
unsigned width; /* Width of the image */
|
||||
unsigned height; /* Height of the image */
|
22
SOURCES/netpbm-gcc4.patch
Normal file
22
SOURCES/netpbm-gcc4.patch
Normal 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
SOURCES/netpbm-glibc.patch
Normal file
13
SOURCES/netpbm-glibc.patch
Normal 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
SOURCES/netpbm-jasper.patch
Normal file
62
SOURCES/netpbm-jasper.patch
Normal 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:
|
184
SOURCES/netpbm-manfix.patch
Normal file
184
SOURCES/netpbm-manfix.patch
Normal file
@ -0,0 +1,184 @@
|
||||
diff -urNp old/userguide/avstopam.html new/userguide/avstopam.html
|
||||
--- old/userguide/avstopam.html 2017-09-05 13:58:08.338559550 +0200
|
||||
+++ new/userguide/avstopam.html 2017-09-05 14:00:27.371039472 +0200
|
||||
@@ -1,8 +1,7 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
+<html>
|
||||
<head>
|
||||
<title>Avstopam User Manual</title>
|
||||
-<meta http-equiv="content-type" content="text/html; charset=us-ascii" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
diff -urNp old/userguide/escp2topbm.html new/userguide/escp2topbm.html
|
||||
--- old/userguide/escp2topbm.html 2017-09-05 13:58:08.335559561 +0200
|
||||
+++ new/userguide/escp2topbm.html 2017-09-05 14:01:20.226842694 +0200
|
||||
@@ -6,6 +6,7 @@ Updated: 14 July 2015
|
||||
<BR>
|
||||
<A HREF="#index">Table Of Contents</A>
|
||||
|
||||
+<H2>NAME</H2>
|
||||
escp2topbm - convert an ESC/P2 printer file to a PBM image
|
||||
|
||||
<H2 id="synopsis">SYNOPSIS</H2>
|
||||
diff -urNp old/userguide/faxformat.html new/userguide/faxformat.html
|
||||
--- old/userguide/faxformat.html 2017-09-05 13:58:08.337559553 +0200
|
||||
+++ new/userguide/faxformat.html 2017-09-05 14:02:33.322571279 +0200
|
||||
@@ -5,10 +5,11 @@
|
||||
Updated: 03 December 2008
|
||||
<BR>
|
||||
|
||||
+<H2>SYNOPSIS</H2>
|
||||
<p>This page, part of the <a href="index.html">Netpbm user's guide</a>,
|
||||
describes FAX formats in relation to Netpbm facilities.
|
||||
|
||||
-
|
||||
+<H2>DESCRIPTION</H2>
|
||||
<p>The ITU (formerly CCITT) publishes standards for operation of fax machines
|
||||
(the idea is to provide a way to be sure that a fax machine is able to receive
|
||||
a fax sent by another). These standards incidentally specify graphics file
|
||||
diff -urNp old/userguide/pampaintspill.html new/userguide/pampaintspill.html
|
||||
--- old/userguide/pampaintspill.html 2017-09-05 13:58:08.338559550 +0200
|
||||
+++ new/userguide/pampaintspill.html 2017-09-05 14:03:32.625351620 +0200
|
||||
@@ -1,8 +1,7 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
-<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
+<html>
|
||||
<head>
|
||||
<title>Pampaintspill User Manual</title>
|
||||
-<meta http-equiv="content-type" content="text/html; charset=us-ascii" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -11,6 +10,7 @@
|
||||
|
||||
<p><a href="#index">Table Of Contents</a></p>
|
||||
|
||||
+<H2>NAME</H2>
|
||||
<p>pampaintspill - smoothly spill colors into the background</p>
|
||||
|
||||
<h2><a name="synopsis">SYNOPSIS</a></h2>
|
||||
diff -urNp old/userguide/pamrecolor.html new/userguide/pamrecolor.html
|
||||
--- old/userguide/pamrecolor.html 2017-09-05 13:58:08.336559557 +0200
|
||||
+++ new/userguide/pamrecolor.html 2017-09-05 14:04:34.714122098 +0200
|
||||
@@ -1,8 +1,7 @@
|
||||
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||||
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Pamrecolor User Manual</title>
|
||||
-<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -11,7 +10,7 @@
|
||||
|
||||
<p>Updated: 31 July 2010</p>
|
||||
|
||||
-<p><a href="#contents">Table Of Contents</a></p>
|
||||
+<p><a href="#index">Table Of Contents</a></p>
|
||||
|
||||
|
||||
<h2 id="name">NAME</h2>
|
||||
diff -urNp old/userguide/pamsistoaglyph.html new/userguide/pamsistoaglyph.html
|
||||
--- old/userguide/pamsistoaglyph.html 2017-09-05 13:58:08.334559565 +0200
|
||||
+++ new/userguide/pamsistoaglyph.html 2017-09-05 14:05:25.865944327 +0200
|
||||
@@ -1,8 +1,7 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
-<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
+<html>
|
||||
<head>
|
||||
<title>Pamsistoaglyph User Manual</title>
|
||||
-<meta http-equiv="content-type" content="text/html; charset=us-ascii" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
diff -urNp old/userguide/pamstereogram.html new/userguide/pamstereogram.html
|
||||
--- old/userguide/pamstereogram.html 2017-09-05 13:58:08.337559553 +0200
|
||||
+++ new/userguide/pamstereogram.html 2017-09-05 14:13:28.523959069 +0200
|
||||
@@ -1,5 +1,5 @@
|
||||
-<!DOCTYPE html>
|
||||
-<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
+<html>
|
||||
<head>
|
||||
<title>Pamstereogram User Manual</title>
|
||||
</head>
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
<p>Updated: 19 June 2015</p>
|
||||
|
||||
-<p><a href="#contents">Table Of Contents</a></p>
|
||||
+<p><a href="#index">Table Of Contents</a></p>
|
||||
|
||||
|
||||
<h2 id="name">NAME</h2>
|
||||
diff -urNp old/userguide/pamtoavs.html new/userguide/pamtoavs.html
|
||||
--- old/userguide/pamtoavs.html 2017-09-05 13:58:08.329559583 +0200
|
||||
+++ new/userguide/pamtoavs.html 2017-09-05 14:05:49.299863901 +0200
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
+<html>
|
||||
<head>
|
||||
<title>Pamtoavs User Manual</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=us-ascii" />
|
||||
diff -urNp old/userguide/pamtooctaveimg.html new/userguide/pamtooctaveimg.html
|
||||
--- old/userguide/pamtooctaveimg.html 2017-09-05 13:58:08.335559561 +0200
|
||||
+++ new/userguide/pamtooctaveimg.html 2017-09-05 14:06:21.825752356 +0200
|
||||
@@ -1,8 +1,7 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
+<html>
|
||||
<head>
|
||||
<title>Pamtooctaveimg User Manual</title>
|
||||
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
diff -urNp old/userguide/pnmflip.html new/userguide/pnmflip.html
|
||||
--- old/userguide/pnmflip.html 2017-09-05 13:58:08.336559557 +0200
|
||||
+++ new/userguide/pnmflip.html 2017-09-05 14:07:15.065963977 +0200
|
||||
@@ -4,9 +4,11 @@
|
||||
<BODY>
|
||||
<H1>pnmflip</H1>
|
||||
<BR>
|
||||
+<H2>NAME</H2>
|
||||
<p><b>pnmflip</b> was replaced in Netpbm 10.13 (December 2002) by
|
||||
<b><a href="pamflip.html">pamflip</a></b>.
|
||||
|
||||
+<H2>DESCRIPTION</H2>
|
||||
<P><B>pamflip</b> is mostly backward compatible with <b>pnmflip</b>,
|
||||
but works on PAM images too.
|
||||
|
||||
diff -urNp old/userguide/pnmmercator.html new/userguide/pnmmercator.html
|
||||
--- old/userguide/pnmmercator.html 2017-09-05 13:58:08.334559565 +0200
|
||||
+++ new/userguide/pnmmercator.html 2017-09-05 14:08:08.305214742 +0200
|
||||
@@ -1,7 +1,6 @@
|
||||
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
<html>
|
||||
<head>
|
||||
-<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
|
||||
<title>PnmMercator User Manual</title>
|
||||
</head>
|
||||
<body>
|
||||
diff -urNp old/userguide/ppmtogif.html new/userguide/ppmtogif.html
|
||||
--- old/userguide/ppmtogif.html 2017-09-05 13:58:08.337559553 +0200
|
||||
+++ new/userguide/ppmtogif.html 2017-09-05 14:09:51.450583126 +0200
|
||||
@@ -4,11 +4,14 @@
|
||||
<BODY>
|
||||
<H1>ppmtogif</H1>
|
||||
<BR>
|
||||
+<H2>NAME</H2>
|
||||
<p><b>ppmtogif</b> was replaced in Netpbm 10.37 (December 2006) by
|
||||
<b><a href="pamtogif.html">pamtogif</a></b>.
|
||||
|
||||
+<H2>SYNOPSIS</H2>
|
||||
<P><B>pamtogif</b> is mostly backward compatible with <b>ppmtogif</b>.
|
||||
|
||||
+<H2>DESCRIPTION</H2>
|
||||
<P>One way <b>pamtogif</b> is not backward compatible with <b>ppmtogif</b>
|
||||
is that to specify a transparency (alpha) mask with <b>ppmtogif</b>, you
|
||||
supply the transparency as a separate pseudo-PGM image and use the
|
1343
SOURCES/netpbm-manual-pages.patch
Normal file
1343
SOURCES/netpbm-manual-pages.patch
Normal file
File diff suppressed because it is too large
Load Diff
11
SOURCES/netpbm-multilib.patch
Normal file
11
SOURCES/netpbm-multilib.patch
Normal 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;
|
||||
}
|
13
SOURCES/netpbm-noppmtompeg.patch
Normal file
13
SOURCES/netpbm-noppmtompeg.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/converter/ppm/Makefile b/converter/ppm/Makefile
|
||||
index b97349d..f68170f 100644
|
||||
--- a/converter/ppm/Makefile
|
||||
+++ b/converter/ppm/Makefile
|
||||
@@ -7,7 +7,7 @@ VPATH=.:$(SRCDIR)/$(SUBDIR)
|
||||
|
||||
include $(BUILDDIR)/config.mk
|
||||
|
||||
-SUBDIRS = hpcdtoppm ppmtompeg
|
||||
+SUBDIRS = hpcdtoppm
|
||||
|
||||
PORTBINARIES = 411toppm eyuvtoppm gouldtoppm ilbmtoppm imgtoppm \
|
||||
leaftoppm mtvtoppm neotoppm \
|
11
SOURCES/netpbm-pamtojpeg2k.patch
Normal file
11
SOURCES/netpbm-pamtojpeg2k.patch
Normal file
@ -0,0 +1,11 @@
|
||||
diff -up netpbm-10.47.12/converter/other/jpeg2000/pamtojpeg2k.c.pamtojpeg2kfix netpbm-10.47.12/converter/other/jpeg2000/pamtojpeg2k.c
|
||||
--- netpbm-10.47.12/converter/other/jpeg2000/pamtojpeg2k.c.pamtojpeg2kfix 2010-04-27 15:47:10.000000000 +0200
|
||||
+++ netpbm-10.47.12/converter/other/jpeg2000/pamtojpeg2k.c 2010-05-03 15:37:49.934269588 +0200
|
||||
@@ -518,7 +518,5 @@ main(int argc, char **argv)
|
||||
|
||||
pm_close(ifP);
|
||||
|
||||
- pm_close(stdout);
|
||||
-
|
||||
return 0;
|
||||
}
|
57
SOURCES/netpbm-ppmfadeusage.patch
Normal file
57
SOURCES/netpbm-ppmfadeusage.patch
Normal 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");
|
1603
SOURCES/netpbm-security-code.patch
Normal file
1603
SOURCES/netpbm-security-code.patch
Normal file
File diff suppressed because it is too large
Load Diff
335
SOURCES/netpbm-security-scripts.patch
Normal file
335
SOURCES/netpbm-security-scripts.patch
Normal file
@ -0,0 +1,335 @@
|
||||
diff -urNp old/converter/other/anytopnm neew/converter/other/anytopnm
|
||||
--- old/converter/other/anytopnm 2017-09-05 12:58:26.795741945 +0200
|
||||
+++ neew/converter/other/anytopnm 2017-09-05 13:03:12.985472566 +0200
|
||||
@@ -537,9 +537,8 @@ else
|
||||
|
||||
fi
|
||||
|
||||
-tempdir=$(mktemp -d "${TMPDIR:-/tmp}/anytopnm.XXXXXXXX") ||
|
||||
+tempdir=$(mktemp -d -t anytopnm.XXXXXXXX) ||
|
||||
( echo "Could not create temporary file. Exiting." 1>&2; exit 1; )
|
||||
-trap 'rm -rf $tempdir' 0
|
||||
|
||||
# Take out all spaces
|
||||
# Find the filename extension for last-ditch efforts later
|
||||
@@ -565,9 +564,17 @@ if [ "$filetype" = "unknown" ]; then
|
||||
echo "$progname: unknown file type. " \
|
||||
"'file' says mime type is '$mimeType', " 1>&2
|
||||
echo "type description is '$typeDescription'" 1>&2
|
||||
+ if [ -d "$tempdir" ] ; then
|
||||
+ rm -rf "$tempdir"
|
||||
+ fi
|
||||
+
|
||||
exit 1
|
||||
fi
|
||||
|
||||
convertIt $file $filetype
|
||||
|
||||
+if [ -d "$tempdir" ] ; then
|
||||
+ rm -rf "$tempdir"
|
||||
+fi
|
||||
+
|
||||
exit 0
|
||||
diff -urNp old/editor/pamstretch-gen neew/editor/pamstretch-gen
|
||||
--- old/editor/pamstretch-gen 2017-09-05 12:58:26.763741946 +0200
|
||||
+++ neew/editor/pamstretch-gen 2017-09-05 13:03:12.985472566 +0200
|
||||
@@ -34,12 +34,10 @@ if [ "$1" = "" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
-tempdir=$(mktemp -d "${TMPDIR:-/tmp}/netpbm.XXXXXXXX") ||
|
||||
+tempfile=$(mktemp /tmp/pnmig.XXXXXXXX) ||
|
||||
( echo "Could not create temporary file. Exiting." 1>&2; exit 1; )
|
||||
trap 'rm -rf $tempdir' 0 1 3 15
|
||||
|
||||
-tempfile=$tempdir/pnmig
|
||||
-
|
||||
if ! cat $2 >$tempfile 2>/dev/null; then
|
||||
echo 'pamstretch-gen: error reading file' 1>&2
|
||||
exit 1
|
||||
diff -urNp old/editor/ppmfade neew/editor/ppmfade
|
||||
--- old/editor/ppmfade 2017-09-05 12:58:26.767741946 +0200
|
||||
+++ neew/editor/ppmfade 2017-09-05 12:59:14.556731156 +0200
|
||||
@@ -40,6 +40,7 @@ exec perl -w -x -S -- "$0" "$@"
|
||||
#
|
||||
##############################################################################
|
||||
use strict;
|
||||
+use File::Temp "tempdir";
|
||||
|
||||
sub doVersionHack($) {
|
||||
my ($argvR) = @_;
|
||||
@@ -149,20 +149,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 +176,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 +191,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);
|
||||
diff -urNp old/editor/ppmshadow neew/editor/ppmshadow
|
||||
--- old/editor/ppmshadow 2017-09-05 12:58:26.768741946 +0200
|
||||
+++ neew/editor/ppmshadow 2017-09-05 13:02:51.480507649 +0200
|
||||
@@ -171,11 +171,12 @@ my $tmpdir = $ENV{TMPDIR} || "/tmp";
|
||||
my $ourtmp;
|
||||
|
||||
if ($keeptemp) {
|
||||
- $ourtmp = "$tmpdir/ppmshadow$$";
|
||||
- mkdir($ourtmp, 0777) or
|
||||
- die("Unable to create directory for temporary files '$ourtmp");
|
||||
+ $ourtmp = chomp($ourtmp = `mktemp -d -t PPMshadow.XXXXXX`);
|
||||
+ if($? >> 8) {
|
||||
+ die "Can't create directory for temporary files";
|
||||
+ }
|
||||
} else {
|
||||
- $ourtmp = File::Temp::tempdir("$tmpdir/ppmshadowXXXX", UNLINK=>1);
|
||||
+ $ourtmp = File::Temp::tempdir("$tmpdir/PPMshadow.XXXXXX", UNLINK=>1);
|
||||
}
|
||||
|
||||
# Apply defaults for arguments not specified
|
21
SOURCES/netpbm-time.patch
Normal file
21
SOURCES/netpbm-time.patch
Normal 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
|
11
SOURCES/netpbm-xwdfix.patch
Normal file
11
SOURCES/netpbm-xwdfix.patch
Normal 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);
|
1280
SPECS/netpbm.spec
Normal file
1280
SPECS/netpbm.spec
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user