Resolves: #1967407 - rebase to 10.94.05

This commit is contained in:
Josef Řídký 2021-06-03 11:40:23 +02:00
parent 3600e9b0b4
commit 9e1f95500d
10 changed files with 2097 additions and 10556 deletions

1
.gitignore vendored
View File

@ -18,3 +18,4 @@
/netpbm-10.90.00.tar.xz /netpbm-10.90.00.tar.xz
/netpbm-10.92.00.tar.xz /netpbm-10.92.00.tar.xz
/netpbm-10.93.00.tar.xz /netpbm-10.93.00.tar.xz
/netpbm-10.94.05.tar.xz

View File

@ -1,8 +1,7 @@
diff --git a/converter/other/pstopnm.c b/converter/other/pstopnm.c diff -urNp a/converter/other/pstopnm.c b/converter/other/pstopnm.c
index f534265..2ab48ab 100644 --- a/converter/other/pstopnm.c 2018-07-23 15:14:51.200658026 +0200
--- a/converter/other/pstopnm.c +++ b/converter/other/pstopnm.c 2018-07-23 15:18:12.579910612 +0200
+++ b/converter/other/pstopnm.c @@ -896,11 +896,11 @@ execGhostscript(int const
@@ -896,11 +896,11 @@ execGhostscript(int const inputPipeFd,
ghostscriptProg, arg0, ghostscriptProg, arg0,
deviceopt, outfileopt, gopt, ropt, textalphabitsopt, deviceopt, outfileopt, gopt, ropt, textalphabitsopt,
"-q", "-dNOPAUSE", "-q", "-dNOPAUSE",
@ -10,10 +9,9 @@ index f534265..2ab48ab 100644
+ "-dPARANOIDSAFER", "-"); + "-dPARANOIDSAFER", "-");
} }
- execl(ghostscriptProg, arg0, deviceopt, outfileopt, gopt, ropt, execl(ghostscriptProg, arg0, deviceopt, outfileopt, gopt, ropt,
- textalphabitsopt, "-q", "-dNOPAUSE", "-dSAFER", "-", NULL); - textalphabitsopt, "-q", "-dNOPAUSE", "-dSAFER", "-", NULL);
+ execl(ghostscriptProg, arg0, deviceopt, outfileopt, gopt, ropt, "-q", + "-q", "-dNOPAUSE", "-dPARANOIDSAFER", "-", NULL);
+ "-dNOPAUSE", "-dPARANOIDSAFER", "-", NULL);
pm_error("execl() of Ghostscript ('%s') failed, errno=%d (%s)", pm_error("execl() of Ghostscript ('%s') failed, errno=%d (%s)",
ghostscriptProg, errno, strerror(errno)); ghostscriptProg, errno, strerror(errno));

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,234 +1,7 @@
diff --git a/converter/other/jpeg2000/pamtojpeg2k.c b/converter/other/jpeg2000/pamtojpeg2k.c diff -up netpbm-10.47.12/converter/other/jpeg2000/pamtojpeg2k.c.pamtojpeg2kfix netpbm-10.47.12/converter/other/jpeg2000/pamtojpeg2k.c
index 4d73316..a53573f 100644 --- netpbm-10.47.12/converter/other/jpeg2000/pamtojpeg2k.c.pamtojpeg2kfix 2010-04-27 15:47:10.000000000 +0200
--- a/converter/other/jpeg2000/pamtojpeg2k.c +++ netpbm-10.47.12/converter/other/jpeg2000/pamtojpeg2k.c 2010-05-03 15:37:49.934269588 +0200
+++ b/converter/other/jpeg2000/pamtojpeg2k.c @@ -532,7 +532,5 @@ main(int argc, char **argv)
@@ -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(ifP);

View File

@ -1,9 +1,28 @@
diff -urNp old/buildtools/makeman new/buildtools/makeman diff --git a/buildtools/makeman b/buildtools/makeman
--- old/buildtools/makeman 2018-01-03 12:15:55.000000000 +0100 index 196dbd0..d73ab76 100755
+++ new/buildtools/makeman 2018-02-26 14:18:39.993760106 +0100 --- a/buildtools/makeman
+++ b/buildtools/makeman
@@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
-#!/usr/bin/python -#!/usr/bin/python
+#!/usr/bin/python3 +#!/usr/bin/python3
# #
# makeman -- compile netpbm's stereotyped HTML to troff markup # makeman -- compile netpbm's stereotyped HTML to troff markup
# #
diff --git a/buildtools/manpage.mk b/buildtools/manpage.mk
index ef1a103..c1badb8 100644
--- a/buildtools/manpage.mk
+++ b/buildtools/manpage.mk
@@ -126,11 +126,11 @@ reportman:
# to standard error.
%.1 %.3 %.5: $(USERGUIDE)/%.html
@echo Converting $< to $@
- @python $(MAKEMAN) -d $(USERGUIDE) $(<F)
+ @python3 $(MAKEMAN) -d $(USERGUIDE) $(<F)
netpbm.1: $(USERGUIDE)/index.html
@echo Converting $< to $@
- @python $(MAKEMAN) -d $(USERGUIDE) index.html
+ @python3 $(MAKEMAN) -d $(USERGUIDE) index.html
@mv index.1 netpbm.1
# Generate man pages

File diff suppressed because it is too large Load Diff

View File

@ -1,150 +0,0 @@
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>

View File

@ -1,7 +1,7 @@
Summary: A library for handling different graphics file formats Summary: A library for handling different graphics file formats
Name: netpbm Name: netpbm
Version: 10.93.00 Version: 10.94.05
Release: 2%{?dist} Release: 1%{?dist}
# See copyright_summary for details # See copyright_summary for details
License: BSD and GPLv2 and IJG and MIT and Public Domain License: BSD and GPLv2 and IJG and MIT and Public Domain
URL: http://netpbm.sourceforge.net/ URL: http://netpbm.sourceforge.net/
@ -27,10 +27,8 @@ Patch12: netpbm-docfix.patch
Patch13: netpbm-cmuwtopbm.patch Patch13: netpbm-cmuwtopbm.patch
Patch14: netpbm-pamtojpeg2k.patch Patch14: netpbm-pamtojpeg2k.patch
Patch15: netpbm-manfix.patch Patch15: netpbm-manfix.patch
Patch16: netpbm-manual-pages.patch Patch16: netpbm-jasper.patch
Patch17: netpbm-jasper.patch Patch17: netpbm-libdir-so.patch
Patch18: netpbm-userguide.patch
Patch19: netpbm-libdir-so.patch
BuildRequires: make BuildRequires: make
BuildRequires: libjpeg-devel, libpng-devel, libtiff-devel, flex, gcc, jbigkit-devel BuildRequires: libjpeg-devel, libpng-devel, libtiff-devel, flex, gcc, jbigkit-devel
@ -230,8 +228,8 @@ popd
%doc userguide/* %doc userguide/*
%changelog %changelog
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 10.93.00-2 * Thu Jun 03 2021 Josef Ridky <jridky@redhat.com> - 10.94.05-1
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 - Rebase to the new upstream release 10.94.05 (#1967407)
* Mon Jan 25 2021 Josef Ridky <jridky@redhat.com> - 10.93.00-1 * Mon Jan 25 2021 Josef Ridky <jridky@redhat.com> - 10.93.00-1
- New upstream release 10.93.00 (#1911159) - New upstream release 10.93.00 (#1911159)

View File

@ -1 +1 @@
SHA512 (netpbm-10.93.00.tar.xz) = 18ff08b1d3672d792dab78b69eb4ef1a9874266b1dfbf5801a53ca172c0dcbbae8d1269297a56e06ed45ccfdff6a6ae5399e60b4bafdcb9d2cb9de800e2bc07c SHA512 (netpbm-10.94.05.tar.xz) = 58e6cd2e77dddaa99e439380a1db9057f357204074d528d82ad3af5beaa31bdc0e36abe9bc4a8aded5befdc228bca2f96e7c5a103882ce04d144eead398b45b2