]> git.pld-linux.org Git - packages/irssi.git/commitdiff
Up to 1.4.2. auto/th/irssi-1.4.2-1
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Sat, 1 Oct 2022 22:00:03 +0000 (00:00 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Sat, 1 Oct 2022 22:00:21 +0000 (00:00 +0200)
bug-1374.patch [new file with mode: 0644]
gtimeval-build-fix.patch [new file with mode: 0644]
irssi-dcc-send-limit.patch
irssi-gcc4.patch [deleted file]
irssi.spec

diff --git a/bug-1374.patch b/bug-1374.patch
new file mode 100644 (file)
index 0000000..7a7efdc
--- /dev/null
@@ -0,0 +1,43 @@
+diff --git a/configure.ac b/configure.ac
+index f03569e..53a9de6 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -650,6 +650,7 @@ for c in $CHAT_MODULES; do
+ done
+ FE_COMMON_LIBS="$FE_COMMON_LIBS../fe-common/core/libfe_common_core.a"
++AC_SUBST(FE_COMMON_LIBS)
+ dnl ** common libraries needed by frontends
+ COMMON_NOUI_LIBS="$CHAT_LIBS $CORE_LIBS"
+diff --git a/src/fe-none/Makefile.am b/src/fe-none/Makefile.am
+index bbcd63f..e8ce8d6 100644
+--- a/src/fe-none/Makefile.am
++++ b/src/fe-none/Makefile.am
+@@ -4,12 +4,13 @@ AM_CPPFLAGS = \
+       -I$(top_builddir) \
+       $(GLIB_CFLAGS)
+-botti_DEPENDENCIES = @COMMON_NOUI_LIBS@
++botti_DEPENDENCIES = @COMMON_NOUI_LIBS@ @FE_COMMON_LIBS@
+ botti_LDADD = \
+       @COMMON_NOUI_LIBS@ \
+       @PERL_LINK_LIBS@ \
+       @PERL_LINK_FLAGS@ \
++      @FE_COMMON_LIBS@ \
+       @PROG_LIBS@
+ botti_SOURCES = \
+diff --git a/src/fe-none/meson.build b/src/fe-none/meson.build
+index 58df15f..8e32b94 100644
+--- a/src/fe-none/meson.build
++++ b/src/fe-none/meson.build
+@@ -11,6 +11,7 @@ executable('botti',
+     libconfig_a,
+     libcore_a,
+     libirc_a,
++    libfe_common_core_a,
+   ],
+   install : true,
+   dependencies : dep
diff --git a/gtimeval-build-fix.patch b/gtimeval-build-fix.patch
new file mode 100644 (file)
index 0000000..93a1203
--- /dev/null
@@ -0,0 +1,123 @@
+From c7728ea5aa2f4e584159b3d12ad815294c44ca6a Mon Sep 17 00:00:00 2001
+From: Ailin Nemui <ailin@z30a.localdomain>
+Date: Tue, 17 Mar 2020 14:32:52 +0100
+Subject: [PATCH] add compatibility code to GTimeVal -> gint64 transition
+Origin: https://github.com/cdidier/irssi-xmpp/pull/53
+Reviewed-By: Simon Chopin <schopin@ubuntu.com>
+Last-Update: 2022-07-29
+
+this is for irssi/irssi#1145
+---
+ src/core/xep/ping.c | 50 +++++++++++++++++++++++++++++++++------------
+ 1 file changed, 37 insertions(+), 13 deletions(-)
+
+diff --git a/src/core/xep/ping.c b/src/core/xep/ping.c
+index d51930a..7b811cb 100644
+--- a/src/core/xep/ping.c
++++ b/src/core/xep/ping.c
+@@ -36,15 +36,40 @@
+ #define XMLNS_PING "urn:xmpp:ping"
++#if defined(IRSSI_ABI_VERSION) && IRSSI_ABI_VERSION >= 25
++#define NO_TIMEVAL
++#define TimeType gint64
++#else
++#define TimeType GTimeVal
++#endif
++
+ struct ping_data {
+-      char     *id;
+-      GTimeVal  time;
++      char    *id;
++      TimeType time;
+ };
+ static int     timeout_tag;
+ static GSList *supported_servers;
+ static DATALIST *pings;
++#ifdef NO_TIMEVAL
++
++#define set_current_time(var)   (var) = g_get_real_time()
++#define clear_time(var)         (var) = 0
++#define has_time(var)           ((var) != 0)
++#define get_time_sec(var)       ((var) / G_TIME_SPAN_SECOND)
++#define get_time_diff(to, from) (to) - (from)
++
++#else
++
++#define set_current_time(var)   g_get_current_time(&(var))
++#define clear_time(var)         memset(&(var), 0, sizeof((var)))
++#define has_time(var)           ((var).tv_sec != 0)
++#define get_time_sec(var)       ((var).tv_sec)
++#define get_time_diff(to, from) (int) get_timeval_diff(&(to), &(from))
++
++#endif
++
+ static void
+ request_ping(XMPP_SERVER_REC *server, const char *dest)
+ {
+@@ -63,13 +88,13 @@ request_ping(XMPP_SERVER_REC *server, const char *dest)
+               g_free(server->ping_id);
+               server->ping_id =
+                   g_strdup(lm_message_node_get_attribute(lmsg->node, "id"));
+-              g_get_current_time(&server->lag_sent);
++              set_current_time(server->lag_sent);
+               server->lag_last_check = time(NULL);
+       } else {
+               pd = g_new0(struct ping_data, 1);
+               pd->id =
+                   g_strdup(lm_message_node_get_attribute(lmsg->node, "id"));
+-              g_get_current_time(&pd->time);
++              set_current_time(pd->time);
+               datalist_add(pings, server, dest, pd);
+       }
+       signal_emit("xmpp send iq", 2, server, lmsg);
+@@ -98,7 +123,7 @@ sig_recv_iq(XMPP_SERVER_REC *server, LmMessage *lmsg, const int type,
+ {
+       DATALIST_REC *rec;
+       LmMessageNode *node;
+-      GTimeVal now;
++      TimeType now;
+       struct ping_data *pd;
+       if (type == LM_MESSAGE_SUB_TYPE_RESULT) {
+@@ -106,19 +131,18 @@ sig_recv_iq(XMPP_SERVER_REC *server, LmMessage *lmsg, const int type,
+               if (server->ping_id != NULL
+                   && (*from == '\0' || strcmp(from, server->domain) == 0)
+                   && strcmp(id, server->ping_id) == 0) {
+-                      g_get_current_time(&now);
+-                      server->lag =
+-                          (int)get_timeval_diff(&now, &server->lag_sent);
+-                      memset(&server->lag_sent, 0, sizeof(server->lag_sent));
++                      set_current_time(now);
++                      server->lag = get_time_diff(now, server->lag_sent);
++                      clear_time(server->lag_sent);
+                       g_free_and_null(server->ping_id);
+                       signal_emit("server lag", 1, server);
+               } else if (lmsg->node->children == NULL
+                   && (rec = datalist_find(pings, server, from)) != NULL) {
+                       pd = rec->data;
+                       if (strcmp(id, pd->id) == 0) {
+-                              g_get_current_time(&now);
++                              set_current_time(now);
+                               signal_emit("xmpp ping", 3, server, from,
+-                                  get_timeval_diff(&now, &pd->time));
++                                  get_time_diff(now, pd->time));
+                       }
+               }
+       } else if (type == LM_MESSAGE_SUB_TYPE_GET) {
+@@ -166,10 +190,10 @@ check_ping_func(void)
+       now = time(NULL);
+       for (tmp = supported_servers; tmp != NULL; tmp = tmp->next) {
+               server = XMPP_SERVER(tmp->data);
+-              if (server->lag_sent.tv_sec != 0) {
++              if (has_time(server->lag_sent)) {
+                       /* waiting for lag reply */
+                       if (max_lag > 1 &&
+-                          (now - server->lag_sent.tv_sec) > max_lag) {
++                          (now - get_time_sec(server->lag_sent)) > max_lag) {
+                               /* too much lag - disconnect */
+                               signal_emit("server lag disconnect", 1,
+                                   server);
index 68535bbb99e39709ad967aa38427330004b68064..0f9f98e85baae6b930be2eeead1eb1a25d62dc91 100644 (file)
@@ -69,7 +69,7 @@ diff -urNp -x '*.orig' irssi-1.2.2.org/src/irc/dcc/dcc-send.c irssi-1.2.2/src/ir
 +              g_source_remove(dcc->timeout_tag);
 +      dcc->timeout_tag = -1;
 +      
-+      dcc->tagwrite = g_input_add(dcc->handle, G_INPUT_WRITE,
++      dcc->tagwrite = i_input_add(dcc->handle, I_INPUT_WRITE,
 +                                  (GInputFunction) dcc_send_data, dcc);
 +
 +      return;
@@ -135,7 +135,7 @@ diff -urNp -x '*.orig' irssi-1.2.2.org/src/irc/dcc/dcc-send.c irssi-1.2.2/src/ir
 +      dcc->timeout_tag = -1;
          dcc->file_quoted = strchr(fname, ' ') != NULL;
        if (!passive) {
-               dcc->tagconn = g_input_add(handle, G_INPUT_READ,
+               dcc->tagconn =
 @@ -473,6 +552,7 @@ void dcc_send_init(void)
          dcc_register_type("SEND");
        settings_add_str("dcc", "dcc_upload_path", "~");
diff --git a/irssi-gcc4.patch b/irssi-gcc4.patch
deleted file mode 100644 (file)
index 6b2ecc5..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-diff -urNp -x '*.orig' irssi-1.2.2.org/src/core/misc.h irssi-1.2.2/src/core/misc.h
---- irssi-1.2.2.org/src/core/misc.h    2019-08-29 15:48:46.000000000 +0200
-+++ irssi-1.2.2/src/core/misc.h        2021-05-04 21:22:59.014622440 +0200
-@@ -4,6 +4,10 @@
- int g_input_add_poll(int fd, int priority, int condition,
-                    GInputFunction function, void *data);
-+#ifdef HAVE_CONFIG_H
-+#include "irssi-config.h"
-+#endif
-+
- /* `str' should be type char[MAX_INT_STRLEN] */
- #define ltoa(str, num) \
-       g_snprintf(str, sizeof(str), "%d", num)
-diff -urNp -x '*.orig' irssi-1.2.2.org/src/perl/module.h irssi-1.2.2/src/perl/module.h
---- irssi-1.2.2.org/src/perl/module.h  2019-08-29 15:48:46.000000000 +0200
-+++ irssi-1.2.2/src/perl/module.h      2021-05-04 21:22:59.017955947 +0200
-@@ -1,5 +1,9 @@
- #include "common.h"
-+#ifdef HAVE_CONFIG_H
-+#include "irssi-config.h"
-+#endif
-+
- #ifdef NEED_PERL_H
- #  include <EXTERN.h>
- #  ifndef _SEM_SEMUN_UNDEFINED
index 4b82c8faf81b8a3afb06e77d0a2493c2c6e1baaa..07ce8ca848cc8fcdc538fe407ac2dd24a2a71478 100644 (file)
 
 %define                idea_ver        0.1.46
 %define                xmpp_ver        0.53
-%define                irssi_perl_version 20210409
+%define                irssi_perl_version 20220717
 Summary:       Irssi is a IRC client
 Summary(fr.UTF-8):     Irssi est un client IRC
 Summary(hu.UTF-8):     Irssi egy IRC kliens
 Summary(pl.UTF-8):     Irssi - wygodny w użyciu klient IRC
 Name:          irssi
-Version:       1.2.3
-Release:       5
+Version:       1.4.2
+Release:       1
 License:       GPL
 Group:         Applications/Communications
 Source0:       https://github.com/irssi/irssi/releases/download/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: ebbf455d8e9c847fc8106591088024ab
+# Source0-md5: 8bf8aa19e6c08553d9bd05b89158df71
 Source1:       %{name}.desktop
 Source2:       %{name}.png
 # NXDOMAIN
@@ -33,9 +33,9 @@ Source4:      http://cybione.org/~irssi-xmpp/files/irssi-xmpp-%{xmpp_ver}.tar.gz
 Patch0:                %{name}-dcc-send-limit.patch
 Patch1:                %{name}-home_etc.patch
 Patch2:                %{name}-idea-listlen.patch
-Patch3:                %{name}-gcc4.patch
+Patch3:         bug-1374.patch
 Patch4:                %{name}-dynamic.patch
-
+Patch5:         gtimeval-build-fix.patch
 Patch6:                %{name}-color_support_for_gui_entry.patch
 Patch7:                %{name}-libs-nopoison.patch
 Patch8:                am.patch
@@ -118,6 +118,7 @@ Ten pakiet zawiera wtyczkę do Irssi z obsługą XMPP.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+
 %if %{with dynamic}
 %patch4 -p1
 %endif
@@ -129,6 +130,11 @@ echo 'AC_DEFUN([AM_PATH_GLIB],[:])' > glib1.m4
 
 mv irssi-idea{-%{idea_ver},}
 mv irssi-xmpp{-%{xmpp_ver},}
+
+cd irssi-xmpp
+%patch5 -p1
+cd ..
+
 %if %{with dynamic}
 %patch8 -p1
 %endif
This page took 0.162059 seconds and 4 git commands to generate.