summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2012-01-08 19:17:32 +0000
committerAndreas K. Hüttel <dilfridge@gentoo.org>2012-01-08 19:17:32 +0000
commitf35e3760fdf531c18cba12380d175d4158822fe6 (patch)
tree2b8220335ce13adc556abdacd98f50936ccea94e /sci-misc
parent[bump] dev-perl/gtk2-spell-1.40.0 (diff)
downloadgentoo-2-f35e3760fdf531c18cba12380d175d4158822fe6.tar.gz
gentoo-2-f35e3760fdf531c18cba12380d175d4158822fe6.tar.bz2
gentoo-2-f35e3760fdf531c18cba12380d175d4158822fe6.zip
Fix build with libpng-1.5; thanks a lot to Samuli
(Portage version: 2.1.10.44/cvs/Linux x86_64)
Diffstat (limited to 'sci-misc')
-rw-r--r--sci-misc/gcam/ChangeLog7
-rw-r--r--sci-misc/gcam/files/gcam-2010.07.27-libpng15.patch34
-rw-r--r--sci-misc/gcam/gcam-2010.07.27.ebuild15
-rw-r--r--sci-misc/gcam/gcam-9999.ebuild13
4 files changed, 61 insertions, 8 deletions
diff --git a/sci-misc/gcam/ChangeLog b/sci-misc/gcam/ChangeLog
index 3414d7d5f737..e476d1561005 100644
--- a/sci-misc/gcam/ChangeLog
+++ b/sci-misc/gcam/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sci-misc/gcam
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-misc/gcam/ChangeLog,v 1.4 2012/01/08 18:38:00 dilfridge Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-misc/gcam/ChangeLog,v 1.5 2012/01/08 19:17:32 dilfridge Exp $
+
+ 08 Jan 2012; Andreas K. Huettel <dilfridge@gentoo.org>
+ gcam-2010.07.27.ebuild, +files/gcam-2010.07.27-libpng15.patch,
+ gcam-9999.ebuild:
+ Fix build with libpng-1.5; thanks a lot to Samuli
*gcam-9999 (08 Jan 2012)
diff --git a/sci-misc/gcam/files/gcam-2010.07.27-libpng15.patch b/sci-misc/gcam/files/gcam-2010.07.27-libpng15.patch
new file mode 100644
index 000000000000..92b117a377a9
--- /dev/null
+++ b/sci-misc/gcam/files/gcam-2010.07.27-libpng15.patch
@@ -0,0 +1,34 @@
+diff -ruN gcam-2010.07.27.orig/libgcode/gcode_image.c gcam-2010.07.27/libgcode/gcode_image.c
+--- gcam-2010.07.27.orig/libgcode/gcode_image.c 2010-07-23 17:15:13.000000000 +0200
++++ gcam-2010.07.27/libgcode/gcode_image.c 2012-01-08 20:07:35.000000000 +0100
+@@ -260,8 +260,8 @@
+
+ png_read_info (png_ptr, info_ptr);
+
+- image->res[0] = info_ptr->width;
+- image->res[1] = info_ptr->height;
++ image->res[0] = png_get_image_width(png_ptr, info_ptr);
++ image->res[1] = png_get_image_height(png_ptr, info_ptr);
+
+ /* printf ("image size: %dx%d\n", image->res[0], image->res[1]); */
+
+@@ -274,16 +274,16 @@
+
+ row_pointers = (png_bytep *) malloc (sizeof (png_bytep) * image->res[1]);
+ for (y = 0; y < image->res[1]; y++)
+- row_pointers[y] = (png_byte*) malloc (info_ptr->rowbytes);
++ row_pointers[y] = (png_byte*) malloc (png_get_rowbytes(png_ptr, info_ptr));
+
+ png_read_image (png_ptr, row_pointers);
+
+ image->dmap = (gfloat_t *) malloc (sizeof (gfloat_t) * image->res[0] * image->res[1]);
+
+ incr = 1;
+- if (info_ptr->color_type & PNG_COLOR_MASK_COLOR)
++ if (png_get_color_type(png_ptr, info_ptr) & PNG_COLOR_MASK_COLOR)
+ incr = 3;
+- if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA)
++ if (png_get_color_type(png_ptr, info_ptr) & PNG_COLOR_MASK_ALPHA)
+ incr = 4;
+
+ for (y = 0; y < image->res[1]; y++)
diff --git a/sci-misc/gcam/gcam-2010.07.27.ebuild b/sci-misc/gcam/gcam-2010.07.27.ebuild
index 20dc44571736..ee30e8f62646 100644
--- a/sci-misc/gcam/gcam-2010.07.27.ebuild
+++ b/sci-misc/gcam/gcam-2010.07.27.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-misc/gcam/gcam-2010.07.27.ebuild,v 1.3 2010/10/23 06:52:42 dilfridge Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-misc/gcam/gcam-2010.07.27.ebuild,v 1.4 2012/01/08 19:17:32 dilfridge Exp $
EAPI="1"
@@ -15,6 +15,13 @@ SLOT="0"
KEYWORDS="amd64 ~x86"
IUSE=""
-DEPEND="x11-libs/gtk+:2
- x11-libs/gtkglext"
+DEPEND="
+ >=media-libs/libpng-1.5
+ x11-libs/gtk+:2
+ x11-libs/gtkglext
+"
RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${P}-libpng15.patch"
+)
diff --git a/sci-misc/gcam/gcam-9999.ebuild b/sci-misc/gcam/gcam-9999.ebuild
index 9198116c953c..ff5b6142e5be 100644
--- a/sci-misc/gcam/gcam-9999.ebuild
+++ b/sci-misc/gcam/gcam-9999.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/sci-misc/gcam/gcam-9999.ebuild,v 1.1 2012/01/08 18:38:00 dilfridge Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-misc/gcam/gcam-9999.ebuild,v 1.2 2012/01/08 19:17:32 dilfridge Exp $
EAPI=4
@@ -17,10 +17,17 @@ SLOT="0"
KEYWORDS=""
IUSE=""
-DEPEND="x11-libs/gtk+:2
- x11-libs/gtkglext"
+DEPEND="
+ >=media-libs/libpng-1.5
+ x11-libs/gtk+:2
+ x11-libs/gtkglext
+"
RDEPEND="${DEPEND}"
+PATCHES=(
+ "${FILESDIR}/${PN}-2010.07.27-libpng15.patch"
+)
+
src_prepare() {
base_src_prepare
eautoreconf