Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Florian Franzmann (66d7611328367c7991e249ab54dab011320cc4de)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Florian Franzmann <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Florian Franzmann (66d7611328367c7991e249ab54dab011320cc4de)
  • Date: Sun, 15 Jun 2014 12:21:02 -0500

GIT changes to master grimoire by Florian Franzmann
<siflfran AT hawo.stw.uni-erlangen.de>:

devel/gdb/DETAILS | 2
devel/gdb/HISTORY | 3
x11/conky/HISTORY | 9
x11/conky/PRE_BUILD | 10
x11/conky/conky-1.8.1-utf8-scroll.patch | 104
+++++++++
x11/conky/conky-1.9.0-apcupsd.patch | 106
++++++++++
x11/conky/conky-1.9.0-default-graph-size.patch | 18 +
x11/conky/conky-1.9.0-diskio-dmmajor.patch | 25 ++
x11/conky/conky-1.9.0-lines-fix.patch | 36 +++
x11/conky/conky-1.9.0-ncurses.patch | 31 ++
x11/conky/conky-1.9.0-update-when-message-count-decreases.patch | 75
+++++++
11 files changed, 418 insertions(+), 1 deletion(-)

New commits:
commit 66d7611328367c7991e249ab54dab011320cc4de
Author: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
Commit: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>

devel/gdb: version 7.7.1

commit 5fb9ddb0f81dc82b1a18e221663d51c0ac44f0ca
Author: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
Commit: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>

x11/conky: add bug fixes from gentoo

diff --git a/devel/gdb/DETAILS b/devel/gdb/DETAILS
index cdc4e77..9e06e04 100755
--- a/devel/gdb/DETAILS
+++ b/devel/gdb/DETAILS
@@ -1,5 +1,5 @@
SPELL=gdb
- VERSION=7.7
+ VERSION=7.7.1
SOURCE=$SPELL-$VERSION.tar.bz2
SOURCE2=$SOURCE.sig
SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION"
diff --git a/devel/gdb/HISTORY b/devel/gdb/HISTORY
index 05e44d5..89c8fe3 100644
--- a/devel/gdb/HISTORY
+++ b/devel/gdb/HISTORY
@@ -1,3 +1,6 @@
+2014-06-15 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
+ * DETAILS: version 7.7.1
+
2014-02-06 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
* DETAILS: version 7.7

diff --git a/x11/conky/HISTORY b/x11/conky/HISTORY
index 2aec731..8425689 100644
--- a/x11/conky/HISTORY
+++ b/x11/conky/HISTORY
@@ -1,5 +1,14 @@
2014-06-09 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
* DETAILS: fix SOURCE_URL[0]
+ * PRE_BUILD,
+ conky-1.8.1-utf8-scroll.patch,
+ conky-1.9.0-apcupsd.patch,
+ conky-1.9.0-default-graph-size.patch,
+ conky-1.9.0-diskio-dmmajor.patch,
+ conky-1.9.0-lines-fix.patch,
+ conky-1.9.0-ncurses.patch,
+ conky-1.9.0-update-when-message-count-decreases.patch:
+ add bug fixes from gentoo

2013-02-17 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
* CONFIGURE: add optional support for hdd temperature, per task
diff --git a/x11/conky/PRE_BUILD b/x11/conky/PRE_BUILD
new file mode 100755
index 0000000..5398005
--- /dev/null
+++ b/x11/conky/PRE_BUILD
@@ -0,0 +1,10 @@
+default_pre_build &&
+cd ${SOURCE_DIRECTORY} &&
+
+patch -p1 < ${SPELL_DIRECTORY}/conky-1.8.1-utf8-scroll.patch &&
+patch -p1 < ${SPELL_DIRECTORY}/conky-1.9.0-ncurses.patch &&
+patch -p1 < ${SPELL_DIRECTORY}/conky-1.9.0-lines-fix.patch &&
+patch -p1 <
${SPELL_DIRECTORY}/conky-1.9.0-update-when-message-count-decreases.patch &&
+patch -p1 < ${SPELL_DIRECTORY}/conky-1.9.0-apcupsd.patch &&
+patch -p1 < ${SPELL_DIRECTORY}/conky-1.9.0-default-graph-size.patch &&
+patch -p1 < ${SPELL_DIRECTORY}/conky-1.9.0-diskio-dmmajor.patch
diff --git a/x11/conky/conky-1.8.1-utf8-scroll.patch
b/x11/conky/conky-1.8.1-utf8-scroll.patch
new file mode 100644
index 0000000..8b9e1e8
--- /dev/null
+++ b/x11/conky/conky-1.8.1-utf8-scroll.patch
@@ -0,0 +1,104 @@
+From b1f6a30bcce020b3c377434137de9856a09b899a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe AT 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/x11/conky/conky-1.9.0-apcupsd.patch
b/x11/conky/conky-1.9.0-apcupsd.patch
new file mode 100644
index 0000000..9161fbc
--- /dev/null
+++ b/x11/conky/conky-1.9.0-apcupsd.patch
@@ -0,0 +1,106 @@
+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 AT gmail.com>
+Forwarded: http://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/x11/conky/conky-1.9.0-default-graph-size.patch
b/x11/conky/conky-1.9.0-default-graph-size.patch
new file mode 100644
index 0000000..02f64e3
--- /dev/null
+++ b/x11/conky/conky-1.9.0-default-graph-size.patch
@@ -0,0 +1,18 @@
+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/x11/conky/conky-1.9.0-diskio-dmmajor.patch
b/x11/conky/conky-1.9.0-diskio-dmmajor.patch
new file mode 100644
index 0000000..754f9dc
--- /dev/null
+++ b/x11/conky/conky-1.9.0-diskio-dmmajor.patch
@@ -0,0 +1,25 @@
+diff --git a/src/linux.c b/src/linux.c
+index ce5f733..bbf8dc5 100644
+--- 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/x11/conky/conky-1.9.0-lines-fix.patch
b/x11/conky/conky-1.9.0-lines-fix.patch
new file mode 100644
index 0000000..de48ab9
--- /dev/null
+++ b/x11/conky/conky-1.9.0-lines-fix.patch
@@ -0,0 +1,36 @@
+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/x11/conky/conky-1.9.0-ncurses.patch
b/x11/conky/conky-1.9.0-ncurses.patch
new file mode 100644
index 0000000..91043ed
--- /dev/null
+++ b/x11/conky/conky-1.9.0-ncurses.patch
@@ -0,0 +1,31 @@
+From fd9462da5ed12369fc6a72e42ebc45c6707403fb Mon Sep 17 00:00:00 2001
+From: Pavel Labath <pavelo AT 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/x11/conky/conky-1.9.0-update-when-message-count-decreases.patch
b/x11/conky/conky-1.9.0-update-when-message-count-decreases.patch
new file mode 100644
index 0000000..dd422c5
--- /dev/null
+++ b/x11/conky/conky-1.9.0-update-when-message-count-decreases.patch
@@ -0,0 +1,75 @@
+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 {



  • [SM-Commit] GIT changes to master grimoire by Florian Franzmann (66d7611328367c7991e249ab54dab011320cc4de), Florian Franzmann, 06/15/2014

Archive powered by MHonArc 2.6.24.

Top of Page