extra/netpbm to 10.66.03-1

This commit is contained in:
Kevin Mihelich 2014-06-18 02:47:04 +00:00
parent 750e8bc8fd
commit f01782d51e
3 changed files with 43 additions and 69 deletions

View file

@ -1,12 +1,12 @@
# $Id: PKGBUILD 184413 2013-05-06 19:38:51Z foutrelis $
# Maintainer: Kevin Piche <kevin@archlinux.org>
# $Id$
# Maintainer:
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - add armv7h for -fPIC flag
pkgname=netpbm
pkgver=10.61.02
pkgrel=3
pkgver=10.66.03
pkgrel=1
pkgdesc="A toolkit for manipulation of graphic images"
arch=('i686' 'x86_64')
license=('custom' 'BSD' 'GPL' 'LGPL')
@ -14,25 +14,24 @@ url="http://netpbm.sourceforge.net/"
depends=('perl' 'libpng' 'libtiff' 'libxml2')
makedepends=('python2')
options=('!makeflags')
source=(ftp://ftp.archlinux.org/other/packages/netpbm/${pkgname}-${pkgver}.tar.gz{,.sig} \
ftp://ftp.archlinux.org/other/packages/netpbm/netpbm-doc-22Feb2009.tar.xz{,.sig} \
source=(ftp://ftp.archlinux.org/other/packages/netpbm/${pkgname}-${pkgver}.tar.xz{,.sig} \
ftp://ftp.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=('dc2354716996c8fe4c4836386e6c403ec2f15589'
'253df0e79f9344e68ee907a43347d630ff6b1b95'
'dfeba9f9a5fe987d64db0aadb5ca8c1b20fcead2'
'e9513608a661beb05a63270931f6191029e935f8'
sha1sums=('b396dfde402b6979a8b551cf60ba1030278a233d'
'SKIP'
'25a58975bd8cd383238b4ae31f4405c60914faac'
'SKIP'
'b79cf9d42488fea065ba16262ed97694c47af08d'
'cde27f75fa5ca8010a3b1f08d8e247d42243d0f5'
'300a2386d3207005f4cb4120bbb2f3788a9b7716')
'4213468c44a63c0575896f6781987a09cfcc2d30'
'c67a63c010353de3ecac3ad72ba76bbb85e4ed4c')
# source PKGBUILD && mksource
mksource() {
# Get docs with: wget --recursive --relative -nH http://netpbm.sourceforge.net/doc/
curl -o advanced.tar.gz 'http://netpbm.svn.sourceforge.net/viewvc/netpbm/advanced.tar.gz?view=tar'
tar -xf advanced.tar.gz advanced/version.mk
svn checkout svn://svn.code.sf.net/p/netpbm/code/advanced advanced
_pkgver=$(grep MAJOR advanced/version.mk |cut -d ' ' -f 3).$(grep MINOR advanced/version.mk |cut -d ' ' -f 3).0$(grep POINT advanced/version.mk |cut -d ' ' -f 3)
mv advanced.tar.gz ${pkgname}-${_pkgver}.tar.gz
gpg --detach-sign --use-agent -u ${GPGKEY} ${pkgname}-${_pkgver}.tar.gz
tar -cf ${pkgname}-${_pkgver}.tar.xz advanced
gpg --detach-sign --use-agent -u ${GPGKEY} ${pkgname}-${_pkgver}.tar.xz
rm -r advanced
}
@ -56,13 +55,12 @@ prepare() {
sed -i 's|misc|share/netpbm|' common.mk
sed -i 's|/link|/lib|' lib/Makefile
sed -i 's|install.manweb install.man|install.man|' GNUmakefile
sed -i 's|install.manwebmain install.manweb install.man|install.man|' GNUmakefile
}
build() {
cd advanced
make
# Generating useful man pages with html doc
make MAKEMAN="${srcdir}/advanced/buildtools/makeman" USERGUIDE=. \
-C ../doc -f "${srcdir}/advanced/buildtools/manpage.mk" manpages

View file

@ -748,14 +748,6 @@ diff -up netpbm-10.58.01/converter/ppm/ppmtoilbm.c.security-code netpbm-10.58.01
MALLOCARRAY_NOFAIL(compr_row, cols * 2);
if( maxval != 15 ) {
@@ -1785,6 +1787,7 @@ make_val_table(oldmaxval, newmaxval)
unsigned int i;
int * table;
+ overflow_add(oldmaxval, 1);
MALLOCARRAY_NOFAIL(table, oldmaxval + 1);
for (i = 0; i <= oldmaxval; ++i)
table[i] = ROUNDDIV(i * newmaxval, oldmaxval);
@@ -2293,8 +2296,11 @@ main(int argc, char ** argv) {
MALLOCARRAY_NOFAIL(coded_rowbuf, RowBytes(cols));
for (i = 0; i < RowBytes(cols); ++i)
@ -988,17 +980,6 @@ diff -up netpbm-10.58.01/converter/ppm/ximtoppm.c.security-code netpbm-10.58.01/
header->colors = (Color *)calloc((unsigned int)header->ncolors,
sizeof(Color));
if (header->colors == NULL) {
diff -up netpbm-10.58.01/converter/ppm/yuvtoppm.c.security-code netpbm-10.58.01/converter/ppm/yuvtoppm.c
--- netpbm-10.58.01/converter/ppm/yuvtoppm.c.security-code 2012-04-09 15:31:44.000000000 +0200
+++ netpbm-10.58.01/converter/ppm/yuvtoppm.c 2012-04-09 15:40:03.218619602 +0200
@@ -72,6 +72,7 @@ main(argc, argv)
ppm_writeppminit(stdout, cols, rows, (pixval) 255, 0);
pixrow = ppm_allocrow(cols);
+ overflow_add(cols, 1);
MALLOCARRAY(yuvbuf, (cols+1)/2);
if (yuvbuf == NULL)
pm_error("Unable to allocate YUV buffer for %d columns.", cols);
diff -up netpbm-10.58.01/editor/pamcut.c.security-code netpbm-10.58.01/editor/pamcut.c
--- netpbm-10.58.01/editor/pamcut.c.security-code 2012-04-09 15:31:33.000000000 +0200
+++ netpbm-10.58.01/editor/pamcut.c 2012-04-09 15:40:03.218619602 +0200
@ -1215,18 +1196,6 @@ diff -up netpbm-10.58.01/generator/pgmcrater.c.security-code netpbm-10.58.01/gen
if (aux == NULL)
pm_error("out of memory allocating elevation array");
diff -up netpbm-10.58.01/generator/pgmkernel.c.security-code netpbm-10.58.01/generator/pgmkernel.c
--- netpbm-10.58.01/generator/pgmkernel.c.security-code 2012-04-09 15:31:34.000000000 +0200
+++ netpbm-10.58.01/generator/pgmkernel.c 2012-04-09 15:40:03.226619502 +0200
@@ -68,7 +68,7 @@ main ( argc, argv )
kycenter = (fysize - 1) / 2.0;
ixsize = fxsize + 0.999;
iysize = fysize + 0.999;
- MALLOCARRAY(fkernel, ixsize * iysize);
+ fkernel = (double *) malloc3 (ixsize, iysize, sizeof(double));
for (i = 0; i < iysize; i++)
for (j = 0; j < ixsize; j++) {
fkernel[i*ixsize+j] = 1.0 / (1.0 + w * sqrt((double)
diff -up netpbm-10.58.01/lib/libpam.c.security-code netpbm-10.58.01/lib/libpam.c
--- netpbm-10.58.01/lib/libpam.c.security-code 2012-04-09 15:31:38.000000000 +0200
+++ netpbm-10.58.01/lib/libpam.c 2012-04-09 15:40:03.227619490 +0200
@ -1252,17 +1221,6 @@ diff -up netpbm-10.58.01/lib/libpammap.c.security-code netpbm-10.58.01/lib/libpa
unsigned int const size =
sizeof(*retval) - sizeof(retval->tupleint.tuple)
+ pamP->depth * sizeof(sample);
diff -up netpbm-10.58.01/lib/libpbm1.c.security-code netpbm-10.58.01/lib/libpbm1.c
--- netpbm-10.58.01/lib/libpbm1.c.security-code 2012-04-09 15:31:38.000000000 +0200
+++ netpbm-10.58.01/lib/libpbm1.c 2012-04-09 15:40:03.228619477 +0200
@@ -77,6 +77,7 @@ pbm_check(FILE * file, const enum pm_che
pm_message("pm_filepos passed to pm_check() is %u bytes",
sizeof(pm_filepos));
#endif
+ overflow2(bytes_per_row, rows);
pm_check(file, check_type, need_raster_size, retval_p);
}
}
diff -up netpbm-10.58.01/lib/libpm.c.security-code netpbm-10.58.01/lib/libpm.c
--- netpbm-10.58.01/lib/libpm.c.security-code 2012-04-09 15:31:38.000000000 +0200
+++ netpbm-10.58.01/lib/libpm.c 2012-04-09 15:40:03.229619464 +0200
@ -1680,3 +1638,23 @@ diff -up netpbm-10.58.01/urt/scanargs.c.security-code netpbm-10.58.01/urt/scanar
static CONST_DECL char * prformat( CONST_DECL char *, int );
static int isnum( CONST_DECL char *, int, int );
--- netpbm-10.58.01/lib/libpbm1.c.orig 2014-06-16 21:12:28.499230631 -0400
+++ netpbm-10.58.01/lib/libpbm1.c 2014-06-16 21:12:55.932519324 -0400
@@ -78,6 +78,7 @@
} else {
pm_filepos const bytesPerRow = (cols+7)/8;
pm_filepos const needRasterSize = rows * bytesPerRow;
+ overflow2(bytesPerRow, rows);
pm_check(fileP, checkType, needRasterSize, retvalP);
}
}
--- netpbm-10.58.01/converter/ppm/ppmtoilbm.c.orig 2014-06-16 21:23:40.061473868 -0400
+++ netpbm-10.58.01/converter/ppm/ppmtoilbm.c 2014-06-16 21:23:44.701466379 -0400
@@ -185,6 +185,7 @@
unsigned int i;
int * table;
+ overflow_add(oldmaxval, 1);
MALLOCARRAY_NOFAIL(table, oldmaxval + 1);
for (i = 0; i <= oldmaxval; ++i)
table[i] = ROUNDDIV(i * newmaxval, oldmaxval);

View file

@ -81,15 +81,6 @@ diff -up netpbm-10.47.05/editor/pnmmargin.security-scripts netpbm-10.47.05/edito
exit
;;
* )
@@ -102,7 +99,4 @@ else
pnmcat -lr $tmp2 $tmp1 $tmp2 > $tmp4
pnmcat -tb $plainopt $tmp3 $tmp4 $tmp3
fi
-
-
-
-
+rm -rf "$tmpdir"
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
@ -373,3 +364,10 @@ 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"