app-admin/conky: Remove unused patches.
authorDaniel Pielmeier <billie@gentoo.org>
Thu, 9 Mar 2017 20:50:00 +0000 (21:50 +0100)
committerDaniel Pielmeier <billie@gentoo.org>
Thu, 9 Mar 2017 20:50:00 +0000 (21:50 +0100)
Package-Manager: Portage-2.3.3, Repoman-2.3.1

app-admin/conky/files/conky-1.8.1-utf8-scroll.patch [deleted file]
app-admin/conky/files/conky-1.9.0-apcupsd.patch [deleted file]
app-admin/conky/files/conky-1.9.0-default-graph-size.patch [deleted file]
app-admin/conky/files/conky-1.9.0-diskio-dmmajor.patch [deleted file]
app-admin/conky/files/conky-1.9.0-lines-fix.patch [deleted file]
app-admin/conky/files/conky-1.9.0-ncurses.patch [deleted file]
app-admin/conky/files/conky-1.9.0-tinfo.patch [deleted file]
app-admin/conky/files/conky-1.9.0-update-noaa-metar-uri.patch [deleted file]
app-admin/conky/files/conky-1.9.0-update-when-message-count-decreases.patch [deleted file]

diff --git a/app-admin/conky/files/conky-1.8.1-utf8-scroll.patch b/app-admin/conky/files/conky-1.8.1-utf8-scroll.patch
deleted file mode 100644 (file)
index 8b9e1e8..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-From b1f6a30bcce020b3c377434137de9856a09b899a Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name>
-Date: Fri, 11 Nov 2011 11:27:43 +0100
-Subject: [PATCH] Make scroll UTF-8 aware.  Fixes bug #3134941.
-
----
- src/scroll.c |   44 ++++++++++++++++++++++++++++++++++++++++++--
- 1 files changed, 42 insertions(+), 2 deletions(-)
-
-diff --git a/src/scroll.c b/src/scroll.c
-index f78f807..738db0d 100644
---- a/src/scroll.c
-+++ b/src/scroll.c
-@@ -34,12 +34,33 @@
- struct scroll_data {
-       char *text;
-+      unsigned int show_orig;
-       unsigned int show;
-       unsigned int step;
-       unsigned int start;
-       long resetcolor;
- };
-+int utf8_charlen(char c) {
-+      unsigned char uc = (unsigned char) c;
-+      int len = 0;
-+
-+      if ((uc & 0x80) == 0)
-+              return 1;
-+
-+      while ((uc & 0x80) != 0) {
-+              ++len;
-+              uc <<= 1;
-+      }
-+
-+      return (len > 0 && len <= 4) ? len : -1;
-+}
-+
-+int is_utf8_char_tail(char c) {
-+      unsigned char uc = (unsigned char) c;
-+      return (uc & 0xc0) == 0x80;
-+}
-+
- void parse_scroll_arg(struct text_object *obj, const char *arg, void *free_at_crash)
- {
-       struct scroll_data *sd;
-@@ -60,15 +81,18 @@ void parse_scroll_arg(struct text_object *obj, const char *arg, void *free_at_cr
-               sd->step = 1;
-       }
-       sd->text = malloc(strlen(arg + n1) + sd->show + 1);
-+      // sd->show value may change when there are UTF-8 chars to be shown, so
-+      // save its origin value
-+      sd->show_orig = sd->show;
-       if (strlen(arg) > sd->show) {
-               for(n2 = 0; (unsigned int) n2 < sd->show; n2++) {
--                  sd->text[n2] = ' ';
-+                      sd->text[n2] = ' ';
-               }
-               sd->text[n2] = 0;
-       }
-       else
--          sd->text[0] = 0;
-+              sd->text[0] = 0;
-       strcat(sd->text, arg + n1);
-       sd->start = 0;
-@@ -82,9 +106,13 @@ void print_scroll(struct text_object *obj, char *p, int p_max_size, struct infor
- {
-       struct scroll_data *sd = obj->data.opaque;
-       unsigned int j, colorchanges = 0, frontcolorchanges = 0, visibcolorchanges = 0, strend;
-+      int charlen = 0;
-+      unsigned int utf8lenfix = 0;
-       char *pwithcolors;
-       char buf[max_user_text];
-+      sd->show = sd->show_orig;
-+
-       if (!sd)
-               return;
-@@ -109,6 +137,18 @@ void print_scroll(struct text_object *obj, char *p, int p_max_size, struct infor
-       while(*(buf + sd->start) == SPECIAL_CHAR) {
-               sd->start++;
-       }
-+      //skip parts of UTF-8 character which messes up display
-+      while(is_utf8_char_tail(*(buf + sd->start))) {
-+              sd->start++;
-+      }
-+      //extend length to be shown for wide characters
-+      j = 0;
-+      while(j < sd->show + visibcolorchanges + utf8lenfix) {
-+              charlen = utf8_charlen(*(buf + sd->start + j));
-+              utf8lenfix += (charlen > 1 ? charlen - 1 : 0);
-+              j += charlen;
-+      }
-+      sd->show = sd->show_orig + utf8lenfix;
-       //place all chars that should be visible in p, including colorchanges
-       for(j=0; j < sd->show + visibcolorchanges; j++) {
-               p[j] = *(buf + sd->start + j);
--- 
-1.7.8.rc1
-
diff --git a/app-admin/conky/files/conky-1.9.0-apcupsd.patch b/app-admin/conky/files/conky-1.9.0-apcupsd.patch
deleted file mode 100644 (file)
index 6b942d3..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-Description: Fix broken apcupsd support in Conky 1.8.1
- Revert apcupsd-related code to Conky 1.8.0 in order to fix broken apcupsd
- support. This is a workaround until upstream properly addresses this issue.
-From: Brian Derr <bderrly@gmail.com>
-Forwarded: https://sourceforge.net/support/tracker.php?aid=3083859
-Bug-Ubuntu: https://bugs.launchpad.net/bugs/897495
-Last-Update: 2011-12-02
-
---- a/src/apcupsd.c
-+++ b/src/apcupsd.c
-@@ -154,7 +154,7 @@
- //
- // Conky update function for apcupsd data
- //
--int update_apcupsd(void) {
-+void update_apcupsd(void) {
-       int i;
-       APCUPSD_S apc;
-@@ -164,41 +164,44 @@
-               memcpy(apc.items[i], "N/A", 4); // including \0
-       do {
--              struct addrinfo hints;
--              struct addrinfo *ai, *rp;
--              int res;
-+              struct hostent* he = 0;
-+              struct sockaddr_in addr;
-               short sz = 0;
--              char portbuf[8];
-+#ifdef HAVE_GETHOSTBYNAME_R
-+              struct hostent he_mem;
-+              int he_errno;
-+              char hostbuff[2048];
-+#endif
-               //
-               // connect to apcupsd daemon
-               //
--              memset(&hints, 0, sizeof(struct addrinfo));
--              hints.ai_family = AF_UNSPEC;
--              hints.ai_socktype = SOCK_STREAM;
--              hints.ai_flags = 0;
--              hints.ai_protocol = 0;
--              snprintf(portbuf, 8, "%d", info.apcupsd.port);
--              res = getaddrinfo(info.apcupsd.host, portbuf, &hints, &ai);
--              if (res != 0) {
--                      NORM_ERR("APCUPSD getaddrinfo: %s", gai_strerror(res));
-+              sock = socket(AF_INET, SOCK_STREAM, 0);
-+              if (sock < 0) {
-+                      perror("socket");
-                       break;
-               }
--              for (rp = ai; rp != NULL; rp = rp->ai_next) {
--                      sock = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol);
--                      if (sock == -1) {
--                              continue;
--                      }
--                      if (connect(sock, rp->ai_addr, rp->ai_addrlen) != -1) {
--                              break;
--                      }
--                      close(sock);
-+#ifdef HAVE_GETHOSTBYNAME_R
-+              if (gethostbyname_r(info.apcupsd.host, &he_mem, hostbuff, sizeof(hostbuff), &he, &he_errno) || !he ) {
-+                      NORM_ERR("APCUPSD gethostbyname_r: %s", hstrerror(h_errno));
-+                      break;
-+              }
-+#else /* HAVE_GETHOSTBYNAME_R */
-+              he = gethostbyname(info.apcupsd.host);
-+              if (!he) {
-+                      herror("gethostbyname");
-+                      break;
-               }
--              freeaddrinfo(ai);
--              if (rp == NULL) {
-+#endif /* HAVE_GETHOSTBYNAME_R */
-+              
-+              memset(&addr, 0, sizeof(addr));
-+              addr.sin_family = AF_INET;
-+              addr.sin_port = info.apcupsd.port;
-+              memcpy(&addr.sin_addr, he->h_addr, he->h_length);
-+              if (connect(sock, (struct sockaddr*)&addr, sizeof(struct sockaddr)) < 0) {
-                       // no error reporting, the daemon is probably not running
-                       break;
-               }
--
-+      
-               //
-               // send status request - "status" - 6B
-               //
-@@ -222,5 +225,5 @@
-       // "atomically" copy the data into working set
-       //
-       memcpy(info.apcupsd.items, apc.items, sizeof(info.apcupsd.items));
--      return 0;
-+      return;
- }
---- a/src/apcupsd.h
-+++ b/src/apcupsd.h
-@@ -49,6 +49,6 @@
- } APCUPSD_S, *PAPCUPSD_S;
- /* Service routine for the conky main thread */
--int update_apcupsd(void);
-+void update_apcupsd(void);
- #endif /*APCUPSD_H_*/
diff --git a/app-admin/conky/files/conky-1.9.0-default-graph-size.patch b/app-admin/conky/files/conky-1.9.0-default-graph-size.patch
deleted file mode 100644 (file)
index 02f64e3..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-diff -r -U 5 conky-1.9.0/src/specials.c conky-1.9.0/src/specials.c
---- conky-1.9.0/src/specials.c 2012-05-03 22:13:47.000000000 +0100
-+++ conky-1.9.0/src/specials.c 2013-02-27 21:16:15.856669451 +0000
-@@ -186,12 +186,12 @@
-               g->scale = defscale;
-               if (sscanf(args, "%1023s %d,%d %x %x", buf, &g->height, &g->width, &g->first_colour, &g->last_colour) == 5) {
-                       return strndup(buf, text_buffer_size);
-               }
-               buf[0] = '\0';
--              g->height = 25;
--              g->width = 0;
-+              g->height = default_graph_height;
-+              g->width = default_graph_width;
-               if (sscanf(args, "%x %x %u", &g->first_colour, &g->last_colour, &g->scale) == 3) {
-                       return NULL;
-               }
-               g->scale = defscale;
-               if (sscanf(args, "%x %x", &g->first_colour, &g->last_colour) == 2) {
diff --git a/app-admin/conky/files/conky-1.9.0-diskio-dmmajor.patch b/app-admin/conky/files/conky-1.9.0-diskio-dmmajor.patch
deleted file mode 100644 (file)
index db3516a..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/src/linux.c
-+++ b/src/linux.c
-@@ -80,6 +80,10 @@
- #define NBD_MAJOR 43
- #endif
-+#if !defined(DM_MAJOR)
-+#define DM_MAJOR 253
-+#endif
-+
- #ifdef HAVE_IWLIB
- #include <iwlib.h>
- #endif
-@@ -2336,7 +2340,8 @@ int update_diskio(void)
-                *
-                * XXX: ignore devices which are part of a SW RAID (MD_MAJOR) */
-               if (col_count == 5 && major != LVM_BLK_MAJOR && major != NBD_MAJOR
--                              && major != RAMDISK_MAJOR && major != LOOP_MAJOR) {
-+                              && major != RAMDISK_MAJOR && major != LOOP_MAJOR
-+                              && major != DM_MAJOR ) {
-                       /* check needed for kernel >= 2.6.31, see sf #2942117 */
-                       if (is_disk(devbuf)) {
-                               total_reads += reads;
diff --git a/app-admin/conky/files/conky-1.9.0-lines-fix.patch b/app-admin/conky/files/conky-1.9.0-lines-fix.patch
deleted file mode 100644 (file)
index de48ab9..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-diff -urN old/src/conky.c new/src/conky.c
---- old/src/conky.c    2012-05-03 23:22:21.000000000 +0200
-+++ new/src/conky.c    2012-08-15 00:06:59.256311301 +0200
-@@ -3065,12 +3065,26 @@
-                                                               og = g;
-                                                       }
--                                                      /* this is mugfugly, but it works */
--                                                      XDrawLine(display, window.drawable, window.gc,
--                                                                        cur_x + i + 1,
--                                                                        specials[special_index].dotgraph ? og : by + h,
--                                                                        cur_x + i + 1,
--                                                                        g);
-+                                                      if (specials[special_index].dotgraph) {
-+                                                              if (og == g) {
-+                                                                      XDrawPoint(display, window.drawable,
-+                                                                                         window.gc, cur_x + i + 1, g);
-+                                                              } else {
-+                                                                      XDrawLine(display, window.drawable, window.gc,
-+                                                                                        cur_x + i + 1,
-+                                                                                        og,
-+                                                                                        cur_x + i + 1,
-+                                                                                        g);
-+                                                              }
-+                                                      } else {
-+                                                              /* this is mugfugly, but it works */
-+                                                              XDrawLine(display, window.drawable, window.gc,
-+                                                                                cur_x + i + 1,
-+                                                                                by + h,
-+                                                                                cur_x + i + 1,
-+                                                                                g);
-+                                                      }
-+
-                                                       ++j;
-                                               }
-                                               if (tmpcolour) free(tmpcolour);
diff --git a/app-admin/conky/files/conky-1.9.0-ncurses.patch b/app-admin/conky/files/conky-1.9.0-ncurses.patch
deleted file mode 100644 (file)
index 91043ed..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-From fd9462da5ed12369fc6a72e42ebc45c6707403fb Mon Sep 17 00:00:00 2001
-From: Pavel Labath <pavelo@centrum.sk>
-Date: Fri, 13 Jul 2012 13:41:09 +0200
-Subject: [PATCH] Fix "conky failes to build with --disable-ncurses" (sf.net #3541329)
-
----
- src/conky.c |    4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/conky.c b/src/conky.c
-index c5b4bed..17fe1a7 100644
---- a/src/conky.c
-+++ b/src/conky.c
-@@ -885,12 +885,12 @@ void generate_text_internal(char *p, int p_max_size,
-                       OBJ(cpu) {
-                               if (cur->cpu_usage) {
-                                       if (obj->data.i > info.cpu_count) {
--                                              static bool warned = false;
-+                                              static int warned = 0;
-                                               if(!warned) {
-                                                       NORM_ERR("obj->data.i %i info.cpu_count %i",
-                                                                       obj->data.i, info.cpu_count);
-                                                       NORM_ERR("attempting to use more CPUs than you have!");
--                                                      warned = true;
-+                                                      warned = 1;
-                                               }
-                                       } else  {
-                                               percent_print(p, p_max_size,
--- 
-1.7.0.4
-
diff --git a/app-admin/conky/files/conky-1.9.0-tinfo.patch b/app-admin/conky/files/conky-1.9.0-tinfo.patch
deleted file mode 100644 (file)
index 0018a72..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/configure.ac.in
-+++ b/configure.ac.in
-@@ -134,7 +134,7 @@
- AM_CONDITIONAL(BUILD_NCURSES, test x$want_ncurses = xyes)
- if test x$want_ncurses = xyes; then
--      conky_LIBS="$conky_LIBS -lncurses"
-+      PKG_CHECK_MODULES(ncurses,ncurses,conky_LIBS="$conky_LIBS $ncurses_LIBS",AC_MSG_ERROR([ncurses not found]))
-       AC_DEFINE(NCURSES, 1, [Define for ncurses support])
-         AC_CHECK_HEADERS([ncurses.h], [], AC_MSG_ERROR([required header(s) not found]))
- fi
---- a/configure.ac
-+++ b/configure.ac
-@@ -134,7 +134,7 @@
- AM_CONDITIONAL(BUILD_NCURSES, test x$want_ncurses = xyes)
- if test x$want_ncurses = xyes; then
--      conky_LIBS="$conky_LIBS -lncurses"
-+      PKG_CHECK_MODULES(ncurses,ncurses,conky_LIBS="$conky_LIBS $ncurses_LIBS",AC_MSG_ERROR([ncurses not found]))
-       AC_DEFINE(NCURSES, 1, [Define for ncurses support])
-         AC_CHECK_HEADERS([ncurses.h], [], AC_MSG_ERROR([required header(s) not found]))
- fi
diff --git a/app-admin/conky/files/conky-1.9.0-update-noaa-metar-uri.patch b/app-admin/conky/files/conky-1.9.0-update-noaa-metar-uri.patch
deleted file mode 100644 (file)
index 0dbf3d3..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/weather.c
-+++ b/src/weather.c
-@@ -858,7 +858,7 @@
-               }
-       } else
- #endif /* XOAP */
--      if (strstr(uri, "weather.noaa.gov")) {
-+      if (strstr(uri, "tgftp.nws.noaa.gov")) {
-               strcat(uri, locID);
-               strcat(uri, ".TXT");
-       } else  if (!strstr(uri, "localhost") && !strstr(uri, "127.0.0.1")) {
diff --git a/app-admin/conky/files/conky-1.9.0-update-when-message-count-decreases.patch b/app-admin/conky/files/conky-1.9.0-update-when-message-count-decreases.patch
deleted file mode 100644 (file)
index dd422c5..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-diff --git a/src/mail.c b/src/mail.c
-index 7f60ba3..882b7c8 100644
---- a/src/mail.c
-+++ b/src/mail.c
-@@ -630,8 +630,15 @@ int imap_check_status(char *recvbuf, struct mail_s *mail)
- void imap_unseen_command(struct mail_s *mail, unsigned long old_unseen, unsigned long old_messages)
- {
--      if (strlen(mail->command) > 1 && (mail->unseen > old_unseen
--                              || (mail->messages > old_messages && mail->unseen > 0))) {
-+      /*
-+       * Georg Hopp (2012-12-23):
-+       * Well, i will read mails from time to time and i want the unseen
-+       * count to be reduced when they are read...so, this seems wrong.
-+       * Try a better one.... :)
-+       */
-+      if (strlen(mail->command) > 1
-+                      && (mail->unseen != old_unseen
-+                       || mail->messages != old_messages)) {
-               // new mail goodie
-               if (system(mail->command) == -1) {
-                       perror("system()");
-@@ -813,7 +820,7 @@ static void *imap_thread(void *arg)
-                                       if (strlen(recvbuf) > 2) {
-                                               unsigned long messages, recent = 0;
-                                               char *buf = recvbuf;
--                                              char force_check = 0;
-+                                              char force_check = 1;
-                                               buf = strstr(buf, "EXISTS");
-                                               while (buf && strlen(buf) > 1 && strstr(buf + 1, "EXISTS")) {
-                                                       buf = strstr(buf + 1, "EXISTS");
-@@ -825,9 +832,7 @@ static void *imap_thread(void *arg)
-                                                       }
-                                                       if (sscanf(buf, "* %lu EXISTS\r\n", &messages) == 1) {
-                                                               timed_thread_lock(mail->p_timed_thread);
--                                                              if (mail->messages != messages) {
--                                                                      force_check = 1;
--                                                              }
-+                                                              force_check = 1;
-                                                               timed_thread_unlock(mail->p_timed_thread);
-                                                       }
-                                               }
-@@ -850,7 +855,10 @@ static void *imap_thread(void *arg)
-                                                * something other than 0, or we had a timeout
-                                                */
-                                               buf = recvbuf;
--                                              if (recent > 0 || (buf && strstr(buf, " FETCH ")) || fetchtimeout.tv_sec == 0 || force_check) {
-+                                              if (recent > 0
-+                                                              || (buf && strstr(buf, " FETCH "))
-+                                                              || (buf && strstr(buf, " EXPUNGE "))
-+                                                              || fetchtimeout.tv_sec == 0 || force_check) {
-                                                       // re-check messages and unseen
-                                                       if (imap_command(sockfd, "DONE\r\n", recvbuf, "a5 OK")) {
-                                                               fail++;
-@@ -868,6 +876,9 @@ static void *imap_thread(void *arg)
-                                                               fail++;
-                                                               break;
-                                                       }
-+                                                      imap_unseen_command(mail, old_unseen, old_messages);
-+                                                      old_unseen = mail->unseen;
-+                                                      old_messages = mail->messages;
-                                                       strncpy(sendbuf, "a5 IDLE\r\n", MAXDATASIZE);
-                                                       if (imap_command(sockfd, sendbuf, recvbuf, "+ idling")) {
-                                                               fail++;
-@@ -886,10 +897,7 @@ static void *imap_thread(void *arg)
-                                               fail++;
-                                               break;
-                                       }
--                                      imap_unseen_command(mail, old_unseen, old_messages);
-                                       fail = 0;
--                                      old_unseen = mail->unseen;
--                                      old_messages = mail->messages;
-                               }
-                               if (fail) break;
-                       } else {