- remove obsolete pgmtopbm and pnmcomp, symlink them to the new compatible

variants
- fix ppmfade -h, --help options
- add missing man pages
This commit is contained in:
Jindrich Novy 2010-02-17 12:23:54 +00:00
parent a276486e28
commit aaf502c701
2 changed files with 33 additions and 14 deletions

View File

@ -1,15 +1,15 @@
diff -up netpbm-10.47.05/editor/ppmfade.ppmfadeusage netpbm-10.47.05/editor/ppmfade diff -up netpbm-10.47.09/editor/ppmfade.ppmfadeusage netpbm-10.47.09/editor/ppmfade
--- netpbm-10.47.05/editor/ppmfade.ppmfadeusage 2010-01-21 05:36:00.000000000 +0100 --- netpbm-10.47.09/editor/ppmfade.ppmfadeusage 2010-02-17 11:22:02.000000000 +0100
+++ netpbm-10.47.05/editor/ppmfade 2010-01-21 05:40:32.000000000 +0100 +++ netpbm-10.47.09/editor/ppmfade 2010-02-17 11:27:29.000000000 +0100
@@ -34,6 +34,7 @@ my $base_name = "fade"; # default base @@ -34,7 +34,6 @@ my $base_name = "fade"; # default base
my $image = "ppm"; # default output storage format my $image = "ppm"; # default output storage format
my $mode = $SPREAD; # default fading mode my $mode = $SPREAD; # default fading mode
+sub usage(); -
my $n; # argument number my $n; # argument number
@@ -44,7 +45,7 @@ for ($n = 0; $n < @ARGV; $n++) { for ($n = 0; $n < @ARGV; $n++) {
@@ -44,7 +43,7 @@ for ($n = 0; $n < @ARGV; $n++) {
if (-e $first_file) { if (-e $first_file) {
} else { } else {
print "I can't find first file '$first_file'\n"; print "I can't find first file '$first_file'\n";
@ -18,7 +18,7 @@ diff -up netpbm-10.47.05/editor/ppmfade.ppmfadeusage netpbm-10.47.05/editor/ppmf
} }
} elsif ($ARGV[$n] eq "-l") { } elsif ($ARGV[$n] eq "-l") {
$n++; $n++;
@@ -52,7 +53,7 @@ for ($n = 0; $n < @ARGV; $n++) { @@ -52,7 +51,7 @@ for ($n = 0; $n < @ARGV; $n++) {
if (-e $last_file) { if (-e $last_file) {
} else { } else {
print "I can't find last file '$last_file'\n"; print "I can't find last file '$last_file'\n";
@ -27,8 +27,15 @@ diff -up netpbm-10.47.05/editor/ppmfade.ppmfadeusage netpbm-10.47.05/editor/ppmf
} }
} elsif ($ARGV[$n] eq "-base") { } elsif ($ARGV[$n] eq "-base") {
$n++; $n++;
@@ -77,7 +78,7 @@ for ($n = 0; $n < @ARGV; $n++) { @@ -73,11 +72,12 @@ for ($n = 0; $n < @ARGV; $n++) {
usage(); $mode = $BLOCK;
} elsif ("$ARGV[$n]" eq "-mix") {
$mode = $MIX;
- } elsif ($ARGV[$n] eq "-help" || $ARGV[$n] eq "-h") {
- usage();
+ } elsif ($ARGV[$n] eq "-help" || $ARGV[$n] eq "--help" || $ARGV[$n] eq "-h") {
+ print "ppmfade: Use 'man ppmfade' for help.\n";
+ exit 1;
} else { } else {
print "Unknown argument: $ARGV[$n]\n"; print "Unknown argument: $ARGV[$n]\n";
- exit 100; - exit 100;
@ -36,7 +43,7 @@ diff -up netpbm-10.47.05/editor/ppmfade.ppmfadeusage netpbm-10.47.05/editor/ppmf
} }
} }
# #
@@ -96,18 +97,18 @@ if ($first_file ne "undefined") { @@ -96,18 +96,18 @@ if ($first_file ne "undefined") {
$width = $1; $height = $2; $width = $1; $height = $2;
} else { } else {
print("Unrecognized results from pnmfile on $first_file.\n"); print("Unrecognized results from pnmfile on $first_file.\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.47.09 Version: 10.47.09
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
@ -163,8 +163,7 @@ mv userguide/man $RPM_BUILD_ROOT%{_mandir}
sed -i 's/\xa0//' $RPM_BUILD_ROOT%{_mandir}/man1/pgmminkowski.1 sed -i 's/\xa0//' $RPM_BUILD_ROOT%{_mandir}/man1/pgmminkowski.1
# Don't ship man pages for non-existent binaries and bogus ones # Don't ship man pages for non-existent binaries and bogus ones
for i in hpcdtoppm pcdovtoppm pnmtojbig \ for i in hpcdtoppm ppmsvgalib vidtoppm picttoppm \
ppmsvgalib vidtoppm picttoppm jbigtopnm \
directory error extendedopacity \ directory error extendedopacity \
pam pbm pgm pnm ppm index libnetpbm_dir \ pam pbm pgm pnm ppm index libnetpbm_dir \
liberror pambackground pamfixtrunc \ liberror pambackground pamfixtrunc \
@ -187,6 +186,13 @@ rm -rf $RPM_BUILD_ROOT/usr/config_template
# Don't ship the static library # Don't ship the static library
rm -f $RPM_BUILD_ROOT/%{_libdir}/lib*.a rm -f $RPM_BUILD_ROOT/%{_libdir}/lib*.a
# remove/symlink obsolete utilities
pushd $RPM_BUILD_ROOT%{_bindir}
rm -f pgmtopbm pnmcomp
ln -s pamditherbw pgmtopbm
ln -s pamcomp pnmcomp
popd
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
@ -214,6 +220,12 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/netpbm/ %{_datadir}/netpbm/
%changelog %changelog
* Wed Feb 17 2010 Jindrich Novy <jnovy@redhat.com> 10.47.09-3
- remove obsolete pgmtopbm and pnmcomp, symlink them to the new
compatible variants
- fix ppmfade -h, --help options
- add missing man pages
* Wed Jan 27 2010 Jindrich Novy <jnovy@redhat.com> 10.47.09-2 * Wed Jan 27 2010 Jindrich Novy <jnovy@redhat.com> 10.47.09-2
- fix buffer overflow in pnmtofiasco - fix buffer overflow in pnmtofiasco