diff options
author | dholland <dholland@pkgsrc.org> | 2011-08-01 01:16:50 +0000 |
---|---|---|
committer | dholland <dholland@pkgsrc.org> | 2011-08-01 01:16:50 +0000 |
commit | c5aa6e15000953e4cf2d88a1b0a07d01847417ee (patch) | |
tree | 567cc2634f597b24a2a7190740c23befe2d36bf6 /chat | |
parent | 6b8cd7d3943b3bd7cef39e4082013c48856d4d8f (diff) | |
download | pkgsrc-c5aa6e15000953e4cf2d88a1b0a07d01847417ee.tar.gz |
Fix build with png-1.5, fully now. Also add various REPLACE_INTERPRETER
and add a dependency on Python for the two installed Python scripts. No
version bump since this hasn't been buildable in a long time.
Diffstat (limited to 'chat')
-rw-r--r-- | chat/amsn/Makefile | 12 | ||||
-rw-r--r-- | chat/amsn/distinfo | 4 | ||||
-rw-r--r-- | chat/amsn/patches/patch-utils_TkCximage_src_CxImage_ximapng.cpp | 93 |
3 files changed, 96 insertions, 13 deletions
diff --git a/chat/amsn/Makefile b/chat/amsn/Makefile index 82c280873a6..392cca0dca8 100644 --- a/chat/amsn/Makefile +++ b/chat/amsn/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.20 2011/04/03 22:10:35 zafer Exp $ +# $NetBSD: Makefile,v 1.21 2011/08/01 01:16:50 dholland Exp $ # DISTNAME= amsn-0.98.3 @@ -22,6 +22,13 @@ REPLACE_INTERPRETER+= WISH REPLACE.WISH.old= .*wish REPLACE.WISH.new= ${PREFIX}/bin/wish REPLACE_FILES.WISH= amsn-remote +REPLACE_FILES.WISH+= skins/Dark\ Matter\ 4.0/pixmapscroll/test.tcl +REPLACE_FILES.WISH+= skins/Oxygen/pixmapscroll/test.tcl +REPLACE_FILES.WISH+= utils/linux/capture/test.tcl +REPLACE_FILES.WISH+= utils/pixmapbutton/test.tcl +REPLACE_FILES.WISH+= utils/pixmapprogbar/test.tcl +REPLACE_FILES.WISH+= utils/pixmapscroll/test.tcl +REPLACE_FILES.WISH+= utils/voipcontrols/test.tcl REPLACE_INTERPRETER+= TCLSH REPLACE.TCLSH.old= .*tclsh @@ -40,12 +47,15 @@ REPLACE_BASH+= plugins/music/infompris REPLACE_BASH+= plugins/music/inforhythmbox REPLACE_BASH+= plugins/music/infospotify REPLACE_BASH+= plugins/music/infovlc +REPLACE_PYTHON+= plugins/music/infosongbird +REPLACE_PYTHON+= lang/missing.py USE_TOOLS+= perl:run bash:run USE_TOOLS+= gmake CHECK_PORTABILITY_SKIP= utils/macosx/finishbuild.sh +.include "../../lang/python/application.mk" .include "../../security/tcl-tls/buildlink3.mk" .include "../../lang/tcl/buildlink3.mk" .include "../../x11/tk/buildlink3.mk" diff --git a/chat/amsn/distinfo b/chat/amsn/distinfo index a58874769d5..45d139ed212 100644 --- a/chat/amsn/distinfo +++ b/chat/amsn/distinfo @@ -1,8 +1,8 @@ -$NetBSD: distinfo,v 1.8 2011/08/01 00:43:58 dholland Exp $ +$NetBSD: distinfo,v 1.9 2011/08/01 01:16:50 dholland Exp $ SHA1 (amsn-0.98.3-src.tar.bz2) = aa8383a11ce66352aceee27f9c291c1410b3403d RMD160 (amsn-0.98.3-src.tar.bz2) = 20f707062da4a5ab1eb6beec49d01dfd2ba90a99 Size (amsn-0.98.3-src.tar.bz2) = 13275477 bytes SHA1 (patch-configure) = ddbd6a9616683c44202a551d734b2c9b10b2e05b -SHA1 (patch-utils_TkCximage_src_CxImage_ximapng.cpp) = 2dfad18af89fb7f5ec4e316bfc35f6ed40377e10 +SHA1 (patch-utils_TkCximage_src_CxImage_ximapng.cpp) = 823904f7b17aff6034339e7873135edb7362b489 SHA1 (patch-utils_TkCximage_src_CxImage_ximapng.h) = 1d7a1cc0acd397629a0e6b1f83f9fdf943fb6d8a diff --git a/chat/amsn/patches/patch-utils_TkCximage_src_CxImage_ximapng.cpp b/chat/amsn/patches/patch-utils_TkCximage_src_CxImage_ximapng.cpp index ef87f297fc9..e25e6d1a637 100644 --- a/chat/amsn/patches/patch-utils_TkCximage_src_CxImage_ximapng.cpp +++ b/chat/amsn/patches/patch-utils_TkCximage_src_CxImage_ximapng.cpp @@ -1,4 +1,4 @@ -$NetBSD: patch-utils_TkCximage_src_CxImage_ximapng.cpp,v 1.2 2011/08/01 00:43:58 dholland Exp $ +$NetBSD: patch-utils_TkCximage_src_CxImage_ximapng.cpp,v 1.3 2011/08/01 01:16:50 dholland Exp $ Fix build with png-1.5. @@ -268,16 +268,18 @@ Fix build with png-1.5. cx_try { -@@ -362,7 +368,7 @@ bool CxImagePNG::Encode(CxFile *hFile) +@@ -362,9 +368,8 @@ bool CxImagePNG::Encode(CxFile *hFile) /* Set error handling. REQUIRED if you aren't supplying your own * error hadnling functions in the png_create_write_struct() call. */ - if (setjmp(png_ptr->jmpbuf)){ + if (setjmp(png_jmpbuf(png_ptr))){ /* If we get here, we had a problem reading the file */ - if (info_ptr->palette) free(info_ptr->palette); +- if (info_ptr->palette) free(info_ptr->palette); png_destroy_write_struct(&png_ptr, (png_infopp)&info_ptr); -@@ -376,20 +382,18 @@ bool CxImagePNG::Encode(CxFile *hFile) + cx_throw("Error saving PNG file"); + } +@@ -376,20 +381,18 @@ bool CxImagePNG::Encode(CxFile *hFile) png_set_write_fn(png_ptr,hFile,/*(png_rw_ptr)*/user_write_data,/*(png_flush_ptr)*/user_flush_data); /* set the file information here */ @@ -305,7 +307,7 @@ Fix build with png-1.5. } /* set compression level */ -@@ -399,19 +403,19 @@ bool CxImagePNG::Encode(CxFile *hFile) +@@ -399,19 +402,19 @@ bool CxImagePNG::Encode(CxFile *hFile) if (GetNumColors()){ if (bGrayScale){ @@ -332,7 +334,7 @@ Fix build with png-1.5. } #endif -@@ -428,8 +432,8 @@ bool CxImagePNG::Encode(CxFile *hFile) +@@ -428,29 +431,21 @@ bool CxImagePNG::Encode(CxFile *hFile) /* set metrics */ png_set_pHYs(png_ptr, info_ptr, head.biXPelsPerMeter, head.biYPelsPerMeter, PNG_RESOLUTION_METER); @@ -343,7 +345,47 @@ Fix build with png-1.5. PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); //<DP> simple transparency -@@ -469,13 +473,7 @@ bool CxImagePNG::Encode(CxFile *hFile) + if (info.nBkgndIndex >= 0){ +- info_ptr->num_trans = 1; +- info_ptr->valid |= PNG_INFO_tRNS; +-#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4 +- info_ptr->trans_alpha = trans; +- info_ptr->trans_color.index = (BYTE)info.nBkgndIndex; +- info_ptr->trans_color.red = tc.rgbRed; +- info_ptr->trans_color.green = tc.rgbGreen; +- info_ptr->trans_color.blue = tc.rgbBlue; +- info_ptr->trans_color.gray = info_ptr->trans_color.index; +-#else +- info_ptr->trans = trans; +- info_ptr->trans_values.index = (BYTE)info.nBkgndIndex; +- info_ptr->trans_values.red = tc.rgbRed; +- info_ptr->trans_values.green = tc.rgbGreen; +- info_ptr->trans_values.blue = tc.rgbBlue; +- info_ptr->trans_values.gray = info_ptr->trans_values.index; +-#endif ++ png_color_16 trans_color; ++ ++ trans_color.index = (BYTE)info.nBkgndIndex; ++ trans_color.red = tc.rgbRed; ++ trans_color.green = tc.rgbGreen; ++ trans_color.blue = tc.rgbBlue; ++ trans_color.gray = (BYTE)info.nBkgndIndex; ++ ++ png_set_tRNS(png_ptr, info_ptr, trans, 1, &trans_color); + + // the transparency indexes start from 0 for non grayscale palette + if (!bGrayScale && head.biClrUsed && info.nBkgndIndex) +@@ -459,30 +454,27 @@ bool CxImagePNG::Encode(CxFile *hFile) + + /* set the palette if there is one */ + if (GetPalette()){ +- if (!bGrayScale){ +- info_ptr->valid |= PNG_INFO_PLTE; +- } +- + int nc = GetClrImportant(); + if (nc==0) nc = GetNumColors(); + if (info.bAlphaPaletteEnabled){ for(WORD ip=0; ip<nc;ip++) trans[ip]=GetPaletteColor((BYTE)ip).rgbReserved; @@ -358,7 +400,25 @@ Fix build with png-1.5. } // copy the palette colors -@@ -496,8 +494,8 @@ bool CxImagePNG::Encode(CxFile *hFile) +- info_ptr->palette = new png_color[nc]; +- info_ptr->num_palette = (png_uint_16) nc; +- for (int i=0; i<nc; i++) +- GetPaletteColor(i, &info_ptr->palette[i].red, &info_ptr->palette[i].green, &info_ptr->palette[i].blue); ++ if (!bGrayScale) { ++ png_color *palette; ++ ++ palette = (png_color *)png_malloc(png_ptr, nc*sizeof(palette[0])); ++ for (int i=0; i<nc; i++) ++ GetPaletteColor(i, &palette[i].red, &palette[i].green, &palette[i].blue); ++ png_set_PLTE(png_ptr, info_ptr, palette, nc); ++ png_data_freer(png_ptr, info_ptr, ++ PNG_DESTROY_WILL_FREE_DATA, ++ PNG_FREE_PLTE); ++ } + } + + #if CXIMAGE_SUPPORT_ALPHA // <vho> +@@ -496,8 +488,8 @@ bool CxImagePNG::Encode(CxFile *hFile) } } } #endif // CXIMAGE_SUPPORT_ALPHA // <vho> @@ -369,7 +429,7 @@ Fix build with png-1.5. BYTE *row_pointers = new BYTE[row_size]; /* write the file information */ -@@ -515,7 +513,7 @@ bool CxImagePNG::Encode(CxFile *hFile) +@@ -515,7 +507,7 @@ bool CxImagePNG::Encode(CxFile *hFile) if (AlphaIsValid()){ for (long ax=head.biWidth-1; ax>=0;ax--){ c = BlindGetPixelColor(ax,ay); @@ -378,7 +438,7 @@ Fix build with png-1.5. if (!bGrayScale){ row_pointers[px++]=c.rgbRed; row_pointers[px++]=c.rgbGreen; -@@ -530,7 +528,7 @@ bool CxImagePNG::Encode(CxFile *hFile) +@@ -530,7 +522,7 @@ bool CxImagePNG::Encode(CxFile *hFile) #endif //CXIMAGE_SUPPORT_ALPHA // <vho> { iter.GetRow(row_pointers, row_size); @@ -387,3 +447,16 @@ Fix build with png-1.5. RGBtoBGR(row_pointers, row_size); png_write_row(png_ptr, row_pointers); } +@@ -547,12 +539,6 @@ bool CxImagePNG::Encode(CxFile *hFile) + /* It is REQUIRED to call this to finish writing the rest of the file */ + png_write_end(png_ptr, info_ptr); + +- /* if you malloced the palette, free it here */ +- if (info_ptr->palette){ +- delete [] (info_ptr->palette); +- info_ptr->palette = NULL; +- } +- + /* clean up after the write, and free any memory allocated */ + png_destroy_write_struct(&png_ptr, (png_infopp)&info_ptr); + |