diff options
author | adam <adam@pkgsrc.org> | 2011-01-29 16:30:41 +0000 |
---|---|---|
committer | adam <adam@pkgsrc.org> | 2011-01-29 16:30:41 +0000 |
commit | 1f2fc73d90648bab99f9aadc446b4e85ed825187 (patch) | |
tree | ba96b37cce4a6864485d6a918b868b6205b3702f /graphics/enblend-enfuse | |
parent | db05f75625d408c5dc29d5bff3253bd8f625141b (diff) | |
download | pkgsrc-1f2fc73d90648bab99f9aadc446b4e85ed825187.tar.gz |
Fix building with libpng-1.5
Diffstat (limited to 'graphics/enblend-enfuse')
-rw-r--r-- | graphics/enblend-enfuse/distinfo | 4 | ||||
-rw-r--r-- | graphics/enblend-enfuse/patches/patch-ae | 211 |
2 files changed, 209 insertions, 6 deletions
diff --git a/graphics/enblend-enfuse/distinfo b/graphics/enblend-enfuse/distinfo index 16bc16b1edb..c37fb955d01 100644 --- a/graphics/enblend-enfuse/distinfo +++ b/graphics/enblend-enfuse/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.6 2010/12/14 18:26:34 adam Exp $ +$NetBSD: distinfo,v 1.7 2011/01/29 16:30:41 adam Exp $ SHA1 (enblend-enfuse-4.0/enblend-enfuse-4.0.tar.gz) = 34c3a5ce11c6ef0ef520d8a15a3cb6a94a567033 RMD160 (enblend-enfuse-4.0/enblend-enfuse-4.0.tar.gz) = 9e531b5bf6f7258ef8778c01b456979e0bc04338 @@ -7,6 +7,6 @@ SHA1 (patch-aa) = b1809fe6ef6609658b697635c6cbf0c112a03fd1 SHA1 (patch-ab) = afc074bb94e2a2b96c654c37540072514ba0bce0 SHA1 (patch-ac) = 916f4655ff30013583014eb8deecc72bd19ae55d SHA1 (patch-ad) = 735b9bb01a8a76ec3dc4a13cece4d79681c2d951 -SHA1 (patch-ae) = d16fc0157c9796bfc63bc434cc627dcf99669d6f +SHA1 (patch-ae) = 7dc598bd9a2eda75e762c46b2aebc4004de6a817 SHA1 (patch-af) = a32710958e30000fe75ecd436071306ea4b1844c SHA1 (patch-ag) = 6ef31f8b5ce54883e636adf23b4ea615ae9c752d diff --git a/graphics/enblend-enfuse/patches/patch-ae b/graphics/enblend-enfuse/patches/patch-ae index c083c9fd80d..53e9d07a99c 100644 --- a/graphics/enblend-enfuse/patches/patch-ae +++ b/graphics/enblend-enfuse/patches/patch-ae @@ -1,15 +1,218 @@ -$NetBSD: patch-ae,v 1.1 2010/06/13 22:44:29 wiz Exp $ +$NetBSD: patch-ae,v 1.2 2011/01/29 16:30:41 adam Exp $ ---- src/vigra_impex/png.cxx.orig 2009-12-20 15:32:28.000000000 +0000 +--- src/vigra_impex/png.cxx.orig 2011-01-29 14:59:12.000000000 +0000 +++ src/vigra_impex/png.cxx -@@ -274,8 +274,8 @@ namespace vigra { +@@ -81,7 +81,11 @@ extern "C" { + static void PngError( png_structp png_ptr, png_const_charp error_msg ) + { + png_error_message = std::string(error_msg); ++#if (PNG_LIBPNG_VER < 10500) + longjmp( png_ptr->jmpbuf, 1 ); ++#else ++ png_longjmp( png_ptr, 1 ); ++#endif + } + + // called on non-fatal errors +@@ -213,7 +217,7 @@ namespace vigra { + vigra_postcondition( png != 0, "could not create the read struct." ); + + // create info struct +- if (setjmp(png->jmpbuf)) { ++ if (setjmp(png_jmpbuf(png))) { + png_destroy_read_struct( &png, &info, NULL ); + vigra_postcondition( false, png_error_message.insert(0, "error in png_create_info_struct(): ").c_str() ); + } +@@ -221,14 +225,14 @@ namespace vigra { + vigra_postcondition( info != 0, "could not create the info struct." ); + + // init png i/o +- if (setjmp(png->jmpbuf)) { ++ if (setjmp(png_jmpbuf(png))) { + png_destroy_read_struct( &png, &info, NULL ); + vigra_postcondition( false, png_error_message.insert(0, "error in png_init_io(): ").c_str() ); + } + png_init_io( png, file.get() ); + + // specify that the signature was already read +- if (setjmp(png->jmpbuf)) { ++ if (setjmp(png_jmpbuf(png))) { + png_destroy_read_struct( &png, &info, NULL ); + vigra_postcondition( false, png_error_message.insert(0, "error in png_set_sig_bytes(): ").c_str() ); + } +@@ -244,13 +248,13 @@ namespace vigra { + void PngDecoderImpl::init() + { + // read all chunks up to the image data +- if (setjmp(png->jmpbuf)) ++ if (setjmp(png_jmpbuf(png))) + vigra_postcondition( false, png_error_message.insert(0, "error in png_read_info(): ").c_str() ); + png_read_info( png, info ); + + // pull over the header fields + int interlace_method, compression_method, filter_method; +- if (setjmp(png->jmpbuf)) ++ if (setjmp(png_jmpbuf(png))) + vigra_postcondition( false, png_error_message.insert(0, "error in png_get_IHDR(): ").c_str() ); + png_get_IHDR( png, info, &width, &height, &bit_depth, &color_type, + &interlace_method, &compression_method, &filter_method ); +@@ -264,7 +268,7 @@ namespace vigra { + + // transform palette to rgb + if ( color_type == PNG_COLOR_TYPE_PALETTE) { +- if (setjmp(png->jmpbuf)) ++ if (setjmp(png_jmpbuf(png))) + vigra_postcondition( false, png_error_message.insert(0, "error in png_palette_to_rgb(): ").c_str() ); + png_set_palette_to_rgb(png); + color_type = PNG_COLOR_TYPE_RGB; +@@ -273,9 +277,9 @@ namespace vigra { + // expand gray values to at least one byte size if ( color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8 ) { - if (setjmp(png->jmpbuf)) +- if (setjmp(png->jmpbuf)) - vigra_postcondition( false,png_error_message.insert(0, "error in png_set_gray_1_2_4_to_8(): ").c_str()); - png_set_gray_1_2_4_to_8(png); ++ if (setjmp(png_jmpbuf(png))) + vigra_postcondition( false,png_error_message.insert(0, "error in png_set_expand_gray_1_2_4_to_8(): ").c_str()); + png_set_expand_gray_1_2_4_to_8(png); bit_depth = 8; } +@@ -283,7 +287,7 @@ namespace vigra { + #if 0 + // strip alpha channel + if ( color_type & PNG_COLOR_MASK_ALPHA ) { +- if (setjmp(png->jmpbuf)) ++ if (setjmp(png_jmpbuf(png))) + vigra_postcondition( false, png_error_message.insert(0, "error in png_set_strip_alpha(): ").c_str() ); + png_set_strip_alpha(png); + color_type ^= PNG_COLOR_MASK_ALPHA; +@@ -325,9 +329,9 @@ namespace vigra { + #if (PNG_LIBPNG_VER > 10008) && defined(PNG_READ_iCCP_SUPPORTED) + char * dummyName; + int dummyCompType; +- char * profilePtr; ++ png_byte * profilePtr; + png_uint_32 profileLen; +- if (info->valid & PNG_INFO_iCCP) { ++ if (png_get_valid(png, info, PNG_INFO_iCCP)) { + png_get_iCCP(png, info, &dummyName, &dummyCompType, &profilePtr, &profileLen) ; + iccProfilePtr = (unsigned char *) profilePtr; + iccProfileLength = profileLen; +@@ -340,7 +344,7 @@ namespace vigra { + // image gamma + double image_gamma = 0.45455; + if ( png_get_valid( png, info, PNG_INFO_gAMA ) ) { +- if (setjmp(png->jmpbuf)) ++ if (setjmp(png_jmpbuf(png))) + vigra_postcondition( false, png_error_message.insert(0, "error in png_get_gAMA(): ").c_str() ); + png_get_gAMA( png, info, &image_gamma ); + } +@@ -349,26 +353,26 @@ namespace vigra { + double screen_gamma = 2.2; + + // set gamma correction +- if (setjmp(png->jmpbuf)) ++ if (setjmp(png_jmpbuf(png))) + vigra_postcondition( false, png_error_message.insert(0, "error in png_set_gamma(): ").c_str() ); + png_set_gamma( png, screen_gamma, image_gamma ); + #endif + + // interlace handling, get number of read passes needed +- if (setjmp(png->jmpbuf)) ++ if (setjmp(png_jmpbuf(png))) + vigra_postcondition( false,png_error_message.insert(0, "error in png_set_interlace_handling(): ").c_str()); + n_interlace_passes = png_set_interlace_handling(png); + + // update png library state to reflect any changes that were made +- if (setjmp(png->jmpbuf)) ++ if (setjmp(png_jmpbuf(png))) + vigra_postcondition( false, png_error_message.insert(0, "error in png_read_update_info(): ").c_str() ); + png_read_update_info( png, info ); + +- if (setjmp(png->jmpbuf)) ++ if (setjmp(png_jmpbuf(png))) + vigra_postcondition( false,png_error_message.insert(0, "error in png_get_channels(): ").c_str()); + n_channels = png_get_channels(png, info); + +- if (setjmp(png->jmpbuf)) ++ if (setjmp(png_jmpbuf(png))) + vigra_postcondition( false,png_error_message.insert(0, "error in png_get_rowbytes(): ").c_str()); + rowsize = png_get_rowbytes(png, info); + +@@ -379,7 +383,7 @@ namespace vigra { + void PngDecoderImpl::nextScanline() + { + for (int i=0; i < n_interlace_passes; i++) { +- if (setjmp(png->jmpbuf)) ++ if (setjmp(png_jmpbuf(png))) + vigra_postcondition( false,png_error_message.insert(0, "error in png_read_row(): ").c_str()); + png_read_row(png, row_data.begin(), NULL); + } +@@ -545,7 +549,7 @@ namespace vigra { + vigra_postcondition( png != 0, "could not create the write struct." ); + + // create info struct +- if (setjmp(png->jmpbuf)) { ++ if (setjmp(png_jmpbuf(png))) { + png_destroy_write_struct( &png, &info ); + vigra_postcondition( false, png_error_message.insert(0, "error in png_info_struct(): ").c_str() ); + } +@@ -556,7 +560,7 @@ namespace vigra { + } + + // init png i/o +- if (setjmp(png->jmpbuf)) { ++ if (setjmp(png_jmpbuf(png))) { + png_destroy_write_struct( &png, &info ); + vigra_postcondition( false, png_error_message.insert(0, "error in png_init_io(): ").c_str() ); + } +@@ -571,7 +575,7 @@ namespace vigra { + void PngEncoderImpl::finalize() + { + // write the IHDR +- if (setjmp(png->jmpbuf)) ++ if (setjmp(png_jmpbuf(png))) + vigra_postcondition( false, png_error_message.insert(0, "error in png_set_IHDR(): ").c_str() ); + png_set_IHDR( png, info, width, height, bit_depth, color_type, + PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, +@@ -579,7 +583,7 @@ namespace vigra { + + // set resolution + if (x_resolution > 0 && y_resolution > 0) { +- if (setjmp(png->jmpbuf)) ++ if (setjmp(png_jmpbuf(png))) + vigra_postcondition( false, png_error_message.insert(0, "error in png_set_pHYs(): ").c_str() ); + png_set_pHYs(png, info, (png_uint_32) (x_resolution / 0.0254 + 0.5), + (png_uint_32) (y_resolution / 0.0254 + 0.5), +@@ -588,7 +592,7 @@ namespace vigra { + + // set offset + if (position.x > 0 && position.y > 0) { +- if (setjmp(png->jmpbuf)) ++ if (setjmp(png_jmpbuf(png))) + vigra_postcondition( false, png_error_message.insert(0, "error in png_set_oFFs(): ").c_str() ); + png_set_oFFs(png, info, position.x, position.y, PNG_OFFSET_PIXEL); + } +@@ -597,7 +601,7 @@ namespace vigra { + // set icc profile + if (iccProfile.size() > 0) { + png_set_iCCP(png, info, "icc", 0, +- (char *)iccProfile.begin(), iccProfile.size()); ++ (png_bytep)iccProfile.begin(), iccProfile.size()); + } + #endif + +@@ -634,10 +638,10 @@ namespace vigra { + } + + // write the whole image +- if (setjmp(png->jmpbuf)) ++ if (setjmp(png_jmpbuf(png))) + vigra_postcondition( false, png_error_message.insert(0, "error in png_write_image(): ").c_str() ); + png_write_image( png, row_pointers.begin() ); +- if (setjmp(png->jmpbuf)) ++ if (setjmp(png_jmpbuf(png))) + vigra_postcondition( false, png_error_message.insert(0, "error in png_write_end(): ").c_str() ); + png_write_end(png, info); + } |