Date: Mon, 4 Oct 2010 17:50:03 GMT From: Nikos Ntarmos <ntarmos@cs.uoi.gr> To: freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/150233: conky 1.8 broken (sysutils/conky) Message-ID: <201010041750.o94Ho3cH089391@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/150233; it has been noted by GNATS. From: Nikos Ntarmos <ntarmos@cs.uoi.gr> To: bug-followup@FreeBSD.ORG Cc: Subject: Re: ports/150233: conky 1.8 broken (sysutils/conky) Date: Mon, 4 Oct 2010 20:40:19 +0300 --C7zPtVaVf+AK4Oqc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Managed to find a 64-bit host and installed FBSD/amd64 in a vm, and *still* can't reproduce the crash... :-\ I did catch a couple of minor bugs though (updated shar attached). The quest continues... \n\n --C7zPtVaVf+AK4Oqc Content-Type: application/x-shar Content-Disposition: attachment; filename="conky.shar" Content-Transfer-Encoding: quoted-printable # This is a shell archive. Save it in a file, remove anything before=0A# t= his line, and then unpack it by entering "sh file". Note, it may=0A# creat= e directories; files and directories will be owned by you and=0A# have defa= ult permissions.=0A#=0A# This archive contains:=0A#=0A# conky=0A# conky/Mak= efile=0A# conky/files=0A# conky/files/patch-src-conky.c=0A# conky/files/pat= ch-src-mixer.c=0A# conky/files/patch-configure=0A# conky/files/patch-src-co= mmon.c=0A# conky/files/patch-src-i8k.c=0A# conky/files/patch-src-diskio.c= =0A# conky/files/patch-src-conky.h=0A# conky/files/patch-src-mail.c=0A# con= ky/files/patch-src-bmpx.c=0A# conky/files/patch-src-top.c=0A# conky/files/p= atch-src-logging.h=0A# conky/files/patch-src-bmpx.h=0A# conky/files/patch-s= rc-rss.c=0A# conky/files/patch-lua-cairo.pkg=0A# conky/files/patch-src-Make= file.in=0A# conky/files/patch-src-core.c=0A# conky/files/patch-src-freebsd.= c=0A# conky/pkg-descr=0A# conky/distinfo=0A#=0Aecho c - conky=0Amkdir -p co= nky > /dev/null 2>&1=0Aecho x - conky/Makefile=0Ased 's/^X//' >conky/Makefi= le << 'c6f03d61758ca6e484be3d23647891ea'=0AX# New ports collection makefile= for: conky=0AX# Date created: 2005-08-27=0AX# Whom: Roman Bogorodsk= iy <novel@FreeBSD.org>=0AX#=0AX# $FreeBSD: ports/sysutils/conky/Makefile,v = 1.51 2010/01/28 01:59:34 amdmi3 Exp $=0AX#=0AX=0AXPORTNAME=3D conky=0AXPORT= VERSION=3D 1.8.0=0AXPORTREVISION=3D 1=0AXCATEGORIES=3D sysutils=0AXMASTER_S= ITES=3D SF=0AX=0AXMAINTAINER=3D ntarmos@cs.uoi.gr=0AXCOMMENT=3D An advanced= , highly configurable system monitor for X=0AX=0AXCONFLICTS?=3D conky-aweso= me-[0-9]*=0AXSLAVEDIRS=3D sysutils/conky-awesome=0AX=0AXUSE_ICONV=3D yes=0A= XUSE_BZIP2=3D yes=0AXGNU_CONFIGURE=3D yes=0AXUSE_XORG?=3D x11 xext xdamage= =0AXUSE_GNOME?=3D pkgconfig=0AXUSE_ICONV=3D yes=0AXUSE_GMAKE=3D yes=0AXCONF= IGURE_ARGS+=3D --disable-portmon \=0AX --disable-hddtemp=0AXCONFIGURE_ENV= +=3D CPPFLAGS=3D"${CPPFLAGS} -I${LOCALBASE}/include" \=0AX LDFLAGS=3D"${LD= FLAGS} -L${LOCALBASE}/lib"=0AX=0AXMAN1=3D conky.1=0AXPLIST_FILES=3D bin/co= nky=0AXPORTEXAMPLES=3D conkyrc.sample=0AXPORTDOCS=3D README AUTHORS ChangeL= og TODO NEWS \=0AX docs.html variables.html config_settings.html=0AX=0AXOP= TIONS+=3D APCUPSD "Enable APCUPSD support" Off \=0AX AUDACIOUS "Enable Aud= acious support" Off \=0AX BMPX "Enable BMPX support" Off \=0AX MPD "Enabl= e MPD support" Off \=0AX NCURSES "Enable ncurses support" Off \=0AX RSS "= Enable RSS support" Off \=0AX METAR "Enable METAR Weather support" Off \= =0AX XOAP "Enable XOAP Weather support" Off \=0AX XMMS2 "Enable XMMS2 sup= port" Off=0AX=0AX.if !empty(USE_XORG)=0AXOPTIONS+=3D DOUBLE_BUFFER "Enable = double buffering" On \=0AX IMLIB2 "Enable Imlib2 support" Off \=0AX LUA "= Enable Lua support" Off \=0AX LUA_CAIRO "Enable Lua-Cairo binding (impl. L= ua)" Off \=0AX LUA_IMLIB2 "Enable Lua-Imlib2 binding (impl. Lua/Imlib2)" O= ff \=0AX XFT "Enable Xft support" Off=0AX.else=0AXOPTIONS+=3D LUA "Enable = Lua support" Off=0AX.endif=0AX=0AX.include <bsd.port.pre.mk>=0AX=0AX.if emp= ty(USE_XORG)=0AXWITHOUT_DOUBLE_BUFFER=3D On=0AXCONFIGURE_ARGS+=3D --disable= -x11 --disable-own-window=0AX.undef WITH_IMLIB2=0AX.undef WITH_LUA_CAIRO=0A= X.undef WITH_LUA_IMLIB2=0AX.undef WITH_XFT=0AX.endif=0AX=0AX.if defined(WIT= H_APCUPSD)=0AXRUN_DEPENDS+=3D ${LOCALBASE}/sbin/apcupsd:${PORTSDIR}/sysuti= ls/apcupsd=0AXCONFIGURE_ARGS+=3D --enable-apcupsd=0AX.else=0AXCONFIGURE_ARG= S+=3D --disable-apcupsd=0AX.endif=0AX=0AX.if defined(WITH_AUDACIOUS)=0AXLIB= _DEPENDS+=3D audclient.2:${PORTSDIR}/multimedia/audacious=0AXCONFIGURE_ARG= S+=3D --enable-audacious=0AX.else=0AXCONFIGURE_ARGS+=3D --disable-audacious= =0AX.endif=0AX=0AX.if defined(WITH_BMPX)=0AXBUILD_DEPENDS+=3D beep-media-p= layer-2:${PORTSDIR}/multimedia/bmpx=0AXRUN_DEPENDS+=3D beep-media-player-2= :${PORTSDIR}/multimedia/bmpx=0AXLIB_DEPENDS+=3D dbus-1.3:${PORTSDIR}/devel= /dbus=0AXCONFIGURE_ARGS+=3D --enable-bmpx=0AX.else=0AXCONFIGURE_ARGS+=3D --= disable-bmpx=0AX.endif=0AX=0AX.if defined(WITH_LUA) || defined(WITH_LUA_CAI= RO) || defined(WITH_LUA_IMLIB2)=0AXUSE_LUA=3D 5.1+=0AXCONFIGURE_ARGS+=3D -= -enable-lua=0AX.else=0AXCONFIGURE_ARGS+=3D --disable-lua=0AX.endif=0AX=0AX.= if defined(WITH_LUA_CAIRO)=0AXLIB_DEPENDS+=3D cairo.2:${PORTSDIR}/graphics= /cairo=0AXBUILD_DEPENDS+=3D tolua++-5.1:${PORTSDIR}/lang/tolua++=0AXRUN_DE= PENDS+=3D tolua++-5.1:${PORTSDIR}/lang/tolua++=0AXCONFIGURE_ARGS+=3D --ena= ble-lua-cairo=0AX.endif=0AX=0AX.if defined(WITH_IMLIB2) || defined(WITH_LUA= _IMLIB2)=0AXLIB_DEPENDS+=3D Imlib2.5:${PORTSDIR}/graphics/imlib2=0AXCONFIG= URE_ARGS+=3D --enable-imlib2=0AX.else=0AXCONFIGURE_ARGS+=3D --disable-imlib= 2=0AX.endif=0AX=0AX.if defined(WITH_LUA_IMLIB2)=0AXBUILD_DEPENDS+=3D tolua= ++-5.1:${PORTSDIR}/lang/tolua++=0AXRUN_DEPENDS+=3D tolua++-5.1:${PORTSDIR}= /lang/tolua++=0AXCONFIGURE_ARGS+=3D --enable-lua-imlib2=0AX.endif=0AX=0AX.i= f defined(WITH_NCURSES)=0AXCONFIGURE_ARGS+=3D --enable-ncurses=0AX.else=0AX= CONFIGURE_ARGS+=3D --disable-ncurses=0AX.endif=0AX=0AX.if defined(WITH_XFT)= =0AXLIB_DEPENDS+=3D Xft.2:${PORTSDIR}/x11-fonts/libXft=0AXCONFIGURE_ARGS+= =3D --enable-xft=0AX.else=0AXCONFIGURE_ARGS+=3D --disable-xft=0AX.endif=0AX= =0AX.if defined(WITHOUT_MPD)=0AXCONFIGURE_ARGS+=3D --disable-mpd=0AX.endif= =0AX=0AX.if defined(WITH_RSS)=0AXLIB_DEPENDS+=3D curl.6:${PORTSDIR}/ftp/cu= rl \=0AX xml2.5:${PORTSDIR}/textproc/libxml2=0AXCONFIGURE_ARGS+=3D --enab= le-rss=0AXUSE_GNOME+=3D glib20=0AX.endif=0AX=0AX.if defined(WITH_METAR)=0A= XLIB_DEPENDS+=3D curl.6:${PORTSDIR}/ftp/curl=0AXCONFIGURE_ARGS+=3D --enabl= e-weather-metar=0AX.endif=0AX=0AX.if defined(WITH_XOAP)=0AXLIB_DEPENDS+=3D = curl.6:${PORTSDIR}/ftp/curl \=0AX xml2.5:${PORTSDIR}/textproc/libxml2=0A= XCONFIGURE_ARGS+=3D --enable-weather-xoap=0AX.endif=0AX=0AX.if defined(WITH= _XMMS2)=0AXLIB_DEPENDS+=3D xmmsclient.5:${PORTSDIR}/audio/xmms2=0AXCONFIGU= RE_ARGS+=3D --enable-xmms2=0AX.else=0AXCONFIGURE_ARGS+=3D --disable-xmms2= =0AX.endif=0AX=0AX.if defined(WITHOUT_DOUBLE_BUFFER)=0AXCONFIGURE_ARGS+=3D = --disable-double-buffer=0AX.endif=0AX=0AXpost-patch:=0AX @${REINPLACE_CMD} = -e 's,lua5\.1,lua-5.1,g' \=0AX ${WRKSRC}/configure=0AX @${REINPLACE_CMD} -= e 's,imlib_context_disconnect_display();,,g' \=0AX ${WRKSRC}/src/imlib2.c= =0AX=0AXdo-install:=0AX ${INSTALL_PROGRAM} ${WRKSRC}/src/conky ${PREFIX}/bi= n=0AX ${INSTALL_MAN} ${WRKSRC}/doc/conky.1 ${PREFIX}/man/man1=0AX=0AXpost-i= nstall:=0AX.if !defined(NOPORTEXAMPLES)=0AX @${MKDIR} ${EXAMPLESDIR}=0AX. i= f !empty(USE_XORG)=0AX @${INSTALL_DATA} ${WRKSRC}/data/conky.conf ${EXAMPLE= SDIR}/conkyrc.sample=0AX. else=0AX @${INSTALL_DATA} ${WRKSRC}/data/conky_no= _x11.conf ${EXAMPLESDIR}/conkyrc.sample=0AX. endif=0AX.endif=0AX=0AX.if !de= fined(NOPORTDOCS)=0AX @${MKDIR} ${DOCSDIR}=0AX.for i in README AUTHORS Chan= geLog TODO NEWS=0AX ${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}=0AX.endfor=0A= X.for i in docs.html variables.html config_settings.html=0AX ${INSTALL_DATA= } ${WRKSRC}/doc/${i} ${DOCSDIR}=0AX.endfor=0AX.endif=0AX=0AX.include <bsd.p= ort.post.mk>=0Ac6f03d61758ca6e484be3d23647891ea=0Aecho c - conky/files=0Amk= dir -p conky/files > /dev/null 2>&1=0Aecho x - conky/files/patch-src-conky.= c=0Ased 's/^X//' >conky/files/patch-src-conky.c << 'c59c590f71d1b0c018c091a= f48aee345'=0AX--- src/conky.c.orig 2010-03-25 22:27:32.000000000 +0200=0AX+= ++ src/conky.c 2010-06-22 00:38:09.000000000 +0300=0AX@@ -166,9 +166,7 @@= =0AX #ifdef IOSTATS=0AX int top_io;=0AX #endif=0AX-#ifdef __linux__=0AX int= top_running;=0AX-#endif=0AX int output_methods;=0AX static int extra_newli= ne;=0AX enum x_initialiser_state x_initialised =3D NO;=0AX@@ -269,9 +267,6 = @@=0AX #ifdef IMLIB2=0AX " * Imlib2\n"=0AX #endif /* IMLIB2 */=0AX-#i= fdef MIXER_IS_ALSA=0AX- " * ALSA mixer support\n"=0AX-#endif /* MIXER_= IS_ALSA */=0AX #ifdef APCUPSD=0AX " * apcupsd\n"=0AX #endif /* APCUPS= D */=0AX@@ -463,7 +458,7 @@=0AX }=0AX fclose(where);=0AX } else {=0AX-= NORM_ERR("Could not open the file");=0AX+ NORM_ERR("Could not open the f= ile '%s'", f);=0AX }=0AX return ret;=0AX }=0AX@@ -512,6 +507,7 @@=0AX ch= ar *ps, *pe;=0AX int special_index =3D 0; /* specials index */=0AX =0AX+ i= f(! b) return;=0AX for (ps =3D b, pe =3D b; *pe; pe++) {=0AX if (*pe =3D= =3D '\n') {=0AX *pe =3D '\0';=0AX@@ -765,6 +761,8 @@=0AX buff_in[0] =3D= 0;=0AX #endif /* HAVE_ICONV */=0AX =0AX+ if(! p) return;=0AX+=0AX p[0] = =3D 0;=0AX obj =3D root.next;=0AX while (obj && p_max_size > 0) {=0AX@@ -= 1330,7 +1328,7 @@=0AX DO_JUMP;=0AX } else if (spc) {=0AX *spc= =3D '\0';=0AX- if (check_contains(obj->data.s, spc + 1))=0AX+ if (= !check_contains(obj->data.s, spc + 1))=0AX DO_JUMP;=0AX *spc =3D= ' ';=0AX }=0AX@@ -2062,9 +2060,11 @@=0AX OBJ(xmms2_percent) {=0AX = snprintf(p, p_max_size, "%2.0f", cur->xmms2.progress * 100);=0AX }=0A= X+#ifdef X11=0AX OBJ(xmms2_bar) {=0AX new_bar(obj, p, p_max_size, (i= nt) (cur->xmms2.progress * 255.0f));=0AX }=0AX+#endif /* X11 */=0AX O= BJ(xmms2_playlist) {=0AX snprintf(p, p_max_size, "%s", cur->xmms2.playl= ist);=0AX }=0AX@@ -2140,6 +2140,7 @@=0AX snprintf(p, p_max_size, "%s= ",=0AX cur->audacious.items[AUDACIOUS_MAIN_VOLUME]);=0AX }=0AX+#ifd= ef X11=0AX OBJ(audacious_bar) {=0AX double progress;=0AX =0AX@@ -214= 8,6 +2149,7 @@=0AX atof(cur->audacious.items[AUDACIOUS_LENGTH_SECONDS]= );=0AX new_bar(obj, p, p_max_size, (int) (progress * 255.0f));=0AX }= =0AX+#endif /* X11 */=0AX #endif /* AUDACIOUS */=0AX =0AX #ifdef BMPX=0AX@@= -2173,7 +2175,6 @@=0AX /* we have four different types of top (top, top= _mem,=0AX * top_time and top_io). To avoid having almost-same code four= =0AX * times, we have this special handler. */=0AX-#ifdef __linux__=0AX= break;=0AX case OBJ_top:=0AX case OBJ_top_mem:=0AX@@ -2182,7 +218= 3,6 @@=0AX case OBJ_top_io:=0AX #endif=0AX print_top(obj, p, p_max_s= ize);=0AX-#endif /* __linux__ */=0AX OBJ(tail) {=0AX print_tailhead(= "tail", obj, p, p_max_size);=0AX }=0AX@@ -2375,13 +2375,7 @@=0AX #ifdef = HAVE_ICONV=0AX iconv_convert(&a, buff_in, p, p_max_size);=0AX #endif /* = HAVE_ICONV */=0AX- if (obj->type !=3D OBJ_text && obj->type !=3D OBJ_exec= p && obj->type !=3D OBJ_execpi=0AX-#ifdef HAVE_LUA=0AX- && obj->type != =3D OBJ_lua && obj->type !=3D OBJ_lua_parse=0AX-#endif /* HAVE_LUA */=0AX- = ) {=0AX- substitute_newlines(p, a - 2);=0AX- }=0AX+ substitute_n= ewlines(p, a - 2);=0AX p +=3D a;=0AX p_max_size -=3D a;=0AX (*p) = =3D 0;=0AX@@ -3119,36 +3113,49 @@=0AX if (seconds !=3D 0) {=0AX = timeunits =3D seconds / 86400; seconds %=3D 86400;=0AX if (timeuni= ts > 0) {=0AX- asprintf(&tmp_day_str, "%dd", timeunits);=0AX+ = if (asprintf(&tmp_day_str, "%dd", timeunits) < 0) {=0AX+ tmp_day_s= tr =3D 0;=0AX+ }=0AX } else {=0AX tmp_day_str =3D str= dup("");=0AX }=0AX timeunits =3D seconds / 3600; seconds %=3D= 3600;=0AX if (timeunits > 0) {=0AX- asprintf(&tmp_hour_str, = "%dh", timeunits);=0AX+ if (asprintf(&tmp_hour_str, "%dh", timeunits= ) < 0) {=0AX+ tmp_day_str =3D 0;=0AX+ }=0AX } else {= =0AX tmp_hour_str =3D strdup("");=0AX }=0AX timeunits= =3D seconds / 60; seconds %=3D 60;=0AX if (timeunits > 0) {=0AX- = asprintf(&tmp_min_str, "%dm", timeunits);=0AX+ if (asprintf(&tm= p_min_str, "%dm", timeunits) < 0) {=0AX+ tmp_min_str =3D 0;=0AX+ = }=0AX } else {=0AX tmp_min_str =3D strdup("");=0AX = }=0AX if (seconds > 0) {=0AX- asprintf(&tmp_sec_str, "%ds"= , seconds);=0AX+ if (asprintf(&tmp_sec_str, "%ds", seconds) < 0) {= =0AX+ tmp_sec_str =3D 0;=0AX+ }=0AX } else {=0AX = tmp_sec_str =3D strdup("");=0AX }=0AX- asprintf(&tmp_str, = "%s%s%s%s", tmp_day_str, tmp_hour_str, tmp_min_str, tmp_sec_str);=0AX- = free(tmp_day_str); free(tmp_hour_str); free(tmp_min_str); free(tmp_sec_st= r);=0AX+ if (asprintf(&tmp_str, "%s%s%s%s", tmp_day_str,=0AX+ = tmp_hour_str, tmp_min_str, tmp_sec_str) < 0) {=0AX+ tmp_str =3D 0;= =0AX+ }=0AX+#define FREE(a) if ((a)) free((a));=0AX+ FREE(tmp_d= ay_str); FREE(tmp_hour_str); FREE(tmp_min_str); FREE(tmp_sec_str);=0AX = } else {=0AX- asprintf(&tmp_str, "Range not possible"); // should n= ever happen, but better safe then sorry=0AX+ tmp_str =3D strdup("Rang= e not possible"); /* should never happen, but better safe then sorry */=0AX= }=0AX cur_x +=3D (w / 2) - (font_ascent() * (strlen(tmp_str) /= 2));=0AX cur_y +=3D font_h / 2;=0AX draw_string(tmp_str);=0AX-= free(tmp_str);=0AX+ FREE(tmp_str);=0AX+#undef FREE=0AX cur= _x =3D tmp_x;=0AX cur_y =3D tmp_y;=0AX }=0AX@@ -3974,11 +3981,39= @@=0AX initialisation(argc_copy, argv_copy);=0AX }=0AX =0AX-void clean_up= (void *memtofree1, void* memtofree2)=0AX-{=0AX- int i;=0AX+#ifdef X11=0AX+v= oid clean_up_x11() {=0AX+ if(window_created =3D=3D 1) {=0AX+ XClearArea(di= splay, window.window, text_start_x - window.border_inner_margin - window.bo= rder_outer_margin - window.border_width,=0AX+ text_start_y - window.borde= r_inner_margin - window.border_outer_margin - window.border_width,=0AX+ t= ext_width + window.border_inner_margin * 2 + window.border_outer_margin * 2= + window.border_width * 2,=0AX+ text_height + window.border_inner_margin= * 2 + window.border_outer_margin * 2 + window.border_width * 2, 0);=0AX+ }= =0AX+ destroy_window();=0AX+ free_fonts();=0AX+ fonts =3D NULL;=0AX+ if(x11= _stuff.region) {=0AX+ XDestroyRegion(x11_stuff.region);=0AX+ x11_stuff.re= gion =3D NULL;=0AX+ }=0AX+ if(display) {=0AX+ XCloseDisplay(display);=0AX+= display =3D NULL;=0AX+ }=0AX+ if(info.x11.desktop.all_names) {=0AX+ free= (info.x11.desktop.all_names);=0AX+ info.x11.desktop.all_names =3D NULL;=0A= X+ }=0AX+ if (info.x11.desktop.name) {=0AX+ free(info.x11.desktop.name);= =0AX+ info.x11.desktop.name =3D NULL;=0AX+ }=0AX+ x_initialised =3D NO;=0A= X+}=0AX+#endif=0AX =0AX- free_update_callbacks();=0AX+void clean_up_without= _threads(void *memtofree1, void* memtofree2) {=0AX+ int i;=0AX =0AX #ifdef = NCURSES=0AX if(output_methods & TO_NCURSES) {=0AX@@ -4001,29 +4036,7 @@=0A= X }=0AX #ifdef X11=0AX if (x_initialised =3D=3D YES) {=0AX- if(window_cr= eated =3D=3D 1) {=0AX- XClearArea(display, window.window, text_start_x - = window.border_inner_margin - window.border_outer_margin - window.border_wid= th,=0AX- text_start_y - window.border_inner_margin - window.border_outer= _margin - window.border_width,=0AX- text_width + window.border_inner_mar= gin * 2 + window.border_outer_margin * 2 + window.border_width * 2,=0AX- = text_height + window.border_inner_margin * 2 + window.border_outer_margin = * 2 + window.border_width * 2, 0);=0AX- }=0AX- destroy_window();=0AX- fr= ee_fonts();=0AX- if(x11_stuff.region) {=0AX- XDestroyRegion(x11_stuff.re= gion);=0AX- x11_stuff.region =3D NULL;=0AX- }=0AX- XCloseDisplay(displa= y);=0AX- display =3D NULL;=0AX- if(info.x11.desktop.all_names) {=0AX- f= ree(info.x11.desktop.all_names);=0AX- info.x11.desktop.all_names =3D NULL= ;=0AX- }=0AX- if (info.x11.desktop.name) {=0AX- free(info.x11.desktop.n= ame);=0AX- info.x11.desktop.name =3D NULL;=0AX- }=0AX- x_initialised = =3D NO;=0AX+ clean_up_x11();=0AX }else{=0AX free(fonts); //in set_defau= lt_configurations a font is set but not loaded=0AX font_count =3D -1;=0AX= @@ -4097,6 +4110,12 @@=0AX }=0AX }=0AX =0AX+void clean_up(void *memtofree1= , void* memtofree2)=0AX+{=0AX+ free_update_callbacks();=0AX+ clean_up_witho= ut_threads(memtofree1, memtofree2);=0AX+}=0AX+=0AX static int string_to_boo= l(const char *s)=0AX {=0AX if (!s) {=0AX@@ -4200,9 +4219,7 @@=0AX #ifdef I= OSTATS=0AX top_io =3D 0;=0AX #endif=0AX-#ifdef __linux__=0AX top_running = =3D 0;=0AX-#endif=0AX #ifdef MPD=0AX mpd_env_host =3D getenv("MPD_HOST");= =0AX mpd_env_port =3D getenv("MPD_PORT");=0AX@@ -4252,6 +4269,9 @@=0AX ou= tput_methods =3D TO_STDOUT;=0AX #endif=0AX #ifdef X11=0AX+#ifdef BUILD_XFT= =0AX+ use_xft =3D 0;=0AX+#endif=0AX show_graph_scale =3D 0;=0AX show_grap= h_range =3D 0;=0AX draw_shades =3D 1;=0AX@@ -4518,13 +4538,13 @@=0AX int= a =3D string_to_alignment(value);=0AX =0AX if (a <=3D 0) {=0AX- if(set= byconffile =3D=3D true) {=0AX+ if(setbyconffile =3D=3D 1) {=0AX CONF_= ERR;=0AX } else NORM_ERR("'%s' is not a alignment setting", value);=0AX = } else {=0AX *ltext_alignment =3D a;=0AX }=0AX- } else if(setbyconff= ile =3D=3D true) {=0AX+ } else if(setbyconffile =3D=3D 1) {=0AX CONF_ERR;= =0AX }=0AX }=0AX@@ -4552,15 +4572,12 @@=0AX =0AX #ifdef X11=0AX CONF2("o= ut_to_x") {=0AX- /* don't listen if X is already initialised or=0AX- *= if we already know we don't want it */=0AX- if(x_initialised !=3D YES) {= =0AX- if (string_to_bool(value)) {=0AX- output_methods &=3D TO_X;=0A= X- } else {=0AX- output_methods &=3D ~TO_X;=0AX- x_initialised = =3D NEVER;=0AX- }=0AX+ if (string_to_bool(value)) {=0AX+ output_met= hods &=3D TO_X;=0AX+ } else {=0AX+ clean_up_x11();=0AX+ output_meth= ods &=3D ~TO_X;=0AX+ x_initialised =3D NEVER;=0AX }=0AX }=0AX CON= F("display") {=0AX@@ -4573,7 +4590,7 @@=0AX }=0AX }=0AX CONF("alignm= ent") {=0AX- setalignment(&text_alignment, window.type, value, f, line, t= rue);=0AX+ setalignment(&text_alignment, window.type, value, f, line, 1);= =0AX }=0AX CONF("background") {=0AX fork_to_background =3D string_to= _bool(value);=0AX@@ -4609,7 +4626,7 @@=0AX CONF("border_width") {=0AX = if (value) {=0AX window.border_width =3D strtol(value, 0, 0);=0AX- i= f (window.border_width < 0) window.border_width =3D 0;=0AX+ if (window.b= order_width < 1) window.border_width =3D 1;=0AX } else {=0AX CONF_ER= R;=0AX }=0AX@@ -5670,7 +5687,7 @@=0AX #endif=0AX =0AX #if defined(__Free= BSD__) || defined(__FreeBSD_kernel__)=0AX- if ((kd =3D kvm_open("/dev/null"= , "/dev/null", "/dev/null", O_RDONLY,=0AX+ if ((kd =3D kvm_open(NULL, "/dev= /null", "/dev/null", O_RDONLY,=0AX "kvm_open")) =3D=3D NULL) {=0AX CRI= T_ERR(NULL, NULL, "cannot read kvm");=0AX }=0AX@@ -5696,7 +5713,7 @@=0AX = set_first_font(optarg);=0AX break;=0AX case 'a':=0AX- setalign= ment(&text_alignment, window.type, optarg, NULL, 0, false);=0AX+ setalig= nment(&text_alignment, window.type, optarg, NULL, 0, 0);=0AX break;=0AX= =0AX #ifdef OWN_WINDOW=0AX@@ -5895,7 +5912,9 @@=0AX current_config =3D= strndup(optarg, max_user_text);=0AX break;=0AX case 'q':=0AX- fr= eopen("/dev/null", "w", stderr);=0AX+ if (!freopen("/dev/null", "w", std= err)) {=0AX+ NORM_ERR("unable to redirect stderr to /dev/null");=0AX+ = }=0AX break;=0AX case 'h':=0AX print_help(argv[0]);=0AX@@ -592= 9,7 +5948,13 @@=0AX #endif /* XOAP */=0AX =0AX #ifdef HAVE_SYS_INOTIFY_H=0A= X- inotify_fd =3D inotify_init1(IN_NONBLOCK);=0AX+ inotify_fd =3D inotify_i= nit();=0AX+ if(inotify_fd !=3D -1) {=0AX+ int fl;=0AX+=0AX+ fl =3D fcntl(= inotify_fd, F_GETFL);=0AX+ fcntl(inotify_fd, F_SETFL, fl | O_NONBLOCK);=0A= X+ }=0AX #endif /* HAVE_SYS_INOTIFY_H */=0AX =0AX initialisation(argc, arg= v);=0Ac59c590f71d1b0c018c091af48aee345=0Aecho x - conky/files/patch-src-mix= er.c=0Ased 's/^X//' >conky/files/patch-src-mixer.c << '34de5c2a761905d37e86= baba46208622'=0AX--- src/mixer.c.orig=0AX+++ src/mixer.c=0AX@@ -281,6 +281,= 7 @@ int mixer_is_mute(int i)=0AX =0AX #define mixer_to_255(i, x) x=0AX #en= dif /* MIXER_IS_ALSA */=0AX+#define mixer_to_255(i, x) x * 2.55=0AX =0AX vo= id parse_mixer_arg(struct text_object *obj, const char *arg)=0AX {=0A34de5c= 2a761905d37e86baba46208622=0Aecho x - conky/files/patch-configure=0Ased 's/= ^X//' >conky/files/patch-configure << '498e2a3501cfe7ff2362b87148767ae4'=0A= X--- configure.orig=0AX+++ configure=0AX@@ -11233,12 +11233,12 @@=0AX = pkg_cv_Audacious_CFLAGS=3D"$Audacious_CFLAGS"=0AX else=0AX i= f test -n "$PKG_CONFIG" && \=0AX- { { $as_echo "$as_me:${as_lineno-$LINE= NO}: \$PKG_CONFIG --exists --print-errors \"audacious >=3D 1.4.0 dbus-glib-= 1 glib-2.0 gobject-2.0\""; } >&5=0AX- ($PKG_CONFIG --exists --print-errors= "audacious >=3D 1.4.0 dbus-glib-1 glib-2.0 gobject-2.0") 2>&5=0AX+ { { = $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors= \"audacious >=3D 1.4.0 audclient dbus-glib-1 glib-2.0 gobject-2.0\""; } >&= 5=0AX+ ($PKG_CONFIG --exists --print-errors "audacious >=3D 1.4.0 audclien= t dbus-glib-1 glib-2.0 gobject-2.0") 2>&5=0AX ac_status=3D$?=0AX $as_ec= ho "$as_me:${as_lineno-$LINENO}: \$? =3D $ac_status" >&5=0AX test $ac_sta= tus =3D 0; }; then=0AX- pkg_cv_Audacious_CFLAGS=3D`$PKG_CONFIG --cflags "a= udacious >=3D 1.4.0 dbus-glib-1 glib-2.0 gobject-2.0" 2>/dev/null`=0AX+ pk= g_cv_Audacious_CFLAGS=3D`$PKG_CONFIG --cflags "audacious >=3D 1.4.0 audclie= nt dbus-glib-1 glib-2.0 gobject-2.0" 2>/dev/null`=0AX else=0AX pkg_failed= =3Dyes=0AX fi=0AX@@ -11251,12 +11251,12 @@=0AX pkg_cv_Audacious_LIB= S=3D"$Audacious_LIBS"=0AX else=0AX if test -n "$PKG_CONFIG" && = \=0AX- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists = --print-errors \"audacious >=3D 1.4.0 dbus-glib-1 glib-2.0 gobject-2.0\""; = } >&5=0AX- ($PKG_CONFIG --exists --print-errors "audacious >=3D 1.4.0 dbus= -glib-1 glib-2.0 gobject-2.0") 2>&5=0AX+ { { $as_echo "$as_me:${as_linen= o-$LINENO}: \$PKG_CONFIG --exists --print-errors \"audacious >=3D 1.4.0 aud= client dbus-glib-1 glib-2.0 gobject-2.0\""; } >&5=0AX+ ($PKG_CONFIG --exis= ts --print-errors "audacious >=3D 1.4.0 audclient dbus-glib-1 glib-2.0 gobj= ect-2.0") 2>&5=0AX ac_status=3D$?=0AX $as_echo "$as_me:${as_lineno-$LIN= ENO}: \$? =3D $ac_status" >&5=0AX test $ac_status =3D 0; }; then=0AX- pk= g_cv_Audacious_LIBS=3D`$PKG_CONFIG --libs "audacious >=3D 1.4.0 dbus-glib-1= glib-2.0 gobject-2.0" 2>/dev/null`=0AX+ pkg_cv_Audacious_LIBS=3D`$PKG_CON= FIG --libs "audacious >=3D 1.4.0 audclient dbus-glib-1 glib-2.0 gobject-2.0= " 2>/dev/null`=0AX else=0AX pkg_failed=3Dyes=0AX fi=0AX@@ -11275,14 +1127= 5,14 @@=0AX _pkg_short_errors_supported=3Dno=0AX fi=0AX if = test $_pkg_short_errors_supported =3D yes; then=0AX- Audacious_PKG_= ERRORS=3D`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "aud= acious >=3D 1.4.0 dbus-glib-1 glib-2.0 gobject-2.0"`=0AX+ Audacious= _PKG_ERRORS=3D`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors= "audacious >=3D 1.4.0 audclient dbus-glib-1 glib-2.0 gobject-2.0"`=0AX = else=0AX- Audacious_PKG_ERRORS=3D`$PKG_CONFIG --errors-to-stdo= ut --print-errors "audacious >=3D 1.4.0 dbus-glib-1 glib-2.0 gobject-2.0"`= =0AX+ Audacious_PKG_ERRORS=3D`$PKG_CONFIG --errors-to-stdout --prin= t-errors "audacious >=3D 1.4.0 audclient dbus-glib-1 glib-2.0 gobject-2.0"`= =0AX fi=0AX # Put the nasty error message in config.log where it b= elongs=0AX echo "$Audacious_PKG_ERRORS" >&5=0AX =0AX- as_fn_error "Package= requirements (audacious >=3D 1.4.0 dbus-glib-1 glib-2.0 gobject-2.0) were = not met:=0AX+ as_fn_error "Package requirements (audacious >=3D 1.4.0 audcl= ient dbus-glib-1 glib-2.0 gobject-2.0) were not met:=0AX =0AX $Audacious_PK= G_ERRORS=0AX =0AX@@ -11645,7 +11645,7 @@=0AX =0AX =0AX if test x$want_apcup= sd =3D xyes; then=0AX- if test x"$uname" !=3D xLinux; then=0AX+ if test x= "$uname" !=3D xLinux -a x"$uname" !=3D xFreeBSD; then=0AX { $as_echo = "$as_me:${as_lineno-$LINENO}: apcupsd not supported on $uname... disabling"= >&5=0AX $as_echo "$as_me: apcupsd not supported on $uname... disabling" >&= 6;}=0AX want_apcupsd=3D"not supported on $uname"=0AX@@ -11675,7 +1167= 5,7 @@=0AX =0AX =0AX if test x$want_iostats =3D xyes; then=0AX- if test x"= $uname" !=3D xLinux; then=0AX+ if test x"$uname" !=3D xLinux -a x"$uname" = !=3D xFreeBSD; then=0AX { $as_echo "$as_me:${as_lineno-$LINENO}: iost= ats not supported on $uname... disabling" >&5=0AX $as_echo "$as_me: iostats= not supported on $uname... disabling" >&6;}=0AX want_iostats=3D"not = supported on $uname"=0AX@@ -15950,11 +15950,6 @@=0AX fi=0AX =0AX fi=0AX-if = test x$want_alsa =3D xyes; then=0AX-=0AX-$as_echo "#define MIXER_IS_ALSA 1"= >>confdefs.h=0AX-=0AX-fi=0AX =0AX for ac_header in signal.h unistd.h sys/u= tsname.h sys/stat.h linux/soundcard.h alsa/asoundlib.h dirent.h mcheck.h \= =0AX sys/statfs.h sys/param.h pthread.h semaphore.h assert.h errno.h = time.h=0AX@@ -18905,6 +18900,7 @@=0AX ALSA mixer: $want_alsa=0AX = apcupsd: $want_apcupsd=0AX I/O stats: $want_iostats=0AX+ = ncurses: $want_ncurses=0AX =0AX * Lua ($want_lua) bindings:=0AX = Cairo: $want_lua_cairo=0A498e2a3501cfe7ff2362b87148767ae4=0Aec= ho x - conky/files/patch-src-common.c=0Ased 's/^X//' >conky/files/patch-src= -common.c << '24cdd30e7953ea41310801eca05f1374'=0AX--- src/common.c.orig=0A= X+++ src/common.c=0AX@@ -411,8 +417,14 @@ void update_stuff(void)=0AX }=0A= X /* need to synchronise here, otherwise locking is needed (as data=0AX = * would be printed with some update callbacks still running) */=0AX- for (u= c =3D update_cb_head.next; uc; uc =3D uc->next)=0AX+ for (uc =3D update_cb_= head.next; uc; uc =3D uc->next) {=0AX sem_wait(&uc->end_wait);=0AX+ if(u= c =3D=3D uc->next) {=0AX+ pthread_join(uc->thread, NULL);=0AX+ free(uc)= ;=0AX+ exit(EXIT_FAILURE);=0AX+ }=0AX+ }=0AX =0AX /* XXX: move the foll= owing into the update_meminfo() functions? */=0AX if (no_buffers) {=0A24cd= d30e7953ea41310801eca05f1374=0Aecho x - conky/files/patch-src-i8k.c=0Ased '= s/^X//' >conky/files/patch-src-i8k.c << '03f7f438b524e17aa11f6534db01c938'= =0AX--- src/i8k.c.orig=0AX+++ src/i8k.c=0AX@@ -61,8 +61,12 @@ void update_i= 8k(void)=0AX i8k_procbuf =3D (char *) malloc(128 * sizeof(char));=0AX }= =0AX if ((fp =3D fopen(PROC_I8K, "r")) =3D=3D NULL) {=0AX- CRIT_ERR(NULL,= NULL, "/proc/i8k doesn't exist! use insmod to make sure the kernel "=0AX+ = free(i8k_procbuf);=0AX+ i8k_procbuf =3D NULL;=0AX+ NORM_ERR("/proc/i8k d= oesn't exist! use insmod to make sure the kernel "=0AX "driver is loaded= =2E..");=0AX+ clean_up_without_threads(NULL, NULL);=0AX+ free(current_mai= l_spool);=0AX }=0AX =0AX memset(&i8k_procbuf[0], 0, 128);=0A03f7f438b524e= 17aa11f6534db01c938=0Aecho x - conky/files/patch-src-diskio.c=0Ased 's/^X//= ' >conky/files/patch-src-diskio.c << '4cdfd9587647cda26c3e5aa9031719fa'=0AX= --- src/diskio.c.orig=0AX+++ src/diskio.c=0AX@@ -76,12 +76,6 @@ struct disk= io_stat *prepare_diskio_stat(const char *s)=0AX if (!s)=0AX return &stat= s;=0AX =0AX-#if defined(__FreeBSD__)=0AX- if (strncmp(s, "/dev/", 5) =3D=3D= 0) {=0AX- // supplied a /dev/device arg, so cut off the /dev part=0AX- s= trncpy(device_name, s + 5, text_buffer_size);=0AX- } else=0AX-#endif=0AX s= trncpy(device_name, s, text_buffer_size);=0AX =0AX snprintf(stat_name, tex= t_buffer_size, "/dev/%s", device_name);=0A4cdfd9587647cda26c3e5aa9031719fa= =0Aecho x - conky/files/patch-src-conky.h=0Ased 's/^X//' >conky/files/patch= -src-conky.h << 'af61214ebb1a9bd0a4b9cfc894797f31'=0AX--- src/conky.h.orig= =0AX+++ src/conky.h=0AX@@ -296,9 +296,7 @@ extern int top_cpu, top_mem, top= _time;=0AX #ifdef IOSTATS=0AX extern int top_io;=0AX #endif=0AX-#ifdef __li= nux__=0AX extern int top_running;=0AX-#endif=0AX =0AX /* defined in conky.c= , needed by top.c */=0AX extern int cpu_separate;=0Aaf61214ebb1a9bd0a4b9cfc= 894797f31=0Aecho x - conky/files/patch-src-mail.c=0Ased 's/^X//' >conky/fil= es/patch-src-mail.c << '08f1d225e95a511dc39755093b1c6f93'=0AX--- src/mail.c= =2Eorig=0AX+++ src/mail.c=0AX@@ -61,6 +61,8 @@=0AX #define POP3_TYPE 1=0AX = #define IMAP_TYPE 2=0AX =0AX+#define MAXFOLDERSIZE 128=0AX+=0AX struct mail= _s { // for imap and pop3=0AX unsigned long unseen;=0AX unsigned long m= essages;=0AX@@ -74,7 +76,7 @@ struct mail_s { // for imap and pop3=0AX c= har user[128];=0AX char pass[128];=0AX char command[1024];=0AX- char fold= er[128];=0AX+ char folder[MAXFOLDERSIZE];=0AX timed_thread *p_timed_thread= ;=0AX char secure;=0AX };=0AX@@ -465,17 +467,20 @@ struct mail_s *parse_ma= il_args(char type, const char *arg)=0AX if (type =3D=3D IMAP_TYPE) {=0AX = tmp =3D strstr(arg, "-f ");=0AX if (tmp) {=0AX- int len =3D 1024;=0AX+= int len =3D MAXFOLDERSIZE-1;=0AX tmp +=3D 3;=0AX if (tmp[0] =3D=3D= '\'') {=0AX len =3D strstr(tmp + 1, "'") - tmp - 1;=0AX- if (len > = 1024) {=0AX- len =3D 1024;=0AX+ if (len > MAXFOLDERSIZE-1) {=0AX+ = len =3D MAXFOLDERSIZE-1;=0AX }=0AX+ tmp++;=0AX }=0AX- strncpy= (mail->folder, tmp + 1, len);=0AX+ strncpy(mail->folder, tmp, len);=0AX+ = mail->folder[len-1] =3D 0;=0AX } else {=0AX- strncpy(mail->folder, "I= NBOX", 128); // default imap inbox=0AX+ strncpy(mail->folder, "INBOX", MA= XFOLDERSIZE-1); // default imap inbox=0AX+ mail->folder[MAXFOLDERSIZE-1] = =3D 0;=0AX }=0AX }=0AX tmp =3D strstr(arg, "-e ");=0A08f1d225e95a511dc3= 9755093b1c6f93=0Aecho x - conky/files/patch-src-bmpx.c=0Ased 's/^X//' >conk= y/files/patch-src-bmpx.c << '7009353d4142186daa1a0cda0c310e52'=0AX--- src/b= mpx.c.orig=0AX+++ src/bmpx.c=0AX@@ -42,7 +42,7 @@=0AX static int connected = =3D 0;=0AX static char *unknown =3D "unknown";=0AX =0AX-void fail(GError *e= rror);=0AX+void fail(GError *error, struct information *);=0AX =0AX void up= date_bmpx()=0AX {=0AX@@ -58,15 +58,15 @@=0AX bus =3D dbus_g_bus_get(DBUS_= BUS_SESSION, &error);=0AX if (bus =3D=3D NULL) {=0AX NORM_ERR("BMPx er= ror 1: %s\n", error->message);=0AX- fail(error);=0AX+ fail(error, curre= nt_info);=0AX return;=0AX }=0AX =0AX remote_object =3D dbus_g_proxy_= new_for_name(bus, BMP_DBUS_SERVICE,=0AX- BMP_DBUS_PATH, BMP_DBUS_INTERFA= CE);=0AX+ BMP_DBUS_PATH__BMP, BMP_DBUS_INTERFACE__BMP);=0AX if (!remot= e_object) {=0AX NORM_ERR("BMPx error 2: %s\n", error->message);=0AX- f= ail(error);=0AX+ fail(error, current_info);=0AX return;=0AX }=0AX = =0AX@@ -78,7 +78,7 @@=0AX G_TYPE_INVALID, G_TYPE_INT, ¤t_track, = G_TYPE_INVALID)) {=0AX } else {=0AX NORM_ERR("BMPx error 3: %s\n", err= or->message);=0AX- fail(error);=0AX+ fail(error, current_info);=0AX = return;=0AX }=0AX =0AX@@ -112,17 +112,17 @@=0AX g_value_get_string(g_= hash_table_lookup(metadata, "location"));=0AX } else {=0AX NORM_ERR("B= MPx error 4: %s\n", error->message);=0AX- fail(error);=0AX+ fail(error,= current_info);=0AX return;=0AX }=0AX =0AX g_hash_table_destroy(meta= data);=0AX } else {=0AX- fail(error);=0AX+ fail(error, current_info);=0A= X }=0AX }=0AX =0AX-void fail(GError *error)=0AX+void fail(GError *error, s= truct information *current_info)=0AX {=0AX if (error) {=0AX g_error_free= (error);=0A7009353d4142186daa1a0cda0c310e52=0Aecho x - conky/files/patch-sr= c-top.c=0Ased 's/^X//' >conky/files/patch-src-top.c << '5a1c07c8f27bb5fa50c= 9d078a689ba56'=0AX--- src/top.c.orig=0AX+++ src/top.c=0AX@@ -880,16 +880,22= @@ int parse_top_args(const char *s, const char *arg, struct text_object *= obj)=0AX #else /* IOSTATS */=0AX NORM_ERR("must be one of: name, cpu, pi= d, mem, time, mem_res, mem_vsize");=0AX #endif /* IOSTATS */=0AX+ free(td= ->s);=0AX+ free(obj->data.opaque);=0AX return 0;=0AX }=0AX if (n <= 1 || n > 10) {=0AX NORM_ERR("invalid num arg for top. Must be between 1= and 10.");=0AX+ free(td->s);=0AX+ free(obj->data.opaque);=0AX retur= n 0;=0AX } else {=0AX td->num =3D n - 1;=0AX }=0AX } else {=0AX N= ORM_ERR("invalid argument count for top");=0AX+ free(td->s);=0AX+ free(ob= j->data.opaque);=0AX return 0;=0AX }=0AX return 1;=0A5a1c07c8f27bb5fa50= c9d078a689ba56=0Aecho x - conky/files/patch-src-logging.h=0Ased 's/^X//' >c= onky/files/patch-src-logging.h << 'd71a60d6818a8d7f78b196674f4e0c11'=0AX---= src/logging.h.orig=0AX+++ src/logging.h=0AX@@ -30,6 +30,7 @@=0AX #include = "mail.h"=0AX =0AX void clean_up(void *memtofree1, void* memtofree2);=0AX+vo= id clean_up_without_threads(void *memtofree1, void* memtofree2);=0AX =0AX #= ifndef _LOGGING_H=0AX #define _LOGGING_H=0AX@@ -44,6 +45,9 @@ void clean_up= (void *memtofree1, void* memtofree2);=0AX #define CRIT_ERR(memtofree1, memt= ofree2, ...) \=0AX { NORM_ERR(__VA_ARGS__); clean_up(memtofree1, memtofree= 2); free(current_mail_spool); exit(EXIT_FAILURE); }=0AX =0AX+#define THREAD= _CRIT_ERR(memtofree1, memtofree2, ...) \=0AX+ { NORM_ERR(__VA_ARGS__); clea= n_up_without_threads(memtofree1, memtofree2); free(current_mail_spool); ret= urn; }=0AX+=0AX /* debugging output */=0AX extern int global_debug_level;= =0AX #define __DBGP(level, ...) \=0Ad71a60d6818a8d7f78b196674f4e0c11=0Aecho= x - conky/files/patch-src-bmpx.h=0Ased 's/^X//' >conky/files/patch-src-bmp= x.h << '7aa331d858358f3f577dc4fd46751684'=0AX--- src/bmpx.h.orig=0AX+++ src= /bmpx.h=0AX@@ -0,0 +1,39 @@=0AX+/* -*- mode: c; c-basic-offset: 4; tab-widt= h: 4; indent-tabs-mode: t -*-=0AX+ * vim: ts=3D4 sw=3D4 noet ai cindent syn= tax=3Dc=0AX+ *=0AX+ * Conky, a system monitor, based on torsmo=0AX+ *=0AX+ = * Please see COPYING for details=0AX+ *=0AX+ * Copyright (c) 2005-2009 Bren= den Matthews, Philip Kovacs, et. al.=0AX+ * (see AUTHORS)=0AX+ * All rights= reserved.=0AX+ *=0AX+ * This program is free software: you can redistribut= e it and/or modify=0AX+ * it under the terms of the GNU General Public Lice= nse as published by=0AX+ * the Free Software Foundation, either version 3 o= f the License, or=0AX+ * (at your option) any later version.=0AX+ *=0AX+ * = This program is distributed in the hope that it will be useful,=0AX+ * but = WITHOUT ANY WARRANTY; without even the implied warranty of=0AX+ * MERCHANTA= BILITY or FITNESS FOR A PARTICULAR PURPOSE. See the=0AX+ * GNU General Pub= lic License for more details.=0AX+ * You should have received a copy of the= GNU General Public License=0AX+ * along with this program. If not, see <h= ttp://www.gnu.org/licenses/>.=0AX+ *=0AX+ */=0AX+=0AX+#ifndef BMPX_H_=0AX+#= define BMPX_H_=0AX+=0AX+void update_bmpx(void);=0AX+struct bmpx_s {=0AX+ ch= ar *title;=0AX+ char *artist;=0AX+ char *album;=0AX+ char *uri;=0AX+ int bi= trate;=0AX+ int track;=0AX+};=0AX+=0AX+#endif /*BMPX_H_*/=0A7aa331d858358f3= f577dc4fd46751684=0Aecho x - conky/files/patch-src-rss.c=0Ased 's/^X//' >co= nky/files/patch-src-rss.c << '76c8c57d8c780d81a228c4b723b5d1cb'=0AX--- src/= rss.c.orig=0AX+++ src/rss.c=0AX@@ -67,7 +67,7 @@ static void rss_process_in= fo(char *p, int p_max_size, char *uri, char *action, i=0AX curloc->result= =3D malloc(sizeof(PRSS));=0AX memset(curloc->result, 0, sizeof(PRSS));= =0AX curloc->process_function =3D &prss_parse_data;=0AX- ccurl_init_thre= ad(curloc, interval);=0AX+ ccurl_init_thread(curloc, interval * 60);=0AX = if (!curloc->p_timed_thread) {=0AX NORM_ERR("error setting up RSS threa= d");=0AX }=0A76c8c57d8c780d81a228c4b723b5d1cb=0Aecho x - conky/files/patc= h-lua-cairo.pkg=0Ased 's/^X//' >conky/files/patch-lua-cairo.pkg << 'b690010= cd703ed9c276c87f5b62a0618'=0AX--- lua/cairo.pkg.orig=0AX+++ lua/cairo.pkg= =0AX@@ -4,6 +4,7 @@=0AX $#include <cairo-xlib.h>=0AX $#include <X11/Xlib.h>= =0AX $#include "libcairo-helper.h"=0AX+$#define tolua_outside=0AX /*=0AX *= This code was mostly copied from cairo.h and cairo-xlib.h with comments=0A= X * removed. The licence noticed below is present for the sake of clarity= =2E=0Ab690010cd703ed9c276c87f5b62a0618=0Aecho x - conky/files/patch-src-Mak= efile.in=0Ased 's/^X//' >conky/files/patch-src-Makefile.in << '5c21d9aa16f5= dcf2797cb5497615f523'=0AX--- src/Makefile.in.orig=0AX+++ src/Makefile.in=0A= X@@ -141,7 +141,7 @@=0AX am__objects_15 =3D conky-linux.$(OBJEXT) conky-top= =2E$(OBJEXT) \=0AX conky-users.$(OBJEXT) conky-sony.$(OBJEXT) conky-i8k.$(= OBJEXT)=0AX @BUILD_LINUX_TRUE@am__objects_16 =3D $(am__objects_15)=0AX-am__= objects_17 =3D conky-freebsd.$(OBJEXT)=0AX+am__objects_17 =3D conky-freebsd= =2E$(OBJEXT) conky-top.$(OBJEXT)=0AX @BUILD_FREEBSD_TRUE@am__objects_18 =3D= $(am__objects_17)=0AX am__objects_19 =3D conky-openbsd.$(OBJEXT)=0AX @BUIL= D_OPENBSD_TRUE@am__objects_20 =3D $(am__objects_19)=0A5c21d9aa16f5dcf2797cb= 5497615f523=0Aecho x - conky/files/patch-src-core.c=0Ased 's/^X//' >conky/f= iles/patch-src-core.c << '00e630dd0ae98e36949f27098228d476'=0AX--- src/core= =2Ec.orig 2010-03-25 22:27:32.000000000 +0200=0AX+++ src/core.c 2010-06-22 = 01:40:31.000000000 +0300=0AX@@ -171,8 +171,6 @@=0AX NORM_ERR("acpiacadap= ter: arg is only used on linux");=0AX #endif=0AX }=0AX- if(! obj->data.o= paque)=0AX- obj->data.opaque =3D strdup("AC");=0AX #endif /* !__OpenBSD__= */=0AX END OBJ(freq, 0)=0AX get_cpu_count();=0AX@@ -279,8 +277,9 @@=0AX= obj->data.s =3D strndup(bat, text_buffer_size);=0AX END OBJ(battery_bar= , 0)=0AX char bat[64];=0AX- if (arg) {=0AX- arg =3D scan_bar(obj, arg)= ;=0AX+=0AX+ arg =3D scan_bar(obj, arg);=0AX+ if (arg && strlen(arg)>0) {= =0AX sscanf(arg, "%63s", bat);=0AX } else {=0AX strcpy(bat, "BAT0")= ;=0AX@@ -372,18 +371,18 @@=0AX scan_loadgraph_arg(obj, arg);=0AX #endif /= * X11 */=0AX END OBJ(diskio, &update_diskio)=0AX- parse_diskio_arg(obj, a= rg);=0AX+ parse_diskio_arg(obj, dev_name(arg));=0AX END OBJ(diskio_read, = &update_diskio)=0AX- parse_diskio_arg(obj, arg);=0AX+ parse_diskio_arg(ob= j, dev_name(arg));=0AX END OBJ(diskio_write, &update_diskio)=0AX- parse_d= iskio_arg(obj, arg);=0AX+ parse_diskio_arg(obj, dev_name(arg));=0AX #ifdef= X11=0AX END OBJ(diskiograph, &update_diskio)=0AX- parse_diskiograph_arg(= obj, arg);=0AX+ parse_diskiograph_arg(obj, dev_name(arg));=0AX END OBJ(di= skiograph_read, &update_diskio)=0AX- parse_diskiograph_arg(obj, arg);=0AX+= parse_diskiograph_arg(obj, dev_name(arg));=0AX END OBJ(diskiograph_write= , &update_diskio)=0AX- parse_diskiograph_arg(obj, arg);=0AX+ parse_diskio= graph_arg(obj, dev_name(arg));=0AX #endif /* X11 */=0AX END OBJ(color, 0)= =0AX #ifdef X11=0AX@@ -542,6 +541,13 @@=0AX parse_platform_sensor(obj, ar= g);=0AX END OBJ_ARG(hwmon, 0, "hwmon needs argumanets")=0AX parse_hwmon_= sensor(obj, arg);=0AX+#endif /* __linux__ */=0AX+ END OBJ(addr, &update_net= _stats)=0AX+ parse_net_stat_arg(obj, arg, free_at_crash);=0AX+#ifdef __lin= ux__=0AX+ END OBJ(addrs, &update_net_stats)=0AX+ parse_net_stat_arg(obj, a= rg, free_at_crash);=0AX+#endif /* __linux__ */=0AX END=0AX /* we have fou= r different types of top (top, top_mem, top_time and top_io). To=0AX * av= oid having almost-same code four times, we have this special=0AX@@ -552,12 = +558,8 @@=0AX if (!parse_top_args(s, arg, obj)) {=0AX return NULL;=0AX= }=0AX- } else OBJ(addr, &update_net_stats)=0AX- parse_net_stat_arg(obj,= arg, free_at_crash);=0AX- END OBJ(addrs, &update_net_stats)=0AX- parse_ne= t_stat_arg(obj, arg, free_at_crash);=0AX-#endif /* __linux__ */=0AX- END OB= J_ARG(tail, 0, "tail needs arguments")=0AX+ } else=0AX+ OBJ_ARG(tail, 0, "= tail needs arguments")=0AX init_tailhead("tail", arg, obj, free_at_crash)= ;=0AX END OBJ_ARG(head, 0, "head needs arguments")=0AX init_tailhead("he= ad", arg, obj, free_at_crash);=0AX@@ -966,8 +968,10 @@=0AX END OBJ(xmms2_s= ize, &update_xmms2)=0AX END OBJ(xmms2_status, &update_xmms2)=0AX END OBJ(= xmms2_percent, &update_xmms2)=0AX+#ifdef X11=0AX END OBJ(xmms2_bar, &updat= e_xmms2)=0AX scan_bar(obj, arg);=0AX+#endif=0AX END OBJ(xmms2_smart, &up= date_xmms2)=0AX END OBJ(xmms2_playlist, &update_xmms2)=0AX END OBJ(xmms2_= timesplayed, &update_xmms2)=0AX@@ -993,9 +997,11 @@=0AX END OBJ(audacious_= playlist_length, &update_audacious)=0AX END OBJ(audacious_playlist_positio= n, &update_audacious)=0AX END OBJ(audacious_main_volume, &update_audacious= )=0AX+#ifdef X11=0AX END OBJ(audacious_bar, &update_audacious)=0AX scan_= bar(obj, arg);=0AX #endif=0AX+#endif=0AX #ifdef BMPX=0AX END OBJ(bmpx_titl= e, &update_bmpx)=0AX memset(&(info.bmpx), 0, sizeof(struct bmpx_s));=0AX@= @ -1327,7 +1333,7 @@=0AX strfold(p, 1);=0AX } else if (*p =3D=3D '#') = {=0AX char c;=0AX- if (remove_comment(p, &c) && p > orig_p && c =3D=3D= '\n') {=0AX+ if (remove_comment(p, &c) && p >=3D orig_p && c =3D=3D '\n'= ) {=0AX /* if remove_comment removed a newline, we need to 'back up' wi= th p */=0AX p--;=0AX }=0A00e630dd0ae98e36949f27098228d476=0Aecho x -= conky/files/patch-src-freebsd.c=0Ased 's/^X//' >conky/files/patch-src-free= bsd.c << '11452bf3b469397e88fdf71c8331e2fa'=0AX--- src/freebsd.c.orig=0AX++= + src/freebsd.c=0AX@@ -67,7 +67,7 @@=0AX #endif=0AX =0AX __attribute__((gnu= _inline)) inline void=0AX-proc_find_top(struct process **cpu, struct proces= s **mem);=0AX+proc_find_top(struct process **cpu, struct process **mem, str= uct process **time);=0AX =0AX static short cpu_setup =3D 0;=0AX =0AX@@ -286= ,40 +290,38 @@ void update_running_processes(void)=0AX info.run_procs =3D = cnt;=0AX }=0AX =0AX-struct cpu_load_struct {=0AX- unsigned long load[5];=0A= X-};=0AX-=0AX-struct cpu_load_struct fresh =3D { {0, 0, 0, 0, 0} };=0AX-lon= g cpu_used, oldtotal, oldused;=0AX-=0AX void get_cpu_count(void)=0AX {=0AX-= /* int cpu_count =3D 0; */=0AX+ int cpu_count =3D 0;=0AX+ size_t cpu_count= _len =3D sizeof(cpu_count);=0AX =0AX- /* XXX: FreeBSD doesn't allow to get = per CPU load stats on SMP machines.=0AX- * It's possible to get a CPU coun= t, but as we fulfill only=0AX- * info.cpu_usage[0], it's better to report = there's only one CPU.=0AX- * It should fix some bugs (e.g. cpugraph) */=0A= X-#if 0=0AX if (GETSYSCTL("hw.ncpu", cpu_count) =3D=3D 0) {=0AX info.cpu= _count =3D cpu_count;=0AX+ } else {=0AX+ fprintf(stderr, "Cannot get hw.nc= pu\n");=0AX+ info.cpu_count =3D 0;=0AX }=0AX-#endif=0AX- info.cpu_count = =3D 1;=0AX =0AX- info.cpu_usage =3D malloc(info.cpu_count * sizeof(float));= =0AX+ info.cpu_usage =3D malloc((info.cpu_count + 1) * sizeof(float));=0AX = if (info.cpu_usage =3D=3D NULL) {=0AX CRIT_ERR(NULL, NULL, "malloc");=0A= X }=0AX }=0AX =0AX-/* XXX: SMP support */=0AX-void update_cpu_usage(void)= =0AX+struct cpu_info {=0AX+ long oldtotal;=0AX+ long oldused;=0AX+};=0AX+= =0AX+void update_cpu_usage(void)=0AX {=0AX+ int i, j =3D 0;=0AX long used,= total;=0AX- long cp_time[CPUSTATES];=0AX- size_t cp_len =3D sizeof(cp_time= );=0AX+ long *cp_time =3D NULL;=0AX+ size_t cp_len;=0AX+ static struct cpu_= info *cpu =3D NULL;=0AX+ unsigned int malloc_cpu_size =3D 0;=0AX+ extern vo= id* global_cpu;=0AX =0AX /* add check for !info.cpu_usage since that mem i= s freed on a SIGUSR1 */=0AX if ((cpu_setup =3D=3D 0) || (!info.cpu_usage))= {=0AX@@ -327,28 +332,68 @@ void update_cpu_usage(void)=0AX cpu_setup =3D= 1;=0AX }=0AX =0AX- if (sysctlbyname("kern.cp_time", &cp_time, &cp_len, NU= LL, 0) < 0) {=0AX- fprintf(stderr, "Cannot get kern.cp_time");=0AX+ if (!g= lobal_cpu) {=0AX+ malloc_cpu_size =3D (info.cpu_count + 1) * sizeof(struct= cpu_info);=0AX+ cpu =3D malloc(malloc_cpu_size);=0AX+ memset(cpu, 0, mal= loc_cpu_size);=0AX+ global_cpu =3D cpu;=0AX }=0AX =0AX- fresh.load[0] =3D= cp_time[CP_USER];=0AX- fresh.load[1] =3D cp_time[CP_NICE];=0AX- fresh.load= [2] =3D cp_time[CP_SYS];=0AX- fresh.load[3] =3D cp_time[CP_IDLE];=0AX- fres= h.load[4] =3D cp_time[CP_IDLE];=0AX+ /* cpu[0] is overall stats, get it fro= m separate sysctl */=0AX+ cp_len =3D CPUSTATES * sizeof(long);=0AX+ cp_time= =3D malloc(cp_len);=0AX =0AX- used =3D fresh.load[0] + fresh.load[1] + fre= sh.load[2];=0AX- total =3D fresh.load[0] + fresh.load[1] + fresh.load[2] + = fresh.load[3];=0AX+ if (sysctlbyname("kern.cp_time", cp_time, &cp_len, NULL= , 0) < 0) {=0AX+ fprintf(stderr, "Cannot get kern.cp_time\n");=0AX+ }=0AX+= =0AX+ total =3D 0;=0AX+ for (j =3D 0; j < CPUSTATES; j++)=0AX+ total +=3D = cp_time[j];=0AX =0AX- if ((total - oldtotal) !=3D 0) {=0AX- info.cpu_usage= [0] =3D ((double) (used - oldused)) /=0AX- (double) (total - oldtotal);= =0AX+ used =3D total - cp_time[CP_IDLE];=0AX+=0AX+ if ((total - cpu[0].oldt= otal) !=3D 0) {=0AX+ info.cpu_usage[0] =3D ((double) (used - cpu[0].olduse= d)) /=0AX+ (double) (total - cpu[0].oldtotal);=0AX } else {=0AX info.cp= u_usage[0] =3D 0;=0AX }=0AX =0AX- oldused =3D used;=0AX- oldtotal =3D tota= l;=0AX+ cpu[0].oldused =3D used;=0AX+ cpu[0].oldtotal =3D total;=0AX+=0AX+ = free(cp_time);=0AX+=0AX+ /* per-core stats */=0AX+ cp_len =3D CPUSTATES * s= izeof(long) * info.cpu_count;=0AX+ cp_time =3D malloc(cp_len);=0AX+=0AX+ /*= on e.g. i386 SMP we may have more values than actual cpus; this will just = drop extra values */=0AX+ if (sysctlbyname("kern.cp_times", cp_time, &cp_le= n, NULL, 0) < 0 && errno !=3D ENOMEM) {=0AX+ fprintf(stderr, "Cannot get k= ern.cp_times\n");=0AX+ }=0AX+=0AX+ for (i =3D 0; i < info.cpu_count; i++)= =0AX+ {=0AX+ total =3D 0;=0AX+ for (j =3D 0; j < CPUSTATES; j++)=0AX+ t= otal +=3D cp_time[i*CPUSTATES + j];=0AX+=0AX+ used =3D total - cp_time[i*C= PUSTATES + CP_IDLE];=0AX+=0AX+ if ((total - cpu[i+1].oldtotal) !=3D 0) {= =0AX+ info.cpu_usage[i+1] =3D ((double) (used - cpu[i+1].oldused)) /=0AX+= (double) (total - cpu[i+1].oldtotal);=0AX+ } else {=0AX+ info.cpu_usa= ge[i+1] =3D 0;=0AX+ }=0AX+=0AX+ cpu[i+1].oldused =3D used;=0AX+ cpu[i+1]= =2Eoldtotal =3D total;=0AX+ }=0AX+=0AX+ free(cp_time);=0AX }=0AX =0AX void = update_load_average(void)=0AX@@ -540,7 +588,7 @@ char get_freq(char *p_clie= nt_buffer, size_t client_buffer_size, const char *p_fo=0AX =0AX void update= _top(void)=0AX {=0AX- proc_find_top(info.cpu, info.memu);=0AX+ proc_find_to= p(info.cpu, info.memu, info.time);=0AX }=0AX =0AX #if 0=0AX@@ -676,8 +726,1= 5 @@ int comparemem(const void *a, const void *b)=0AX }=0AX }=0AX =0AX+int= comparetime(const void *va, const void *vb)=0AX+{=0AX+ struct process *a = =3D (struct process *)va, *b =3D (struct process *)vb;=0AX+=0AX+ return b->= total_cpu_time - a->total_cpu_time;=0AX+}=0AX+=0AX __attribute__((gnu_inlin= e)) inline void=0AX-proc_find_top(struct process **cpu, struct process **me= m)=0AX+proc_find_top(struct process **cpu, struct process **mem, struct pro= cess **time)=0AX {=0AX struct kinfo_proc *p;=0AX int n_processes;=0AX@@ -= 701,6 +758,9 @@ proc_find_top(struct process **cpu, struct process **mem)= =0AX processes[j].amount =3D 100.0 * p[i].ki_pctcpu / FSCALE;=0AX pro= cesses[j].vsize =3D p[i].ki_size;=0AX processes[j].rss =3D (p[i].ki_rssi= ze * getpagesize());=0AX+ /* ki_runtime is in microseconds, total_cpu_tim= e in centiseconds.=0AX+ * Therefore we divide by 10000. */=0AX+ proces= ses[j].total_cpu_time =3D p[i].ki_runtime / 10000;=0AX j++;=0AX }=0AX = }=0AX@@ -710,11 +770,8 @@ proc_find_top(struct process **cpu, struct proce= ss **mem)=0AX struct process *tmp, *ttmp;=0AX =0AX tmp =3D malloc(sizeo= f(struct process));=0AX- tmp->pid =3D processes[i].pid;=0AX- tmp->amount = =3D processes[i].amount;=0AX+ memcpy(tmp, &processes[i], sizeof(struct pro= cess));=0AX tmp->name =3D strndup(processes[i].name, text_buffer_size);= =0AX- tmp->rss =3D processes[i].rss;=0AX- tmp->vsize =3D processes[i].vsi= ze;=0AX =0AX ttmp =3D mem[i];=0AX mem[i] =3D tmp;=0AX@@ -729,11 +786,8 = @@ proc_find_top(struct process **cpu, struct process **mem)=0AX struct p= rocess *tmp, *ttmp;=0AX =0AX tmp =3D malloc(sizeof(struct process));=0AX-= tmp->pid =3D processes[i].pid;=0AX- tmp->amount =3D processes[i].amount;= =0AX+ memcpy(tmp, &processes[i], sizeof(struct process));=0AX tmp->name = =3D strndup(processes[i].name, text_buffer_size);=0AX- tmp->rss =3D proces= ses[i].rss;=0AX- tmp->vsize =3D processes[i].vsize;=0AX =0AX ttmp =3D cp= u[i];=0AX cpu[i] =3D tmp;=0AX@@ -743,6 +797,22 @@ proc_find_top(struct pr= ocess **cpu, struct process **mem)=0AX }=0AX }=0AX =0AX+ qsort(processes= , j - 1, sizeof(struct process), comparetime);=0AX+ for (i =3D 0; i < 10 &&= i < n_processes; i++) {=0AX+ struct process *tmp, *ttmp;=0AX+=0AX+ tmp = =3D malloc(sizeof(struct process));=0AX+ memcpy(tmp, &processes[i], sizeof= (struct process));=0AX+ tmp->name =3D strndup(processes[i].name, text_buff= er_size);=0AX+=0AX+ ttmp =3D time[i];=0AX+ time[i] =3D tmp;=0AX+ if (ttm= p !=3D NULL) {=0AX+ free(ttmp->name);=0AX+ free(ttmp);=0AX+ }=0AX+ }= =0AX+=0AX #if defined(FREEBSD_DEBUG)=0AX printf("=3D=3D=3D=3D=3D\nmem\n");= =0AX for (i =3D 0; i < 10; i++) {=0AX@@ -916,8 +986,3 @@ int get_entropy_p= oolsize(unsigned int *val)=0AX (void)val;=0AX return 1;=0AX }=0AX-=0AX-/*= empty stub so conky links */=0AX-void free_all_processes(void)=0AX-{=0AX-}= =0A11452bf3b469397e88fdf71c8331e2fa=0Aecho x - conky/pkg-descr=0Ased 's/^X/= /' >conky/pkg-descr << '1dc47ddbf5208b510dd9392ba07bd8c1'=0AXConky is an ad= vanced, highly configurable system monitor for X=0AX=0AXWWW: http://conky.s= ourceforge.net/=0A1dc47ddbf5208b510dd9392ba07bd8c1=0Aecho x - conky/distinf= o=0Ased 's/^X//' >conky/distinfo << 'ca22fce68ddee350633d14dc535474a0'=0AXM= D5 (conky-1.8.0.tar.bz2) =3D 494cbaf1108cfdb977fc80454d9b13e2=0AXSHA256 (co= nky-1.8.0.tar.bz2) =3D badb3824a9655eee90281939df8bdb3ca95cf8bab03269b3b377= 5bfea2ed0a51=0AXSIZE (conky-1.8.0.tar.bz2) =3D 610545=0Aca22fce68ddee350633= d14dc535474a0=0Aexit=0A=0A --C7zPtVaVf+AK4Oqc--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010041750.o94Ho3cH089391>