diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2011-08-09 09:10:30 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2011-08-09 09:10:30 +0000 |
commit | de32bcfcceaad93de94ebeaa279517471a7320c3 (patch) | |
tree | 9831d33728d6fd14d1f782ab6de91924345b1123 /media-libs/stimg | |
parent | Missing -lz since for example, gzopen is used. Missing zlib.h include wrt #37... (diff) | |
download | historical-de32bcfcceaad93de94ebeaa279517471a7320c3.tar.gz historical-de32bcfcceaad93de94ebeaa279517471a7320c3.tar.bz2 historical-de32bcfcceaad93de94ebeaa279517471a7320c3.zip |
Fix building with libpng15 wrt #378355 by Diego Elio Pettenò
Package-Manager: portage-2.2.0_alpha50/cvs/Linux x86_64
Diffstat (limited to 'media-libs/stimg')
-rw-r--r-- | media-libs/stimg/ChangeLog | 8 | ||||
-rw-r--r-- | media-libs/stimg/Manifest | 15 | ||||
-rw-r--r-- | media-libs/stimg/files/stimg-0.1.0-libpng15.patch | 37 | ||||
-rw-r--r-- | media-libs/stimg/stimg-0.1.0.ebuild | 23 |
4 files changed, 64 insertions, 19 deletions
diff --git a/media-libs/stimg/ChangeLog b/media-libs/stimg/ChangeLog index a33f6b55b0c2..ddbb7d2ea94f 100644 --- a/media-libs/stimg/ChangeLog +++ b/media-libs/stimg/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-libs/stimg -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/stimg/ChangeLog,v 1.11 2010/11/08 23:20:19 maekke Exp $ +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/stimg/ChangeLog,v 1.12 2011/08/09 09:10:30 ssuominen Exp $ + + 09 Aug 2011; Samuli Suominen <ssuominen@gentoo.org> stimg-0.1.0.ebuild, + +files/stimg-0.1.0-libpng15.patch: + Fix building with libpng15 wrt #378355 by Diego Elio Pettenò 08 Nov 2010; Markus Meier <maekke@gentoo.org> stimg-0.1.0.ebuild: change jpeg dep to virtual/jpeg diff --git a/media-libs/stimg/Manifest b/media-libs/stimg/Manifest index a79d1b08367d..3d0f8123952e 100644 --- a/media-libs/stimg/Manifest +++ b/media-libs/stimg/Manifest @@ -1,14 +1,15 @@ -----BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 +Hash: SHA256 +AUX stimg-0.1.0-libpng15.patch 1445 RMD160 ac15a81e3c974af4f288d17426a1e12173896e72 SHA1 742fe6033fcf5e4e3590765a40f793a0010ffb8a SHA256 b90c277e5749157dbfb5776885757350fb461e079fb499ba6bd2b0142be3e129 DIST stimg-0.1.0.tar.gz 187172 RMD160 186f156788ad5631679b339cc9859ed60913f24b SHA1 a4ed6bd8d772e3482409d93983203d0a5b8ed1e0 SHA256 1098daac6fb37bd0135d700605d99cdbb8b8a9c9e16cdc892b3018a8534fb528 -EBUILD stimg-0.1.0.ebuild 808 RMD160 8f9beb57e5bff6ef934df393f399cec4614e5084 SHA1 3cd82b4a3775763573c51eb2d4f790086f5104ee SHA256 d4c587c77c1fa4a999bdfa3a0b6d8ad3b31395657d340da2b5b051719bc81d78 -MISC ChangeLog 1284 RMD160 d035daedf75577fe7007c54fa50ce893b5ac0571 SHA1 83e3c6d5ce323737249a5f9d8fea63f45c0d3686 SHA256 aa6225c4648d8f55c408a7d3502e5e760965f1a4670c8d96e85ec37a0df56cb2 +EBUILD stimg-0.1.0.ebuild 858 RMD160 6fb5502beeb0cfbb73dd6f75350eebb5cebd0939 SHA1 46cade11e260ad5e48ef2fe92f27b75a72f07416 SHA256 23a17073dd0bb23329cc0286bc7622199ba2b1ae28aefffabb72490f6f328615 +MISC ChangeLog 1463 RMD160 9ad352aa41e11dab1183eedefbcb26c000d79d14 SHA1 2ddb560249f6c6dbd436fd954f9624f0a233f5e6 SHA256 9545ce5cf30c77d533fd1bb8436147d92152703f89d025e198f132651b671da2 MISC metadata.xml 163 RMD160 9cdda004bed83a887f4a756cb1550fab6ce563ce SHA1 bfc4f31690e338a159152dcd46d56ff7fd6b6e1b SHA256 212655100c50c4193072996553f15984b9788fb20fb4175efd2418b80d428564 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.16 (GNU/Linux) +Version: GnuPG v2.0.17 (GNU/Linux) -iEYEARECAAYFAkzYhfEACgkQkKaRLQcq0GLroQCgkB8EEObwzf40FO1sC2j1vCrU -nPkAoKLC99zXOHHSMKd1roEUJ9cIKHgL -=KF2M +iF4EAREIAAYFAk5A+YAACgkQXkR9YqOcLPEXCwD7BlDmkGrYwa/A+vKTjd9Dban/ +7/qluRcCkB/4BjR6OWMA/3Z24/mjIE3yO8D7HRB1R87UsgJGhq3LqP4spjRFoMaR +=FT9d -----END PGP SIGNATURE----- diff --git a/media-libs/stimg/files/stimg-0.1.0-libpng15.patch b/media-libs/stimg/files/stimg-0.1.0-libpng15.patch new file mode 100644 index 000000000000..41ae138f1b1f --- /dev/null +++ b/media-libs/stimg/files/stimg-0.1.0-libpng15.patch @@ -0,0 +1,37 @@ +--- src/png.c ++++ src/png.c +@@ -102,8 +102,8 @@ + 0x00, + NULL); + +- alpha = (info_ptr->channels == 4 || info_ptr->channels == 2) ? 1: 0; +- image = stimg_new(info_ptr->width, info_ptr->height, alpha); ++ alpha = (png_get_channels(png_ptr, info_ptr) == 4 || png_get_channels(png_ptr, info_ptr) == 2) ? 1: 0; ++ image = stimg_new(png_get_image_width(png_ptr, info_ptr), png_get_image_height(png_ptr, info_ptr), alpha); + + if (image == NULL) { + png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); +@@ -112,18 +112,18 @@ + } + + row_pointers = png_get_rows(png_ptr, info_ptr); +- row_size = info_ptr->width * (3 + alpha); ++ row_size = png_get_image_width(png_ptr, info_ptr) * (3 + alpha); + data = stimg_get_data(image); +- if (info_ptr->channels > 2) { +- for (i = 0; i < info_ptr->height; i++) { ++ if (png_get_channels(png_ptr, info_ptr) > 2) { ++ for (i = 0; i < png_get_image_height(png_ptr, info_ptr); i++) { + memcpy(data + row_size * i, row_pointers[i], row_size); + } + } else { + unsigned char *buf = data; + int x; +- for (i = 0; i < info_ptr->height; i++) { ++ for (i = 0; i < png_get_image_height(png_ptr, info_ptr); i++) { + x = 0; +- for (j = 0; j < info_ptr->width; j++) { ++ for (j = 0; j < png_get_image_width(png_ptr, info_ptr); j++) { + buf[0] = buf[1] = buf[2] = row_pointers[i][x]; + if (alpha) { + buf[3] = row_pointers[i][++x]; diff --git a/media-libs/stimg/stimg-0.1.0.ebuild b/media-libs/stimg/stimg-0.1.0.ebuild index 6bc501d5c0d4..bb9c448dd956 100644 --- a/media-libs/stimg/stimg-0.1.0.ebuild +++ b/media-libs/stimg/stimg-0.1.0.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/stimg/stimg-0.1.0.ebuild,v 1.11 2010/11/08 23:20:19 maekke Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/stimg/stimg-0.1.0.ebuild,v 1.12 2011/08/09 09:10:30 ssuominen Exp $ -EAPI=2 -inherit toolchain-funcs +EAPI=4 +inherit eutils toolchain-funcs DESCRIPTION="Simple and tiny image loading library" HOMEPAGE="http://homepage3.nifty.com/slokar/fb/" @@ -19,16 +19,19 @@ RDEPEND="media-libs/libpng virtual/jpeg" DEPEND="${RDEPEND}" +DOCS=( AUTHORS ) + +src_prepare() { + epatch "${FILESDIR}"/${P}-libpng15.patch +} + src_configure() { tc-export CC - econf \ - $(use_enable static-libs static) + econf $(use_enable static-libs static) } src_install() { - emake DESTDIR="${D}" install || die - find "${D}" -name '*.la' -delete - - dodoc AUTHORS + default + find "${D}" -name '*.la' -exec rm -f {} + use linguas_ja && dodoc README.ja } |