summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2005-10-10 14:45:25 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2005-10-10 14:45:25 +0000
commit52bdb42c95f4bedef6ac244442879ef4bb3298f5 (patch)
treeaf83b0ab655deb6363ad4b2ad0939838395611a1 /media-libs
parentupdate HOMEPAGE #108696 by Glenn L. McGrath (diff)
downloadgentoo-2-52bdb42c95f4bedef6ac244442879ef4bb3298f5.tar.gz
gentoo-2-52bdb42c95f4bedef6ac244442879ef4bb3298f5.tar.bz2
gentoo-2-52bdb42c95f4bedef6ac244442879ef4bb3298f5.zip
Added patch to rename the INFINITY variable to infinity to avoid problems where the first is a system define.
(Portage version: 2.0.53_rc5)
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/netpbm/ChangeLog7
-rw-r--r--media-libs/netpbm/files/netpbm-10.29-infinity.patch134
-rw-r--r--media-libs/netpbm/netpbm-10.29-r1.ebuild3
3 files changed, 142 insertions, 2 deletions
diff --git a/media-libs/netpbm/ChangeLog b/media-libs/netpbm/ChangeLog
index b40daa4a9e5e..ce49fc86a5c7 100644
--- a/media-libs/netpbm/ChangeLog
+++ b/media-libs/netpbm/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for media-libs/netpbm
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/netpbm/ChangeLog,v 1.71 2005/10/04 23:20:35 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/netpbm/ChangeLog,v 1.72 2005/10/10 14:45:24 flameeyes Exp $
+
+ 10 Oct 2005; Diego Pettenò <flameeyes@gentoo.org>
+ +files/netpbm-10.29-infinity.patch, netpbm-10.29-r1.ebuild:
+ Added patch to rename the INFINITY variable to infinity to avoid problems
+ where the first is a system define.
04 Oct 2005; Mike Frysinger <vapier@gentoo.org> netpbm-10.29-r1.ebuild:
Redo some library options and merge Darwin support #74101.
diff --git a/media-libs/netpbm/files/netpbm-10.29-infinity.patch b/media-libs/netpbm/files/netpbm-10.29-infinity.patch
new file mode 100644
index 000000000000..00717dd53bc5
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-10.29-infinity.patch
@@ -0,0 +1,134 @@
+Index: netpbm-10.29/editor/pnmaddnoise.c
+===================================================================
+--- netpbm-10.29.orig/editor/pnmaddnoise.c
++++ netpbm-10.29/editor/pnmaddnoise.c
+@@ -252,14 +252,14 @@ laplacian_noise(FILE * const ifp,
+ int rows, cols, format, row;
+ double rtemp, gtemp, btemp;
+ double u, u1;
+- double INFINITY;
++ double infinity;
+
+ double const EPSILON = 1.0e-5;
+ int const forceplain = 0;
+
+ pnm_readpnminit( ifp, &cols, &rows, &maxval, &format );
+ xelrow = pnm_allocrow( cols );
+- INFINITY = (double) maxval;
++ infinity = (double) maxval;
+
+ pnm_writepnminit( stdout, cols, rows, maxval, format, forceplain );
+
+@@ -272,12 +272,12 @@ laplacian_noise(FILE * const ifp,
+ u = ( rand( ) & RANDOM_MASK ) / arand;
+ if ( u <= 0.5 ) {
+ if ( u <= EPSILON )
+- rtemp = PPM_GETR( *xP ) - INFINITY;
++ rtemp = PPM_GETR( *xP ) - infinity;
+ else
+ rtemp = PPM_GETR( *xP ) + lsigma * log( 2.0 * u );
+ } else {
+ if ( ( u1 = 1.0 - u ) <= 0.5 * EPSILON )
+- rtemp = PPM_GETR( *xP ) + INFINITY;
++ rtemp = PPM_GETR( *xP ) + infinity;
+ else
+ rtemp = PPM_GETR( *xP ) - lsigma * log( 2.0 * u1 );
+ }
+@@ -285,12 +285,12 @@ laplacian_noise(FILE * const ifp,
+ u = ( rand( ) & RANDOM_MASK ) / arand;
+ if ( u <= 0.5 ) {
+ if ( u <= EPSILON )
+- gtemp = PPM_GETG( *xP ) - INFINITY;
++ gtemp = PPM_GETG( *xP ) - infinity;
+ else
+ gtemp = PPM_GETG( *xP ) + lsigma * log( 2.0 * u );
+ } else {
+ if ( ( u1 = 1.0 - u ) <= 0.5 * EPSILON )
+- gtemp = PPM_GETG( *xP ) + INFINITY;
++ gtemp = PPM_GETG( *xP ) + infinity;
+ else
+ gtemp = PPM_GETG( *xP ) - lsigma * log( 2.0 * u1 );
+ }
+@@ -298,12 +298,12 @@ laplacian_noise(FILE * const ifp,
+ u = ( rand( ) & RANDOM_MASK ) / arand;
+ if ( u <= 0.5 ) {
+ if ( u <= EPSILON )
+- btemp = PPM_GETB( *xP ) - INFINITY;
++ btemp = PPM_GETB( *xP ) - infinity;
+ else
+ btemp = PPM_GETB( *xP ) + lsigma * log( 2.0 * u );
+ } else {
+ if ( ( u1 = 1.0 - u ) <= 0.5 * EPSILON )
+- btemp = PPM_GETB( *xP ) + INFINITY;
++ btemp = PPM_GETB( *xP ) + infinity;
+ else
+ btemp = PPM_GETB( *xP ) - lsigma * log( 2.0 * u1 );
+ }
+@@ -318,12 +318,12 @@ laplacian_noise(FILE * const ifp,
+ u = ( rand( ) & RANDOM_MASK ) / arand;
+ if ( u <= 0.5 ) {
+ if ( u <= EPSILON )
+- gtemp = PNM_GET1( *xP ) - INFINITY;
++ gtemp = PNM_GET1( *xP ) - infinity;
+ else
+ gtemp = PNM_GET1( *xP ) + lsigma * log( 2.0 * u );
+ } else {
+ if ( ( u1 = 1.0 - u ) <= 0.5 * EPSILON )
+- gtemp = PNM_GET1( *xP ) + INFINITY;
++ gtemp = PNM_GET1( *xP ) + infinity;
+ else
+ gtemp = PNM_GET1( *xP ) - lsigma * log( 2.0 * u1 );
+ }
+@@ -356,14 +356,14 @@ multiplicative_gaussian_noise(FILE * con
+ int rows, cols, format, row;
+ double rtemp, gtemp, btemp;
+ double uniform, rayleigh, gauss;
+- double INFINITY;
++ double infinity;
+
+ double const EPSILON = 1.0e-5;
+ int const forceplain = 0;
+
+ pnm_readpnminit( ifp, &cols, &rows, &maxval, &format );
+ xelrow = pnm_allocrow( cols );
+- INFINITY = (double) maxval;
++ infinity = (double) maxval;
+
+ pnm_writepnminit( stdout, cols, rows, maxval, format, forceplain );
+
+@@ -375,7 +375,7 @@ multiplicative_gaussian_noise(FILE * con
+ case PPM_TYPE:
+ uniform = ( rand( ) & RANDOM_MASK ) / arand;
+ if ( uniform <= EPSILON )
+- rayleigh = INFINITY;
++ rayleigh = infinity;
+ else
+ rayleigh = sqrt( -2.0 * log( uniform ) );
+ uniform = ( rand( ) & RANDOM_MASK ) / arand;
+@@ -384,7 +384,7 @@ multiplicative_gaussian_noise(FILE * con
+
+ uniform = ( rand( ) & RANDOM_MASK ) / arand;
+ if ( uniform <= EPSILON )
+- rayleigh = INFINITY;
++ rayleigh = infinity;
+ else
+ rayleigh = sqrt( -2.0 * log( uniform ) );
+ uniform = ( rand( ) & RANDOM_MASK ) / arand;
+@@ -393,7 +393,7 @@ multiplicative_gaussian_noise(FILE * con
+
+ uniform = ( rand( ) & RANDOM_MASK ) / arand;
+ if ( uniform <= EPSILON )
+- rayleigh = INFINITY;
++ rayleigh = infinity;
+ else
+ rayleigh = sqrt( -2.0 * log( uniform ) );
+ uniform = ( rand( ) & RANDOM_MASK ) / arand;
+@@ -409,7 +409,7 @@ multiplicative_gaussian_noise(FILE * con
+ default:
+ uniform = ( rand( ) & RANDOM_MASK ) / arand;
+ if ( uniform <= EPSILON )
+- rayleigh = INFINITY;
++ rayleigh = infinity;
+ else
+ rayleigh = sqrt( -2.0 * log( uniform ) );
+ uniform = ( rand( ) & RANDOM_MASK ) / arand;
diff --git a/media-libs/netpbm/netpbm-10.29-r1.ebuild b/media-libs/netpbm/netpbm-10.29-r1.ebuild
index 37c92dd9013b..e5d775f2a83b 100644
--- a/media-libs/netpbm/netpbm-10.29-r1.ebuild
+++ b/media-libs/netpbm/netpbm-10.29-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/netpbm/netpbm-10.29-r1.ebuild,v 1.5 2005/10/04 23:20:35 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/netpbm/netpbm-10.29-r1.ebuild,v 1.6 2005/10/10 14:45:25 flameeyes Exp $
inherit flag-o-matic toolchain-funcs eutils multilib
@@ -50,6 +50,7 @@ src_unpack() {
epatch "${FILESDIR}"/netpbm-10.29-anytopnm.patch #105127
epatch "${FILESDIR}"/netpbm-10.29-pnmtopng-alpha-check.patch #104434
epatch "${FILESDIR}"/netpbm-10.29-build.patch
+ epatch "${FILESDIR}"/netpbm-10.29-infinity.patch
rm -f configure
cp Makefile.config.in Makefile.config