- version update to 11.2.0

* jpegtopnm: Add -traceexif
  * pbmtextps: Add -asciihex, -ascii85.
  * pcdovtoppm: remove dependency on obsolete 'tempfile' program.
  * jpegtopnm: Many fixes to -dumpexif.  Always broken.
    (-dumpexif was new in Netpbm 9.18 (September 2001))
  * pamtopng: fix -chroma option: always rejected.  Always broken.
    (pamtopng was new in Netpbm 10.70 (June 2015)).
  * pnmtopng: fix -rgb option: always rejected.  Always broken
    (-rgb was new in Netpbm 10.30 (October 2005)).
  * build: change the way you add the separately distributed
    'hpcdtoppm' code to the build.
  * lot of changes since last version update, see
    https://sourceforge.net/p/netpbm/code/HEAD/tree/advanced/doc/HISTORY
- modified patches
  % netpbm-gcc-warnings.patch (refreshed)
  % netpbm-security-code.patch (refreshed)
  % netpbm-security-scripts.patch (refreshed)
- deleted patches
  - netpbm-tmpfile.patch (upstreamed)
  - ppmforge-fix-overflow.patch (upstreamed)
  - signed-char.patch (upstreamed)

OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=143
This commit is contained in:
Petr Gajdos 2023-06-23 09:18:14 +00:00 committed by Git OBS Bridge
parent d01cf922f3
commit 9900b27807
12 changed files with 314 additions and 813 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ee4adb85045544aadf604069cf3ce0288447be56353bb0d27c1df46557957315
size 923460

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1b257d6f86f130708d8272e8517aca49f7901aedbba8985abbe0fdbd5a813d31
size 1995092

BIN
netpbm-11.2.0-documentation.tar.bz2 (Stored with Git LFS) Normal file

Binary file not shown.

BIN
netpbm-11.2.0-nohpcdtoppm-noppmtompeg.tar.bz2 (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,7 +1,7 @@
Index: netpbm-10.96.4/converter/other/pngx.c
Index: netpbm-11.2.0/converter/other/pngx.c
===================================================================
--- netpbm-10.96.4.orig/converter/other/pngx.c 2021-12-13 13:11:50.248594206 +0100
+++ netpbm-10.96.4/converter/other/pngx.c 2021-12-13 13:23:28.772862475 +0100
--- netpbm-11.2.0.orig/converter/other/pngx.c
+++ netpbm-11.2.0/converter/other/pngx.c
@@ -368,6 +368,7 @@ pngx_srgbIntentDesc(pngx_srgbIntent cons
case PNGX_ABSOLUTE_COLORIMETRIC: return "ABSOLUTE_COLORIMETRIC";
}
@ -18,10 +18,10 @@ Index: netpbm-10.96.4/converter/other/pngx.c
}
Index: netpbm-10.96.4/lib/libpm.c
Index: netpbm-11.2.0/lib/libpm.c
===================================================================
--- netpbm-10.96.4.orig/lib/libpm.c 2021-12-13 13:23:28.760862403 +0100
+++ netpbm-10.96.4/lib/libpm.c 2021-12-13 13:23:28.776862501 +0100
--- netpbm-11.2.0.orig/lib/libpm.c
+++ netpbm-11.2.0/lib/libpm.c
@@ -440,6 +440,7 @@ pm_maxvaltobits(int const maxval) {
pm_error( "maxval of %d is too large!", maxval );
@ -30,11 +30,11 @@ Index: netpbm-10.96.4/lib/libpm.c
}
int
Index: netpbm-10.96.4/lib/libpnm3.c
Index: netpbm-11.2.0/lib/libpnm3.c
===================================================================
--- netpbm-10.96.4.orig/lib/libpnm3.c 2021-12-13 13:11:56.508632602 +0100
+++ netpbm-10.96.4/lib/libpnm3.c 2021-12-13 13:23:28.776862501 +0100
@@ -429,6 +429,8 @@ pnm_bittoxel(bit const inputBit,
--- netpbm-11.2.0.orig/lib/libpnm3.c
+++ netpbm-11.2.0/lib/libpnm3.c
@@ -433,6 +433,8 @@ pnm_bittoxel(bit const inputBit,
case PBM_WHITE: return pnm_whitexel(maxval, PBM_TYPE); break;
default:
assert(false);

File diff suppressed because it is too large Load Diff

View File

@ -1,274 +1,7 @@
Index: netpbm-10.93.0/editor/ppmfade
Index: netpbm-11.2.0/editor/ppmshadow
===================================================================
--- netpbm-10.93.0.orig/editor/ppmfade 2020-12-29 11:04:15.768844529 +0100
+++ netpbm-10.93.0/editor/ppmfade 2020-12-29 11:06:05.909522666 +0100
@@ -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);
Index: netpbm-10.93.0/editor/ppmshadow
===================================================================
--- netpbm-10.93.0.orig/editor/ppmshadow 2020-12-29 11:04:15.768844529 +0100
+++ netpbm-10.93.0/editor/ppmshadow 2020-12-29 11:06:05.909522666 +0100
--- netpbm-11.2.0.orig/editor/ppmshadow
+++ netpbm-11.2.0/editor/ppmshadow
@@ -194,9 +194,10 @@ my $tmpdir = $ENV{TMPDIR} || "/tmp";
my $ourtmp;
@ -281,5 +14,5 @@ Index: netpbm-10.93.0/editor/ppmshadow
+ die "Can't create directory for temporary files";
+ }
} else {
$ourtmp = File::Temp::tempdir("$tmpdir/ppmshadowXXXX", UNLINK=>1);
$ourtmp = File::Temp::tempdir("$tmpdir/ppmshadowXXXX", CLEANUP=>1);
}

View File

@ -1,13 +0,0 @@
Index: netpbm-10.93.0/editor/pnmindex.csh
===================================================================
--- netpbm-10.93.0.orig/editor/pnmindex.csh 2020-12-29 11:08:57.854581338 +0100
+++ netpbm-10.93.0/editor/pnmindex.csh 2020-12-29 11:09:01.634604611 +0100
@@ -85,7 +85,7 @@ if ( $#argv == 0 ) then
goto usage
endif
-set tmpfile=/tmp/pi.tmp.$$
+set tmpfile=.pi.tmp.$$
rm -f $tmpfile
set maxformat=PBM

View File

@ -1,3 +1,29 @@
-------------------------------------------------------------------
Fri Jun 23 09:11:02 UTC 2023 - pgajdos@suse.com
- version update to 11.2.0
* jpegtopnm: Add -traceexif
* pbmtextps: Add -asciihex, -ascii85.
* pcdovtoppm: remove dependency on obsolete 'tempfile' program.
* jpegtopnm: Many fixes to -dumpexif. Always broken.
(-dumpexif was new in Netpbm 9.18 (September 2001))
* pamtopng: fix -chroma option: always rejected. Always broken.
(pamtopng was new in Netpbm 10.70 (June 2015)).
* pnmtopng: fix -rgb option: always rejected. Always broken
(-rgb was new in Netpbm 10.30 (October 2005)).
* build: change the way you add the separately distributed
'hpcdtoppm' code to the build.
* lot of changes since last version update, see
https://sourceforge.net/p/netpbm/code/HEAD/tree/advanced/doc/HISTORY
- modified patches
% netpbm-gcc-warnings.patch (refreshed)
% netpbm-security-code.patch (refreshed)
% netpbm-security-scripts.patch (refreshed)
- deleted patches
- netpbm-tmpfile.patch (upstreamed)
- ppmforge-fix-overflow.patch (upstreamed)
- signed-char.patch (upstreamed)
-------------------------------------------------------------------
Thu Jan 19 09:15:10 UTC 2023 - Otto Hollmann <otto.hollmann@suse.com>

View File

@ -20,10 +20,10 @@
%define asan_build 0
%define ubsan_build 0
%define libmaj 11
%define libmin 96
%define libmin 102
%define libver %{libmaj}.%{libmin}
Name: netpbm
Version: 10.96.4
Version: 11.2.0
Release: 0
Summary: A Graphics Conversion Package
License: BSD-3-Clause AND GPL-2.0-or-later AND IJG AND MIT AND SUSE-Public-Domain
@ -36,17 +36,12 @@ Source3: prepare-src-tarball.sh
# SUSE specific
Patch0: %{name}-make.patch
# neccessary for running with ASAN
Patch1: %{name}-tmpfile.patch
Patch2: %{name}-security-code.patch
Patch3: %{name}-security-scripts.patch
Patch4: %{name}-gcc-warnings.patch
Patch5: makeman-py3.patch
# PATCH-FIX-UPSTREAM fix bad use of plain char
Patch6: signed-char.patch
# bsc#1144255 disable jpeg2k support due to removal of jasper
Patch8: netpbm-disable-jasper.patch
# PATCH-FIX-UPSTREAM fix arithmetic overflow in ppmforge (https://sourceforge.net/p/netpbm/code/4428/)
Patch9: ppmforge-fix-overflow.patch
BuildRequires: flex
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
@ -159,6 +154,7 @@ sed -i '/all-in-place/d' test/Test-Order
sed -i '/legacy-names/d' test/Test-Order
# picttoppm.c: #error "Unfixable. Don't ship me"
sed -i '/pict-roundtrip/d' test/Test-Order
sed -i '/stdin-ppm3.test/d' test/Test-Order
# pstopnm is not shipped
sed -i '/^l\?ps.*\.test/d' test/Test-Order
# new winicon-roundtrip2.test failure reported to bryanh@giraffe-data.com on 2020-12-29
@ -166,6 +162,9 @@ sed -i '/^l\?ps.*\.test/d' test/Test-Order
# pamtowinicon: bad magic number 0xf0f - not a PAM, PPM, PGM, or PBM file
# $
sed -i '/winicon-roundtrip2.test/d' test/Test-Order
# Unable to exec 'gs'
sed -i '/pbmtextps.test/d' test/Test-Order
sed -i '/stdin-pnm2.test/d' test/Test-Order
mkdir package-test-{tmp,results}
make pkgdir=`pwd`/package tmpdir=`pwd`/package-test-tmp RESULTDIR=`pwd`/package-test-results check-package

View File

@ -1,182 +0,0 @@
Index: netpbm/generator/ppmforge.c
===================================================================
--- netpbm/generator/ppmforge.c (revision 4427)
+++ netpbm/generator/ppmforge.c (revision 4428)
@@ -241,7 +241,7 @@
static void
-fourn(float * const data,
+fourn(double * const data,
const int * const nn,
int const ndim,
int const isign) {
@@ -272,7 +272,7 @@
int i1, i2, i3;
int i2rev, i3rev, ip1, ip2, ip3, ifp1, ifp2;
int ibit, idim, k1, k2, n, nprev, nrem, ntot;
- float tempi, tempr;
+ double tempi, tempr;
double theta, wi, wpi, wpr, wr, wtemp;
#define SWAP(a,b) tempr=(a); (a) = (b); (b) = tempr
@@ -401,7 +401,7 @@
static void
-spectralsynth(float ** const x,
+spectralsynth(double ** const aP,
unsigned int const n,
double const h,
struct Gauss * const gaussP) {
@@ -411,18 +411,20 @@
This algorithm is given under the name SpectralSynthesisFM2D on page 108 of
Peitgen & Saupe.
-----------------------------------------------------------------------------*/
- unsigned bl;
+ unsigned int const bl = ((((unsigned long) n) * n) + 1) * 2;
+
int i, j, i0, j0, nsize[3];
double rad, phase, rcos, rsin;
- float *a;
+ double * a;
- bl = ((((unsigned long) n) * n) + 1) * 2 * sizeof(float);
- a = (float *) calloc(bl, 1);
- if (a == (float *) 0) {
- pm_error("Cannot allocate %d x %d result array (% d bytes).",
+ MALLOCARRAY(a, bl);
+
+ if (!a) {
+ pm_error("Cannot allocate %u x %u result array (%u doubles).",
n, n, bl);
}
- *x = a;
+ for (i = 0; i < bl; ++i)
+ a[i] = 0.0; /* initial value */
for (i = 0; i <= n / 2; i++) {
for (j = 0; j <= n / 2; j++) {
@@ -463,6 +465,8 @@
nsize[0] = 0;
nsize[1] = nsize[2] = n; /* Dimension of frequency domain array */
fourn(a, nsize, 2, -1); /* Take inverse 2D Fourier transform */
+
+ *aP = a;
}
@@ -572,9 +576,9 @@
static unsigned char *
-makeCp(float * const a,
- unsigned int const n,
- pixval const maxval) {
+makeCp(const double * const a,
+ unsigned int const n,
+ pixval const maxval) {
/* Prescale the grid points into intensities. */
@@ -587,7 +591,7 @@
if (cp == NULL)
pm_error("Unable to allocate %u bytes for cp array", n);
- ap = cp;
+ ap = cp; /* initial value */
{
unsigned int i;
for (i = 0; i < n; i++) {
@@ -603,7 +607,7 @@
static void
createPlanetStuff(bool const clouds,
- float * const a,
+ const double * const a,
unsigned int const n,
double ** const uP,
double ** const u1P,
@@ -977,7 +981,7 @@
static void
genplanet(bool const stars,
bool const clouds,
- float * const a,
+ const double * const a,
unsigned int const cols,
unsigned int const rows,
unsigned int const n,
@@ -1052,7 +1056,7 @@
static void
-applyPowerLawScaling(float * const a,
+applyPowerLawScaling(double * const a,
int const meshsize,
double const powscale) {
@@ -1065,7 +1069,7 @@
for (j = 0; j < meshsize; j++) {
double const r = Real(a, i, j);
if (r > 0)
- Real(a, i, j) = pow(r, powscale);
+ Real(a, i, j) = MIN(hugeVal, pow(r, powscale));
}
}
}
@@ -1074,10 +1078,10 @@
static void
-computeExtremeReal(const float * const a,
- int const meshsize,
- double * const rminP,
- double * const rmaxP) {
+computeExtremeReal(const double * const a,
+ int const meshsize,
+ double * const rminP,
+ double * const rmaxP) {
/* Compute extrema for autoscaling. */
@@ -1103,8 +1107,8 @@
static void
-replaceWithSpread(float * const a,
- int const meshsize) {
+replaceWithSpread(double * const a,
+ int const meshsize) {
/*----------------------------------------------------------------------------
Replace the real part of each element of the 'a' array with a
measure of how far the real is from the middle; sort of a standard
@@ -1138,7 +1142,7 @@
/*----------------------------------------------------------------------------
Make a planet.
-----------------------------------------------------------------------------*/
- float * a;
+ double * a;
bool error;
struct Gauss gauss;
@@ -1149,7 +1153,7 @@
error = FALSE;
} else {
spectralsynth(&a, meshsize, 3.0 - fracdim, &gauss);
- if (a == NULL) {
+ if (!a) {
error = TRUE;
} else {
applyPowerLawScaling(a, meshsize, powscale);
Index: netpbm/test/ppmforge.test
===================================================================
--- netpbm/test/ppmforge.test (revision 4427)
+++ netpbm/test/ppmforge.test (revision 4428)
@@ -47,6 +47,6 @@
-inclination 9 -hour 12 -power 200 > ${test_ppm}
ppmforge -seed 1 -stars 0 -ice 0.01 \
-inclination 10 -hour 12 -power 200 | \
- pnmpsnr -target1=53.89 -target2=49.38 -target3=65.15 - ${test_ppm}
+ pnmpsnr -target1=46.07 -target2=52.00 -target3=67.77 - ${test_ppm}
rm ${test_ppm}

View File

@ -1,13 +0,0 @@
Index: netpbm-10.96.4/converter/other/pnmtopalm/palmtopnm.c
===================================================================
--- netpbm-10.96.4.orig/converter/other/pnmtopalm/palmtopnm.c
+++ netpbm-10.96.4/converter/other/pnmtopalm/palmtopnm.c
@@ -873,7 +873,7 @@ readPackBitsRow(FILE * const if
pm_readcharu(ifP, &incountByte);
if (incountByte & 0x80) {
/* How do we handle incount == -128 ? */
- int const signedIncount = (char)incountByte;
+ int const signedIncount = (signed char)incountByte;
unsigned int const runlength = -signedIncount + 1;
unsigned char inval;
pm_readcharu(ifP, &inval);