extra/netpbm to 10.73-1

This commit is contained in:
Kevin Mihelich 2016-04-16 14:36:52 +00:00
parent 0c8475ca80
commit 23b2ce0358
3 changed files with 678 additions and 876 deletions

View file

@ -5,7 +5,8 @@
# - add armv7h and aarch64 for -fPIC flag
pkgname=netpbm
pkgver=10.69.02
pkgver=10.73
_rev=r2692
pkgrel=1
pkgdesc="A toolkit for manipulation of graphic images"
arch=('i686' 'x86_64')
@ -15,24 +16,19 @@ depends=('perl' 'libpng' 'libtiff' 'libxml2')
makedepends=('python2' 'jbigkit' 'subversion')
options=('!makeflags')
# Get docs with: wget --recursive --relative -nH http://netpbm.sourceforge.net/doc/
source=(svn://svn.code.sf.net/p/netpbm/code/advanced
ftp://ftp.archlinux.org/other/packages/netpbm/netpbm-doc-31Jan2014.tar.xz{,.sig}
source=(svn://svn.code.sf.net/p/netpbm/code/stable#revision=$_rev
https://sources.archlinux.org/other/packages/netpbm/netpbm-doc-31Jan2014.tar.xz{,.sig}
netpbm-CAN-2005-2471.patch netpbm-security-code.patch netpbm-security-scripts.patch)
sha1sums=('SKIP'
'25a58975bd8cd383238b4ae31f4405c60914faac'
'SKIP'
'b79cf9d42488fea065ba16262ed97694c47af08d'
'313e040ea74eb73675aa420b6f54e1f4452c4769'
'c67a63c010353de3ecac3ad72ba76bbb85e4ed4c')
'60088182b44ed2f10914413f7c95841a71a594fe'
'ca61aabdeb24a6421781ca975719ce7314be2bb9')
validpgpkeys=('5357F3B111688D88C1D88119FCF2CB179205AC90')
pkgver() {
cd advanced
echo $(grep MAJOR version.mk |cut -d ' ' -f 3).$(grep MINOR version.mk |cut -d ' ' -f 3).0$(grep POINT version.mk |cut -d ' ' -f 3)
}
prepare() {
cd advanced
cd stable
patch -p1 < ../netpbm-CAN-2005-2471.patch
patch -p1 < ../netpbm-security-code.patch
@ -57,27 +53,27 @@ prepare() {
}
build() {
cd advanced
cd stable
make
# Generating useful man pages with html doc
make MAKEMAN="${srcdir}/advanced/buildtools/makeman" USERGUIDE=. \
-C ../doc -f "${srcdir}/advanced/buildtools/manpage.mk" manpages
make MAKEMAN="${srcdir}/stable/buildtools/makeman" USERGUIDE=. \
-C ../doc -f "${srcdir}/stable/buildtools/manpage.mk" manpages
}
package() {
cd advanced
cd stable
make pkgdir="${pkgdir}/usr" PKGMANDIR=share/man install-run install-dev
# Removing dummy man pages
rm "${pkgdir}"/usr/share/man/man{1,3,5}/*
make MAKEMAN="${srcdir}/advanced/buildtools/makeman" MANDIR="${pkgdir}/usr/share/man" \
-C ../doc -f "${srcdir}/advanced/buildtools/manpage.mk" installman
make MAKEMAN="${srcdir}/stable/buildtools/makeman" MANDIR="${pkgdir}/usr/share/man" \
-C ../doc -f "${srcdir}/stable/buildtools/manpage.mk" installman
# Replace obsolete utility
echo -e '#!/bin/sh\npamditherbw $@ | pamtopnm\n' > "${pkgdir}/usr/bin/pgmtopbm"
# Licensing. Note that each program in the package has a separate license.
install -D -m644 "${srcdir}/advanced/doc/copyright_summary" \
install -D -m644 "${srcdir}/stable/doc/copyright_summary" \
"${pkgdir}/usr/share/licenses/${pkgname}/copyright_summary.txt"
}

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,8 @@
diff -up netpbm-10.47.05/converter/other/anytopnm.security-scripts netpbm-10.47.05/converter/other/anytopnm
--- netpbm-10.47.05/converter/other/anytopnm.security-scripts 2009-12-10 08:34:36.000000000 +0100
+++ netpbm-10.47.05/converter/other/anytopnm 2010-03-16 21:28:09.000000000 +0100
@@ -510,10 +510,7 @@ else
diff --git a/converter/other/anytopnm b/converter/other/anytopnm
index acf8813..335312a 100755
--- a/converter/other/anytopnm
+++ b/converter/other/anytopnm
@@ -511,10 +511,7 @@ else
inputFile="-"
fi
@ -13,10 +14,13 @@ diff -up netpbm-10.47.05/converter/other/anytopnm.security-scripts netpbm-10.47.
# Take out all spaces
# Find the filename extension for last-ditch efforts later
@@ -539,9 +536,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
@@ -537,12 +534,17 @@ typeDescription=`file "$file" | cut -d: -f2- | cut -c2-`
determineType "$file" "$mimeType" "$typeDescription" "$fileExtension"
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
@ -31,10 +35,11 @@ diff -up netpbm-10.47.05/converter/other/anytopnm.security-scripts netpbm-10.47.
+fi
+
exit 0
diff -up netpbm-10.47.05/editor/pamstretch-gen.security-scripts netpbm-10.47.05/editor/pamstretch-gen
--- netpbm-10.47.05/editor/pamstretch-gen.security-scripts 2009-12-10 08:34:32.000000000 +0100
+++ netpbm-10.47.05/editor/pamstretch-gen 2010-03-16 21:28:47.000000000 +0100
@@ -31,13 +31,9 @@ if [ "$1" = "" ]; then
diff --git a/editor/pamstretch-gen b/editor/pamstretch-gen
index ba0e818..250fca0 100755
--- a/editor/pamstretch-gen
+++ b/editor/pamstretch-gen
@@ -31,9 +31,7 @@ if [ "$1" = "" ]; then
exit 1
fi
@ -44,15 +49,12 @@ diff -up netpbm-10.47.05/editor/pamstretch-gen.security-scripts netpbm-10.47.05/
+tempfile=$(mktemp /tmp/pnmig.XXXXXXXXXX) || 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 -up netpbm-10.47.05/editor/pnmmargin.security-scripts netpbm-10.47.05/editor/pnmmargin
--- netpbm-10.47.05/editor/pnmmargin.security-scripts 2009-12-10 08:34:32.000000000 +0100
+++ netpbm-10.47.05/editor/pnmmargin 2010-03-16 21:28:09.000000000 +0100
@@ -11,15 +11,11 @@
tempfile=$tempdir/pnmig
diff --git a/editor/pnmmargin b/editor/pnmmargin
index 0f57d1d..e0d3625 100755
--- a/editor/pnmmargin
+++ b/editor/pnmmargin
@@ -11,11 +11,7 @@
# documentation. This software is provided "as is" without express or
# implied warranty.
@ -61,38 +63,37 @@ diff -up netpbm-10.47.05/editor/pnmmargin.security-scripts netpbm-10.47.05/edito
- { echo "Could not create temporary file. Exiting." 1>&2; exit 1;}
-trap 'rm -rf $tempdir' 0 1 3 15
-
-tmp1=$tempdir/pnmm1
-tmp2=$tempdir/pnmm2
-tmp3=$tempdir/pnmm3
-tmp4=$tempdir/pnmm4
+tmpdir=$(mktemp -d -t ppmmargin.XXXXXXX) || exit 1
+tmp1="$tmpdir/tmp1"
+tmp2="$tmpdir/tmp2"
+tmp3="$tmpdir/tmp3"
+tmp4="$tmpdir/tmp4"
color="-gofigure"
plainopt=""
+tempdir=$(mktemp -d -t ppmmargin.XXXXXXX) || exit 1
tmp1=$tempdir/pnmm1
tmp2=$tempdir/pnmm2
tmp3=$tempdir/pnmm3
@@ -90,6 +86,7 @@ else
-white | -black )
pnmpad $plainopt $color \
-left=$size -right=$size -top=$size -bottom=$size $tmp1
+ rm -rf "$tmpdir"
+ rm -rf "$tempdir"
exit
;;
* )
diff -up netpbm-10.47.05/editor/ppmfade.security-scripts netpbm-10.47.05/editor/ppmfade
--- netpbm-10.47.05/editor/ppmfade.security-scripts 2009-12-10 08:34:32.000000000 +0100
+++ netpbm-10.47.05/editor/ppmfade 2010-03-16 21:28:09.000000000 +0100
@@ -14,6 +14,7 @@
@@ -103,4 +100,4 @@ else
pnmcat -tb $plainopt $tmp3 $tmp4 $tmp3
fi
-
+rm -rf "$tempdir"
diff --git a/editor/ppmfade b/editor/ppmfade
index 027fc79..8eb094f 100755
--- a/editor/ppmfade
+++ b/editor/ppmfade
@@ -40,6 +40,7 @@ exec perl -w -x -S -- "$0" "$@"
#
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
##############################################################################
use strict;
+use File::Temp "tempdir";
my $SPREAD = 1;
my $SHIFT = 2;
@@ -111,20 +112,26 @@ if ($first_file ne "undefined") {
@@ -137,20 +138,26 @@ if ($first_file ne "undefined") {
print("Frames are " . $width . "W x " . $height . "H\n");
@ -123,7 +124,7 @@ diff -up netpbm-10.47.05/editor/ppmfade.security-scripts netpbm-10.47.05/editor/
}
#
@@ -132,14 +139,14 @@ if ($last_file eq "undefined") {
@@ -158,14 +165,14 @@ if ($last_file eq "undefined") {
#
# Here's what our temporary files are:
@ -146,7 +147,7 @@ diff -up netpbm-10.47.05/editor/ppmfade.security-scripts netpbm-10.47.05/editor/
my $i; # Frame number
for ($i = 1; $i <= $nframes; $i++) {
@@ -147,147 +154,147 @@ for ($i = 1; $i <= $nframes; $i++) {
@@ -173,147 +180,147 @@ for ($i = 1; $i <= $nframes; $i++) {
if ($mode eq $SPREAD) {
if ($i <= 10) {
my $n = $spline20[$i] * 100;
@ -347,10 +348,11 @@ diff -up netpbm-10.47.05/editor/ppmfade.security-scripts netpbm-10.47.05/editor/
+system("rm $tmpdir/junk*$$.ppm");
exit(0);
diff -up netpbm-10.47.05/editor/ppmshadow.security-scripts netpbm-10.47.05/editor/ppmshadow
--- netpbm-10.47.05/editor/ppmshadow.security-scripts 2009-12-10 08:34:32.000000000 +0100
+++ netpbm-10.47.05/editor/ppmshadow 2010-03-16 21:28:09.000000000 +0100
@@ -72,9 +72,10 @@ sub makeConvolutionKernel($$) {
diff --git a/editor/ppmshadow b/editor/ppmshadow
index 62cdf8b..72e1b22 100755
--- a/editor/ppmshadow
+++ b/editor/ppmshadow
@@ -97,9 +97,10 @@ sub makeConvolutionKernel($$) {
my $tmpdir = $ENV{TMPDIR} || "/tmp";
@ -364,10 +366,4 @@ diff -up netpbm-10.47.05/editor/ppmshadow.security-scripts netpbm-10.47.05/edito
# Process command line options
--- snetpbm-10.47.05/editor/pnmmargin.orig 2014-06-16 21:30:27.480812666 -0400
+++ netpbm-10.47.05/editor/pnmmargin 2014-06-16 21:30:41.500789921 -0400
@@ -101,3 +101,4 @@
fi
+rm -rf "$tmpdir"