summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-03-29 18:07:43 +0000
committerMike Frysinger <vapier@gentoo.org>2012-03-29 18:07:43 +0000
commitaa6000a0144953713581e9e88588bcce1212fed0 (patch)
treefffe23348585da9dc592982dd7581e88ddb06454 /media-tv/xbmc
parent[bump] dev-perl/MooseX-Types-Path-Class-0.60.0 (diff)
downloadhistorical-aa6000a0144953713581e9e88588bcce1212fed0.tar.gz
historical-aa6000a0144953713581e9e88588bcce1212fed0.tar.bz2
historical-aa6000a0144953713581e9e88588bcce1212fed0.zip
Restore exec-stack patch and drop now unused libpng patch.
Package-Manager: portage-2.2.0_alpha95/cvs/Linux x86_64
Diffstat (limited to 'media-tv/xbmc')
-rw-r--r--media-tv/xbmc/ChangeLog6
-rw-r--r--media-tv/xbmc/Manifest32
-rw-r--r--media-tv/xbmc/files/xbmc-11.0-libpng-1.5.patch605
-rw-r--r--media-tv/xbmc/files/xbmc-11.0-no-exec-stack.patch30
-rw-r--r--media-tv/xbmc/xbmc-11.0.ebuild4
5 files changed, 53 insertions, 624 deletions
diff --git a/media-tv/xbmc/ChangeLog b/media-tv/xbmc/ChangeLog
index e26e69f0a3cd..0a939a2da700 100644
--- a/media-tv/xbmc/ChangeLog
+++ b/media-tv/xbmc/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for media-tv/xbmc
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-tv/xbmc/ChangeLog,v 1.125 2012/03/29 16:22:51 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-tv/xbmc/ChangeLog,v 1.126 2012/03/29 18:07:43 vapier Exp $
+
+ 29 Mar 2012; Mike Frysinger <vapier@gentoo.org> xbmc-11.0.ebuild,
+ -files/xbmc-11.0-libpng-1.5.patch, +files/xbmc-11.0-no-exec-stack.patch:
+ Restore exec-stack patch and drop now unused libpng patch.
*xbmc-11.0 (29 Mar 2012)
diff --git a/media-tv/xbmc/Manifest b/media-tv/xbmc/Manifest
index bf289b2a75ab..fd06bc63a18c 100644
--- a/media-tv/xbmc/Manifest
+++ b/media-tv/xbmc/Manifest
@@ -1,28 +1,28 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-AUX xbmc-11.0-libpng-1.5.patch 18833 RMD160 023626a75b96fbae4d662ff875f1647113d53bad SHA1 463ff9dda04707fc71db3d431eded9f396698aa9 SHA256 83b49d44b7855dcb2f7d34e2e9628f4c1f8e06ae8f9e94ac06a6036620705daa
+AUX xbmc-11.0-no-exec-stack.patch 807 RMD160 c42590cf3dd2fb3407e6dd518ba706ea8919d586 SHA1 c50207ff50cb1cedc97a7de1484a98fdebf51c5e SHA256 e36c83746838dd362512a046dc066c0f3fdc1252289b2761be381f84262cab78
AUX xbmc-9999-no-arm-flags.patch 542 RMD160 108586f2956cc27cc9f3c582565bd4e2f22fede0 SHA1 e6dc2f2b63e208fccb0c1ecb50322d6a9c9fda88 SHA256 72164a8b91f3209cff06ea1a103580f827135951a7a798eefabc04ee1a6d3e84
AUX xbmc-9999-nomythtv.patch 6190 RMD160 829dff4b58098ee0935aed6fcda345e06abdb7b3 SHA1 d34afef9342b1d5781729433795cb23240fa5d6b SHA256 ffb1eb49f94b4ae41e5d79172499671915122a58af248b0585ee276e4aa2c87e
DIST xbmc-11.0.tar.gz 63012044 RMD160 23cf4d7fa11d2996cc45c44ba5ca0022ff2acc1d SHA1 d836a0a1e8ed239a339ec7e0c19f893e29df741d SHA256 1fe5d310c16138f26e2b13bc545604e95f48ace6c8636f23e77da402cd7b0b19
-EBUILD xbmc-11.0.ebuild 5936 RMD160 ddc4c20b26547a5b02bbe0c62f397028ffd6fde8 SHA1 7cfaf0b52f3c23d756da03c3816684fff591894a SHA256 18deca94893b5ea125c6f1c2793c796ece7f0442025af1bd3b8317653f4cbc71
+EBUILD xbmc-11.0.ebuild 5936 RMD160 12023c7377365db52fdc233d43f2d013fc57fb3c SHA1 bec1201fbcb527a9f1baea52efdfff4e7a280809 SHA256 137b01f4894d9b899477543b4dfe15e8189e33fac6f7937d8c87423fbfb6e9e8
EBUILD xbmc-9999.ebuild 5885 RMD160 66f8c9dee573b14675266915b27a3ebf4f3069ee SHA1 5db9622800507153e306836e1b7f8c0a0594cec8 SHA256 290d289e5102559445d3d1d093140f619316d74fc916f54adf0afb4244c6a901
-MISC ChangeLog 20275 RMD160 cb8efc05e90943b58502b46ed7b74a19e1c052c2 SHA1 01501b40636aa0e6f02bbea166bc04c342e2af74 SHA256 b9c6aab9b49a2402895150575c3ae174478136e2cddeba8911d4e6205f6a48c7
+MISC ChangeLog 20480 RMD160 f38835967b6c2168519979b044ab1c42d98b266f SHA1 35c7dd9ce04ee3d4ba0d42242092d58943d30aa4 SHA256 4e8717564b5098f6db69714e5c767b919748b47fe29f445a4136ff9650e42b3f
MISC metadata.xml 932 RMD160 fbedc1d562949001f2195a49f375d2e4a1fdc7ff SHA1 c102da84b6cd9160308943fc7cc7801aff691a46 SHA256 2f82a971dfec33d4958ee8977011928976c4aab5f4e03139be6a6245bf3eb62d
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
-iQIcBAEBAgAGBQJPdIxiAAoJELEHsLL7fEFWU28QAJ/0E9DgOExOnDz92ppSHvkI
-BTjx7AXeV7LPr4R/ZQqjTuCBRkrdOMt7zI6y6lT5GzAJ4Ytx0Fm0wDOLFd94giij
-lXyO3Xl1Whe+NYKZc+o3WwsXKBArOnbFZDRl1RyFobfd13PfcfkuEZiQHMk+wuf0
-+drkWafCTadbi8Mj7+HgUZsvYTcwzq6IImQkdCXXOzQjFW/3aZI4ZHZnnmP4ZfRR
-RKFvT/psApe2D80zz7JgiwIvtLiNyfIaERIj/HlkwIzJ+YSx8yTYHI9sr9ZY5qvY
-PXSSBd5HQVlvzQXtuO7EAgZqRK5iQsQKvEV8qfmS1WMJuQns4wil09PEJ5nRDgjd
-pdN/E+yXyJrJBqmGkwDcfCwm2CQHXtfA+Dh5O/ktZqOFr9IRvAZgCrQvB7Nx4pY9
-s57V1QUxBszYnRL4HVnJvES4kzQ4F1uEEMotO8esZVjCqkt4/anlyHjPkGCpouUF
-91IpLH1Cviz4qJ/KMlsCp6LVa2Uf7GNVMQ1vSOBEZkyq/EoMb3Iforz39C7I6hqg
-wUdhaaFqgcUU1AzAF7AGoyE8uSOG+7eZIFkUzQzdrC4OjYSgj8vZizeHEdj+jmab
-kXMiL8VFtZXSw8OF0KNSv4clJwvhPI44t6wo2CwE2p/tAU605QrgmuVEb2sBjV6a
-TAi8kM2Vt4+mbaq9/MnZ
-=rlwz
+iQIcBAEBAgAGBQJPdKT2AAoJELEHsLL7fEFWLl4QAK4mC14DUEUF+8iApKqhwJQx
+B447oNa/TiAbAmHQ6rI4SihFMJqEAtwOwSmkZ6dKL8bKlSB98Hz/f5JGLbZnBmLA
+evDPYArOT2o9zGMZECEZLWTBJ4TEyMfkl71JpKPLOQmyY20vkRY0tWXo7TwlwXvn
+v3bUrgZvWqUs3E1QVXAB4FLH3/ojFinyWrXL+iisbff1EL0gWw1ORrSkkqO6YdbG
+kjh5KcDCZhdq5QUBC82nBJ3hzGypCPH4s73nFtU46a5DCwsOV/rbEMrAg7bSDQLD
+BiUZdCd10GrB1unlGNJ3Qki+1K2yZUXaGyTpcDyJ+cp/ikVANuoVZM/OFG8eFMJb
+EKzQHATEjmXd186fmYRA1DrPIbQIrBHZKysl8i3gyvONdeDptinA1zkfKcB3UnKi
+pKISXCsrhAUsjlV8f+/B1R6fsVHkwXf4YRONf4jtEL83i8XPV5MkYvIautSx4epQ
+6EZXOwYBmrjrk6h2/euWG9bGIFhMr/4cvFKAuSYUn9ElN2Yq/Vfb222nXrt+8kRQ
+Ccvm1FXq2OjRPDgRxzow3WlqNdDnACKy/SDCqCzesP6M/Uzbrg2yDHGXbgwzNGnD
+Nd1qekDcyriAEyGfNybYhAjYWq+yyMIRp1f+OngarQ0x1MZ0j1McG+Y6G7m/TfW1
+CvOWyLq5q3SotLKz9HkC
+=uwV5
-----END PGP SIGNATURE-----
diff --git a/media-tv/xbmc/files/xbmc-11.0-libpng-1.5.patch b/media-tv/xbmc/files/xbmc-11.0-libpng-1.5.patch
deleted file mode 100644
index 18c589a126ab..000000000000
--- a/media-tv/xbmc/files/xbmc-11.0-libpng-1.5.patch
+++ /dev/null
@@ -1,605 +0,0 @@
-fix building with newer libpng. patch by Ian Stakenvicius.
-
-https://bugs.gentoo.org/380127
-
---- a/lib/cximage-6.0/CxImage/ximapng.cpp
-+++ b/lib/cximage-6.0/CxImage/ximapng.cpp
-@@ -15,7 +15,11 @@
- void CxImagePNG::ima_png_error(png_struct *png_ptr, char *message)
- {
- strcpy(info.szLastError,message);
-+#if PNG_LIBPNG_VER > 10499
-+ longjmp(png_jmpbuf(png_ptr), 1);
-+#else
- longjmp(png_ptr->jmpbuf, 1);
-+#endif
- }
- ////////////////////////////////////////////////////////////////////////////////
- #if CXIMAGE_SUPPORT_DECODE
-@@ -62,7 +66,11 @@ bool CxImagePNG::Decode(CxFile *hFile)
- /* Set error handling if you are using the setjmp/longjmp method (this is
- * the normal method of doing things with libpng). REQUIRED unless you
- * set up your own error handlers in the png_create_read_struct() earlier. */
-+#if PNG_LIBPNG_VER > 10499
-+ if (setjmp(png_jmpbuf(png_ptr))) {
-+#else
- if (setjmp(png_ptr->jmpbuf)) {
-+#endif
- /* Free all of the memory associated with the png_ptr and info_ptr */
- delete [] row_pointers;
- png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
-@@ -76,16 +84,34 @@ bool CxImagePNG::Decode(CxFile *hFile)
- /* read the file information */
- png_read_info(png_ptr, info_ptr);
-
-+#if PNG_LIBPNG_VER > 10499
-+ png_uint_32 _width,_height;
-+ int _bit_depth,_color_type,_interlace_type,_compression_type,_filter_type;
-+ png_get_IHDR(png_ptr,info_ptr,&_width,&_height,&_bit_depth,&_color_type,
-+ &_interlace_type,&_compression_type,&_filter_type);
-+
-+ if (info.nEscape == -1){
-+ head.biWidth = _width;
-+ head.biHeight= _height;
-+ info.dwType = CXIMAGE_FORMAT_PNG;
-+ longjmp(png_jmpbuf(png_ptr), 1);
-+ }
-+#else
- if (info.nEscape == -1){
- head.biWidth = info_ptr->width;
- head.biHeight= info_ptr->height;
- info.dwType = CXIMAGE_FORMAT_PNG;
- longjmp(png_ptr->jmpbuf, 1);
- }
-+#endif
-
- /* calculate new number of channels */
- int channels=0;
-+#if PNG_LIBPNG_VER > 10499
-+ switch(_color_type){
-+#else
- switch(info_ptr->color_type){
-+#endif
- case PNG_COLOR_TYPE_GRAY:
- case PNG_COLOR_TYPE_PALETTE:
- channels = 1;
-@@ -101,20 +127,49 @@ bool CxImagePNG::Decode(CxFile *hFile)
- break;
- default:
- strcpy(info.szLastError,"unknown PNG color type");
-+#if PNG_LIBPNG_VER > 10499
-+ longjmp(png_jmpbuf(png_ptr), 1);
-+#else
- longjmp(png_ptr->jmpbuf, 1);
-+#endif
- }
-
- //find the right pixel depth used for cximage
-+#if PNG_LIBPNG_VER > 10499
-+ int pixel_depth = _bit_depth * png_get_channels(png_ptr,info_ptr);
-+#else
- int pixel_depth = info_ptr->pixel_depth;
-+#endif
- if (channels == 1 && pixel_depth>8) pixel_depth=8;
- if (channels == 2) pixel_depth=8;
- if (channels >= 3) pixel_depth=24;
-
-+#if PNG_LIBPNG_VER > 10499
-+ if (!Create(_width, _height, pixel_depth, CXIMAGE_FORMAT_PNG)){
-+ longjmp(png_jmpbuf(png_ptr), 1);
-+#else
- if (!Create(info_ptr->width, info_ptr->height, pixel_depth, CXIMAGE_FORMAT_PNG)){
- longjmp(png_ptr->jmpbuf, 1);
-+#endif
- }
-
- /* get metrics */
-+#if PNG_LIBPNG_VER > 10499
-+ png_uint_32 _x_pixels_per_unit,_y_pixels_per_unit;
-+ int _phys_unit_type;
-+ png_get_pHYs(png_ptr,info_ptr,&_x_pixels_per_unit,&_y_pixels_per_unit,&_phys_unit_type);
-+ switch (_phys_unit_type)
-+ {
-+ case PNG_RESOLUTION_UNKNOWN:
-+ SetXDPI(_x_pixels_per_unit);
-+ SetYDPI(_y_pixels_per_unit);
-+ break;
-+ case PNG_RESOLUTION_METER:
-+ SetXDPI((long)floor(_x_pixels_per_unit * 254.0 / 10000.0 + 0.5));
-+ SetYDPI((long)floor(_y_pixels_per_unit * 254.0 / 10000.0 + 0.5));
-+ break;
-+ }
-+#else
- switch (info_ptr->phys_unit_type)
- {
- case PNG_RESOLUTION_UNKNOWN:
-@@ -126,46 +181,94 @@ bool CxImagePNG::Decode(CxFile *hFile)
- SetYDPI((long)floor(info_ptr->y_pixels_per_unit * 254.0 / 10000.0 + 0.5));
- break;
- }
-+#endif
-
-+#if PNG_LIBPNG_VER > 10499
-+ int _num_palette;
-+ png_colorp _palette;
-+ png_uint_32 _palette_ret;
-+ _palette_ret = png_get_PLTE(png_ptr,info_ptr,&_palette,&_num_palette);
-+ if (_palette_ret && _num_palette>0){
-+ SetPalette((rgb_color*)_palette,_num_palette);
-+ SetClrImportant(_num_palette);
-+ } else if (_bit_depth ==2) { //<DP> needed for 2 bpp grayscale PNGs
-+#else
- if (info_ptr->num_palette>0){
- SetPalette((rgb_color*)info_ptr->palette,info_ptr->num_palette);
- SetClrImportant(info_ptr->num_palette);
- } else if (info_ptr->bit_depth ==2) { //<DP> needed for 2 bpp grayscale PNGs
-+#endif
- SetPaletteColor(0,0,0,0);
- SetPaletteColor(1,85,85,85);
- SetPaletteColor(2,170,170,170);
- SetPaletteColor(3,255,255,255);
- } else SetGrayPalette(); //<DP> needed for grayscale PNGs
-
-+#if PNG_LIBPNG_VER > 10499
-+ int nshift = max(0,(_bit_depth>>3)-1)<<3;
-+#else
- int nshift = max(0,(info_ptr->bit_depth>>3)-1)<<3;
-+#endif
-
-+#if PNG_LIBPNG_VER > 10499
-+ png_bytep _trans_alpha;
-+ int _num_trans;
-+ png_color_16p _trans_color;
-+ png_uint_32 _trans_ret;
-+ _trans_ret = png_get_tRNS(png_ptr,info_ptr,&_trans_alpha,&_num_trans,&_trans_color);
-+ if (_trans_ret && _num_trans!=0){ //palette transparency
-+ if (_num_trans==1){
-+ if (_color_type == PNG_COLOR_TYPE_PALETTE){
-+#else
- if (info_ptr->num_trans!=0){ //palette transparency
- if (info_ptr->num_trans==1){
- if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE){
-+#endif
-+#if PNG_LIBPNG_VER > 10499
-+ info.nBkgndIndex = _trans_color->index;
-+#else
- #if PNG_LIBPNG_VER > 10399
- info.nBkgndIndex = info_ptr->trans_color.index;
- #else
- info.nBkgndIndex = info_ptr->trans_values.index;
- #endif
-+#endif
- } else{
-+#if PNG_LIBPNG_VER > 10499
-+ info.nBkgndIndex = _trans_color->gray>>nshift;
-+#else
- #if PNG_LIBPNG_VER > 10399
- info.nBkgndIndex = info_ptr->trans_color.gray>>nshift;
- #else
- info.nBkgndIndex = info_ptr->trans_values.gray>>nshift;
- #endif
-+#endif
- }
- }
-+#if PNG_LIBPNG_VER > 10499
-+ if (_num_trans>1 && _trans_alpha!=NULL){
-+#else
- if (info_ptr->num_trans>1){
-+#endif
- RGBQUAD* pal=GetPalette();
- if (pal){
- DWORD ip;
-+#if PNG_LIBPNG_VER > 10499
-+ for (ip=0;ip<min(head.biClrUsed,(unsigned long)_num_trans);ip++)
-+ pal[ip].rgbReserved=_trans_alpha[ip];
-+#else
- for (ip=0;ip<min(head.biClrUsed,(unsigned long)info_ptr->num_trans);ip++)
- #if PNG_LIBPNG_VER > 10399
- pal[ip].rgbReserved=info_ptr->trans_alpha[ip];
- #else
- pal[ip].rgbReserved=info_ptr->trans[ip];
- #endif
-+#endif
-+#if PNG_LIBPNG_VER > 10499
-+ for (ip=_num_trans;ip<head.biClrUsed;ip++){
-+#else
- for (ip=info_ptr->num_trans;ip<head.biClrUsed;ip++){
-+#endif
- pal[ip].rgbReserved=255;
- }
- info.bAlphaPaletteEnabled=true;
-@@ -178,6 +281,11 @@ bool CxImagePNG::Decode(CxFile *hFile)
- int num_trans;
- png_color_16 *image_background;
- if (png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans, &image_background)){
-+#if PNG_LIBPNG_VER > 10499
-+ info.nBkgndColor.rgbRed = (BYTE)(_trans_color->red>>nshift);
-+ info.nBkgndColor.rgbGreen = (BYTE)(_trans_color->green>>nshift);
-+ info.nBkgndColor.rgbBlue = (BYTE)(_trans_color->blue>>nshift);
-+#else
- #if PNG_LIBPNG_VER > 10399
- info.nBkgndColor.rgbRed = (BYTE)(info_ptr->trans_color.red>>nshift);
- info.nBkgndColor.rgbGreen = (BYTE)(info_ptr->trans_color.green>>nshift);
-@@ -187,6 +295,7 @@ bool CxImagePNG::Decode(CxFile *hFile)
- info.nBkgndColor.rgbGreen = (BYTE)(info_ptr->trans_values.green>>nshift);
- info.nBkgndColor.rgbBlue = (BYTE)(info_ptr->trans_values.blue>>nshift);
- #endif
-+#endif
- info.nBkgndColor.rgbReserved = 0;
- info.nBkgndIndex = 0;
- }
-@@ -202,15 +311,27 @@ bool CxImagePNG::Decode(CxFile *hFile)
- }
-
- // <vho> - flip the RGB pixels to BGR (or RGBA to BGRA)
-+#if PNG_LIBPNG_VER > 10499
-+ if (_color_type & PNG_COLOR_MASK_COLOR){
-+#else
- if (info_ptr->color_type & PNG_COLOR_MASK_COLOR){
-+#endif
- png_set_bgr(png_ptr);
- }
-
- // <vho> - handle cancel
-+#if PNG_LIBPNG_VER > 10499
-+ if (info.nEscape) longjmp(png_jmpbuf(png_ptr), 1);
-+#else
- if (info.nEscape) longjmp(png_ptr->jmpbuf, 1);
-+#endif
-
- // row_bytes is the width x number of channels x (bit-depth / 8)
-+#if PNG_LIBPNG_VER > 10499
-+ row_pointers = new BYTE[png_get_rowbytes(png_ptr,info_ptr) + 8];
-+#else
- row_pointers = new BYTE[info_ptr->rowbytes + 8];
-+#endif
-
- // turn on interlace handling
- int number_passes = png_set_interlace_handling(png_ptr);
-@@ -221,8 +342,16 @@ bool CxImagePNG::Decode(CxFile *hFile)
- SetCodecOption(0);
- }
-
-+#if PNG_LIBPNG_VER > 10499
-+ int chan_offset = _bit_depth >> 3;
-+#else
- int chan_offset = info_ptr->bit_depth >> 3;
-+#endif
-+#if PNG_LIBPNG_VER > 10499
-+ int pixel_offset = (_bit_depth * png_get_channels(png_ptr,info_ptr)) >> 3;
-+#else
- int pixel_offset = info_ptr->pixel_depth >> 3;
-+#endif
-
- for (int pass=0; pass < number_passes; pass++) {
- iter.Upset();
-@@ -230,7 +359,11 @@ bool CxImagePNG::Decode(CxFile *hFile)
- do {
-
- // <vho> - handle cancel
-+#if PNG_LIBPNG_VER > 10499
-+ if (info.nEscape) longjmp(png_jmpbuf(png_ptr), 1);
-+#else
- if (info.nEscape) longjmp(png_ptr->jmpbuf, 1);
-+#endif
-
- #if CXIMAGE_SUPPORT_ALPHA // <vho>
- if (AlphaIsValid()) {
-@@ -241,7 +374,11 @@ bool CxImagePNG::Decode(CxFile *hFile)
- BYTE* prow= iter.GetRow(ay);
-
- //recover data from previous scan
-+#if PNG_LIBPNG_VER > 10499
-+ if (_interlace_type && pass>0 && pass!=7){
-+#else
- if (info_ptr->interlace_type && pass>0 && pass!=7){
-+#endif
- for(ax=0;ax<head.biWidth;ax++){
- long px = ax * pixel_offset;
- if (channels == 2){
-@@ -278,10 +415,17 @@ bool CxImagePNG::Decode(CxFile *hFile)
- #endif // CXIMAGE_SUPPORT_ALPHA // vho
- {
- //recover data from previous scan
-+#if PNG_LIBPNG_VER > 10499
-+ if (_interlace_type && pass>0){
-+ iter.GetRow(row_pointers, png_get_rowbytes(png_ptr,info_ptr));
-+ //re-expand buffer for images with bit depth > 8
-+ if (_bit_depth > 8){
-+#else
- if (info_ptr->interlace_type && pass>0){
- iter.GetRow(row_pointers, info_ptr->rowbytes);
- //re-expand buffer for images with bit depth > 8
- if (info_ptr->bit_depth > 8){
-+#endif
- for(long ax=(head.biWidth*channels-1);ax>=0;ax--)
- row_pointers[ax*chan_offset] = row_pointers[ax];
- }
-@@ -291,15 +435,27 @@ bool CxImagePNG::Decode(CxFile *hFile)
- png_read_row(png_ptr, row_pointers, NULL);
-
- //shrink 16 bit depth images down to 8 bits
-+#if PNG_LIBPNG_VER > 10499
-+ if (_bit_depth > 8){
-+#else
- if (info_ptr->bit_depth > 8){
-+#endif
- for(long ax=0;ax<(head.biWidth*channels);ax++)
- row_pointers[ax] = row_pointers[ax*chan_offset];
- }
-
- //copy the pixels
-+#if PNG_LIBPNG_VER > 10499
-+ iter.SetRow(row_pointers, png_get_rowbytes(png_ptr,info_ptr));
-+#else
- iter.SetRow(row_pointers, info_ptr->rowbytes);
-+#endif
- //<DP> expand 2 bpp images only in the last pass
-+#if PNG_LIBPNG_VER > 10499
-+ if (_bit_depth==2 && pass==(number_passes-1))
-+#else
- if (info_ptr->bit_depth==2 && pass==(number_passes-1))
-+#endif
- expand2to4bpp(iter.GetRow());
-
- //go on
-@@ -361,9 +517,13 @@ 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 PNG_LIBPNG_VER > 10499
-+ if (setjmp(png_jmpbuf(png_ptr))){
-+#else
- if (setjmp(png_ptr->jmpbuf)){
- /* If we get here, we had a problem reading the file */
- if (info_ptr->palette) free(info_ptr->palette);
-+#endif
- png_destroy_write_struct(&png_ptr, (png_infopp)&info_ptr);
- cx_throw("Error saving PNG file");
- }
-@@ -372,9 +532,23 @@ bool CxImagePNG::Encode(CxFile *hFile)
- //png_init_io(png_ptr, hFile);
-
- // use custom I/O functions
-- png_set_write_fn(png_ptr,hFile,/*(png_rw_ptr)*/user_write_data,/*(png_flush_ptr)*/user_flush_data);
-+ png_set_write_fn(png_ptr,hFile,/*(png_rw_ptr)*/user_write_data,/*(png_flush_ptr)*/user_flush_data);
-
- /* set the file information here */
-+#if PNG_LIBPNG_VER > 10499
-+ /* use variables to hold the values so it isnt necessary to png_get them later */
-+ png_uint_32 _width,_height;
-+ int _bit_depth,_color_type,_interlace_type,_compression_type,_filter_type;
-+ png_byte _channels,_pixel_depth;
-+
-+ _width = GetWidth();
-+ _height = GetHeight();
-+ _pixel_depth = (BYTE)GetBpp();
-+ _channels = (GetBpp()>8) ? (BYTE)3: (BYTE)1;
-+ _bit_depth = (BYTE)(GetBpp()/_channels);
-+ _compression_type = PNG_COMPRESSION_TYPE_DEFAULT;
-+ _filter_type = PNG_FILTER_TYPE_DEFAULT;
-+#else
- info_ptr->width = GetWidth();
- info_ptr->height = GetHeight();
- info_ptr->pixel_depth = (BYTE)GetBpp();
-@@ -382,13 +556,22 @@ bool CxImagePNG::Encode(CxFile *hFile)
- info_ptr->bit_depth = (BYTE)(GetBpp()/info_ptr->channels);
- info_ptr->compression_type = info_ptr->filter_type = 0;
- info_ptr->valid = 0;
-+#endif
-
- switch(GetCodecOption(CXIMAGE_FORMAT_PNG)){
- case 1:
-+#if PNG_LIBPNG_VER > 10499
-+ _interlace_type = PNG_INTERLACE_ADAM7;
-+#else
- info_ptr->interlace_type = PNG_INTERLACE_ADAM7;
-+#endif
- break;
- default:
-+#if PNG_LIBPNG_VER > 10499
-+ _interlace_type = PNG_INTERLACE_NONE;
-+#else
- info_ptr->interlace_type = PNG_INTERLACE_NONE;
-+#endif
- }
-
- /* set compression level */
-@@ -398,19 +581,38 @@ bool CxImagePNG::Encode(CxFile *hFile)
-
- if (GetNumColors()){
- if (bGrayScale){
-+#if PNG_LIBPNG_VER > 10499
-+ _color_type = PNG_COLOR_TYPE_GRAY;
-+#else
- info_ptr->color_type = PNG_COLOR_TYPE_GRAY;
-+#endif
- } else {
-+#if PNG_LIBPNG_VER > 10499
-+ _color_type = PNG_COLOR_TYPE_PALETTE;
-+#else
- info_ptr->color_type = PNG_COLOR_TYPE_PALETTE;
-+#endif
- }
- } else {
-+#if PNG_LIBPNG_VER > 10499
-+ _color_type = PNG_COLOR_TYPE_RGB;
-+#else
- info_ptr->color_type = PNG_COLOR_TYPE_RGB;
-+#endif
- }
- #if CXIMAGE_SUPPORT_ALPHA
- if (AlphaIsValid()){
-+#if PNG_LIBPNG_VER > 10499
-+ _color_type |= PNG_COLOR_MASK_ALPHA;
-+ _channels++;
-+ _bit_depth = 8;
-+ _pixel_depth += 8;
-+#else
- info_ptr->color_type |= PNG_COLOR_MASK_ALPHA;
- info_ptr->channels++;
- info_ptr->bit_depth = 8;
- info_ptr->pixel_depth += 8;
-+#endif
- }
- #endif
-
-@@ -427,14 +629,30 @@ bool CxImagePNG::Encode(CxFile *hFile)
- /* set metrics */
- png_set_pHYs(png_ptr, info_ptr, head.biXPelsPerMeter, head.biYPelsPerMeter, PNG_RESOLUTION_METER);
-
-+#if PNG_LIBPNG_VER > 10499
-+ png_set_IHDR(png_ptr,info_ptr,_width,_height,_bit_depth,_color_type,_interlace_type,
-+ _compression_type,_filter_type);
-+#else
- png_set_IHDR(png_ptr, info_ptr, info_ptr->width, info_ptr->height, info_ptr->bit_depth,
- info_ptr->color_type, info_ptr->interlace_type,
- PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
-+#endif
-
- //<DP> simple transparency
- if (info.nBkgndIndex >= 0){
-+#if PNG_LIBPNG_VER <= 10499
- info_ptr->num_trans = 1;
- info_ptr->valid |= PNG_INFO_tRNS;
-+#endif
-+#if PNG_LIBPNG_VER > 10499
-+ 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 = _trans_color.index;
-+ png_set_tRNS(png_ptr,info_ptr,(png_bytep)trans,1,&_trans_color);
-+#else
- #if PNG_LIBPNG_VER > 10399
- info_ptr->trans_alpha = trans;
- info_ptr->trans_color.index = (BYTE)info.nBkgndIndex;
-@@ -450,6 +668,7 @@ bool CxImagePNG::Encode(CxFile *hFile)
- info_ptr->trans_values.blue = tc.rgbBlue;
- info_ptr->trans_values.gray = info_ptr->trans_values.index;
- #endif
-+#endif
-
- // the transparency indexes start from 0 for non grayscale palette
- if (!bGrayScale && head.biClrUsed && info.nBkgndIndex)
-@@ -457,10 +676,16 @@ bool CxImagePNG::Encode(CxFile *hFile)
- }
-
- /* set the palette if there is one */
-+#if PNG_LIBPNG_VER > 10499
-+ png_colorp _palette = NULL;
-+ if (GetPalette()){
-+ /* png_set_PLTE() will be called once the palette is ready */
-+#else
- if (GetPalette()){
- if (!bGrayScale){
- info_ptr->valid |= PNG_INFO_PLTE;
- }
-+#endif
-
- int nc = GetClrImportant();
- if (nc==0) nc = GetNumColors();
-@@ -468,20 +693,34 @@ bool CxImagePNG::Encode(CxFile *hFile)
- if (info.bAlphaPaletteEnabled){
- for(WORD ip=0; ip<nc;ip++)
- trans[ip]=GetPaletteColor((BYTE)ip).rgbReserved;
-+#if PNG_LIBPNG_VER <= 10499
- info_ptr->num_trans = (WORD)nc;
- info_ptr->valid |= PNG_INFO_tRNS;
-+#endif
-+#if PNG_LIBPNG_VER > 10499
-+ png_set_tRNS(png_ptr,info_ptr,(png_bytep)trans,nc,NULL);
-+#else
- #if PNG_LIBPNG_VER > 10399
- info_ptr->trans_alpha = trans;
- #else
- info_ptr->trans = trans;
- #endif
-+#endif
- }
-
- // copy the palette colors
-+#if PNG_LIBPNG_VER > 10499
-+ _palette = new png_color[nc];
-+ 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);
-+#else
- 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);
-+#endif
- }
-
- #if CXIMAGE_SUPPORT_ALPHA // <vho>
-@@ -495,8 +734,12 @@ bool CxImagePNG::Encode(CxFile *hFile)
- } } }
- #endif // CXIMAGE_SUPPORT_ALPHA // <vho>
-
-+#if PNG_LIBPNG_VER > 10499
-+ int row_size = max(info.dwEffWidth, (_width * _channels * _bit_depth / 8));
-+#else
- int row_size = max(info.dwEffWidth, info_ptr->width*info_ptr->channels*(info_ptr->bit_depth/8));
- info_ptr->rowbytes = row_size;
-+#endif
- BYTE *row_pointers = new BYTE[row_size];
-
- /* write the file information */
-@@ -514,7 +757,11 @@ bool CxImagePNG::Encode(CxFile *hFile)
- if (AlphaIsValid()){
- for (long ax=head.biWidth-1; ax>=0;ax--){
- c = BlindGetPixelColor(ax,ay);
-+#if PNG_LIBPNG_VER > 10499
-+ int px = ax * _channels;
-+#else
- int px = ax * info_ptr->channels;
-+#endif
- if (!bGrayScale){
- row_pointers[px++]=c.rgbRed;
- row_pointers[px++]=c.rgbGreen;
-@@ -529,7 +776,11 @@ bool CxImagePNG::Encode(CxFile *hFile)
- #endif //CXIMAGE_SUPPORT_ALPHA // <vho>
- {
- iter.GetRow(row_pointers, row_size);
-+#if PNG_LIBPNG_VER > 10499
-+ if (_color_type == PNG_COLOR_TYPE_RGB) //HACK BY OP
-+#else
- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB) //HACK BY OP
-+#endif
- RGBtoBGR(row_pointers, row_size);
- png_write_row(png_ptr, row_pointers);
- }
-@@ -546,9 +797,14 @@ bool CxImagePNG::Encode(CxFile *hFile)
- png_write_end(png_ptr, info_ptr);
-
- /* if you malloced the palette, free it here */
-+#if PNG_LIBPNG_VER > 10499
-+ if (_palette){
-+ delete [] (_palette);
-+#else
- if (info_ptr->palette){
- delete [] (info_ptr->palette);
- info_ptr->palette = NULL;
-+#endif
- }
-
- /* clean up after the write, and free any memory allocated */
---- a/lib/cximage-6.0/CxImage/ximapng.h
-+++ b/lib/cximage-6.0/CxImage/ximapng.h
-@@ -69,8 +69,13 @@ class CxImagePNG: public CxImage
-
- static void PNGAPI user_error_fn(png_structp png_ptr,png_const_charp error_msg)
- {
-+#if PNG_LIBPNG_VER > 10499
-+ strncpy((char*)png_get_error_ptr(png_ptr),error_msg,255);
-+ longjmp(png_jmpbuf(png_ptr), 1);
-+#else
- strncpy((char*)png_ptr->error_ptr,error_msg,255);
- longjmp(png_ptr->jmpbuf, 1);
-+#endif
- }
- };
-
diff --git a/media-tv/xbmc/files/xbmc-11.0-no-exec-stack.patch b/media-tv/xbmc/files/xbmc-11.0-no-exec-stack.patch
new file mode 100644
index 000000000000..35ff747d4f8b
--- /dev/null
+++ b/media-tv/xbmc/files/xbmc-11.0-no-exec-stack.patch
@@ -0,0 +1,30 @@
+http://trac.xbmc.org/ticket/12735
+
+merged upstream already
+
+From f0e33eefa4b5d46f26811db2f5e943dcd7f2870e Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Thu, 1 Mar 2012 00:04:49 -0500
+Subject: [PATCH] mark stack as non-executable
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ xbmc/utils/fastmemcpy-arm.S | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/xbmc/utils/fastmemcpy-arm.S b/xbmc/utils/fastmemcpy-arm.S
+index 0e810a7..3d77c68 100644
+--- a/xbmc/utils/fastmemcpy-arm.S
++++ b/xbmc/utils/fastmemcpy-arm.S
+@@ -527,3 +527,8 @@ copy_last_3_and_return:
+
+ #endif /* __ARM_ARCH__ < 7 */
+ #endif
++
++#if defined(__linux__) && defined(__ELF__)
++/* we don't need an executable stack */
++.section .note.GNU-stack,"",%progbits
++#endif
+--
+1.7.8.4
+
diff --git a/media-tv/xbmc/xbmc-11.0.ebuild b/media-tv/xbmc/xbmc-11.0.ebuild
index 6ee4ec232996..fdc6e05ad20a 100644
--- a/media-tv/xbmc/xbmc-11.0.ebuild
+++ b/media-tv/xbmc/xbmc-11.0.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-tv/xbmc/xbmc-11.0.ebuild,v 1.1 2012/03/29 16:22:51 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-tv/xbmc/xbmc-11.0.ebuild,v 1.2 2012/03/29 18:07:43 vapier Exp $
EAPI="4"
@@ -123,7 +123,7 @@ src_unpack() {
src_prepare() {
epatch "${FILESDIR}"/${PN}-9999-nomythtv.patch
epatch "${FILESDIR}"/${PN}-9999-no-arm-flags.patch #400617
- epatch "${FILESDIR}"/${PN}-9999-no-exec-stack.patch
+ epatch "${FILESDIR}"/${PN}-11.0-no-exec-stack.patch
# The mythtv patch touches configure.ac, so force a regen
rm -f configure