diff options
author | Alexis Ballier <aballier@gentoo.org> | 2011-02-16 13:00:10 +0000 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2011-02-16 13:00:10 +0000 |
commit | ee282f227ac521a0e8687d8d5b1dafa3051eead1 (patch) | |
tree | 1422f975370461af05001618fce61a83380c752a /dev-tex/pdftex | |
parent | Version bump, security bug #354213. (diff) | |
download | historical-ee282f227ac521a0e8687d8d5b1dafa3051eead1.tar.gz historical-ee282f227ac521a0e8687d8d5b1dafa3051eead1.tar.bz2 historical-ee282f227ac521a0e8687d8d5b1dafa3051eead1.zip |
Import a fix from upstream for libpng 1.5 compatibility.
Package-Manager: portage-2.2.0_alpha24/cvs/Linux x86_64
Diffstat (limited to 'dev-tex/pdftex')
-rw-r--r-- | dev-tex/pdftex/ChangeLog | 6 | ||||
-rw-r--r-- | dev-tex/pdftex/Manifest | 13 | ||||
-rw-r--r-- | dev-tex/pdftex/files/pdftex-1.40.11-libpng15.patch | 211 | ||||
-rw-r--r-- | dev-tex/pdftex/pdftex-1.40.11.ebuild | 7 |
4 files changed, 227 insertions, 10 deletions
diff --git a/dev-tex/pdftex/ChangeLog b/dev-tex/pdftex/ChangeLog index 9333d118fc9d..9c670a4fab50 100644 --- a/dev-tex/pdftex/ChangeLog +++ b/dev-tex/pdftex/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-tex/pdftex # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-tex/pdftex/ChangeLog,v 1.29 2011/01/02 16:16:50 aballier Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-tex/pdftex/ChangeLog,v 1.30 2011/02/16 13:00:10 aballier Exp $ + + 16 Feb 2011; Alexis Ballier <aballier@gentoo.org> pdftex-1.40.11.ebuild, + +files/pdftex-1.40.11-libpng15.patch: + Import a fix from upstream for libpng 1.5 compatibility. *pdftex-1.40.11 (02 Jan 2011) diff --git a/dev-tex/pdftex/Manifest b/dev-tex/pdftex/Manifest index 3f3919f5d07a..cf748ef6cb07 100644 --- a/dev-tex/pdftex/Manifest +++ b/dev-tex/pdftex/Manifest @@ -2,16 +2,17 @@ Hash: SHA1 AUX pdftex-1.40.10-poppler.patch 2130 RMD160 34bf1d2ef9d60edf475c0db12c3016419acb4502 SHA1 81c6b1a2340ccc9f5b095d3d6192c4a665099f45 SHA256 4e0282c7adab34cb71806a73d61b3342b784ee69bf9e9187fe9b2c5a1b58945f +AUX pdftex-1.40.11-libpng15.patch 8384 RMD160 4c23200710f948263072d5a0ea2970851f9246f1 SHA1 ac96cb79abad7e3a2b4533c4f4223f4c08d4e8be SHA256 3f054bb6e987cf54e852234496bb2e22bb7e6b26962ffff56bcec3c6174b695c DIST pdftex-1.40.10.tar.bz2 4990395 RMD160 34b55cd40081def07b987195eebd7c4adfdd1f0a SHA1 5bd5637fccb0ee67afa39d36ef9fea2f221610da SHA256 40f95b4374c92da4c72c014cee91306e4a5202c246ea66df526c10bb705c90bd DIST pdftex-1.40.11.tar.bz2 6108613 RMD160 730b25d1fb7b33ee2b35217c197aa88ea33de030 SHA1 300d7bdbfc3f2442803319c36956ce2a6fbf0953 SHA256 17bd8ac40f73cfb60328591c8353d82e8709f2472a251d170db695af9999036f EBUILD pdftex-1.40.10.ebuild 3172 RMD160 05f5cd91ac6b9bc2c0b2c1dbe5dde44972a2dd4c SHA1 53f7eaa952476c9bfbd3c54dbaf69391bb535e52 SHA256 d18000853991416553e836919e11a6813dd7388ea668b3f7a5ba83312a921833 -EBUILD pdftex-1.40.11.ebuild 1899 RMD160 4a5329ba0b9d74a7c7e0468c385772c5ec0dbc91 SHA1 d0507c58c80395da8ed921ae80015b40be2db67c SHA256 dbd0b9f26fd92a5c3b5b3bb1e0cf9d7b2cf4f59fc529b044e13ce98b38efd158 -MISC ChangeLog 4088 RMD160 8b1045635fd39751a06a5dfa56913d52726763bc SHA1 6d047a65a52743184e2aeedd9291a97b787b9447 SHA256 ddf45fa760a5dd02dfd79c24c0dd3efcd7226c671e238330fcdcb976d0fb8e88 +EBUILD pdftex-1.40.11.ebuild 1954 RMD160 ac6540e883b48edbdd3b03fd15e29001564bf6f0 SHA1 6914bb0864c61c56f041430561aa567765403238 SHA256 6db8c0a1d5fd6ec7dc738fdf1f3320dbf758652ddce725e7da29fe1a6b7a16ff +MISC ChangeLog 4263 RMD160 da89a8318de5885b8e974dd044d318a13349844f SHA1 a2bb35c6830a96cb96c59c0ded08f64603dc4a29 SHA256 8399614e935f9672499bff7c03b83c6930caf45ed0f54cb944610640256a2c3a MISC metadata.xml 638 RMD160 59e3769086396359f1a50ee60b6702555770e33e SHA1 f9a566b850466987e74d5c16c345c54506ae4a0d SHA256 b28290517ed75fbaaa0282cdca3692f11635d173ee5dc5cb342f6071dbb3d3ea -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.16 (GNU/Linux) +Version: GnuPG v2.0.17 (GNU/Linux) -iEYEARECAAYFAk0gpPgACgkQvFcC4BYPU0oOSQCeO9hc6BomYQuOEYX878nL/Tqc -5MYAniW80YZPaQGS7Lx+aAZ6Ojt8y5qA -=LTUJ +iEYEARECAAYFAk1bymAACgkQvFcC4BYPU0qFdwCeOMEVhBGtxYXFSOC3m9y9ADig +cIMAnia7B8T7/Pwj6FpiDQgoiIQZhDHJ +=1OyQ -----END PGP SIGNATURE----- diff --git a/dev-tex/pdftex/files/pdftex-1.40.11-libpng15.patch b/dev-tex/pdftex/files/pdftex-1.40.11-libpng15.patch new file mode 100644 index 000000000000..1c177c983647 --- /dev/null +++ b/dev-tex/pdftex/files/pdftex-1.40.11-libpng15.patch @@ -0,0 +1,211 @@ +Index: source/texk/web2c/pdftexdir/writepng.c +=================================================================== +--- source/texk/web2c/pdftexdir/writepng.c (revision 21236) ++++ source/texk/web2c/pdftexdir/writepng.c (revision 21237) +@@ -21,47 +21,19 @@ + #include "ptexlib.h" + #include "image.h" + +-#if PNG_LIBPNG_VER_MINOR > 2 +- + /* ToDo: +- * use png_get_PLTE() to access num_palette and palette +- * use xxx to access transformations ++ * Check if multiple use of, e.g., png_bit_depth(img) should be ++ * replaced by ++ * int bitdepth = png_bit_depth(img); ++ * and subsequent use of bitdepth + */ +- + #define png_bit_depth(N) png_get_bit_depth(png_ptr(N), png_info(N)) + #define png_color_type(N) png_get_color_type(png_ptr(N), png_info(N)) + #define png_height(N) png_get_image_height(png_ptr(N), png_info(N)) + #define png_interlace_type(N) png_get_interlace_type(png_ptr(N), png_info(N)) +-#define png_io_ptr(N) png_get_io_ptr(png_ptr(N)) +-#define png_num_palette(N) png_info(N)->num_palette +-#define png_palette(N) png_info(N)->palette + #define png_rowbytes(N) png_get_rowbytes(png_ptr(N), png_info(N)) +-#define png_transformations(N) png_ptr(N)->transformations +-#define png_valid(N,flag) png_get_valid(png_ptr(N), png_info(N), flag) + #define png_width(N) png_get_image_width(png_ptr(N), png_info(N)) + +-#define png_ptr_bit_depth(N) png_get_bit_depth(png_ptr(N), png_info(N)) +-#define png_ptr_color_type(N) png_get_color_type(png_ptr(N), png_info(N)) +- +-#else +- +-#define png_bit_depth(N) png_info(N)->bit_depth +-#define png_color_type(N) png_info(N)->color_type +-#define png_height(N) png_info(N)->height +-#define png_interlace_type(N) png_info(N)->interlace_type +-#define png_io_ptr(N) png_ptr(N)->io_ptr +-#define png_num_palette(N) png_info(N)->num_palette +-#define png_palette(N) png_info(N)->palette +-#define png_rowbytes(N) png_info(N)->rowbytes +-#define png_transformations(N) png_ptr(N)->transformations +-#define png_valid(N,flag) png_info(N)->valid & (flag) +-#define png_width(N) png_info(N)->width +- +-#define png_ptr_bit_depth(N) png_ptr(N)->bit_depth +-#define png_ptr_color_type(N) png_ptr(N)->color_type +- +-#endif +- + static int transparent_page_group = -1; + + void read_png_info(integer img) +@@ -84,7 +56,7 @@ + } + /* alpha channel support */ + if (fixedpdfminorversion < 4 +- && png_ptr_color_type(img) | PNG_COLOR_MASK_ALPHA) ++ && png_color_type(img) | PNG_COLOR_MASK_ALPHA) + png_set_strip_alpha(png_ptr(img)); + /* 16bit depth support */ + if (fixedpdfminorversion < 5) +@@ -104,7 +76,7 @@ + /* resolution support */ + img_width(img) = png_width(img); + img_height(img) = png_height(img); +- if (png_valid(img, PNG_INFO_pHYs)) { ++ if (png_get_valid(png_ptr(img), png_info(img), PNG_INFO_pHYs)) { + img_xres(img) = + round(0.0254 * + png_get_x_pixels_per_meter(png_ptr(img), png_info(img))); +@@ -201,14 +173,18 @@ + int i, j, k, l; + png_bytep row, r, *rows; + integer palette_objnum = 0; ++ png_colorp palette; ++ int num_palette; ++ ++ png_get_PLTE(png_ptr(img), png_info(img), &palette, &num_palette); ++ + pdfcreateobj(0, 0); + palette_objnum = objptr; + if (img_colorspace_ref(img) != 0) { + pdf_printf("%i 0 R\n", (int) img_colorspace_ref(img)); + } else { + pdf_printf("[/Indexed /DeviceRGB %i %i 0 R]\n", +- (int) (png_num_palette(img) - 1), +- (int) palette_objnum); ++ num_palette -1, (int) palette_objnum); + } + pdfbeginstream(); + if (png_interlace_type(img) == PNG_INTERLACE_NONE) { +@@ -230,11 +206,11 @@ + if (palette_objnum > 0) { + pdfbegindict(palette_objnum, 0); + pdfbeginstream(); +- for (i = 0; (unsigned) i < png_num_palette(img); i++) { ++ for (i = 0; (unsigned) i < num_palette; i++) { + pdfroom(3); +- pdfbuf[pdfptr++] = png_palette(img)[i].red; +- pdfbuf[pdfptr++] = png_palette(img)[i].green; +- pdfbuf[pdfptr++] = png_palette(img)[i].blue; ++ pdfbuf[pdfptr++] = palette[i].red; ++ pdfbuf[pdfptr++] = palette[i].green; ++ pdfbuf[pdfptr++] = palette[i].blue; + } + pdfendstream(); + } +@@ -461,7 +437,7 @@ + + static void copy_png(integer img) + { +- FILE *fp = (FILE *) png_io_ptr(img); ++ FILE *fp = (FILE *) png_get_io_ptr(png_ptr(img)); + int i, len, type, streamlength = 0; + boolean endflag = false; + int idat = 0; /* flag to check continuous IDAT chunks sequence */ +@@ -553,7 +529,12 @@ + double gamma, checked_gamma; + int i; + integer palette_objnum = 0; ++ png_colorp palette; ++ int num_palette; + last_png_needs_page_group = false; ++ ++ png_get_PLTE(png_ptr(img), png_info(img), &palette, &num_palette); ++ + if (fixedpdfminorversion < 5) + fixedimagehicolor = 0; + +@@ -570,16 +551,12 @@ + checked_gamma = (fixedgamma / 1000.0) * (1000.0 / fixedimagegamma); + } + } +- /* the switching between |png_info| and |png_ptr| queries has been trial and error. +- */ + if (fixedpdfminorversion > 1 + && png_interlace_type(img) == PNG_INTERLACE_NONE +- && (png_transformations(img) == PNG_TRANSFORM_IDENTITY +- || png_transformations(img) == 0x2000) + /* gamma */ +- && !(png_ptr_color_type(img) == PNG_COLOR_TYPE_GRAY_ALPHA || +- png_ptr_color_type(img) == PNG_COLOR_TYPE_RGB_ALPHA) +- && (fixedimagehicolor || (png_ptr_bit_depth(img) <= 8)) ++ && !(png_color_type(img) == PNG_COLOR_TYPE_GRAY_ALPHA || ++ png_color_type(img) == PNG_COLOR_TYPE_RGB_ALPHA) ++ && (fixedimagehicolor || (png_bit_depth(img) <= 8)) + && (checked_gamma <= 1.01 && checked_gamma > 0.99) + ) { + if (img_colorspace_ref(img) != 0) { +@@ -590,8 +567,7 @@ + pdfcreateobj(0, 0); + palette_objnum = objptr; + pdf_printf("[/Indexed /DeviceRGB %i %i 0 R]\n", +- (int) (png_num_palette(img) - 1), +- (int) palette_objnum); ++ num_palette - 1, (int) palette_objnum); + break; + case PNG_COLOR_TYPE_GRAY: + pdf_puts("/DeviceGray\n"); +@@ -605,11 +581,11 @@ + if (palette_objnum > 0) { + pdfbegindict(palette_objnum, 0); + pdfbeginstream(); +- for (i = 0; i < png_num_palette(img); i++) { ++ for (i = 0; i < num_palette; i++) { + pdfroom(3); +- pdfbuf[pdfptr++] = png_palette(img)[i].red; +- pdfbuf[pdfptr++] = png_palette(img)[i].green; +- pdfbuf[pdfptr++] = png_palette(img)[i].blue; ++ pdfbuf[pdfptr++] = palette[i].red; ++ pdfbuf[pdfptr++] = palette[i].green; ++ pdfbuf[pdfptr++] = palette[i].blue; + } + pdfendstream(); + } +@@ -619,9 +595,6 @@ + if (fixedimageapplygamma && + (checked_gamma > 1.01 || checked_gamma < 0.99)) + tex_printf("gamma delta=%lf ", checked_gamma); +- if (png_transformations(img) != PNG_TRANSFORM_IDENTITY) +- tex_printf("transform=%lu", +- (long) png_transformations(img)); + if ((png_color_type(img) != PNG_COLOR_TYPE_GRAY) + && (png_color_type(img) != PNG_COLOR_TYPE_RGB) + && (png_color_type(img) != PNG_COLOR_TYPE_PALETTE)) +Index: source/texk/web2c/pdftexdir/writeimg.c +=================================================================== +--- source/texk/web2c/pdftexdir/writeimg.c (revision 19947) ++++ source/texk/web2c/pdftexdir/writeimg.c (revision 19948) +@@ -137,7 +137,7 @@ + { + switch (img_type(img)) { + case IMAGE_TYPE_PNG: +- return png_info(img)->bit_depth; ++ return png_get_bit_depth(png_ptr(img), png_info(img)); + case IMAGE_TYPE_JPG: + return jpg_ptr(img)->bits_per_component; + case IMAGE_TYPE_JBIG2: +@@ -389,7 +389,7 @@ + epdf_delete(); + break; + case IMAGE_TYPE_PNG: +- xfclose((FILE *) png_ptr(img)->io_ptr, cur_file_name); ++ xfclose((FILE *) png_get_io_ptr(png_ptr(img)), cur_file_name); + png_destroy_read_struct(&(png_ptr(img)), &(png_info(img)), NULL); + break; + case IMAGE_TYPE_JPG: diff --git a/dev-tex/pdftex/pdftex-1.40.11.ebuild b/dev-tex/pdftex/pdftex-1.40.11.ebuild index c2cf82c71f4c..4295c9fe4a25 100644 --- a/dev-tex/pdftex/pdftex-1.40.11.ebuild +++ b/dev-tex/pdftex/pdftex-1.40.11.ebuild @@ -1,9 +1,9 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-tex/pdftex/pdftex-1.40.11.ebuild,v 1.1 2011/01/02 16:16:50 aballier Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-tex/pdftex/pdftex-1.40.11.ebuild,v 1.2 2011/02/16 13:00:10 aballier Exp $ EAPI=2 -inherit libtool toolchain-funcs +inherit libtool toolchain-funcs eutils DESCRIPTION="Standalone version of pdftex that can be used to replace TeX Live's" HOMEPAGE="http://www.pdftex.org/" @@ -16,7 +16,7 @@ KEYWORDS="~amd64 ~arm ~hppa ~x86" IUSE="" RDEPEND=">=app-text/poppler-0.12.3-r3[xpdf-headers] - media-libs/libpng + >=media-libs/libpng-1.4 sys-libs/zlib dev-libs/kpathsea app-admin/eselect-pdftex" @@ -28,6 +28,7 @@ S=${WORKDIR}/${P}/build src_prepare() { mkdir "${S}" cd "${WORKDIR}/${P}/src" + epatch "${FILESDIR}/${P}-libpng15.patch" elibtoolize } |