diff options
author | Erich Eckner <git@eckner.net> | 2018-01-20 14:48:11 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-01-20 14:48:11 +0100 |
commit | fabfa9419b66f1f22148ffe63b38d446a9f3620e (patch) | |
tree | 711aaa1c362a248b0836afffd1fced1f5ebef23f /conky | |
parent | 26c0bc009f159d3d1b6fc113bbec105252c4a6c3 (diff) | |
download | archlinuxewe-fabfa9419b66f1f22148ffe63b38d446a9f3620e.tar.xz |
conky: 1.10.6-2 -> 1.10.7
Diffstat (limited to 'conky')
-rw-r--r-- | conky/PKGBUILD | 15 | ||||
-rw-r--r-- | conky/irc_lines.patch | 104 |
2 files changed, 7 insertions, 112 deletions
diff --git a/conky/PKGBUILD b/conky/PKGBUILD index 0c0664bf8..576345904 100644 --- a/conky/PKGBUILD +++ b/conky/PKGBUILD @@ -6,8 +6,8 @@ # Contributor: Partha Chowdhury <kira.laucas@gmail.com> pkgname=conky -pkgver=1.10.6 -pkgrel=2 +pkgver=1.10.7 +pkgrel=1 pkgdesc='Lightweight system monitor for X' url='https://github.com/brndnmtthws/conky' license=('BSD' 'GPL') @@ -18,12 +18,10 @@ depends=('glib2' 'lua' 'wireless_tools' 'libxdamage' 'libxinerama' 'libxft' optdepends=('mounted') source=("https://github.com/brndnmtthws/conky/archive/v${pkgver}.tar.gz" 'lua53.patch' - 'MAX_SP.patch' - 'irc_lines.patch') -sha512sums=('ddd0b087e89654f8dace7d9682935a802b3bb22b7e65acd25dcc0f06e90b46bee695502d78b6e40a409f8eaffcd65a78d5f861ee6dbcbff6e48f88c2f20319c9' + 'MAX_SP.patch') +sha512sums=('4da501c7c7613e8b9b26a691a1c0118c05cec818e944d4a30e250ecba26956d6f3103ec5731f082a095173dbfe0713137ded92043cc4c1eb3821c0943f1744f4' 'a8f7184b0e21daaff137a07431c736269a94b654f50b45ac531cdb0d0edbfa8509def72254c36dce0ca4a1ee5ebae62aac5894f89cda2feae3d54cfcbd85377b' - 'ca23309b45a471b075fbebd2f6ec34b1d7b3198528056ddb3018af4010623a5de83a80ecfc98677b48676fd2600224c33772f55b515c897a3cc917997c70bb38' - 'b241860096fa8581ea1804e59725ea5efb7ff418d6aa7dc5a0a5255efefb27d98f2a4e34ba9953b7491315e93f15e60f8116fd30a5a46e23c52e5a14aa43c636') + 'ca23309b45a471b075fbebd2f6ec34b1d7b3198528056ddb3018af4010623a5de83a80ecfc98677b48676fd2600224c33772f55b515c897a3cc917997c70bb38') options=('!strip' 'debug') @@ -31,7 +29,8 @@ prepare() { cd "${srcdir}/${pkgname}-${pkgver}" patch -p1 -i ../lua53.patch # lua_gettable returns an int in lua-5.3 patch -p1 -i ../MAX_SP.patch - patch -p1 -i ../irc_lines.patch + sed '/^#include / s,<libircclient\.h>,<libircclient/libircclient.h>,' -i 'src/irc.cc' + sed '/check_include_files(/ s,libircclient\.h,libircclient/libircclient.h,' -i 'cmake/ConkyPlatformChecks.cmake' } build() { diff --git a/conky/irc_lines.patch b/conky/irc_lines.patch deleted file mode 100644 index 2ff03c0c1..000000000 --- a/conky/irc_lines.patch +++ /dev/null @@ -1,104 +0,0 @@ -diff --git a/doc/variables.xml b/doc/variables.xml -index effc5880..f07ef893 100644 ---- a/doc/variables.xml -+++ b/doc/variables.xml -@@ -1756,11 +1756,12 @@ - <command> - <option>irc</option> - </command> -- <option>server(:port) #channel</option> -+ <option>server(:port) #channel (max_msg_lines)</option> - </term> - <listitem>Shows everything that's being told in #channel on IRCserver - 'server'. TCP-port 6667 is used for the connection unless 'port' is -- specified. -+ specified. Shows everything since the last time or the last -+ 'max_msg_lines' entries if specified. - <para /></listitem> - </varlistentry> - <varlistentry> -diff --git a/src/irc.cc b/src/irc.cc -index 17b81d73..ad5cb846 100644 ---- a/src/irc.cc -+++ b/src/irc.cc -@@ -44,6 +44,7 @@ struct obj_irc { - - struct ctx { - char *chan; -+ int max_msg_lines; - struct ll_text *messages; - }; - -@@ -69,6 +70,22 @@ void addmessage(struct ctx *ctxptr, char *nick, const char *text) { - } - lastmsg->next = newmsg; - } -+ if(ctxptr->max_msg_lines>0) { -+ int msgcnt = 0; -+ newmsg = ctxptr->messages; -+ while(newmsg) { -+ newmsg = newmsg->next; -+ msgcnt++; -+ } -+ msgcnt -= ctxptr->max_msg_lines; -+ while(msgcnt>0) { -+ msgcnt--; -+ newmsg = ctxptr->messages->next; -+ free(ctxptr->messages->text); -+ free(ctxptr->messages); -+ ctxptr->messages = newmsg; -+ } -+ } - } - - void ev_talkinchan(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count) { -@@ -95,7 +112,7 @@ void ev_num(irc_session_t *session, unsigned int event, const char *origin, cons - if(origin || count) {} //fix gcc warnings - } - --#define IRCSYNTAX "The correct syntax is ${irc server(:port) #channel}" -+#define IRCSYNTAX "The correct syntax is ${irc server(:port) #channel (max_msg_lines)}" - #define IRCPORT 6667 - #define IRCNICK "conky" - #define IRCSERVERPASS NULL -@@ -108,6 +125,7 @@ void *ircclient(void *ptr) { - irc_callbacks_t callbacks; - char *server; - char *strport; -+ char *str_max_msg_lines; - unsigned int port; - - memset (&callbacks, 0, sizeof(callbacks)); -@@ -120,6 +138,10 @@ void *ircclient(void *ptr) { - if( ! ctxptr->chan) { - NORM_ERR("irc: %s", IRCSYNTAX); - } -+ str_max_msg_lines = strtok(NULL, " "); -+ if(str_max_msg_lines) { -+ ctxptr->max_msg_lines = strtol(str_max_msg_lines, NULL, 10); -+ } - ctxptr->messages = NULL; - irc_set_ctx(ircobj->session, ctxptr); - server = strtok(server, ":"); -@@ -169,14 +191,18 @@ void print_irc(struct text_object *obj, char *p, int p_max_size) { - while(curmsg) { - nextmsg = curmsg->next; - strncat(p, curmsg->text, p_max_size - strlen(p) - 1); -- free(curmsg->text); -- free(curmsg); -+ if(!ctxptr->max_msg_lines) { -+ free(curmsg->text); -+ free(curmsg); -+ } - curmsg = nextmsg; - } - if(p[0] != 0) { - p[strlen(p) - 1] = 0; - } -- ctxptr->messages = NULL; -+ if(!ctxptr->max_msg_lines) { -+ ctxptr->messages = NULL; -+ } - } - - void free_irc(struct text_object *obj) { |