From f1867d8e038fcdb874dc1cda9cf6738734661edc Mon Sep 17 00:00:00 2001 From: Samuli Suominen Date: Thu, 11 Mar 2010 00:44:53 +0000 Subject: Fix (detection and) building with libpng14. (Portage version: 2.2_rc66/cvs/Linux x86_64) --- x11-terms/multi-aterm/ChangeLog | 8 +++-- .../multi-aterm/files/0.2.1-initialize-vars.patch | 5 ++-- .../multi-aterm-0.2.1-display-security-issue.patch | 6 ++-- .../files/multi-aterm-0.2.1-libpng14.patch | 20 +++++++++++++ x11-terms/multi-aterm/multi-aterm-0.2.1-r1.ebuild | 34 +++++++++++----------- 5 files changed, 49 insertions(+), 24 deletions(-) create mode 100644 x11-terms/multi-aterm/files/multi-aterm-0.2.1-libpng14.patch (limited to 'x11-terms') diff --git a/x11-terms/multi-aterm/ChangeLog b/x11-terms/multi-aterm/ChangeLog index 052abfd777cc..a1880702857e 100644 --- a/x11-terms/multi-aterm/ChangeLog +++ b/x11-terms/multi-aterm/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for x11-terms/multi-aterm -# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-terms/multi-aterm/ChangeLog,v 1.30 2008/05/06 17:45:27 dertobi123 Exp $ +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/x11-terms/multi-aterm/ChangeLog,v 1.31 2010/03/11 00:44:53 ssuominen Exp $ + + 11 Mar 2010; Samuli Suominen + multi-aterm-0.2.1-r1.ebuild, +files/multi-aterm-0.2.1-libpng14.patch: + Fix (detection and) building with libpng14. 06 May 2008; Tobias Scherbaum multi-aterm-0.2.1-r1.ebuild: diff --git a/x11-terms/multi-aterm/files/0.2.1-initialize-vars.patch b/x11-terms/multi-aterm/files/0.2.1-initialize-vars.patch index b7f31b5393e0..58be689bb961 100644 --- a/x11-terms/multi-aterm/files/0.2.1-initialize-vars.patch +++ b/x11-terms/multi-aterm/files/0.2.1-initialize-vars.patch @@ -1,6 +1,5 @@ -diff -Nur multi-aterm-0.2.1/src/command.c multi-aterm-0.2.1-fixed/src/command.c ---- multi-aterm-0.2.1/src/command.c 2004-08-17 12:09:11.000000000 +0200 -+++ multi-aterm-0.2.1-fixed/src/command.c 2004-09-04 05:27:51.740333672 +0200 +--- src/command.c ++++ src/command.c @@ -1487,7 +1487,7 @@ static XComposeStatus compose = { NULL, 0 }; static unsigned char kbuf[KBUFSZ]; diff --git a/x11-terms/multi-aterm/files/multi-aterm-0.2.1-display-security-issue.patch b/x11-terms/multi-aterm/files/multi-aterm-0.2.1-display-security-issue.patch index 27f56255acdb..939785484030 100644 --- a/x11-terms/multi-aterm/files/multi-aterm-0.2.1-display-security-issue.patch +++ b/x11-terms/multi-aterm/files/multi-aterm-0.2.1-display-security-issue.patch @@ -1,5 +1,7 @@ ---- multi-aterm-0.2.1/src/main.c 2004-09-03 20:49:36.000000000 +0200 -+++ multi-aterm-0.2.1.new/src/main.c 2008-05-03 13:33:04.000000000 +0200 +http://bugs.gentoo.org/219754 + +--- src/main.c ++++ src/main.c @@ -1853,15 +1853,13 @@ //get_options(argc, argv); //display_options(); diff --git a/x11-terms/multi-aterm/files/multi-aterm-0.2.1-libpng14.patch b/x11-terms/multi-aterm/files/multi-aterm-0.2.1-libpng14.patch new file mode 100644 index 000000000000..6aeadc47780e --- /dev/null +++ b/x11-terms/multi-aterm/files/multi-aterm-0.2.1-libpng14.patch @@ -0,0 +1,20 @@ +--- src/png.c ++++ src/png.c +@@ -86,7 +86,7 @@ + display_depth = XDefaultDepth(display,XDefaultScreen(display)); + + fread(sig, 1, 8, ifile); +- if (!png_check_sig(sig, 8)){ ++ if (png_sig_cmp (sig, 0, 8)){ + fclose(ifile); + return -1; + } +@@ -116,7 +116,7 @@ + + if (png_depth < 8){ + if (png_color_type == PNG_COLOR_TYPE_GRAY ){ +- png_set_gray_1_2_4_to_8(png_ptr); ++ png_set_expand_gray_1_2_4_to_8(png_ptr); + png_row_bytes = png_width; + }else{ + png_set_expand(png_ptr); diff --git a/x11-terms/multi-aterm/multi-aterm-0.2.1-r1.ebuild b/x11-terms/multi-aterm/multi-aterm-0.2.1-r1.ebuild index d77a7b48ae6b..a9b2013c26a0 100644 --- a/x11-terms/multi-aterm/multi-aterm-0.2.1-r1.ebuild +++ b/x11-terms/multi-aterm/multi-aterm-0.2.1-r1.ebuild @@ -1,17 +1,18 @@ -# Copyright 1999-2008 Gentoo Foundation +# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-terms/multi-aterm/multi-aterm-0.2.1-r1.ebuild,v 1.8 2008/05/06 17:45:27 dertobi123 Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-terms/multi-aterm/multi-aterm-0.2.1-r1.ebuild,v 1.9 2010/03/11 00:44:53 ssuominen Exp $ +EAPI=2 inherit eutils DESCRIPTION="Terminal emulator with transparency support as well as rxvt backwards compatibility with tab support" HOMEPAGE="http://www.nongnu.org/materm/materm.html" SRC_URI="http://www.nongnu.org/materm/${P}.tar.gz" -IUSE="cjk debug jpeg png" LICENSE="GPL-2" SLOT="0" KEYWORDS="alpha amd64 hppa ~mips ppc sparc x86" +IUSE="cjk debug jpeg png" RDEPEND="x11-libs/libXpm jpeg? ( media-libs/jpeg ) @@ -19,17 +20,17 @@ RDEPEND="x11-libs/libXpm DEPEND="${RDEPEND} >=sys-apps/sed-4" -src_unpack() { - unpack ${A} - cd "${S}" - - epatch "${FILESDIR}/${PV}-initialize-vars.patch" +src_prepare() { + epatch "${FILESDIR}"/${PV}-initialize-vars.patch \ + "${FILESDIR}"/${P}-display-security-issue.patch \ + "${FILESDIR}"/${P}-libpng14.patch - # Security bug #219754 - epatch "${FILESDIR}/${P}-display-security-issue.patch" + sed -i \ + -e 's:png_check_sig:png_sig_cmp:' \ + configure || die } -src_compile() { +src_configure() { econf \ --enable-transparency \ --enable-fading \ @@ -42,12 +43,11 @@ src_compile() { $(use_enable cjk kanji) \ $(use_enable debug) \ $(use_enable jpeg) \ - $(use_enable png) \ - || die "econf failed" - emake || die "emake failed" + $(use_enable png) } -src_install () { - einstall || die "einstall failed" - dodoc NEWS ChangeLog doc/TODO || die "dodoc failed" +src_install() { + emake DESTDIR="${D}" install || die + dodoc AUTHORS ChangeLog NEWS TODO + newdoc doc/TODO TODO.2 } -- cgit v1.2.3-65-gdbad