summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2010-03-10 13:44:18 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2010-03-10 13:44:18 +0000
commit538b0d3df25d54d7cb565fcc873e271962ee022d (patch)
treee4026d7e507ac3439d7520dc2dc598b27eb5a9eb /media-gfx/fontforge
parentKeyword ~amd64. (diff)
downloadgentoo-2-538b0d3df25d54d7cb565fcc873e271962ee022d.tar.gz
gentoo-2-538b0d3df25d54d7cb565fcc873e271962ee022d.tar.bz2
gentoo-2-538b0d3df25d54d7cb565fcc873e271962ee022d.zip
Fix building with libpng14.
(Portage version: 2.2_rc66/cvs/Linux x86_64)
Diffstat (limited to 'media-gfx/fontforge')
-rw-r--r--media-gfx/fontforge/ChangeLog6
-rw-r--r--media-gfx/fontforge/files/fontforge-20090923-libpng14.patch91
-rw-r--r--media-gfx/fontforge/fontforge-20090923.ebuild7
3 files changed, 102 insertions, 2 deletions
diff --git a/media-gfx/fontforge/ChangeLog b/media-gfx/fontforge/ChangeLog
index 8d268db93fcf..42197610b712 100644
--- a/media-gfx/fontforge/ChangeLog
+++ b/media-gfx/fontforge/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for media-gfx/fontforge
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/fontforge/ChangeLog,v 1.119 2010/01/07 22:04:35 fauli Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/fontforge/ChangeLog,v 1.120 2010/03/10 13:44:18 ssuominen Exp $
+
+ 10 Mar 2010; Samuli Suominen <ssuominen@gentoo.org>
+ fontforge-20090923.ebuild, +files/fontforge-20090923-libpng14.patch:
+ Fix building with libpng14.
07 Jan 2010; Christian Faulhammer <fauli@gentoo.org>
fontforge-20090923.ebuild:
diff --git a/media-gfx/fontforge/files/fontforge-20090923-libpng14.patch b/media-gfx/fontforge/files/fontforge-20090923-libpng14.patch
new file mode 100644
index 000000000000..f72cf9ec08f1
--- /dev/null
+++ b/media-gfx/fontforge/files/fontforge-20090923-libpng14.patch
@@ -0,0 +1,91 @@
+http://repos.archlinux.org/wsvn/packages/fontforge/trunk/libpng14.patch
+http://www.mail-archive.com/arch-commits@archlinux.org/msg11199.html
+
+--- gutils/gimagereadpng.c
++++ gutils/gimagereadpng.c
+@@ -220,13 +220,13 @@
+ if ( (info_ptr->valid&PNG_INFO_tRNS) && info_ptr->num_trans>0 ) {
+ if ( info_ptr->color_type==PNG_COLOR_TYPE_RGB || info_ptr->color_type==PNG_COLOR_TYPE_RGB_ALPHA )
+ base->trans = COLOR_CREATE(
+- (info_ptr->trans_values.red>>8),
+- (info_ptr->trans_values.green>>8),
+- (info_ptr->trans_values.blue>>8));
++ (info_ptr->trans_color.red>>8),
++ (info_ptr->trans_color.green>>8),
++ (info_ptr->trans_color.blue>>8));
+ else if ( base->image_type == it_mono )
+- base->trans = info_ptr->trans[0];
++ base->trans = info_ptr->trans_alpha[0];
+ else
+- base->clut->trans_index = base->trans = info_ptr->trans[0];
++ base->clut->trans_index = base->trans = info_ptr->trans_alpha[0];
+ }
+
+ row_pointers = galloc(info_ptr->height*sizeof(png_bytep));
+--- gutils/gimagewritepng.c
++++ gutils/gimagewritepng.c
+@@ -183,8 +183,8 @@
+ if ( info_ptr->num_palette<=16 )
+ _png_set_packing(png_ptr);
+ if ( base->trans!=-1 ) {
+- info_ptr->trans = galloc(1);
+- info_ptr->trans[0] = base->trans;
++ info_ptr->trans_alpha = galloc(1);
++ info_ptr->trans_alpha[0] = base->trans;
+ }
+ } else {
+ info_ptr->color_type = PNG_COLOR_TYPE_RGB;
+@@ -192,9 +192,9 @@
+ info_ptr->color_type = PNG_COLOR_TYPE_RGB_ALPHA;
+
+ if ( base->trans!=-1 ) {
+- info_ptr->trans_values.red = COLOR_RED(base->trans);
+- info_ptr->trans_values.green = COLOR_GREEN(base->trans);
+- info_ptr->trans_values.blue = COLOR_BLUE(base->trans);
++ info_ptr->trans_color.red = COLOR_RED(base->trans);
++ info_ptr->trans_color.green = COLOR_GREEN(base->trans);
++ info_ptr->trans_color.blue = COLOR_BLUE(base->trans);
+ }
+ }
+ _png_write_info(png_ptr, info_ptr);
+@@ -210,7 +210,7 @@
+
+ _png_write_end(png_ptr, info_ptr);
+
+- if ( info_ptr->trans!=NULL ) gfree(info_ptr->trans);
++ if ( info_ptr->trans_alpha!=NULL ) gfree(info_ptr->trans_alpha);
+ if ( info_ptr->palette!=NULL ) gfree(info_ptr->palette);
+ _png_destroy_write_struct(&png_ptr, &info_ptr);
+ gfree(rows);
+--- gutils/gimagewritepng.c
++++ gutils/gimagewritepng.c
+@@ -314,15 +314,15 @@
+ if ( info_ptr->num_palette<=16 )
+ png_set_packing(png_ptr);
+ if ( base->trans!=-1 ) {
+- info_ptr->trans = galloc(1);
+- info_ptr->trans[0] = base->trans;
++ info_ptr->trans_alpha = galloc(1);
++ info_ptr->trans_alpha[0] = base->trans;
+ }
+ } else {
+ info_ptr->color_type = PNG_COLOR_TYPE_RGB;
+ if ( base->trans!=-1 ) {
+- info_ptr->trans_values.red = COLOR_RED(base->trans);
+- info_ptr->trans_values.green = COLOR_GREEN(base->trans);
+- info_ptr->trans_values.blue = COLOR_BLUE(base->trans);
++ info_ptr->trans_color.red = COLOR_RED(base->trans);
++ info_ptr->trans_color.green = COLOR_GREEN(base->trans);
++ info_ptr->trans_color.blue = COLOR_BLUE(base->trans);
+ }
+ }
+ png_write_info(png_ptr, info_ptr);
+@@ -338,7 +338,7 @@
+
+ png_write_end(png_ptr, info_ptr);
+
+- if ( info_ptr->trans!=NULL ) gfree(info_ptr->trans);
++ if ( info_ptr->trans_alpha!=NULL ) gfree(info_ptr->trans_alpha);
+ if ( info_ptr->palette!=NULL ) gfree(info_ptr->palette);
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+ gfree(rows);
diff --git a/media-gfx/fontforge/fontforge-20090923.ebuild b/media-gfx/fontforge/fontforge-20090923.ebuild
index c1ba5e20181d..b63fad6c566f 100644
--- a/media-gfx/fontforge/fontforge-20090923.ebuild
+++ b/media-gfx/fontforge/fontforge-20090923.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/fontforge/fontforge-20090923.ebuild,v 1.4 2010/01/07 22:04:35 fauli Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/fontforge/fontforge-20090923.ebuild,v 1.5 2010/03/10 13:44:18 ssuominen Exp $
# Some notes for maintainers this package:
# 1. README-unix: freetype headers are required to make use of truetype debugger
@@ -60,6 +60,11 @@ src_unpack() {
src_prepare() {
epatch "${FILESDIR}"/fontforge-desktop.patch
epatch "${FILESDIR}"/${P}-configure.patch
+
+ # info_ptr->trans_alpha might be no-go with libpng12
+ has_version ">=media-libs/libpng-1.4" && epatch \
+ "${FILESDIR}"/${P}-libpng14.patch
+
eautoconf
if use doc; then
cd "${WORKDIR}"/html/