summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2009-08-07 12:29:43 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2009-08-07 12:29:43 +0000
commitdf43a247a0eee2ab7d53f76885fb28f66aeb0cbb (patch)
tree3b39fd118d3fd045e98d32fff81439bbcdedeebe /net-irc
parentCVS broke the patch due to header in it, fix it (diff)
downloadgentoo-2-df43a247a0eee2ab7d53f76885fb28f66aeb0cbb.tar.gz
gentoo-2-df43a247a0eee2ab7d53f76885fb28f66aeb0cbb.tar.bz2
gentoo-2-df43a247a0eee2ab7d53f76885fb28f66aeb0cbb.zip
Fix building with GLIBC 2.10+ wrt #271640.
(Portage version: 2.2_rc36/cvs/Linux x86_64)
Diffstat (limited to 'net-irc')
-rw-r--r--net-irc/telepathy-idle/ChangeLog6
-rw-r--r--net-irc/telepathy-idle/files/telepathy-idle-0.1.2-glibc-2.10.patch60
-rw-r--r--net-irc/telepathy-idle/telepathy-idle-0.1.2.ebuild11
3 files changed, 74 insertions, 3 deletions
diff --git a/net-irc/telepathy-idle/ChangeLog b/net-irc/telepathy-idle/ChangeLog
index 4cacb86be1ec..440d0dbd9db8 100644
--- a/net-irc/telepathy-idle/ChangeLog
+++ b/net-irc/telepathy-idle/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for net-irc/telepathy-idle
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-irc/telepathy-idle/ChangeLog,v 1.7 2009/03/29 15:45:26 solar Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-irc/telepathy-idle/ChangeLog,v 1.8 2009/08/07 12:29:42 ssuominen Exp $
+
+ 07 Aug 2009; Samuli Suominen <ssuominen@gentoo.org>
+ telepathy-idle-0.1.2.ebuild, +files/telepathy-idle-0.1.2-glibc-2.10.patch:
+ Fix building with GLIBC 2.10+ wrt #271640.
29 Mar 2009; <solar@gentoo.org> telepathy-idle-0.1.2.ebuild:
- keyword ~arm
diff --git a/net-irc/telepathy-idle/files/telepathy-idle-0.1.2-glibc-2.10.patch b/net-irc/telepathy-idle/files/telepathy-idle-0.1.2-glibc-2.10.patch
new file mode 100644
index 000000000000..32264d5eac80
--- /dev/null
+++ b/net-irc/telepathy-idle/files/telepathy-idle-0.1.2-glibc-2.10.patch
@@ -0,0 +1,60 @@
+From 1380db9f7a3feab144452f990b79728c9f2e3dbf Mon Sep 17 00:00:00 2001
+From: Will Thompson <will.thompson@collabora.co.uk>
+Date: Sat, 20 Jun 2009 18:22:15 +0100
+Subject: [PATCH] Define _GNU_SOURCE not __USE_GNU to get strnlen(3).
+
+__USE_GNU is a glibc-internal macro that we should not be using; this
+was causing a build failure in openSUSE, which has a glibc from the
+future.
+
+idle-connection.c doesn't actually use strnlen.
+
+Based on a patch by Vincent Untz, which didn't compile for me: it seemed
+like string.h was getting #included before the #define, and thus strnlen
+wasn't exposed. Making the #define the first thing in idle-parser.c
+fixed this.
+---
+ src/idle-connection.c | 2 --
+ src/idle-parser.c | 5 +++--
+ 2 files changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/src/idle-connection.c b/src/idle-connection.c
+index 7080ae3..10613b4 100644
+--- a/src/idle-connection.c
++++ b/src/idle-connection.c
+@@ -22,8 +22,6 @@
+
+ #include <config.h>
+
+-/* strnlen */
+-#define __USE_GNU
+ #include <string.h>
+ #include <time.h>
+
+diff --git a/src/idle-parser.c b/src/idle-parser.c
+index b5d561a..93c330d 100644
+--- a/src/idle-parser.c
++++ b/src/idle-parser.c
+@@ -18,6 +18,9 @@
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
++/* For strnlen(), which is a GNU extension. */
++#define _GNU_SOURCE
++
+ #include "idle-parser.h"
+
+ #include "idle-connection.h"
+@@ -26,9 +29,7 @@
+ #include <glib.h>
+ #include <glib-object.h>
+
+-#define __USE_GNU
+ #include <string.h>
+-#undef __USE_GNU
+ #include <stdio.h>
+
+ #define IDLE_DEBUG_FLAG IDLE_DEBUG_PARSER
+--
+1.6.3.1
+
diff --git a/net-irc/telepathy-idle/telepathy-idle-0.1.2.ebuild b/net-irc/telepathy-idle/telepathy-idle-0.1.2.ebuild
index 6a3a78bb5c98..160fb8d0ff55 100644
--- a/net-irc/telepathy-idle/telepathy-idle-0.1.2.ebuild
+++ b/net-irc/telepathy-idle/telepathy-idle-0.1.2.ebuild
@@ -1,6 +1,9 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-irc/telepathy-idle/telepathy-idle-0.1.2.ebuild,v 1.5 2009/03/29 15:45:26 solar Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-irc/telepathy-idle/telepathy-idle-0.1.2.ebuild,v 1.6 2009/08/07 12:29:42 ssuominen Exp $
+
+EAPI=2
+inherit eutils
DESCRIPTION="Full-featured IRC connection manager for Telepathy."
HOMEPAGE="http://telepathy.freedesktop.org/wiki/Components"
@@ -12,13 +15,17 @@ KEYWORDS="~arm ~alpha ~amd64 ~ia64 ~sparc ~x86"
IUSE=""
RDEPEND="dev-libs/dbus-glib
- >=dev-libs/glib-2.8.6
+ >=dev-libs/glib-2.8.6:2
dev-libs/openssl
net-libs/telepathy-glib
sys-apps/dbus"
DEPEND="${RDEPEND}
dev-util/pkgconfig"
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-glibc-2.10.patch
+}
+
src_install() {
emake DESTDIR="${D}" install || die "emake install failed"
dodoc AUTHORS || die