maintenance update to 10.35.83

This commit is contained in:
naddy 2011-12-13 21:39:17 +00:00
parent 287cc0be7d
commit e0a0be81ba
4 changed files with 74 additions and 63 deletions

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile,v 1.56 2011/11/13 12:33:11 naddy Exp $
# $OpenBSD: Makefile,v 1.57 2011/12/13 21:39:17 naddy Exp $
COMMENT= toolkit for converting images between different formats
DISTNAME= netpbm-10.35.82
DISTNAME= netpbm-10.35.83
SHARED_LIBS= netpbm 2.0
CATEGORIES= graphics
HOMEPAGE= http://netpbm.sourceforge.net/
@ -35,6 +35,14 @@ MAKE_FLAGS= CC="${CC}" \
LIBnetpbm_VERSION=${LIBnetpbm_VERSION}
FAKE_FLAGS= PKGDIR="${WRKINST}${TRUEPREFIX}"
.include <bsd.port.arch.mk>
.if ${NO_SHARED_LIBS:L} == "yes"
MAKE_FLAGS+= NETPBMLIBTYPE=unixstatic
.else
MAKE_FLAGS+= NETPBMLIBTYPE=unixshared
.endif
pre-patch:
@rm -f ${WRKSRC}/converter/other/jpeg2000/libjasper/include/jasper/jas_types.h.orig
@ -43,14 +51,7 @@ pre-build:
-e 's#%%X11BASE%%#${X11BASE}#g;' \
-e 's#%%PREFIX%%#${PREFIX}#g;' ${WRKSRC}/pm_config.in.h
cp ${FILESDIR}/Makefile.config.OpenBSD ${WRKSRC}/Makefile.config
cd ${WRKSRC}; buildtools/stamp-date >lib/compile.h
NO_REGRESS= Yes
.include <bsd.port.mk>
.if ${NO_SHARED_LIBS:L} == "yes"
MAKE_FLAGS+= NETPBMLIBTYPE=unixstatic
.else
MAKE_FLAGS+= NETPBMLIBTYPE=unixshared
.endif

View File

@ -1,5 +1,5 @@
MD5 (netpbm-10.35.82.tgz) = /K4vx5KK19MbBUDsDD5xCw==
RMD160 (netpbm-10.35.82.tgz) = xVtNBv5BAc1Q+EbC/yhci4/KzEw=
SHA1 (netpbm-10.35.82.tgz) = k34z4SWBRlEO/9SuCeygNjoh/es=
SHA256 (netpbm-10.35.82.tgz) = 1KFS+pMAUOudH9g5kFFgWg8dSiFeeOpBl5L20ERCKDA=
SIZE (netpbm-10.35.82.tgz) = 2547793
MD5 (netpbm-10.35.83.tgz) = AOrWtzqXVfdeE1qbnrtdHQ==
RMD160 (netpbm-10.35.83.tgz) = CII79QEV0JwcNGLFzGg5apZV4Us=
SHA1 (netpbm-10.35.83.tgz) = ASMaDzjzKIfS0sCxG19ya1yRLOI=
SHA256 (netpbm-10.35.83.tgz) = KgEToq2h4YzzFMfhdoBkpZQIEVGPR5bDTnCTBBKJJ+I=
SIZE (netpbm-10.35.83.tgz) = 2547911

View File

@ -1,9 +1,9 @@
$OpenBSD: patch-converter_other_pngtopnm_c,v 1.1 2011/07/08 20:36:09 naddy Exp $
$OpenBSD: patch-converter_other_pngtopnm_c,v 1.2 2011/12/13 21:39:17 naddy Exp $
Fix build with png-1.5.
--- converter/other/pngtopnm.c.orig Sat Jan 15 13:18:40 2011
+++ converter/other/pngtopnm.c Mon Jul 4 14:21:23 2011
--- converter/other/pngtopnm.c.orig Fri Nov 25 01:15:46 2011
+++ converter/other/pngtopnm.c Tue Dec 13 22:25:03 2011
@@ -44,12 +44,6 @@
#include "nstring.h"
#include "shhopt.h"
@ -91,14 +91,24 @@ Fix build with png-1.5.
png_info *info_ptr;
#endif
{
@@ -311,12 +312,13 @@ png_info *info_ptr;
@@ -311,19 +312,20 @@ png_info *info_ptr;
"", "January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"
};
+ png_timep mod_time;
- if (info_ptr->valid & PNG_INFO_tIME) {
- if (info_ptr->mod_time.month < 1 ||
- info_ptr->mod_time.month >= ARRAY_SIZE(month)) {
+ if (png_get_tIME(png_ptr, info_ptr, &mod_time) & PNG_INFO_tIME) {
+ if (mod_time->month < 1 ||
+ mod_time->month >= ARRAY_SIZE(month)) {
pm_message("tIME chunk in PNG input is invalid; "
"modification time of image is unknown. "
"The month value, which should be in the range "
- "1-12, is %u", info_ptr->mod_time.month);
+ "1-12, is %u", mod_time->month);
} else
pm_message ("modification time: %02d %s %d %02d:%02d:%02d",
- info_ptr->mod_time.day, month[info_ptr->mod_time.month],
- info_ptr->mod_time.year, info_ptr->mod_time.hour,
@ -109,7 +119,7 @@ Fix build with png-1.5.
}
}
@@ -353,12 +355,28 @@ png_const_charp msg;
@@ -360,12 +362,28 @@ png_const_charp msg;
static void
@ -140,7 +150,7 @@ Fix build with png-1.5.
case PNG_COLOR_TYPE_GRAY:
type_string = "gray";
break;
@@ -380,90 +398,101 @@ dump_png_info(png_info *info_ptr) {
@@ -387,90 +405,101 @@ dump_png_info(png_info *info_ptr) {
break;
}
@ -270,7 +280,7 @@ Fix build with png-1.5.
pm_message("sRGB chunk: present");
else
pm_message("sRGB chunk: not present");
@@ -472,19 +501,19 @@ dump_png_info(png_info *info_ptr) {
@@ -479,19 +508,19 @@ dump_png_info(png_info *info_ptr) {
static bool
@ -297,7 +307,7 @@ Fix build with png-1.5.
/* There seems to be a problem here: you can't compare real
numbers for equality. Also, I'm not sure the gamma
corrected/uncorrected color spaces are right here.
@@ -530,9 +559,11 @@ setupGammaCorrection(png_struct * const png_ptr,
@@ -537,9 +566,11 @@ setupGammaCorrection(png_struct * const png_ptr,
if (displaygamma == -1.0)
*totalgammaP = -1.0;
else {
@ -311,7 +321,7 @@ Fix build with png-1.5.
else {
if (verbose)
pm_message("PNG doesn't specify image gamma. Assuming 1.0");
@@ -548,10 +579,14 @@ setupGammaCorrection(png_struct * const png_ptr,
@@ -555,10 +586,14 @@ setupGammaCorrection(png_struct * const png_ptr,
} else {
png_set_gamma(png_ptr, displaygamma, imageGamma);
*totalgammaP = imageGamma * displaygamma;
@ -326,7 +336,7 @@ Fix build with png-1.5.
if (verbose)
pm_message("image gamma is %4.2f, "
"converted for display gamma of %4.2f",
@@ -563,20 +598,24 @@ setupGammaCorrection(png_struct * const png_ptr,
@@ -570,20 +605,24 @@ setupGammaCorrection(png_struct * const png_ptr,
static bool
@ -357,7 +367,7 @@ Fix build with png-1.5.
foundGray = TRUE;
}
}
@@ -604,14 +643,16 @@ setupSignificantBits(png_struct * const png_ptr
@@ -611,14 +650,16 @@ setupSignificantBits(png_struct * const png_ptr
Return the result as *maxvalP.
-----------------------------------------------------------------------------*/
@ -378,7 +388,7 @@ Fix build with png-1.5.
/* Use same maxval as PNG transparency palette for simplicity*/
*maxvalP = 255;
else
@@ -621,7 +662,7 @@ setupSignificantBits(png_struct * const png_ptr
@@ -628,7 +669,7 @@ setupSignificantBits(png_struct * const png_ptr
/* Use same maxval as PNG palette for simplicity */
*maxvalP = 255;
} else {
@ -387,7 +397,7 @@ Fix build with png-1.5.
}
/* sBIT handling is very tricky. If we are extracting only the
@@ -634,20 +675,26 @@ setupSignificantBits(png_struct * const png_ptr
@@ -641,20 +682,26 @@ setupSignificantBits(png_struct * const png_ptr
is used
*/
@ -421,7 +431,7 @@ Fix build with png-1.5.
trans_mix = FALSE;
break;
}
@@ -658,70 +705,76 @@ setupSignificantBits(png_struct * const png_ptr
@@ -665,70 +712,76 @@ setupSignificantBits(png_struct * const png_ptr
/* else fall though to normal case */
case ALPHA_NONE:
@ -533,7 +543,7 @@ Fix build with png-1.5.
}
break;
@@ -732,22 +785,28 @@ setupSignificantBits(png_struct * const png_ptr
@@ -739,22 +792,28 @@ setupSignificantBits(png_struct * const png_ptr
static bool
@ -568,7 +578,7 @@ Fix build with png-1.5.
foundColor = TRUE;
}
retval = foundColor;
@@ -760,14 +819,15 @@ imageHasColor(png_info * const info_ptr) {
@@ -767,14 +826,15 @@ imageHasColor(png_info * const info_ptr) {
static void
@ -586,7 +596,7 @@ Fix build with png-1.5.
*pnmTypeP = PPM_TYPE;
else {
if (maxval > 1)
@@ -780,7 +840,8 @@ determineOutputType(png_info * const info_ptr
@@ -787,7 +847,8 @@ determineOutputType(png_info * const info_ptr
static void
@ -596,7 +606,7 @@ Fix build with png-1.5.
const char * const requestedColor,
float const totalgamma,
xelval const maxval,
@@ -791,6 +852,8 @@ getBackgroundColor(png_info * const info_ptr,
@@ -798,6 +859,8 @@ getBackgroundColor(png_info * const info_ptr,
Otherwise, if the PNG specifies a background color, that's the one.
And otherwise, it's white.
-----------------------------------------------------------------------------*/
@ -605,7 +615,7 @@ Fix build with png-1.5.
if (requestedColor) {
/* Background was specified from the command-line; we always
use that. I chose to do no gamma-correction in this case;
@@ -802,27 +865,32 @@ getBackgroundColor(png_info * const info_ptr,
@@ -809,27 +872,32 @@ getBackgroundColor(png_info * const info_ptr,
bgColorP->g = PPM_GETG(backcolor);
bgColorP->b = PPM_GETB(backcolor);
@ -647,7 +657,7 @@ Fix build with png-1.5.
bgColorP->r = gamma_correct(rawBgcolor.red, totalgamma);
bgColorP->g = gamma_correct(rawBgcolor.green, totalgamma);
@@ -841,6 +909,7 @@ static void
@@ -848,6 +916,7 @@ static void
writePnm(FILE * const ofP,
xelval const maxval,
int const pnm_type,
@ -655,7 +665,7 @@ Fix build with png-1.5.
png_info * const info_ptr,
png_byte ** const png_image,
pngcolor const bgColor,
@@ -858,6 +927,7 @@ writePnm(FILE * const ofP,
@@ -865,6 +934,7 @@ writePnm(FILE * const ofP,
-----------------------------------------------------------------------------*/
xel * xelrow;
unsigned int row;
@ -663,7 +673,7 @@ Fix build with png-1.5.
if (verbose)
pm_message ("writing a %s file (maxval=%u)",
@@ -867,27 +937,35 @@ writePnm(FILE * const ofP,
@@ -874,27 +944,35 @@ writePnm(FILE * const ofP,
"UNKNOWN!",
maxval);
@ -711,7 +721,7 @@ Fix build with png-1.5.
}
break;
@@ -902,19 +980,31 @@ writePnm(FILE * const ofP,
@@ -909,19 +987,31 @@ writePnm(FILE * const ofP,
break;
case PNG_COLOR_TYPE_PALETTE: {
@ -753,7 +763,7 @@ Fix build with png-1.5.
}
break;
@@ -925,8 +1015,8 @@ writePnm(FILE * const ofP,
@@ -932,8 +1022,8 @@ writePnm(FILE * const ofP,
fgColor.g = get_png_val(png_pixelP);
fgColor.b = get_png_val(png_pixelP);
setXel(&xelrow[col], fgColor, bgColor, alpha_handling,
@ -764,7 +774,7 @@ Fix build with png-1.5.
}
break;
@@ -943,10 +1033,10 @@ writePnm(FILE * const ofP,
@@ -950,10 +1040,10 @@ writePnm(FILE * const ofP,
break;
default:
@ -777,7 +787,7 @@ Fix build with png-1.5.
}
pnm_freerow (xelrow);
}
@@ -967,6 +1057,7 @@ convertpng(FILE * const ifp,
@@ -974,6 +1064,7 @@ convertpng(FILE * const ifp,
int pnm_type;
pngcolor bgColor;
float totalgamma;
@ -785,7 +795,7 @@ Fix build with png-1.5.
*errorlevelP = 0;
@@ -989,28 +1080,28 @@ convertpng(FILE * const ifp,
@@ -996,28 +1087,28 @@ convertpng(FILE * const ifp,
png_set_sig_bytes (png_ptr, SIG_CHECK_SIZE);
png_read_info (png_ptr, info_ptr);
@ -822,7 +832,7 @@ Fix build with png-1.5.
png_image[y] = malloc (linesize);
if (png_image[y] == NULL) {
for (x = 0 ; x < y ; x++)
@@ -1022,7 +1113,7 @@ convertpng(FILE * const ifp,
@@ -1029,7 +1120,7 @@ convertpng(FILE * const ifp,
}
}
@ -831,7 +841,7 @@ Fix build with png-1.5.
png_set_packing (png_ptr);
setupGammaCorrection(png_ptr, info_ptr, cmdline.gamma, &totalgamma);
@@ -1030,8 +1121,8 @@ convertpng(FILE * const ifp,
@@ -1037,8 +1128,8 @@ convertpng(FILE * const ifp,
setupSignificantBits(png_ptr, info_ptr, cmdline.alpha,
&maxval, errorlevelP);
@ -842,7 +852,7 @@ Fix build with png-1.5.
png_read_image (png_ptr, png_image);
png_read_end (png_ptr, info_ptr);
@@ -1041,16 +1132,17 @@ convertpng(FILE * const ifp,
@@ -1048,16 +1139,17 @@ convertpng(FILE * const ifp,
completes. That's because it comes from chunks that are at the
end of the stream.
*/
@ -865,7 +875,7 @@ Fix build with png-1.5.
if (r != 1.0) {
pm_message ("warning - non-square pixels; "
"to fix do a 'pamscale -%cscale %g'",
@@ -1060,13 +1152,13 @@ convertpng(FILE * const ifp,
@@ -1067,13 +1159,13 @@ convertpng(FILE * const ifp,
}
}

View File

@ -1,9 +1,9 @@
$OpenBSD: patch-converter_other_pnmtopng_c,v 1.1 2011/07/08 20:36:09 naddy Exp $
$OpenBSD: patch-converter_other_pnmtopng_c,v 1.2 2011/12/13 21:39:17 naddy Exp $
Fix build with png-1.5.
--- converter/other/pnmtopng.c.orig Fri Dec 10 11:19:40 2010
+++ converter/other/pnmtopng.c Mon Jul 4 14:21:23 2011
--- converter/other/pnmtopng.c.orig Sun Sep 25 20:51:44 2011
+++ converter/other/pnmtopng.c Tue Dec 13 22:22:04 2011
@@ -61,7 +61,8 @@
#include <assert.h>
#include <string.h> /* strcat() */
@ -28,7 +28,7 @@ Fix build with png-1.5.
struct zlibCompression {
/* These are parameters that describe a form of zlib compression.
Values have the same meaning as the similarly named arguments to
@@ -2079,6 +2073,7 @@ makePngLine(png_byte * const line,
@@ -2098,6 +2092,7 @@ makePngLine(png_byte * const line,
gray * const alpha_mask,
colorhash_table const cht,
coloralphahash_table const caht,
@ -36,7 +36,7 @@ Fix build with png-1.5.
png_info * const info_ptr,
xelval const png_maxval,
unsigned int const depth) {
@@ -2091,20 +2086,20 @@ makePngLine(png_byte * const line,
@@ -2110,20 +2105,20 @@ makePngLine(png_byte * const line,
xel p_png;
xel const p = xelrow[col];
PPM_DEPTH(p_png, p, maxval, png_maxval);
@ -62,7 +62,7 @@ Fix build with png-1.5.
if (depth == 16)
*pp++ = PPM_GETR(p_png) >> 8;
*pp++ = PPM_GETR(p_png) & 0xff;
@@ -2117,7 +2112,7 @@ makePngLine(png_byte * const line,
@@ -2136,7 +2131,7 @@ makePngLine(png_byte * const line,
} else
pm_error("INTERNAL ERROR: undefined color_type");
@ -71,7 +71,7 @@ Fix build with png-1.5.
int const png_alphaval = (int)
alpha_mask[col] * (float) png_maxval / maxval + 0.5;
if (depth == 16)
@@ -2174,7 +2169,7 @@ writeRaster(png_struct * const png_ptr,
@@ -2193,7 +2188,7 @@ writeRaster(png_struct * const png_ptr,
makePngLine(line, xelrow, cols, maxval,
alpha, alpha ? alpha_mask[row] : NULL,
@ -80,7 +80,7 @@ Fix build with png-1.5.
png_write_row(png_ptr, line);
}
@@ -2186,12 +2181,12 @@ writeRaster(png_struct * const png_ptr,
@@ -2205,12 +2200,12 @@ writeRaster(png_struct * const png_ptr,
static void
doGamaChunk(struct cmdlineInfo const cmdline,
@ -95,7 +95,7 @@ Fix build with png-1.5.
}
}
@@ -2199,20 +2194,15 @@ doGamaChunk(struct cmdlineInfo const cmdline,
@@ -2218,20 +2213,15 @@ doGamaChunk(struct cmdlineInfo const cmdline,
static void
doChrmChunk(struct cmdlineInfo const cmdline,
@ -121,7 +121,7 @@ Fix build with png-1.5.
}
}
@@ -2220,15 +2210,12 @@ doChrmChunk(struct cmdlineInfo const cmdline,
@@ -2239,15 +2229,12 @@ doChrmChunk(struct cmdlineInfo const cmdline,
static void
doPhysChunk(struct cmdlineInfo const cmdline,
@ -139,7 +139,7 @@ Fix build with png-1.5.
}
}
@@ -2237,26 +2224,28 @@ doPhysChunk(struct cmdlineInfo const cmdline,
@@ -2256,26 +2243,28 @@ doPhysChunk(struct cmdlineInfo const cmdline,
static void
doTimeChunk(struct cmdlineInfo const cmdline,
@ -173,7 +173,7 @@ Fix build with png-1.5.
(pngMaxval > maxval || (alpha && pngMaxval > alphaMaxval))) {
/* We're writing in a bit depth that doesn't match the maxval
@@ -2275,27 +2264,29 @@ doSbitChunk(png_info * const pngInfoP,
@@ -2294,27 +2283,29 @@ doSbitChunk(png_info * const pngInfoP,
sBIT chunk.
*/
@ -216,7 +216,7 @@ Fix build with png-1.5.
}
}
@@ -2391,6 +2382,8 @@ convertpnm(struct cmdlineInfo const cmdline,
@@ -2410,6 +2401,8 @@ convertpnm(struct cmdlineInfo const cmdline,
xelval maxmaxval;
gray ** alpha_mask;
@ -225,7 +225,7 @@ Fix build with png-1.5.
/* these guys are initialized to quiet compiler warnings: */
maxmaxval = 255;
alpha_mask = NULL;
@@ -2576,43 +2569,42 @@ convertpnm(struct cmdlineInfo const cmdline,
@@ -2595,43 +2588,42 @@ convertpnm(struct cmdlineInfo const cmdline,
pm_error ("setjmp returns error condition (2)");
}
@ -291,7 +291,7 @@ Fix build with png-1.5.
}
/* creating hIST chunk */
if (cmdline.hist) {
@@ -2638,18 +2630,17 @@ convertpnm(struct cmdlineInfo const cmdline,
@@ -2657,18 +2649,17 @@ convertpnm(struct cmdlineInfo const cmdline,
ppm_freecolorhash(cht);
@ -316,7 +316,7 @@ Fix build with png-1.5.
}
} else {
/* This is PNG_COLOR_MASK_ALPHA. Transparency will be handled
@@ -2657,43 +2648,49 @@ convertpnm(struct cmdlineInfo const cmdline,
@@ -2676,43 +2667,49 @@ convertpnm(struct cmdlineInfo const cmdline,
*/
}
if (verbose) {
@ -384,7 +384,7 @@ Fix build with png-1.5.
if (cmdline.filterSet != 0)
png_set_filter(png_ptr, 0, cmdline.filterSet);
@@ -2703,6 +2700,7 @@ convertpnm(struct cmdlineInfo const cmdline,
@@ -2722,6 +2719,7 @@ convertpnm(struct cmdlineInfo const cmdline,
/* write the png-info struct */
png_write_info(png_ptr, info_ptr);
@ -392,7 +392,7 @@ Fix build with png-1.5.
if (cmdline.text || cmdline.ztxt)
/* prevent from being written twice with png_write_end */
info_ptr->num_text = 0;
@@ -2710,6 +2708,7 @@ convertpnm(struct cmdlineInfo const cmdline,
@@ -2729,6 +2727,7 @@ convertpnm(struct cmdlineInfo const cmdline,
if (cmdline.modtime)
/* prevent from being written twice with png_write_end */
info_ptr->valid &= ~PNG_INFO_tIME;