diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-admin/conky | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
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 <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-admin/conky')
-rw-r--r-- | app-admin/conky/Manifest | 1 | ||||
-rw-r--r-- | app-admin/conky/conky-1.9.0-r3.ebuild | 145 | ||||
-rw-r--r-- | app-admin/conky/files/conky-1.8.1-utf8-scroll.patch | 104 | ||||
-rw-r--r-- | app-admin/conky/files/conky-1.9.0-apcupsd.patch | 106 | ||||
-rw-r--r-- | app-admin/conky/files/conky-1.9.0-default-graph-size.patch | 18 | ||||
-rw-r--r-- | app-admin/conky/files/conky-1.9.0-diskio-dmmajor.patch | 23 | ||||
-rw-r--r-- | app-admin/conky/files/conky-1.9.0-lines-fix.patch | 36 | ||||
-rw-r--r-- | app-admin/conky/files/conky-1.9.0-ncurses.patch | 31 | ||||
-rw-r--r-- | app-admin/conky/files/conky-1.9.0-tinfo.patch | 22 | ||||
-rw-r--r-- | app-admin/conky/files/conky-1.9.0-update-when-message-count-decreases.patch | 75 | ||||
-rw-r--r-- | app-admin/conky/metadata.xml | 36 |
11 files changed, 597 insertions, 0 deletions
diff --git a/app-admin/conky/Manifest b/app-admin/conky/Manifest new file mode 100644 index 000000000000..bf4df4e45b9d --- /dev/null +++ b/app-admin/conky/Manifest @@ -0,0 +1 @@ +DIST conky-1.9.0.tar.bz2 626555 SHA256 baf1b550f135fbfb53e5e286a33aadc03a667d63bf6c4d52ba7637366295bb6f SHA512 98c9f69fd8bee2062e3eddeb7a394cce932199ffd6c8664006d1222f0453569406613e63637848c77a455f7dae3f16be3079a2cab56ecafea51ec043de23c889 WHIRLPOOL 41bbe95ec838dbda2c2d4a9422d2f2f7d22d0cb99e87c59fbd32c0c7856cc83de36cbeefd982c964ec5229ae0b0342e84525aa5343d8c5cf9525205cea4a274a diff --git a/app-admin/conky/conky-1.9.0-r3.ebuild b/app-admin/conky/conky-1.9.0-r3.ebuild new file mode 100644 index 000000000000..aac776f80764 --- /dev/null +++ b/app-admin/conky/conky-1.9.0-r3.ebuild @@ -0,0 +1,145 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools eutils libtool + +DESCRIPTION="An advanced, highly configurable system monitor for X" +HOMEPAGE="http://conky.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" + +LICENSE="GPL-3 BSD LGPL-2.1 MIT" +SLOT="0" +KEYWORDS="alpha amd64 ~arm ppc ppc64 sparc x86" +IUSE="apcupsd audacious curl debug eve hddtemp imlib iostats lua lua-cairo lua-imlib math moc mpd nano-syntax ncurses nvidia +portmon rss thinkpad truetype vim-syntax weather-metar weather-xoap wifi X xmms2" + +DEPEND_COMMON=" + X? ( + imlib? ( media-libs/imlib2[X] ) + lua-cairo? ( + >=dev-lua/toluapp-1.0.93 + >=dev-lang/lua-5.1.4-r8 + x11-libs/cairo[X] ) + lua-imlib? ( + >=dev-lua/toluapp-1.0.93 + >=dev-lang/lua-5.1.4-r8 + media-libs/imlib2[X] ) + nvidia? ( media-video/nvidia-settings ) + truetype? ( x11-libs/libXft >=media-libs/freetype-2 ) + x11-libs/libX11 + x11-libs/libXdamage + x11-libs/libXext + audacious? ( >=media-sound/audacious-1.5 dev-libs/glib ) + xmms2? ( media-sound/xmms2 ) + ) + curl? ( net-misc/curl ) + eve? ( net-misc/curl dev-libs/libxml2 ) + portmon? ( dev-libs/glib ) + lua? ( >=dev-lang/lua-5.1.4-r8 ) + ncurses? ( sys-libs/ncurses ) + rss? ( dev-libs/libxml2 net-misc/curl dev-libs/glib ) + wifi? ( net-wireless/wireless-tools ) + weather-metar? ( net-misc/curl ) + weather-xoap? ( dev-libs/libxml2 net-misc/curl ) + virtual/libiconv + " +RDEPEND=" + ${DEPEND_COMMON} + apcupsd? ( sys-power/apcupsd ) + hddtemp? ( app-admin/hddtemp ) + moc? ( media-sound/moc ) + nano-syntax? ( app-editors/nano ) + vim-syntax? ( || ( app-editors/vim app-editors/gvim ) ) + " +DEPEND=" + ${DEPEND_COMMON} + virtual/pkgconfig + " + +src_prepare() { + epatch \ + "${FILESDIR}/${PN}-1.8.1-utf8-scroll.patch" \ + "${FILESDIR}/${P}-ncurses.patch" \ + "${FILESDIR}/${P}-lines-fix.patch" \ + "${FILESDIR}/${P}-update-when-message-count-decreases.patch" \ + "${FILESDIR}/${P}-apcupsd.patch" \ + "${FILESDIR}/${P}-default-graph-size.patch" \ + "${FILESDIR}/${P}-diskio-dmmajor.patch" \ + "${FILESDIR}/${P}-tinfo.patch" + + # Allow user patches #478482 + epatch_user + + eautoreconf +} + +src_configure() { + local myconf + + if use X; then + myconf="--enable-x11 --enable-double-buffer --enable-xdamage" + myconf="${myconf} --enable-argb --enable-own-window" + myconf="${myconf} $(use_enable imlib imlib2) $(use_enable lua-cairo)" + myconf="${myconf} $(use_enable lua-imlib lua-imlib2)" + myconf="${myconf} $(use_enable nvidia) $(use_enable truetype xft)" + myconf="${myconf} $(use_enable audacious) $(use_enable xmms2)" + else + myconf="--disable-x11 --disable-own-window --disable-argb" + myconf="${myconf} --disable-lua-cairo --disable-nvidia --disable-xft" + myconf="${myconf} --disable-audacious --disable-xmms2" + fi + + econf \ + ${myconf} \ + $(use_enable apcupsd) \ + $(use_enable curl) \ + $(use_enable debug) \ + $(use_enable eve) \ + $(use_enable hddtemp) \ + $(use_enable iostats) \ + $(use_enable lua) \ + $(use_enable thinkpad ibm) \ + $(use_enable math) \ + $(use_enable moc) \ + $(use_enable mpd) \ + $(use_enable ncurses) \ + $(use_enable portmon) \ + $(use_enable rss) \ + $(use_enable weather-metar) \ + $(use_enable weather-xoap) \ + $(use_enable wifi wlan) +} + +src_install() { + default + + dohtml doc/*.html + + if use vim-syntax; then + insinto /usr/share/vim/vimfiles/ftdetect + doins "${S}"/extras/vim/ftdetect/conkyrc.vim + + insinto /usr/share/vim/vimfiles/syntax + doins "${S}"/extras/vim/syntax/conkyrc.vim + fi + + if use nano-syntax; then + insinto /usr/share/nano/ + doins "${S}"/extras/nano/conky.nanorc + fi +} + +pkg_postinst() { + if [[ -z "${REPLACING_VERSIONS}" ]]; then + elog "You can find sample configurations at ${ROOT%/}/etc/conky." + elog "To customize, copy to ~/.conkyrc and edit it to your liking." + elog + elog "There are pretty html docs available at the conky homepage" + elog "or in ${ROOT%/}/usr/share/doc/${PF}/html." + elog + elog "Also see https://wiki.gentoo.org/wiki/Conky/HOWTO" + elog + fi +} 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?= <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 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 <bderrly@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/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 <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 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 <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 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 { diff --git a/app-admin/conky/metadata.xml b/app-admin/conky/metadata.xml new file mode 100644 index 000000000000..81d6ebe98f1b --- /dev/null +++ b/app-admin/conky/metadata.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>billie@gentoo.org</email> + <name>Daniel Pielmeier</name> + </maintainer> + <upstream> + <maintainer> + <email>brenden@rty.ca</email> + <name>Brenden Matthews</name> + <description>Upstream author</description> + </maintainer> + <remote-id type="sourceforge">conky</remote-id> + </upstream> + <longdescription>Conky is a system monitor that sits in the corner of your desktop. It is a fork of Torsmo that is actually maintained.</longdescription> + <use> + <flag name="apcupsd">enable support for <pkg>sys-power/apcupsd</pkg></flag> + <flag name="audacious">enable monitoring of music played by <pkg>media-sound/audacious</pkg></flag> + <flag name="eve">enable support for the eve-online skill monitor</flag> + <flag name="iostats">enable support for per-task I/O statistics</flag> + <flag name="lua">enable if you want Lua scripting support</flag> + <flag name="lua-cairo">enable if you want Lua Cairo bindings for Conky (also enables lua support)</flag> + <flag name="lua-imlib">enable if you want Lua Imlib2 bindings for Conky (also enables lua and imlib support)</flag> + <flag name="math">enable support for glibc's libm math library</flag> + <flag name="moc">enable monitoring of music played by <pkg>media-sound/moc</pkg></flag> + <flag name="mpd">enable monitoring of music controlled by <pkg>media-sound/mpd</pkg></flag> + <flag name="nano-syntax">enable syntax highlighting for <pkg>app-editors/nano</pkg></flag> + <flag name="nvidia">enable reading of nvidia card temperature sensors via <pkg>media-video/nvidia-settings</pkg></flag> + <flag name="portmon">enable support for tcp (ip4) port monitoring</flag> + <flag name="thinkpad">enable support for IBM/Lenovo notebooks</flag> + <flag name="weather-metar">enable support for metar weather service</flag> + <flag name="weather-xoap">enable support for metar and xoap weather service</flag> + <flag name="xmms2">enable monitoring of music played by <pkg>media-sound/xmms2</pkg></flag> + </use> +</pkgmetadata> |