diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2011-09-15 18:22:38 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2011-09-15 18:22:38 +0000 |
commit | 4bc82c4bb5226900031cfa152fc982aa08dd4238 (patch) | |
tree | 7abbaa9b309a2c4064a2a9beb540427ce8a45556 /media-gfx/pngtools | |
parent | version bump (diff) | |
download | historical-4bc82c4bb5226900031cfa152fc982aa08dd4238.tar.gz historical-4bc82c4bb5226900031cfa152fc982aa08dd4238.tar.bz2 historical-4bc82c4bb5226900031cfa152fc982aa08dd4238.zip |
Bug #378169: fixes for libpng15.
Package-Manager: portage-2.2.0_alpha51/cvs/Linux x86_64
Diffstat (limited to 'media-gfx/pngtools')
-rw-r--r-- | media-gfx/pngtools/ChangeLog | 10 | ||||
-rw-r--r-- | media-gfx/pngtools/Manifest | 6 | ||||
-rw-r--r-- | media-gfx/pngtools/files/pngtools-0.4-libpng15-fixes.patch | 184 | ||||
-rw-r--r-- | media-gfx/pngtools/pngtools-0.4-r1.ebuild | 35 | ||||
-rw-r--r-- | media-gfx/pngtools/pngtools-0.4.ebuild | 7 |
5 files changed, 235 insertions, 7 deletions
diff --git a/media-gfx/pngtools/ChangeLog b/media-gfx/pngtools/ChangeLog index 96b34b8969fc..588893f15747 100644 --- a/media-gfx/pngtools/ChangeLog +++ b/media-gfx/pngtools/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for media-gfx/pngtools -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-gfx/pngtools/ChangeLog,v 1.8 2010/03/08 22:43:31 ssuominen Exp $ +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/media-gfx/pngtools/ChangeLog,v 1.9 2011/09/15 18:22:37 robbat2 Exp $ + +*pngtools-0.4-r1 (15 Sep 2011) + + 15 Sep 2011; Robin H. Johnson <robbat2@gentoo.org> +pngtools-0.4-r1.ebuild, + +files/pngtools-0.4-libpng15-fixes.patch: + Bug #378169: fixes for libpng15. 08 Mar 2010; Samuli Suominen <ssuominen@gentoo.org> pngtools-0.4.ebuild, +files/pngtools-0.4-libpng14.patch: diff --git a/media-gfx/pngtools/Manifest b/media-gfx/pngtools/Manifest index 45547bcd4fc0..5b334a3f9fe7 100644 --- a/media-gfx/pngtools/Manifest +++ b/media-gfx/pngtools/Manifest @@ -1,6 +1,8 @@ AUX pngtools-0.3-implicit-declarations.patch 1428 RMD160 90a59cff9af1251af6ba93be1c9c27aaeb2ba8de SHA1 2ea57d8b3b393942443e64bfed8f86be8dcb329e SHA256 7ef75837f24736cbba7f7130ba1e31178a70088d883d6581f86acf0fed79ee62 AUX pngtools-0.4-libpng14.patch 1265 RMD160 bc1e98bfcf752f876493e2d3ba655a37b9ff81e0 SHA1 6f0f89b072654b6e57b63118408778408c318ba7 SHA256 22c623fee58ffc1b2c8f90b12e27ec56b9001decc97935d4caf94f991f4e44ee +AUX pngtools-0.4-libpng15-fixes.patch 6396 RMD160 906fe93a8f9880856fafc7792350dc8263f1e525 SHA1 e71c2f0c537cd56f993ab2aa1f20d39f8f41f2bc SHA256 501a0b69ece22431b00995c4dbb7be22992c135a57e0c939ecfa05200d3052f7 DIST pngtools_0_4.tgz 1312178 RMD160 10553ce0f4ec956d8996c2325b6a9a741124ad54 SHA1 bc8b4953fbdf993f5837e2df510d2341e0ab7d54 SHA256 da0035d140c5efbc7d42d95a27327928d982866851c4c67bac58d32936075655 -EBUILD pngtools-0.4.ebuild 839 RMD160 db492775b2bafdcf99e122e0c92b0221a6bf5ff3 SHA1 2390b6a2ab16f1b4e45b111b4ff827df45c3fc21 SHA256 0166b77b40f043972c962e74623608bbaa787457a2c29f4879969d780ec5c08f -MISC ChangeLog 1452 RMD160 4c369779e6939f975b1fa2d1019434b1d181b5ea SHA1 ea98f2359db9fde0f84ec971497c65ff71e78a3d SHA256 35af86b4771dac37c719845a0c29254f4da041963368e56f253cc3bf1c45563d +EBUILD pngtools-0.4-r1.ebuild 912 RMD160 6bc0bbe87d5faafc7af8fabf6a1ddcd39e4f529d SHA1 809ded1480988a9cdf9e28b66ff6beb204283780 SHA256 57671b0ba67fd7d6f32f291898323b81518726c4c7fe17f1e37b0467e721147d +EBUILD pngtools-0.4.ebuild 854 RMD160 45a584a8a3e8167e189bb3e3459754c92149ce47 SHA1 4b6f2bdfffe67ae9f25ee54cc57d37ea0ef60e20 SHA256 e477189214598aff164f519730073453f1632ae0e2eb4c608161aba076c068d7 +MISC ChangeLog 1640 RMD160 b8de67f7f0ab9f96e99eb5c4e9554ee80b9043a8 SHA1 01a3d3d9777ba18843a82017301c1c305df45e82 SHA256 fd0c9d54d4a992c28526c384436c083b817f741ca6e7f0a0f70905a5bcfee994 MISC metadata.xml 224 RMD160 ccd6090ef80b519508172a0c24ea5ad88454b42b SHA1 1460973a0074ede59c646aed8e68d428f8c32988 SHA256 5fc722539b33aa476eae5643bf61f0b9aa31488da230655896b36fa2288acc55 diff --git a/media-gfx/pngtools/files/pngtools-0.4-libpng15-fixes.patch b/media-gfx/pngtools/files/pngtools-0.4-libpng15-fixes.patch new file mode 100644 index 000000000000..44965ab839af --- /dev/null +++ b/media-gfx/pngtools/files/pngtools-0.4-libpng15-fixes.patch @@ -0,0 +1,184 @@ +--- pngtools-0.4.orig/pnginfo.c 2008-11-27 01:14:17.000000000 +0200 ++++ pngtools-0.4.orig/pnginfo.c 2011-09-15 14:30:36.000000000 +0300 +@@ -187,18 +187,21 @@ + printf (" Image Width: %d Image Length: %d\n", width, height); + if(tiffnames == pnginfo_true){ + printf (" Bits/Sample: %d\n", bitdepth); +- printf (" Samples/Pixel: %d\n", info->channels); +- printf (" Pixel Depth: %d\n", info->pixel_depth); // Does this add value? ++ printf (" Samples/Pixel: %d\n", png_get_channels(png, info)); ++ printf (" Pixel Depth: %d\n", info->pixel_depth); // Does this add value? + } + else{ + printf (" Bitdepth (Bits/Sample): %d\n", bitdepth); +- printf (" Channels (Samples/Pixel): %d\n", info->channels); +- printf (" Pixel depth (Pixel Depth): %d\n", info->pixel_depth); // Does this add value? ++ printf (" Channels (Samples/Pixel): %d\n", png_get_channels(png, info)); ++ printf (" Pixel depth (Pixel Depth): %d\n", info->pixel_depth); // Does this add value? + } + + // Photometric interp packs a lot of information + printf (" Colour Type (Photometric Interpretation): "); + ++ int num_palette; ++ int num_trans; ++ + switch (colourtype) + { + case PNG_COLOR_TYPE_GRAY: +@@ -207,10 +210,10 @@ + + case PNG_COLOR_TYPE_PALETTE: + printf ("PALETTED COLOUR "); +- if (info->num_trans > 0) ++ if (num_trans > 0) + printf ("with alpha "); + printf ("(%d colours, %d transparent) ", +- info->num_palette, info->num_trans); ++ num_palette, num_trans); + break; + + case PNG_COLOR_TYPE_RGB: +@@ -232,7 +235,7 @@ + printf ("\n"); + + printf (" Image filter: "); +- switch (info->filter_type) ++ switch (png_get_filter_type(png, info)) + { + case PNG_FILTER_TYPE_BASE: + printf ("Single row per byte filter "); +@@ -249,7 +252,7 @@ + printf ("\n"); + + printf (" Interlacing: "); +- switch (info->interlace_type) ++ switch (png_get_interlace_type(png, info)) + { + case PNG_INTERLACE_NONE: + printf ("No interlacing "); +@@ -266,7 +269,7 @@ + printf ("\n"); + + printf (" Compression Scheme: "); +- switch (info->compression_type) ++ switch (png_get_compression_type(png, info)) + { + case PNG_COMPRESSION_TYPE_BASE: + printf ("Deflate method 8, 32k window"); +@@ -278,9 +281,13 @@ + } + printf ("\n"); + ++ png_uint_32 x_pixels_per_unit, y_pixels_per_unit; ++ int phys_unit_type; ++ png_get_pHYs (png, info, &x_pixels_per_unit, &y_pixels_per_unit, &phys_unit_type); ++ + printf (" Resolution: %d, %d ", +- info->x_pixels_per_unit, info->y_pixels_per_unit); +- switch (info->phys_unit_type) ++ x_pixels_per_unit, y_pixels_per_unit); ++ switch (phys_unit_type) + { + case PNG_RESOLUTION_UNKNOWN: + printf ("(unit unknown)"); +@@ -299,15 +306,18 @@ + // FillOrder is always msb-to-lsb, big endian + printf (" FillOrder: msb-to-lsb\n Byte Order: Network (Big Endian)\n"); + ++ png_textp text; ++ int num_text, max_text; ++ + // Text comments + printf (" Number of text strings: %d of %d\n", +- info->num_text, info->max_text); ++ num_text, max_text); + +- for (i = 0; i < info->num_text; i++) ++ for (i = 0; i < num_text; i++) + { +- printf (" %s ", info->text[i].key); ++ printf (" %s ", text[i].key); + +- switch (info->text[1].compression) ++ switch (text[1].compression) + { + case -1: + printf ("(tEXt uncompressed)"); +@@ -332,12 +342,12 @@ + + printf (": "); + j = 0; +- while (info->text[i].text[j] != '\0') ++ while (text[i].text[j] != '\0') + { +- if (info->text[i].text[j] == '\n') ++ if (text[i].text[j] == '\n') + printf ("\\n"); + else +- fputc (info->text[i].text[j], stdout); ++ fputc (text[i].text[j], stdout); + + j++; + } +@@ -385,14 +395,14 @@ + + printf ("Dumping the bitmap for this image:\n"); + printf ("(Expanded samples result in %d bytes per pixel, %d channels with %d bytes per channel)\n\n", +- info->channels * bytespersample, info->channels, bytespersample); ++ png_get_channels(png, info) * bytespersample, png_get_channels(png, info), bytespersample); + + // runlen is used to stop us displaying repeated byte patterns over and over -- + // I display them once, and then tell you how many times it occured in the file. + // This currently only applies to runs on zeros -- I should one day add an + // option to extend this to runs of other values as well + runlen = 0; +- for (i = 0; i < rowbytes * height / info->channels; i += info->channels * bytespersample) ++ for (i = 0; i < rowbytes * height / png_get_channels(png, info); i += png_get_channels(png, info) * bytespersample) + { + int scount, bcount, pixel; + +@@ -408,16 +418,16 @@ + + // Determine if this is a pixel whose entire value is zero + pixel = 0; +- for(scount = 0; scount < info->channels; scount++) ++ for(scount = 0; scount < png_get_channels(png, info); scount++) + for(bcount = 0; bcount < bytespersample; bcount++) + pixel += bitmap[i + scount * bytespersample + bcount]; + + if ((runlen == 0) && !pixel) + { + printf ("["); +- for(scount = 0; scount < info->channels; scount++){ ++ for(scount = 0; scount < png_get_channels(png, info); scount++){ + for(bcount = 0; bcount < bytespersample; bcount++) printf("00"); +- if(scount != info->channels - 1) printf(" "); ++ if(scount != png_get_channels(png, info) - 1) printf(" "); + } + printf ("] "); + runlen++; +@@ -425,10 +435,10 @@ + + if (runlen == 0){ + printf ("["); +- for(scount = 0; scount < info->channels; scount++){ ++ for(scount = 0; scount < png_get_channels(png, info); scount++){ + for(bcount = 0; bcount < bytespersample; bcount++) + printf("%02x", (unsigned char) bitmap[i + scount * bytespersample + bcount]); +- if(scount != info->channels - 1) printf(" "); ++ if(scount != png_get_channels(png, info) - 1) printf(" "); + } + printf("] "); + } +--- pngtools-0.4.orig/pngread.c 2008-11-27 01:14:17.000000000 +0200 ++++ pngtools-0.4.orig/pngread.c 2011-09-15 14:27:37.000000000 +0300 +@@ -68,7 +68,7 @@ + // palette is correctly reported... + //png_set_strip_alpha (png); + png_read_update_info (png, info); +- *channels = info->channels; ++ *channels = png_get_channels(png, info); + + rowbytes = png_get_rowbytes (png, info); + if((row_pointers = malloc (*height * sizeof (png_bytep))) == NULL){ diff --git a/media-gfx/pngtools/pngtools-0.4-r1.ebuild b/media-gfx/pngtools/pngtools-0.4-r1.ebuild new file mode 100644 index 000000000000..507d3e3ede8b --- /dev/null +++ b/media-gfx/pngtools/pngtools-0.4-r1.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-gfx/pngtools/pngtools-0.4-r1.ebuild,v 1.1 2011/09/15 18:22:37 robbat2 Exp $ + +EAPI=4 +inherit autotools eutils + +MY_PV=${PV/./_} + +DESCRIPTION="A series of tools for the PNG image format" +HOMEPAGE="http://www.stillhq.com/pngtools/" +SRC_URI="http://www.stillhq.com/pngtools/source/pngtools_${MY_PV}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="" + +RDEPEND=">=media-libs/libpng-1.2.40" +DEPEND="${RDEPEND}" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-0.3-implicit-declarations.patch + epatch "${FILESDIR}"/${P}-libpng14.patch + epatch "${FILESDIR}"/${P}-libpng15-fixes.patch + + eautoreconf +} + +src_install() { + emake install DESTDIR="${D}" || die + dodoc ABOUT AUTHORS ChangeLog NEWS README chunks.txt + insinto /usr/share/doc/${PF}/examples + doins *.png +} diff --git a/media-gfx/pngtools/pngtools-0.4.ebuild b/media-gfx/pngtools/pngtools-0.4.ebuild index ba912110adeb..c8f2645bc0f1 100644 --- a/media-gfx/pngtools/pngtools-0.4.ebuild +++ b/media-gfx/pngtools/pngtools-0.4.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-gfx/pngtools/pngtools-0.4.ebuild,v 1.6 2010/03/08 22:43:31 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-gfx/pngtools/pngtools-0.4.ebuild,v 1.7 2011/09/15 18:22:38 robbat2 Exp $ EAPI=2 inherit autotools eutils @@ -16,7 +16,8 @@ SLOT="0" KEYWORDS="amd64 ppc x86" IUSE="" -DEPEND=">=media-libs/libpng-1.2.40" +RDEPEND=">=media-libs/libpng-1.2.40" +DEPEND="${RDEPEND}" src_prepare() { epatch "${FILESDIR}"/${PN}-0.3-implicit-declarations.patch \ @@ -26,7 +27,7 @@ src_prepare() { } src_install() { - emake -j1 install DESTDIR="${D}" || die + emake install DESTDIR="${D}" || die dodoc ABOUT AUTHORS ChangeLog NEWS README chunks.txt insinto /usr/share/doc/${PF}/examples doins *.png |