diff options
author | Michael Sterrett <mr_bones_@gentoo.org> | 2014-11-02 17:42:55 +0000 |
---|---|---|
committer | Michael Sterrett <mr_bones_@gentoo.org> | 2014-11-02 17:42:55 +0000 |
commit | 95c84a93cf6344efa94048d0397a87cd1d13bc1a (patch) | |
tree | efa074d406f9aa19f5628d98c7ee6e0c23fb353f /media-libs/sdl-image | |
parent | version bump (diff) | |
download | gentoo-2-95c84a93cf6344efa94048d0397a87cd1d13bc1a.tar.gz gentoo-2-95c84a93cf6344efa94048d0397a87cd1d13bc1a.tar.bz2 gentoo-2-95c84a93cf6344efa94048d0397a87cd1d13bc1a.zip |
old
(Portage version: 2.2.8-r2/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'media-libs/sdl-image')
-rw-r--r-- | media-libs/sdl-image/ChangeLog | 7 | ||||
-rw-r--r-- | media-libs/sdl-image/files/sdl-image-1.2.10-libpng15.patch | 160 | ||||
-rw-r--r-- | media-libs/sdl-image/sdl-image-1.2.10-r1.ebuild | 57 | ||||
-rw-r--r-- | media-libs/sdl-image/sdl-image-1.2.12.ebuild | 54 |
4 files changed, 6 insertions, 272 deletions
diff --git a/media-libs/sdl-image/ChangeLog b/media-libs/sdl-image/ChangeLog index 009950b839b2..64f06fe257f9 100644 --- a/media-libs/sdl-image/ChangeLog +++ b/media-libs/sdl-image/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for media-libs/sdl-image # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/sdl-image/ChangeLog,v 1.98 2014/11/02 08:58:23 ago Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/sdl-image/ChangeLog,v 1.99 2014/11/02 17:42:55 mr_bones_ Exp $ + + 02 Nov 2014; Michael Sterrett <mr_bones_@gentoo.org> + -files/sdl-image-1.2.10-libpng15.patch, -sdl-image-1.2.10-r1.ebuild, + -sdl-image-1.2.12.ebuild: + old 02 Nov 2014; Agostino Sarubbo <ago@gentoo.org> sdl-image-1.2.12-r1.ebuild: Stable for alpha, wrt bug #525742 diff --git a/media-libs/sdl-image/files/sdl-image-1.2.10-libpng15.patch b/media-libs/sdl-image/files/sdl-image-1.2.10-libpng15.patch deleted file mode 100644 index 78b0a92ea03e..000000000000 --- a/media-libs/sdl-image/files/sdl-image-1.2.10-libpng15.patch +++ /dev/null @@ -1,160 +0,0 @@ ---- IMG_png.c -+++ IMG_png.c -@@ -71,6 +71,10 @@ - #endif - #include <png.h> - -+/* Check for the older version of libpng */ -+#if (PNG_LIBPNG_VER_MAJOR == 1) && (PNG_LIBPNG_VER_MINOR < 4) -+#define LIBPNG_VERSION_12 -+#endif - - static struct { - int loaded; -@@ -80,6 +84,8 @@ - void (*png_destroy_read_struct) (png_structpp png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr); - png_uint_32 (*png_get_IHDR) (png_structp png_ptr, png_infop info_ptr, png_uint_32 *width, png_uint_32 *height, int *bit_depth, int *color_type, int *interlace_method, int *compression_method, int *filter_method); - png_voidp (*png_get_io_ptr) (png_structp png_ptr); -+ png_byte (*png_get_channels) (png_structp png_ptr, png_infop info_ptr); -+ png_uint_32 (*png_get_PLTE) (png_structp png_ptr, png_infop info_ptr, png_colorp *palette, int *num_palette); - png_uint_32 (*png_get_tRNS) (png_structp png_ptr, png_infop info_ptr, png_bytep *trans, int *num_trans, png_color_16p *trans_values); - png_uint_32 (*png_get_valid) (png_structp png_ptr, png_infop info_ptr, png_uint_32 flag); - void (*png_read_image) (png_structp png_ptr, png_bytepp image); -@@ -91,6 +97,9 @@ - void (*png_set_read_fn) (png_structp png_ptr, png_voidp io_ptr, png_rw_ptr read_data_fn); - void (*png_set_strip_16) (png_structp png_ptr); - int (*png_sig_cmp) (png_bytep sig, png_size_t start, png_size_t num_to_check); -+#ifndef LIBPNG_VERSION_12 -+ jmp_buf* (*png_set_longjmp_fn) (png_structp, png_longjmp_ptr, size_t); -+#endif - } lib; - - #ifdef LOAD_PNG_DYNAMIC -@@ -129,6 +138,13 @@ - SDL_UnloadObject(lib.handle); - return -1; - } -+ lib.png_get_channels = -+ (png_byte (*) (png_structp, png_infop)) -+ SDL_LoadFunction(lib.handle, "png_get_channels"); -+ if ( lib.png_get_channels == NULL ) { -+ SDL_UnloadObject(lib.handle); -+ return -1; -+ } - lib.png_get_io_ptr = - (png_voidp (*) (png_structp)) - SDL_LoadFunction(lib.handle, "png_get_io_ptr"); -@@ -136,6 +152,13 @@ - SDL_UnloadObject(lib.handle); - return -1; - } -+ lib.png_get_PLTE = -+ (png_uint_32 (*) (png_structp, png_infop, png_colorp *, int *)) -+ SDL_LoadFunction(lib.handle, "png_get_PLTE"); -+ if ( lib.png_get_PLTE == NULL ) { -+ SDL_UnloadObject(lib.handle); -+ return -1; -+ } - lib.png_get_tRNS = - (png_uint_32 (*) (png_structp, png_infop, png_bytep *, int *, png_color_16p *)) - SDL_LoadFunction(lib.handle, "png_get_tRNS"); -@@ -213,6 +236,15 @@ - SDL_UnloadObject(lib.handle); - return -1; - } -+#ifndef LIBPNG_VERSION_12 -+ lib.png_set_longjmp_fn = -+ (jmp_buf * (*) (png_structp, png_longjmp_ptr, size_t)) -+ SDL_LoadFunction(lib.handle, "png_set_longjmp_fn"); -+ if ( lib.png_set_longjmp_fn == NULL ) { -+ SDL_UnloadObject(lib.handle); -+ return -1; -+ } -+#endif - } - ++lib.loaded; - -@@ -236,7 +268,9 @@ - lib.png_create_read_struct = png_create_read_struct; - lib.png_destroy_read_struct = png_destroy_read_struct; - lib.png_get_IHDR = png_get_IHDR; -+ lib.png_get_channels = png_get_channels; - lib.png_get_io_ptr = png_get_io_ptr; -+ lib.png_get_PLTE = png_get_PLTE; - lib.png_get_tRNS = png_get_tRNS; - lib.png_get_valid = png_get_valid; - lib.png_read_image = png_read_image; -@@ -248,6 +282,9 @@ - lib.png_set_read_fn = png_set_read_fn; - lib.png_set_strip_16 = png_set_strip_16; - lib.png_sig_cmp = png_sig_cmp; -+#ifndef LIBPNG_VERSION_12 -+ lib.png_set_longjmp_fn = png_set_longjmp_fn; -+#endif - } - ++lib.loaded; - -@@ -347,7 +384,12 @@ - * the normal method of doing things with libpng). REQUIRED unless you - * set up your own error handlers in png_create_read_struct() earlier. - */ -- if ( setjmp(png_ptr->jmpbuf) ) { -+#ifndef LIBPNG_VERSION_12 -+ if ( setjmp(*lib.png_set_longjmp_fn(png_ptr, longjmp, sizeof (jmp_buf))) ) -+#else -+ if ( setjmp(png_ptr->jmpbuf) ) -+#endif -+ { - error = "Error reading the PNG file."; - goto done; - } -@@ -416,9 +458,9 @@ - Rmask = 0x000000FF; - Gmask = 0x0000FF00; - Bmask = 0x00FF0000; -- Amask = (info_ptr->channels == 4) ? 0xFF000000 : 0; -+ Amask = (lib.png_get_channels(png_ptr, info_ptr) == 4) ? 0xFF000000 : 0; - } else { -- int s = (info_ptr->channels == 4) ? 0 : 8; -+ int s = (lib.png_get_channels(png_ptr, info_ptr) == 4) ? 0 : 8; - Rmask = 0xFF000000 >> s; - Gmask = 0x00FF0000 >> s; - Bmask = 0x0000FF00 >> s; -@@ -426,7 +468,7 @@ - } - } - surface = SDL_AllocSurface(SDL_SWSURFACE, width, height, -- bit_depth*info_ptr->channels, Rmask,Gmask,Bmask,Amask); -+ bit_depth*lib.png_get_channels(png_ptr, info_ptr), Rmask,Gmask,Bmask,Amask); - if ( surface == NULL ) { - error = "Out of memory"; - goto done; -@@ -467,6 +509,9 @@ - /* Load the palette, if any */ - palette = surface->format->palette; - if ( palette ) { -+ int png_num_palette; -+ png_colorp png_palette; -+ lib.png_get_PLTE(png_ptr, info_ptr, &png_palette, &png_num_palette); - if(color_type == PNG_COLOR_TYPE_GRAY) { - palette->ncolors = 256; - for(i = 0; i < 256; i++) { -@@ -474,12 +519,12 @@ - palette->colors[i].g = i; - palette->colors[i].b = i; - } -- } else if (info_ptr->num_palette > 0 ) { -- palette->ncolors = info_ptr->num_palette; -- for( i=0; i<info_ptr->num_palette; ++i ) { -- palette->colors[i].b = info_ptr->palette[i].blue; -- palette->colors[i].g = info_ptr->palette[i].green; -- palette->colors[i].r = info_ptr->palette[i].red; -+ } else if (png_num_palette > 0 ) { -+ palette->ncolors = png_num_palette; -+ for( i=0; i<png_num_palette; ++i ) { -+ palette->colors[i].b = png_palette[i].blue; -+ palette->colors[i].g = png_palette[i].green; -+ palette->colors[i].r = png_palette[i].red; - } - } - } diff --git a/media-libs/sdl-image/sdl-image-1.2.10-r1.ebuild b/media-libs/sdl-image/sdl-image-1.2.10-r1.ebuild deleted file mode 100644 index 44f41aeedf19..000000000000 --- a/media-libs/sdl-image/sdl-image-1.2.10-r1.ebuild +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/sdl-image/sdl-image-1.2.10-r1.ebuild,v 1.12 2011/03/25 11:24:15 tupone Exp $ -EAPI=2 - -inherit base - -MY_P="${P/sdl-/SDL_}" -DESCRIPTION="image file loading library" -HOMEPAGE="http://www.libsdl.org/projects/SDL_image/" -SRC_URI="http://www.libsdl.org/projects/SDL_image/release/${MY_P}.tar.gz" - -LICENSE="LGPL-2.1" -SLOT="0" -KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris" -IUSE="gif jpeg png static-libs tiff" - -DEPEND="sys-libs/zlib - media-libs/libsdl - png? ( >=media-libs/libpng-1.4 ) - jpeg? ( virtual/jpeg ) - tiff? ( media-libs/tiff )" -RDEPEND="${DEPEND}" - -S=${WORKDIR}/${MY_P} - -PATCHES=( "${FILESDIR}"/${P}-libpng15.patch ) - -src_configure() { - econf \ - --disable-jpg-shared \ - --disable-png-shared \ - --disable-tif-shared \ - $(use_enable static-libs static) \ - $(use_enable gif) \ - $(use_enable jpeg jpg) \ - $(use_enable tiff tif) \ - $(use_enable png) \ - --enable-bmp \ - --enable-lbm \ - --enable-pcx \ - --enable-pnm \ - --enable-tga \ - --enable-xcf \ - --enable-xpm \ - --enable-xv -} - -src_install() { - emake DESTDIR="${D}" install || die "make install failed" - dobin .libs/showimage || die "dobin failed" - dodoc CHANGES README - if ! use static-libs ; then - find "${D}" -type f -name '*.la' -exec rm {} + \ - || die "la removal failed" - fi -} diff --git a/media-libs/sdl-image/sdl-image-1.2.12.ebuild b/media-libs/sdl-image/sdl-image-1.2.12.ebuild deleted file mode 100644 index e578ddf1fdab..000000000000 --- a/media-libs/sdl-image/sdl-image-1.2.12.ebuild +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/sdl-image/sdl-image-1.2.12.ebuild,v 1.10 2012/06/08 19:56:50 mr_bones_ Exp $ - -EAPI=2 -inherit eutils - -MY_P="${P/sdl-/SDL_}" -DESCRIPTION="image file loading library" -HOMEPAGE="http://www.libsdl.org/projects/SDL_image/" -SRC_URI="http://www.libsdl.org/projects/SDL_image/release/${MY_P}.tar.gz" - -LICENSE="ZLIB" -SLOT="0" -KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris" -IUSE="gif jpeg png static-libs tiff webp" - -DEPEND="sys-libs/zlib - media-libs/libsdl - png? ( >=media-libs/libpng-1.4 ) - jpeg? ( virtual/jpeg ) - tiff? ( media-libs/tiff ) - webp? ( media-libs/libwebp )" - -S=${WORKDIR}/${MY_P} - -src_configure() { - econf \ - --disable-jpg-shared \ - --disable-png-shared \ - --disable-tif-shared \ - --disable-webp-shared \ - $(use_enable static-libs static) \ - $(use_enable gif) \ - $(use_enable jpeg jpg) \ - $(use_enable tiff tif) \ - $(use_enable png) \ - $(use_enable webp) \ - --enable-bmp \ - --enable-lbm \ - --enable-pcx \ - --enable-pnm \ - --enable-tga \ - --enable-xcf \ - --enable-xpm \ - --enable-xv -} - -src_install() { - emake DESTDIR="${D}" install || die - dobin .libs/showimage || die - dodoc CHANGES README - use static-libs || prune_libtool_files --all -} |