summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2009-09-25 16:48:52 +0000
committerJustin Lecher <jlec@gentoo.org>2009-09-25 16:48:52 +0000
commit7954409342b3fd81e93a61c2fe5c9e786dbd72c9 (patch)
tree483da107f1b06f96823c45d0b31a49fdee91f11c
parentmedia-radio/ax25-tools: further parallel make fixes (diff)
downloadsunrise-7954409342b3fd81e93a61c2fe5c9e786dbd72c9.tar.gz
sunrise-7954409342b3fd81e93a61c2fe5c9e786dbd72c9.tar.bz2
sunrise-7954409342b3fd81e93a61c2fe5c9e786dbd72c9.zip
net-im/freetalk: bug 286362
svn path=/sunrise/; revision=9291
-rw-r--r--net-im/freetalk/ChangeLog9
-rw-r--r--net-im/freetalk/files/3.2-asneeded.patch16
-rw-r--r--net-im/freetalk/files/3.2-callback.patch67
-rw-r--r--net-im/freetalk/freetalk-3.2.ebuild34
-rw-r--r--net-im/freetalk/metadata.xml5
5 files changed, 131 insertions, 0 deletions
diff --git a/net-im/freetalk/ChangeLog b/net-im/freetalk/ChangeLog
new file mode 100644
index 000000000..95e0ffc9b
--- /dev/null
+++ b/net-im/freetalk/ChangeLog
@@ -0,0 +1,9 @@
+# ChangeLog for net-im/freetalk
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 25 Sep 2009; Justin Lecher (jlec) <jlec@j-schmitz.net>
+ +freetalk-3.2.ebuild, +files/3.2-asneeded.patch,
+ +files/3.2-callback.patch, +metadata.xml:
+ bug 286362
+
diff --git a/net-im/freetalk/files/3.2-asneeded.patch b/net-im/freetalk/files/3.2-asneeded.patch
new file mode 100644
index 000000000..7a2c7d509
--- /dev/null
+++ b/net-im/freetalk/files/3.2-asneeded.patch
@@ -0,0 +1,16 @@
+--- src/Makefile.am 2008-08-27 10:58:59.000000000 +0200
++++ src/Makefile.am.new 2009-09-25 17:58:19.000000000 +0200
+@@ -1,4 +1,4 @@
+-AM_CPPFLAGS= -Wall -g $(GUILE_CFLAGS) $(GLIB_CFLAGS) $(LOUDMOUTH_CFLAGS) -DDATADIR=\"$(datadir)\" -DLOCALEDIR=\"$(localedir)\"
++AM_CPPFLAGS= $(GUILE_CFLAGS) $(GLIB_CFLAGS) $(LOUDMOUTH_CFLAGS) -DDATADIR=\"$(datadir)\" -DLOCALEDIR=\"$(localedir)\"
+
+ bin_PROGRAMS=freetalk
+
+@@ -9,6 +9,6 @@
+ roster.h interpreter.h extensions.h primitives.h presence.h \
+ file_transfer.h register.h compat.h
+
+-freetalk_LDFLAGS=$(LOUDMOUTH_LIBS) $(GLIB_LIBS) $(GUILE_LDFLAGS)
++LIBS=$(LOUDMOUTH_LIBS) $(GLIB_LIBS) $(GUILE_LIBS) -lguile -lreadline -lncurses
+
+ CLEANFILES = *~
diff --git a/net-im/freetalk/files/3.2-callback.patch b/net-im/freetalk/files/3.2-callback.patch
new file mode 100644
index 000000000..3948afee7
--- /dev/null
+++ b/net-im/freetalk/files/3.2-callback.patch
@@ -0,0 +1,67 @@
+--- orig/src/callbacks.cc
++++ mod/src/callbacks.cc
+@@ -1,7 +1,7 @@
+ /*
+ callbacks.c: Callback functions
+
+- Copyright (c) 2005, 2006, 2007 Freetalk Core Team
++ Copyright (c) 2005, 2006, 2007, 2008, 2009, 2009 Freetalk Core Team
+ This file is part of GNU Freetalk.
+
+ Freetalk is free software; you can redistribute it and/or modify
+@@ -20,6 +20,7 @@
+ */
+
+ #include <stdio.h>
++#include <string>
+ #include <string.h>
+ #include <stdlib.h>
+ #include <glib.h>
+@@ -116,8 +117,9 @@
+ LmMessage *msg, gpointer user_data)
+ {
+ LmMessageNode *root, *body, *x;
+- const char *from, *msg_str, *type;
++ const char *msg_str, *type;
+ char *ts = NULL;
++ std::string from;
+
+ root = lm_message_get_node (msg);
+ body = lm_message_node_get_child (root, "body");
+@@ -152,11 +154,12 @@
+ set_hook_return (0);
+ /* TBD : make the below stripping of /Resource configurable */
+ if (1) {
+- if (strchr (from, '/'))
+- *strchr (from, '/') = '\0';
++ const size_t pos = from.find("/");
++ if (pos != std::string::npos)
++ from.replace(pos, from.size() - pos, "");
+ }
+ {
+- FtRosterItem *item = ft_roster_lookup (from);
++ FtRosterItem *item = ft_roster_lookup (from.c_str());
+ char *nickname;
+
+ if (!item)
+@@ -166,17 +169,17 @@
+
+ scm_run_hook (ex_message_receive_hook,
+ scm_list_n (ts ? scm_from_locale_string (ts) : scm_from_locale_string (""),
+- scm_from_locale_string (from),
++ scm_from_locale_string (from.c_str()),
+ nickname ? scm_from_locale_string (nickname) : scm_from_locale_string (""),
+ scm_from_locale_string (msg_str),
+ SCM_UNDEFINED));
+ }
+ if (ts) g_free (ts);
+
+- if (get_hook_return () == 1)
++ if (get_hook_return () == 1)
+ return LM_HANDLER_RESULT_REMOVE_MESSAGE;
+
+- PRINTF ("%s: %s", from, msg_str);
++ PRINTF ("%s: %s", from.c_str(), msg_str);
+ } else {
+ /* This logic should be looked into : FIXME */
+ ft_send_file_message_data (msg);
diff --git a/net-im/freetalk/freetalk-3.2.ebuild b/net-im/freetalk/freetalk-3.2.ebuild
new file mode 100644
index 000000000..ef0df2d66
--- /dev/null
+++ b/net-im/freetalk/freetalk-3.2.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+
+inherit autotools eutils
+
+DESCRIPTION="Console based Jabber client"
+HOMEPAGE="http://www.gnu.org/software/freetalk/"
+SRC_URI="http://savannah.gnu.org/download/${PN}/${P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+LICENSE="GPL-3"
+IUSE=""
+
+RDEPEND="
+ dev-libs/glib:2
+ dev-scheme/guile
+ net-libs/loudmouth"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PV}-callback.patch \
+ "${FILESDIR}"/${PV}-asneeded.patch
+ mkdir m4
+ eautoreconf
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+}
diff --git a/net-im/freetalk/metadata.xml b/net-im/freetalk/metadata.xml
new file mode 100644
index 000000000..7e3286984
--- /dev/null
+++ b/net-im/freetalk/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>maintainer-wanted</herd>
+</pkgmetadata>