- fix broken perl syntax in ppmfade

- fix exit status and error reporting in ppmrainbow
This commit is contained in:
Jindrich Novy 2009-02-27 08:45:01 +00:00
parent 6edbbf7f4d
commit ef860ef581
3 changed files with 53 additions and 1 deletions

View File

@ -0,0 +1,12 @@
diff -up netpbm-10.35.60/editor/ppmfade.ppmfadeusage netpbm-10.35.60/editor/ppmfade
--- netpbm-10.35.60/editor/ppmfade.ppmfadeusage 2009-02-26 17:43:14.000000000 +0100
+++ netpbm-10.35.60/editor/ppmfade 2009-02-26 17:43:44.000000000 +0100
@@ -36,6 +36,8 @@ my $mode = $SPREAD; # default fading mo
#
# Check those command line args.
#
+sub usage();
+
if (@ARGV == 0) {
usage();
}

View File

@ -0,0 +1,31 @@
diff -up netpbm-10.35.60/generator/ppmrainbow.ppmrainbowexit netpbm-10.35.60/generator/ppmrainbow
--- netpbm-10.35.60/generator/ppmrainbow.ppmrainbowexit 2009-02-15 13:04:35.000000000 +0100
+++ netpbm-10.35.60/generator/ppmrainbow 2009-02-26 18:48:34.000000000 +0100
@@ -21,15 +21,16 @@ GetOptions("width=i" => \$Twid,
"norepeat!" => \$norepeat,
"verbose!" => \$verbose);
+$! = 1;
die "invalid width and/or height\n" unless $Twid >= 1 && $Thgt >= 1;
my $verboseCommand = $verbose ? "set -x;" : "";
if (@ARGV < 1) {
- die("You must specify at least one color as an argument");
+ die("You must specify at least one color as an argument\n");
} elsif (@ARGV < 2 && $norepeat) {
die("With the -norepeat option, you must specify at least two colors " .
- "as arguments.");
+ "as arguments.\n");
}
my @colorlist;
@@ -57,7 +58,7 @@ while (@colorlist >= 2) {
my $rc = system("$verboseCommand pgmramp -lr $w $Thgt | " .
"pgmtoppm \"$colorlist[0]-$colorlist[1]\" >$outfile");
if ($rc != 0) {
- die("pgmramp|pgmtoppm failed.");
+ die("pgmramp|pgmtoppm failed.\n");
}
$widthRemaining -= $w;
$n++;

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.35.60 Version: 10.35.60
Release: 2%{?dist} Release: 3%{?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
Group: System Environment/Libraries Group: System Environment/Libraries
@ -35,6 +35,8 @@ Patch22: netpbm-10.35-pnmmontagefix.patch
Patch23: netpbm-10.35-pnmtofiasco-stdin.patch Patch23: netpbm-10.35-pnmtofiasco-stdin.patch
Patch24: netpbm-10.35-64bitfix.patch Patch24: netpbm-10.35-64bitfix.patch
Patch25: netpbm-10.35-ximtoppmsegfault.patch Patch25: netpbm-10.35-ximtoppmsegfault.patch
Patch26: netpbm-10.35-ppmfadeusage.patch
Patch27: netpbm-10.35-ppmrainbowexit.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libjpeg-devel, libpng-devel, libtiff-devel, flex BuildRequires: libjpeg-devel, libpng-devel, libtiff-devel, flex
BuildRequires: libX11-devel, python, jasper-devel BuildRequires: libX11-devel, python, jasper-devel
@ -100,6 +102,8 @@ netpbm-progs. You'll also need to install the netpbm package.
%patch23 -p1 -b .pnmtofiasco-stdin %patch23 -p1 -b .pnmtofiasco-stdin
%patch24 -p1 -b .64bitfix %patch24 -p1 -b .64bitfix
%patch25 -p1 -b .ximtoppmsegfault %patch25 -p1 -b .ximtoppmsegfault
%patch26 -p1 -b .ppmfadeusage
%patch27 -p1 -b .ppmrainbowexit
%build %build
./configure <<EOF ./configure <<EOF
@ -216,6 +220,7 @@ rm -rf $RPM_BUILD_ROOT
%{_includedir}/*.h %{_includedir}/*.h
%{_libdir}/lib*.so %{_libdir}/lib*.so
%{_mandir}/man3/* %{_mandir}/man3/*
%files progs %files progs
%defattr(-,root,root) %defattr(-,root,root)
%{_bindir}/* %{_bindir}/*
@ -224,6 +229,10 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/netpbm/ %{_datadir}/netpbm/
%changelog %changelog
* Thu Feb 26 2009 Jindrich Novy <jnovy@redhat.com> 10.35.60-3
- fix broken perl syntax in ppmfade
- fix exit status and error reporting in ppmrainbow
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 10.35.60-2 * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 10.35.60-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild