From 0f5737fe82f7e52cc8468281054c52e7de1800d9 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 5 Jan 2019 19:01:29 -0800 Subject: [PATCH] quassel-irc: Update to latest version Now that the library has been updated, we can also update this. Switched to codeload as we don't need the submodule anymore. Various other Makefile consistency updates. Signed-off-by: Rosen Penev --- net/quassel-irssi/Makefile | 26 ++-- .../patches/001-respect-cflags.patch | 2 +- .../patches/002-use-cc-var.patch | 2 +- .../003-use-pkgconfig-ldflags-quasselc.patch | 2 +- ...ith-potential-irssi-abi-8-and-drop-p.patch | 118 ++++++++++++++++++ ...ys-socket.h-rather-than-asm-socket.h.patch | 26 ---- ...dereference-when-leaving-an-unconnec.patch | 28 ----- .../patches/030-Makes-gcc7-happy.patch | 64 ---------- 8 files changed, 132 insertions(+), 136 deletions(-) create mode 100644 net/quassel-irssi/patches/010-Get-compatible-with-potential-irssi-abi-8-and-drop-p.patch delete mode 100644 net/quassel-irssi/patches/010-Use-sys-socket.h-rather-than-asm-socket.h.patch delete mode 100644 net/quassel-irssi/patches/020-Fix-nullpointer-dereference-when-leaving-an-unconnec.patch delete mode 100644 net/quassel-irssi/patches/030-Makes-gcc7-happy.patch diff --git a/net/quassel-irssi/Makefile b/net/quassel-irssi/Makefile index 2a88e0122..002f52ec1 100644 --- a/net/quassel-irssi/Makefile +++ b/net/quassel-irssi/Makefile @@ -8,22 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=quassel-irssi +PKG_SOURCE_DATE:=2017-11-30 +PKG_SOURCE_VERSION:=079be662dde374a383646256108a4974c2bc7796 +PKG_RELEASE:=1 -# quassel-irssi upstream doesn't release versions (at least, at the moment), -# so use commit date for PKG_VERSION and embed commit hash into PKG_RELEASE. -PKG_VERSION:=2017-01-17 -PKG_SOURCE_VERSION:=19e810405789a35b92026b56ea49d01a3f544b07 -PKG_RELEASE:=1.$(PKG_SOURCE_VERSION) - -PKG_LICENSE:=GPL-3.0+ - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/phhusson/quassel-irssi -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz -PKG_MIRROR_HASH:=5ad9416ce4d522dc3bb1b487063339f559928dcefa8aef4ce88ab93d5f4d5352 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/phhusson/quassel-irssi/tar.gz/$(PKG_SOURCE_VERSION)? +PKG_HASH:=c276a92a47f8edf5ae1d9db0e72a69d078f2f3f80e055853fc6d06099d898966 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION) PKG_MAINTAINER:=Ben Rosser +PKG_LICENSE:=GPL-3.0+ +PKG_LICENSE_FILES:=core/COPYING PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 @@ -31,12 +27,12 @@ PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk MAKE_PATH := core -MAKE_VARS += IRSSI_CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" IRSSI_INCLUDE=$(STAGING_DIR)/usr/include/irssi +MAKE_VARS += SYSTEM_QUASSELC=1 IRSSI_CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" IRSSI_INCLUDE=$(STAGING_DIR)/usr/include/irssi define Package/quassel-irssi SECTION:=net CATEGORY:=Network - DEPENDS:=+irssi + DEPENDS:=+irssi +quasselc SUBMENU:=Instant Messaging URL:=https://github.com/phhusson/quassel-irssi TITLE:=An irssi plugin to connect to quassel core diff --git a/net/quassel-irssi/patches/001-respect-cflags.patch b/net/quassel-irssi/patches/001-respect-cflags.patch index b1d0a77b7..aeaf6d41f 100644 --- a/net/quassel-irssi/patches/001-respect-cflags.patch +++ b/net/quassel-irssi/patches/001-respect-cflags.patch @@ -9,7 +9,7 @@ IRSSI_LIB?=$(DESTDIR)/$(LIBDIR)/irssi IRSSI_CFLAGS+=-I$(IRSSI_INCLUDE)/src/ IRSSI_CFLAGS+=-I$(IRSSI_INCLUDE)/src/core/ -@@ -27,7 +27,7 @@ else +@@ -28,7 +28,7 @@ else LDFLAGS += -lquasselc endif diff --git a/net/quassel-irssi/patches/002-use-cc-var.patch b/net/quassel-irssi/patches/002-use-cc-var.patch index bc4e13fa4..248bac4b5 100644 --- a/net/quassel-irssi/patches/002-use-cc-var.patch +++ b/net/quassel-irssi/patches/002-use-cc-var.patch @@ -1,6 +1,6 @@ --- a/core/Makefile +++ b/core/Makefile -@@ -48,7 +48,7 @@ irssi/network-openssl.o: CFLAGS:=$(IRSSI_CFLAGS) +@@ -49,7 +49,7 @@ irssi/network-openssl.o: CFLAGS:=$(IRSSI_CFLAGS) quasselc-connector.o: CFLAGS:=$(CFLAGS) $(TARGET): $(OBJECTS) diff --git a/net/quassel-irssi/patches/003-use-pkgconfig-ldflags-quasselc.patch b/net/quassel-irssi/patches/003-use-pkgconfig-ldflags-quasselc.patch index 10f30e064..f33c046aa 100644 --- a/net/quassel-irssi/patches/003-use-pkgconfig-ldflags-quasselc.patch +++ b/net/quassel-irssi/patches/003-use-pkgconfig-ldflags-quasselc.patch @@ -1,6 +1,6 @@ --- a/core/Makefile +++ b/core/Makefile -@@ -24,7 +24,7 @@ ifndef SYSTEM_QUASSELC +@@ -25,7 +25,7 @@ ifndef SYSTEM_QUASSELC QUASSELC_FLAGS:=-Ilib else QUASSELC_FLAGS:=$(shell pkg-config --cflags quasselc) diff --git a/net/quassel-irssi/patches/010-Get-compatible-with-potential-irssi-abi-8-and-drop-p.patch b/net/quassel-irssi/patches/010-Get-compatible-with-potential-irssi-abi-8-and-drop-p.patch new file mode 100644 index 000000000..0e0727a0d --- /dev/null +++ b/net/quassel-irssi/patches/010-Get-compatible-with-potential-irssi-abi-8-and-drop-p.patch @@ -0,0 +1,118 @@ +From 19e810405789a35b92026b56ea49d01a3f544b07 Mon Sep 17 00:00:00 2001 +From: Pierre-Hugues Husson +Date: Tue, 17 Jan 2017 23:09:24 +0100 +Subject: [PATCH] Get compatible with potential irssi abi 8, and drop polling + +--- + core/Makefile | 1 - + core/quassel-net.c | 64 ++++++++++++++++++++++++++++++++++++++-------- + 2 files changed, 53 insertions(+), 10 deletions(-) + +diff --git a/core/Makefile b/core/Makefile +index c1c65fc..987bd7b 100644 +--- a/core/Makefile ++++ b/core/Makefile +@@ -16,7 +16,6 @@ SSL_CFLAGS=$(shell pkg-config --cflags openssl) + SSL_LDLAGS=$(shell pkg-config --libs openssl) + OBJECTS:=quasselc-connector.o quassel-core.o + OBJECTS+=quassel-net.o quassel-msgs.o quassel-cmds.o +-OBJECTS+=irssi/network-openssl.o + OBJECTS+=quassel-fe-window.o quassel-fe-level.o quassel-cfg.o + + LDFLAGS ?= +diff --git a/core/quassel-net.c b/core/quassel-net.c +index 8a6eb55..5db7fe0 100644 +--- a/core/quassel-net.c ++++ b/core/quassel-net.c +@@ -132,10 +132,10 @@ static SERVER_REC* quassel_server_init_connect(SERVER_CONNECT_REC* conn) { + ret->got = 0; + server_connect_ref(SERVER_CONNECT(conn)); + +- if(conn->use_ssl) { ++ if(conn->use_tls) { + ret->ssl = 1; + } +- ret->connrec->use_ssl = 0; ++ ret->connrec->use_tls = 0; + + ret->channels_join = quassel_irssi_channels_join; + ret->send_message = quassel_irssi_send_message; +@@ -161,12 +161,59 @@ void quassel_net_init(CHAT_PROTOCOL_REC* rec) { + signal_add_first("server connected", (SIGNAL_FUNC) sig_connected); + } + +-GIOChannel *irssi_ssl_get_iochannel(GIOChannel *handle, int port, SERVER_REC *server); ++static void quassel_net_final_setup(SERVER_REC* server, GIOChannel *handle) { ++ quassel_login(handle, server->connrec->nick, server->connrec->password); ++ server->handle->handle = handle; ++ ++ server->readtag = ++ g_input_add(handle, ++ G_INPUT_READ, ++ (GInputFunction) quassel_parse_incoming, server); ++} ++ ++static void quassel_net_ssl_callback(SERVER_REC *server, GIOChannel *handle) { ++ int error; ++ ++ g_return_if_fail(IS_SERVER(server)); ++ ++ error = irssi_ssl_handshake(handle); ++ if (error == -1) { ++ server->connection_lost = TRUE; ++ server_connect_failed(server, NULL); ++ return; ++ } ++ if (error & 1) { ++ if (server->connect_tag != -1) ++ g_source_remove(server->connect_tag); ++ server->connect_tag = g_input_add(handle, error == 1 ? G_INPUT_READ : G_INPUT_WRITE, ++ (GInputFunction) ++ quassel_net_ssl_callback, ++ server); ++ return; ++ } ++ ++ if (server->connect_tag != -1) { ++ g_source_remove(server->connect_tag); ++ server->connect_tag = -1; ++ } ++ ++ quassel_net_final_setup(server, handle); ++} ++ + void quassel_irssi_init_ack(void *arg) { + Quassel_SERVER_REC *server = (Quassel_SERVER_REC*)arg; +- if(!server->ssl) +- goto login; +- GIOChannel* ssl_handle = irssi_ssl_get_iochannel(server->handle->handle, 1337, SERVER(server)); ++ GIOChannel* ssl_handle = net_start_ssl((SERVER_REC*)server); ++ ++ if(server->readtag != -1) { ++ g_source_remove(server->readtag); ++ server->readtag = -1; ++ } ++ ++ if(!server->ssl) { ++ quassel_net_final_setup((SERVER_REC*)server, server->handle->handle); ++ return; ++ } ++ + int error; + //That's polling, and that's really bad... + while( (error=irssi_ssl_handshake(ssl_handle)) & 1) { +@@ -175,10 +222,7 @@ void quassel_irssi_init_ack(void *arg) { + return; + } + } +- server->handle->handle = ssl_handle; +- +-login: +- quassel_login(server->handle->handle, server->connrec->nick, server->connrec->password); ++ quassel_net_ssl_callback((SERVER_REC*)server, ssl_handle); + } + + void quassel_irssi_init_nack(void *arg) { +-- +2.17.1 + diff --git a/net/quassel-irssi/patches/010-Use-sys-socket.h-rather-than-asm-socket.h.patch b/net/quassel-irssi/patches/010-Use-sys-socket.h-rather-than-asm-socket.h.patch deleted file mode 100644 index 822fd4f58..000000000 --- a/net/quassel-irssi/patches/010-Use-sys-socket.h-rather-than-asm-socket.h.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 7d4caa6a60af0e584dc5c3dc44437117744f6f84 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jelmer=20Vernoo=C4=B3?= -Date: Sat, 14 Jan 2017 20:55:00 +0000 -Subject: [PATCH] Use sys/socket.h rather than asm/socket.h. - -The latter is not available on some platforms. ---- - core/quasselc-connector.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/core/quasselc-connector.c b/core/quasselc-connector.c -index 08a3718..77e8d7a 100644 ---- a/core/quasselc-connector.c -+++ b/core/quasselc-connector.c -@@ -16,7 +16,7 @@ - */ - - #define _GNU_SOURCE --#include -+#include - #include - #include - #include --- -2.19.1 - diff --git a/net/quassel-irssi/patches/020-Fix-nullpointer-dereference-when-leaving-an-unconnec.patch b/net/quassel-irssi/patches/020-Fix-nullpointer-dereference-when-leaving-an-unconnec.patch deleted file mode 100644 index 521f41184..000000000 --- a/net/quassel-irssi/patches/020-Fix-nullpointer-dereference-when-leaving-an-unconnec.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 525ff7ec3bafe9ccbf5802559e2664a25cf925e1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Bastian=20M=C3=BCller?= -Date: Sat, 12 Aug 2017 10:24:49 +0200 -Subject: [PATCH] Fix nullpointer dereference when leaving an unconnected - window - ---- - core/quassel-fe-level.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/core/quassel-fe-level.c b/core/quassel-fe-level.c -index 3d69202..3382ddc 100644 ---- a/core/quassel-fe-level.c -+++ b/core/quassel-fe-level.c -@@ -62,6 +62,10 @@ static void sig_created(WINDOW_REC *winrec, int automatic) { - return; - } - -+ if (!winrec->active_server) { -+ return; -+ } -+ - CHANNEL_REC *_chanrec = channel_find(winrec->active_server, winrec->active->visible_name); - if(_chanrec->chat_type != Quassel_PROTOCOL) - return; --- -2.19.1 - diff --git a/net/quassel-irssi/patches/030-Makes-gcc7-happy.patch b/net/quassel-irssi/patches/030-Makes-gcc7-happy.patch deleted file mode 100644 index 9b8078fb3..000000000 --- a/net/quassel-irssi/patches/030-Makes-gcc7-happy.patch +++ /dev/null @@ -1,64 +0,0 @@ -From ab0dc71822b3e769b4be2a990bc6c87347016cfd Mon Sep 17 00:00:00 2001 -From: Pierre-Hugues Husson -Date: Tue, 12 Sep 2017 17:42:46 +0200 -Subject: [PATCH] Makes gcc7 happy - ---- - core/quasselc-connector.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/core/quasselc-connector.c b/core/quasselc-connector.c -index 77e8d7a..d28fa5e 100644 ---- a/core/quasselc-connector.c -+++ b/core/quasselc-connector.c -@@ -145,6 +145,7 @@ void handle_sync(void* irssi_arg, object_t o, function_t f, ...) { - highlight=0; - if(!fnc) - fnc="MarkBufferAsRead"; -+ /* Falls through */ - case Displayed: - if(!fnc) - fnc="BufferDisplayed"; -@@ -155,6 +156,7 @@ void handle_sync(void* irssi_arg, object_t o, function_t f, ...) { - case Removed: - if(!fnc) - fnc="BufferRemoved"; -+ /* Falls through */ - case TempRemoved: - if(!fnc) - fnc="BufferTempRemoved"; -@@ -210,6 +212,7 @@ void handle_sync(void* irssi_arg, object_t o, function_t f, ...) { - case AddUserMode: - if(!fnc) - fnc="AddUserMode"; -+ /* Falls through */ - case RemoveUserMode: - if(!fnc) - fnc="RemoveUserMode"; -@@ -223,6 +226,7 @@ void handle_sync(void* irssi_arg, object_t o, function_t f, ...) { - case SetNick2: - if(!fnc) - fnc="SetNick"; -+ /* Falls through */ - case Quit: - if(!fnc) - fnc="Quit"; -@@ -233,12 +237,15 @@ void handle_sync(void* irssi_arg, object_t o, function_t f, ...) { - case SetNick: - if(!fnc) - fnc="SetNick"; -+ /* Falls through */ - case SetServer: - if(!fnc) - fnc="SetServer"; -+ /* Falls through */ - case SetRealName: - if(!fnc) - fnc="SetRealName"; -+ /* Falls through */ - case PartChannel: - if(!fnc) - fnc="PartChannel"; --- -2.19.1 -