From 42ef615cc61900a246505a461885033e981aabcb Mon Sep 17 00:00:00 2001
From: Markos Chandras <hwoarang@gentoo.org>
Date: Thu, 2 Jul 2009 13:40:41 +0000
Subject: Patch to compile with glibc-2.10 and gcc-4.4. Fixes bug 276204
 (Portage version: 2.2_rc33/cvs/Linux x86_64)

---
 net-im/twittare/ChangeLog                               |  6 +++++-
 net-im/twittare/files/twittare-gcc-4.4-glibc-2.10.patch | 14 ++++++++++++++
 net-im/twittare/twittare-0.7.42.ebuild                  |  7 ++++++-
 3 files changed, 25 insertions(+), 2 deletions(-)
 create mode 100644 net-im/twittare/files/twittare-gcc-4.4-glibc-2.10.patch

diff --git a/net-im/twittare/ChangeLog b/net-im/twittare/ChangeLog
index a90ad5eb0933..3fc32ae6d0fc 100644
--- a/net-im/twittare/ChangeLog
+++ b/net-im/twittare/ChangeLog
@@ -1,6 +1,10 @@
 # ChangeLog for net-im/twittare
 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-im/twittare/ChangeLog,v 1.1 2009/05/10 11:35:02 hwoarang Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-im/twittare/ChangeLog,v 1.2 2009/07/02 13:40:40 hwoarang Exp $
+
+  02 Jul 2009; <hwoarang@gentoo.org> twittare-0.7.42.ebuild,
+  +files/twittare-gcc-4.4-glibc-2.10.patch:
+  Patch to compile with glibc-2.10 and gcc-4.4. Fixes bug 276204
 
 *twittare-0.7.42 (10 May 2009)
 
diff --git a/net-im/twittare/files/twittare-gcc-4.4-glibc-2.10.patch b/net-im/twittare/files/twittare-gcc-4.4-glibc-2.10.patch
new file mode 100644
index 000000000000..c45f9a5742cf
--- /dev/null
+++ b/net-im/twittare/files/twittare-gcc-4.4-glibc-2.10.patch
@@ -0,0 +1,14 @@
+Index: twittare-0.7.42/src/binreloc.cpp
+===================================================================
+--- twittare-0.7.42.orig/src/binreloc.cpp
++++ twittare-0.7.42/src/binreloc.cpp
+@@ -741,7 +741,8 @@ br_strndup (const char *str, size_t size
+ char *
+ br_dirname (const char *path)
+ {
+-	char *end, *result;
++	const char *end;
++	char *result;
+ 
+ 	if (path == (const char *) NULL)
+ 		return (char *) NULL;
diff --git a/net-im/twittare/twittare-0.7.42.ebuild b/net-im/twittare/twittare-0.7.42.ebuild
index bde130a56555..ff4e3b4dc43d 100644
--- a/net-im/twittare/twittare-0.7.42.ebuild
+++ b/net-im/twittare/twittare-0.7.42.ebuild
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-im/twittare/twittare-0.7.42.ebuild,v 1.1 2009/05/10 11:35:02 hwoarang Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-im/twittare/twittare-0.7.42.ebuild,v 1.2 2009/07/02 13:40:40 hwoarang Exp $
 
 EAPI="2"
 
@@ -20,10 +20,15 @@ DEPEND="x11-libs/qt-core:4
 	x11-libs/libnotify"
 RDEPEND="${DEPEND}"
 
+PATCHES=(
+	"${FILESDIR}/${PN}-gcc-4.4-glibc-2.10.patch"
+)
+
 src_prepare() {
 	# fix LDFLAGS issue
 	sed -i "s/-fpic/${LDFLAGS}\ -fpic/" "${S}"/libtwnotification/makefile || die "sed failed"
 	sed -i "s/-shared/${LDFLAGS}\ -shared/" "${S}"/libtwnotification/makefile || die "sed failed"
+	qt4_src_prepare
 }
 
 src_configure() {
-- 
cgit v1.2.3-65-gdbad