From 56bd759df1d0c750a065b8c845e93d5dfa6b549d Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Sat, 8 Aug 2015 13:49:04 -0700 Subject: proj/gentoo: Initial commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson X-Thanks: Alec Warner - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring - wrote much python to improve cvs2svn X-Thanks: Rich Freeman - validation scripts X-Thanks: Patrick Lauer - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed --- .../conky/files/conky-1.8.1-utf8-scroll.patch | 104 ++++++++++++++++++++ app-admin/conky/files/conky-1.9.0-apcupsd.patch | 106 +++++++++++++++++++++ .../files/conky-1.9.0-default-graph-size.patch | 18 ++++ .../conky/files/conky-1.9.0-diskio-dmmajor.patch | 23 +++++ app-admin/conky/files/conky-1.9.0-lines-fix.patch | 36 +++++++ app-admin/conky/files/conky-1.9.0-ncurses.patch | 31 ++++++ app-admin/conky/files/conky-1.9.0-tinfo.patch | 22 +++++ ...1.9.0-update-when-message-count-decreases.patch | 75 +++++++++++++++ 8 files changed, 415 insertions(+) create mode 100644 app-admin/conky/files/conky-1.8.1-utf8-scroll.patch create mode 100644 app-admin/conky/files/conky-1.9.0-apcupsd.patch create mode 100644 app-admin/conky/files/conky-1.9.0-default-graph-size.patch create mode 100644 app-admin/conky/files/conky-1.9.0-diskio-dmmajor.patch create mode 100644 app-admin/conky/files/conky-1.9.0-lines-fix.patch create mode 100644 app-admin/conky/files/conky-1.9.0-ncurses.patch create mode 100644 app-admin/conky/files/conky-1.9.0-tinfo.patch create mode 100644 app-admin/conky/files/conky-1.9.0-update-when-message-count-decreases.patch (limited to 'app-admin/conky/files') 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 new file mode 100644 index 000000000000..8b9e1e8fb9d0 --- /dev/null +++ b/app-admin/conky/files/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?= +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 new file mode 100644 index 000000000000..9161fbcc5ebb --- /dev/null +++ b/app-admin/conky/files/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 +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/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 new file mode 100644 index 000000000000..02f64e314e0e --- /dev/null +++ b/app-admin/conky/files/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/app-admin/conky/files/conky-1.9.0-diskio-dmmajor.patch b/app-admin/conky/files/conky-1.9.0-diskio-dmmajor.patch new file mode 100644 index 000000000000..db3516aa292b --- /dev/null +++ b/app-admin/conky/files/conky-1.9.0-diskio-dmmajor.patch @@ -0,0 +1,23 @@ +--- 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 + #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 new file mode 100644 index 000000000000..de48ab95e48a --- /dev/null +++ b/app-admin/conky/files/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/app-admin/conky/files/conky-1.9.0-ncurses.patch b/app-admin/conky/files/conky-1.9.0-ncurses.patch new file mode 100644 index 000000000000..91043ed42050 --- /dev/null +++ b/app-admin/conky/files/conky-1.9.0-ncurses.patch @@ -0,0 +1,31 @@ +From fd9462da5ed12369fc6a72e42ebc45c6707403fb Mon Sep 17 00:00:00 2001 +From: Pavel Labath +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 new file mode 100644 index 000000000000..0018a726f3ff --- /dev/null +++ b/app-admin/conky/files/conky-1.9.0-tinfo.patch @@ -0,0 +1,22 @@ +--- 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-when-message-count-decreases.patch b/app-admin/conky/files/conky-1.9.0-update-when-message-count-decreases.patch new file mode 100644 index 000000000000..dd422c584e35 --- /dev/null +++ b/app-admin/conky/files/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 { -- cgit v1.2.3-18-g5258