Bug 168161

Summary: [PATCH] sysutils/conky: update to 1.9.0
Product: Ports & Packages Reporter: Loïc Bartoletti <lbartoletti>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff
none
conky-1.9.0.diff
none
conky-1.9.0.diff none

Description Loïc Bartoletti freebsd_committer freebsd_triage 2012-05-20 11:20:01 UTC
Update sysutils/conky 1.8.1_5 -> 1.9.0

Fix: Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-05-20 11:20:55 UTC
Maintainer of sysutils/conky,

Please note that PR ports/168161 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/168161

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2012-05-20 11:20:57 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 ntarmos 2012-05-30 11:11:35 UTC
I'm afraid I'm overwhelmed with Real Work(TM) at the moment. I do plan
to review the patch and reply by next week though.

Cheers.

\n\n
Comment 4 Michael Scheidell freebsd_committer freebsd_triage 2012-06-24 14:22:17 UTC
Responsible Changed
From-To: freebsd-ports-bugs->scheidell

I'll take it.
Comment 5 Michael Scheidell freebsd_committer freebsd_triage 2012-06-24 17:59:04 UTC
State Changed
From-To: feedback->suspended

Suspended until fixed. 
Won't compile in 7.4 or 9.0, AMD or I386. 
built in a tinderbox, default OPTIONS. 

7.4 I386: 
conky.c: In function 'generate_text_internal': 
394 	conky.c:885: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'warned' 
395 	conky.c:885: error: 'warned' undeclared (first use in this function) 
396 	conky.c:885: error: (Each undeclared identifier is reported only once 
397 	conky.c:885: error: for each function it appears in.) 
398 	conky.c:885: error: 'false' undeclared (first use in this function) 
399 	conky.c:890: error: 'true' undeclared (first use in this function) 
400 	gmake[2]: *** [conky-conky.o] Error 1 
401 	gmake[2]: Leaving directory `/work/a/ports/sysutils/conky/work/conky-1.9.0/src' 
402 	gmake[1]: *** [all] Error 2 
403 	gmake[1]: Leaving directory `/work/a/ports/sysutils/conky/work/conky-1.9.0/src' 
404 	gmake: *** [all-recursive] Error 1 
405 	*** Error code 1 

9.0, AMD64 
gmake[2]: Entering directory `/work/a/ports/sysutils/conky/work/conky-1.9.0/src' 
371 	cc -DHAVE_CONFIG_H -I. -DSYSTEM_CONFIG_FILE="/usr/local/etc/conky/conky.conf"  
-DPACKAGE_LIBDIR="/usr/local/lib/conky" -I/usr/local/include -D_THREAD_SAFE -I/usr/local/include -D_THREAD_SAFE  
-I/usr/local/include -D_THREAD_SAFE -I/usr/local/include -Wall -W -O2 -pipe -fno-strict-aliasing -MT conky-conf_cookie.o -MD  
-MP -MF .deps/conky-conf_cookie.Tpo -c -o conky-conf_cookie.o `test -f 'conf_cookie.c' || echo './'`conf_cookie.c 
372 	mv -f .deps/conky-conf_cookie.Tpo .deps/conky-conf_cookie.Po 
373 	cc -DHAVE_CONFIG_H -I. -DSYSTEM_CONFIG_FILE="/usr/local/etc/conky/conky.conf"  
-DPACKAGE_LIBDIR="/usr/local/lib/conky" -I/usr/local/include -D_THREAD_SAFE -I/usr/local/include -D_THREAD_SAFE  
-I/usr/local/include -D_THREAD_SAFE -I/usr/local/include -Wall -W -O2 -pipe -fno-strict-aliasing -MT conky-moc.o -MD -MP -MF  
.deps/conky-moc.Tpo -c -o conky-moc.o `test -f 'moc.c' || echo './'`moc.c 
374 	mv -f .deps/conky-moc.Tpo .deps/conky-moc.Po 
375 	cc -DHAVE_CONFIG_H -I. -DSYSTEM_CONFIG_FILE="/usr/local/etc/conky/conky.conf"  
-DPACKAGE_LIBDIR="/usr/local/lib/conky" -I/usr/local/include -D_THREAD_SAFE -I/usr/local/include -D_THREAD_SAFE  
-I/usr/local/include -D_THREAD_SAFE -I/usr/local/include -Wall -W -O2 -pipe -fno-strict-aliasing -MT conky-freebsd.o -MD -MP  
-MF .deps/conky-freebsd.Tpo -c -o conky-freebsd.o `test -f 'freebsd.c' || echo './'`freebsd.c 
376 	freebsd.c:286:104: error: operator '<' has no left operand 
377 	gmake[2]: *** [conky-freebsd.o] Error 1 
378 	gmake[2]: Leaving directory `/work/a/ports/sysutils/conky/work/conky-1.9.0/src' 
379 	gmake[1]: *** [all] Error 2 
380 	gmake[1]: Leaving directory `/work/a/ports/sysutils/conky/work/conky-1.9.0/src' 
381 	gmake: *** [all-recursive] Error 1 
382 	*** Error code 1 
GNATS: Enter the reason for  
changing this PR's state here. GNATS: Lines beginning with "GNATS:" will be deleted. 


Comment 6 Michael Scheidell freebsd_committer freebsd_triage 2012-06-24 17:59:04 UTC
Responsible Changed
From-To: scheidell->freebsd-ports-bugs

Back to pool
Comment 7 ntarmos 2012-07-19 12:38:04 UTC
On Sun, Jun 24, 2012 at 05:01:44PM +0000, scheidell@FreeBSD.org wrote:
> Synopsis: [PATCH] sysutils/conky: update to 1.9.0
> 
> State-Changed-From-To: feedback->suspended
> State-Changed-By: scheidell
> State-Changed-When: Sun Jun 24 16:59:04 UTC 2012
> State-Changed-Why: 
> Suspended until fixed.
> Won't compile in 7.4 or 9.0, AMD or I386.
> built in a tinderbox, default OPTIONS.

Please try with attached patch. Tested on a recent-ish 10-CURRENT/amd64
system and in a 7.4-RELEASE/amd64 tinderbox.

Sorry for the delay.

\n\n
Comment 8 Michael Scheidell freebsd_committer freebsd_triage 2012-07-23 23:30:03 UTC
State Changed
From-To: suspended->open

Maintainer has fixed.
Comment 9 Michael Scheidell freebsd_committer freebsd_triage 2012-07-26 12:08:10 UTC
Responsible Changed
From-To: freebsd-ports-bugs->scheidell

I'll take it.
Comment 10 Michael Scheidell freebsd_committer freebsd_triage 2012-07-26 12:29:41 UTC
State Changed
From-To: open->feedback

Still no joy: 
<http://lorie.secnap.net/tb/index.php?action=display_markup_log&build=7-scheidell_I386&id=2092#390> 
<http://lorie.secnap.net/tb/index.php?action=display_markup_log&build=9-scheidell_AMD64&id=2092#387> 
cc -DHAVE_CONFIG_H -I. -DSYSTEM_CONFIG_FILE="/usr/local/etc/conky/conky.conf" -DPACKAGE_LIBDIR="/usr/local/lib/conky"  
-I/usr/local/include -D_THREAD_SAFE -I/usr/local/include -D_THREAD_SAFE -I/usr/local/include -D_THREAD_SAFE  
-I/usr/local/include -Wall -W -O2 -pipe -fno-strict-aliasing -MT conky-conky.o -MD -MP -MF .deps/conky-conky.Tpo -c -o  
conky-conky.o `test -f 'conky.c' || echo './'`conky.c 
conky.c: In function 'generate_text_internal': 
conky.c:885: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'warned' 
conky.c:885: error: 'warned' undeclared (first use in this function) 
conky.c:885: error: (Each undeclared identifier is reported only once 
conky.c:885: error: for each function it appears in.) 
conky.c:885: error: 'false' undeclared (first use in this function) 
conky.c:890: error: 'true' undeclared (first use in this function)
Comment 11 Michael Scheidell freebsd_committer freebsd_triage 2012-08-09 12:55:39 UTC
Responsible Changed
From-To: scheidell->freebsd-ports-bugs

Back to the pool. No feedback received.
Comment 12 ntarmos 2012-12-07 09:27:15 UTC
Hi again.

Slightly different diff attached. Sorry for the delay.

\n\n
Comment 13 Martin Wilke freebsd_committer freebsd_triage 2013-02-08 07:11:09 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!
Comment 14 dfilter service freebsd_committer freebsd_triage 2013-02-08 07:11:18 UTC
Author: miwi
Date: Fri Feb  8 07:11:05 2013
New Revision: 311909
URL: http://svnweb.freebsd.org/changeset/ports/311909

Log:
  - Update to 1.9.0
  
  PR:		168161
  Submitted by:	lbartoletti <coder@tuxfamily.org>
  		Lars Engels <lars.engels@0x20.net>
  Approved by:	maintainer

Modified:
  head/sysutils/conky/Makefile
  head/sysutils/conky/distinfo
  head/sysutils/conky/files/patch-configure
  head/sysutils/conky/files/patch-src-ccurl_thread.c
  head/sysutils/conky/files/patch-src-conky.c
  head/sysutils/conky/files/patch-src-core.c
  head/sysutils/conky/files/patch-src-exec.c
  head/sysutils/conky/files/patch-src-freebsd.c
  head/sysutils/conky/files/patch-src-freebsd.h
  head/sysutils/conky/files/patch-src-xmms2.c

Modified: head/sysutils/conky/Makefile
==============================================================================
--- head/sysutils/conky/Makefile	Fri Feb  8 07:09:43 2013	(r311908)
+++ head/sysutils/conky/Makefile	Fri Feb  8 07:11:05 2013	(r311909)
@@ -1,13 +1,8 @@
-# New ports collection makefile for:	conky
-# Date created:				2005-08-27
-# Whom:					Roman Bogorodskiy <novel@FreeBSD.org>
-#
+# Created by: Roman Bogorodskiy <novel@FreeBSD.org>
 # $FreeBSD$
-#
 
 PORTNAME=	conky
-PORTVERSION=	1.8.1
-PORTREVISION=	5
+PORTVERSION=	1.9.0
 CATEGORIES=	sysutils
 MASTER_SITES=	SF
 

Modified: head/sysutils/conky/distinfo
==============================================================================
--- head/sysutils/conky/distinfo	Fri Feb  8 07:09:43 2013	(r311908)
+++ head/sysutils/conky/distinfo	Fri Feb  8 07:11:05 2013	(r311909)
@@ -1,2 +1,2 @@
-SHA256 (conky-1.8.1.tar.bz2) = f85a278f2869596b1fd68b6d26d58c93af8dcc39d5186bbcfd587d4c545e5e43
-SIZE (conky-1.8.1.tar.bz2) = 612481
+SHA256 (conky-1.9.0.tar.bz2) = baf1b550f135fbfb53e5e286a33aadc03a667d63bf6c4d52ba7637366295bb6f
+SIZE (conky-1.9.0.tar.bz2) = 626555

Modified: head/sysutils/conky/files/patch-configure
==============================================================================
--- head/sysutils/conky/files/patch-configure	Fri Feb  8 07:09:43 2013	(r311908)
+++ head/sysutils/conky/files/patch-configure	Fri Feb  8 07:11:05 2013	(r311909)
@@ -1,6 +1,6 @@
---- configure.orig
-+++ configure
-@@ -1002,6 +1002,7 @@
+--- configure.orig	2012-05-04 00:47:40.000000000 +0300
++++ configure	2012-12-06 04:26:37.000000000 +0200
+@@ -895,6 +895,7 @@
  enable_xft
  enable_nvidia
  enable_alsa
@@ -8,7 +8,7 @@
  enable_debug
  enable_testing
  enable_profiling
-@@ -1729,6 +1730,7 @@
+@@ -1620,6 +1621,7 @@
    --enable-nvidia         enable if you want nvidia support [default=no]
    --disable-alsa          disable if you do not want ALSA support
                            [default=yes]
@@ -16,25 +16,20 @@
    --enable-debug          compile with debug symbols [default=no]
    --enable-testing        use strict compiler flags for testing [default=no]
    --enable-profiling      specify compiler flags for use with gprof and gcov
-@@ -11647,7 +11649,7 @@
- 
- 
- if test x$want_apcupsd = xyes; then
--  if test x"$uname" != xLinux; then
-+  if test x"$uname" != xLinux -a x"$uname" != xFreeBSD; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: apcupsd not supported on $uname... disabling" >&5
- $as_echo "$as_me: apcupsd not supported on $uname... disabling" >&6;}
-       want_apcupsd="not supported on $uname"
-@@ -11675,7 +11675,7 @@
- 
- 
- if test x$want_iostats = xyes; then
--  if test x"$uname" != xLinux; then
-+  if test x"$uname" != xLinux -a x"$uname" != xFreeBSD; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: iostats not supported on $uname... disabling" >&5
- $as_echo "$as_me: iostats not supported on $uname... disabling" >&6;}
-       want_iostats="not supported on $uname"
-@@ -16071,20 +16073,65 @@
+@@ -11930,7 +11932,11 @@
+   Linux*)
+     WANT_SYSINFO=yes
+     ;;
+-  FreeBSD*|GNU/kFreeBSD*)
++  FreeBSD*)
++    WANT_KVM=yes
++    WANT_DEVSTAT=yes
++    ;;
++  GNU/kFreeBSD*)
+     WANT_KVM=yes
+     WANT_DEVSTAT=yes
+     WANT_OPTRESET=yes
+@@ -16998,18 +17004,63 @@
  
  done
  
@@ -42,29 +37,26 @@
 -for ac_header in sys/inotify.h
 -do :
 -  ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
--if test "x$ac_cv_header_sys_inotify_h" = x""yes; then :
--  cat >>confdefs.h <<_ACEOF
--#define HAVE_SYS_INOTIFY_H 1
--_ACEOF
- 
++
 +# Check whether --enable-inotify was given.
 +if test "${enable_inotify+set}" = set; then :
 +  enableval=$enable_inotify; want_inotify="$enableval"
 +else
 +  want_inotify=no
- fi
- 
--done
++fi
++
 +if test x$want_inotify = xyes; then
 +    ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
-+if test "x$ac_cv_header_sys_inotify_h" = xyes; then :
+ if test "x$ac_cv_header_sys_inotify_h" = xyes; then :
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_SYS_INOTIFY_H 1
+-_ACEOF
 + 
 +else
 +  want_inotify=no
 +fi
  
- 
-+fi
+ fi
 +if test x$want_inotify = xyes; then
 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inotify_init in -linotify" >&5
 +$as_echo_n "checking for inotify_init in -linotify... " >&6; }
@@ -75,7 +67,8 @@
 +LIBS="-linotify  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
-+
+ 
+-done
 +#include <sys/inotify.h>
 +
 +char inotify_init ();
@@ -105,16 +98,6 @@
 +fi
 +
 +fi
-+
- 
- 
- $as_echo "#define DEFAULTNETDEV \"eth0\"" >>confdefs.h
-@@ -16102,7 +16153,7 @@
- $as_echo "#define DEFAULT_TEXT_BUFFER_SIZE 256" >>confdefs.h
- 
- 
--$as_echo "#define MAX_NET_INTERFACES 16" >>confdefs.h
-+$as_echo "#define MAX_NET_INTERFACES 64" >>confdefs.h
  
  
  

Modified: head/sysutils/conky/files/patch-src-ccurl_thread.c
==============================================================================
--- head/sysutils/conky/files/patch-src-ccurl_thread.c	Fri Feb  8 07:09:43 2013	(r311908)
+++ head/sysutils/conky/files/patch-src-ccurl_thread.c	Fri Feb  8 07:11:05 2013	(r311909)
@@ -1,10 +0,0 @@
---- src/ccurl_thread.c.orig	2010-10-06 00:29:36.000000000 +0300
-+++ src/ccurl_thread.c	2012-03-05 01:08:23.000000000 +0200
-@@ -33,7 +33,6 @@
- #endif /* DEBUG */
- 
- #include <curl/curl.h>
--#include <curl/types.h>
- #include <curl/easy.h>
- 
- /*

Modified: head/sysutils/conky/files/patch-src-conky.c
==============================================================================
--- head/sysutils/conky/files/patch-src-conky.c	Fri Feb  8 07:09:43 2013	(r311908)
+++ head/sysutils/conky/files/patch-src-conky.c	Fri Feb  8 07:11:05 2013	(r311909)
@@ -1,5 +1,5 @@
---- src/conky.c.orig	2010-10-06 00:29:36.000000000 +0300
-+++ src/conky.c	2012-03-05 01:03:43.000000000 +0200
+--- src/conky.c.orig	2012-05-04 00:22:21.000000000 +0300
++++ src/conky.c	2012-12-04 11:09:20.000000000 +0200
 @@ -119,7 +119,7 @@
  #include "openbsd.h"
  #endif
@@ -9,51 +9,25 @@
  #include <bsd/bsd.h>
  #endif
  
-@@ -2072,9 +2072,11 @@
- 			OBJ(xmms2_percent) {
- 				snprintf(p, p_max_size, "%2.0f", cur->xmms2.progress * 100);
- 			}
-+#ifdef X11
- 			OBJ(xmms2_bar) {
- 				new_bar(obj, p, p_max_size, (int) (cur->xmms2.progress * 255.0f));
- 			}
-+#endif /* X11 */
- 			OBJ(xmms2_playlist) {
- 				snprintf(p, p_max_size, "%s", cur->xmms2.playlist);
- 			}
-@@ -2150,6 +2152,7 @@
- 				snprintf(p, p_max_size, "%s",
- 					cur->audacious.items[AUDACIOUS_MAIN_VOLUME]);
- 			}
-+#ifdef X11
- 			OBJ(audacious_bar) {
- 				double progress;
- 
-@@ -2158,6 +2161,7 @@
- 					atof(cur->audacious.items[AUDACIOUS_LENGTH_SECONDS]);
- 				new_bar(obj, p, p_max_size, (int) (progress * 255.0f));
- 			}
-+#endif /* X11 */
- #endif /* AUDACIOUS */
- 
- #ifdef BMPX
-@@ -5716,6 +5720,7 @@
- 			"kvm_open")) == NULL) {
- 		CRIT_ERR(NULL, NULL, "cannot read kvm");
- 	}
-+	pthread_mutex_init(&kvm_proc_mutex, NULL);
- #endif
+@@ -4292,7 +4292,8 @@
  
- 	while (1) {
-@@ -5999,6 +6004,7 @@
+ 	free_templates();
  
- #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
- 	kvm_close(kd);
-+	pthread_mutex_destroy(&kvm_proc_mutex);
+-	free(current_mail_spool);
++	if (current_mail_spool)
++		free(current_mail_spool);
+ 	{
+ 		char buf[256];
+ 
+@@ -5662,6 +5663,7 @@
+ 			current_mail_spool = strndup(buf, text_buffer_size);
+ 		}
+ 	}
++	pthread_mutex_init(&kvm_proc_mutex, NULL);
  #endif
  
- 	return 0;
-@@ -6007,7 +6013,7 @@
+ 	/* handle other command line arguments */
+@@ -5971,7 +5973,7 @@
  
  void alarm_handler(void) {
  	if(childpid > 0) {

Modified: head/sysutils/conky/files/patch-src-core.c
==============================================================================
--- head/sysutils/conky/files/patch-src-core.c	Fri Feb  8 07:09:43 2013	(r311908)
+++ head/sysutils/conky/files/patch-src-core.c	Fri Feb  8 07:11:05 2013	(r311909)
@@ -1,59 +0,0 @@
---- src/core.c.orig	2010-10-06 00:29:36.000000000 +0300
-+++ src/core.c	2010-10-09 23:51:18.000000000 +0300
-@@ -541,11 +541,11 @@
- 		parse_platform_sensor(obj, arg);
- 	END OBJ_ARG(hwmon, 0, "hwmon needs argumanets")
- 		parse_hwmon_sensor(obj, arg);
--	END OBJ(addr, &update_net_stats)
--		parse_net_stat_arg(obj, arg, free_at_crash);
- 	END OBJ(addrs, &update_net_stats)
- 		parse_net_stat_arg(obj, arg, free_at_crash);
- #endif /* __linux__ */
-+	END OBJ(addr, &update_net_stats)
-+		parse_net_stat_arg(obj, arg, free_at_crash);
- 	END
- 	/* we have four different types of top (top, top_mem, top_time and top_io). To
- 	 * avoid having almost-same code four times, we have this special
-@@ -577,7 +577,7 @@
- 		obj->data.s = strndup(arg, text_buffer_size);
- 	END OBJ_IF_ARG(if_mounted, 0, "if_mounted needs an argument")
- 		obj->data.s = strndup(arg, text_buffer_size);
--#ifdef __linux__
-+#if defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
- 	END OBJ_IF_ARG(if_running, &update_top, "if_running needs an argument")
- 		top_running = 1;
- 		obj->data.s = strndup(arg, text_buffer_size);
-@@ -787,9 +787,9 @@
- 		obj->sub = malloc(sizeof(struct text_object));
- 		extract_variable_text_internal(obj->sub, arg);
- 	END OBJ(processes, &update_total_processes)
-+#ifdef __linux__
- 	END OBJ(running_processes, &update_top)
- 		top_running = 1;
--#ifdef __linux__
- 	END OBJ(threads, &update_threads)
- 	END OBJ(running_threads, &update_stat)
- #else
-@@ -967,8 +967,10 @@
- 	END OBJ(xmms2_size, &update_xmms2)
- 	END OBJ(xmms2_status, &update_xmms2)
- 	END OBJ(xmms2_percent, &update_xmms2)
-+#ifdef X11
- 	END OBJ(xmms2_bar, &update_xmms2)
- 		scan_bar(obj, arg);
-+#endif
- 	END OBJ(xmms2_smart, &update_xmms2)
- 	END OBJ(xmms2_playlist, &update_xmms2)
- 	END OBJ(xmms2_timesplayed, &update_xmms2)
-@@ -994,9 +996,11 @@
- 	END OBJ(audacious_playlist_length, &update_audacious)
- 	END OBJ(audacious_playlist_position, &update_audacious)
- 	END OBJ(audacious_main_volume, &update_audacious)
-+#ifdef X11
- 	END OBJ(audacious_bar, &update_audacious)
- 		scan_bar(obj, arg);
- #endif
-+#endif
- #ifdef BMPX
- 	END OBJ(bmpx_title, &update_bmpx)
- 		memset(&(info.bmpx), 0, sizeof(struct bmpx_s));

Modified: head/sysutils/conky/files/patch-src-exec.c
==============================================================================
--- head/sysutils/conky/files/patch-src-exec.c	Fri Feb  8 07:09:43 2013	(r311908)
+++ head/sysutils/conky/files/patch-src-exec.c	Fri Feb  8 07:11:05 2013	(r311909)
@@ -1,28 +0,0 @@
---- src/exec.c.orig	2010-10-27 20:19:48.000000000 +0300
-+++ src/exec.c	2010-10-27 20:19:52.000000000 +0300
-@@ -93,6 +93,7 @@
- 		} else {
- 			close(1);
- 		}
-+		close(parentend);
- 		dup(childend);	//by dupping childend, the returned fd will have close-on-exec turned off
- 		execl("/bin/sh", "sh", "-c", command, (char *) NULL);
- 		_exit(EXIT_FAILURE); //child should die here, (normally execl will take care of this but it can fail)
-@@ -156,7 +157,7 @@
- 		int length;
- 
- 		length = fread(buf, 1, size, fp);
--		pclose(fp);
-+		fclose(fp);
- 		buf[length] = '\0';
- 		if (length > 0 && buf[length - 1] == '\n') {
- 			buf[length - 1] = '\0';
-@@ -320,7 +321,7 @@
- 			ed->buffer = malloc(text_buffer_size);
- 
- 		length = fread(ed->buffer, 1, text_buffer_size, fp);
--		pclose(fp);
-+		fclose(fp);
- 
- 		output = ed->buffer;
- 		output[length] = '\0';

Modified: head/sysutils/conky/files/patch-src-freebsd.c
==============================================================================
--- head/sysutils/conky/files/patch-src-freebsd.c	Fri Feb  8 07:09:43 2013	(r311908)
+++ head/sysutils/conky/files/patch-src-freebsd.c	Fri Feb  8 07:11:05 2013	(r311909)
@@ -1,5 +1,5 @@
---- src/freebsd.c.orig	2010-10-06 00:29:36.000000000 +0300
-+++ src/freebsd.c	2012-03-05 01:02:25.000000000 +0200
+--- src/freebsd.c.orig	2012-05-04 00:08:27.000000000 +0300
++++ src/freebsd.c	2012-12-04 11:09:20.000000000 +0200
 @@ -38,6 +38,11 @@
  #include <sys/types.h>
  #include <sys/user.h>
@@ -12,21 +12,8 @@
  #include <net/if.h>
  #include <net/if_mib.h>
  #include <net/if_media.h>
-@@ -266,7 +271,9 @@
- {
- 	int n_processes;
- 
-+	pthread_mutex_lock(&kvm_proc_mutex);
- 	kvm_getprocs(kd, KERN_PROC_ALL, 0, &n_processes);
-+	pthread_mutex_unlock(&kvm_proc_mutex);
- 
- 	info.procs = n_processes;
- 	return 0;
-@@ -278,9 +285,10 @@
- 	int n_processes;
- 	int i, cnt = 0;
- 
-+	pthread_mutex_lock(&kvm_proc_mutex);
+@@ -283,7 +288,7 @@
+ 	pthread_mutex_lock(&kvm_proc_mutex);
  	p = kvm_getprocs(kd, KERN_PROC_ALL, 0, &n_processes);
  	for (i = 0; i < n_processes; i++) {
 -#if (__FreeBSD__ < 5) && (__FreeBSD_kernel__ < 5)
@@ -34,35 +21,35 @@
  		if (p[i].kp_proc.p_stat == SRUN) {
  #else
  		if (p[i].ki_stat == SRUN) {
-@@ -288,6 +296,7 @@
- 			cnt++;
- 		}
- 	}
-+	pthread_mutex_unlock(&kvm_proc_mutex);
- 
- 	info.run_procs = cnt;
- 	return 0;
-@@ -296,7 +305,6 @@
+@@ -300,7 +305,9 @@
  void get_cpu_count(void)
  {
  	int cpu_count = 0;
 -	size_t cpu_count_len = sizeof(cpu_count);
++	/* add check for !info.cpu_usage since that mem is freed on a SIGUSR1 */
++	if ((cpu_setup == 1) && (info.cpu_usage))
++		return;
  
  	if (GETSYSCTL("hw.ncpu", cpu_count) == 0) {
  		info.cpu_count = cpu_count;
-@@ -748,6 +756,7 @@
- 		CRIT_ERR(NULL, NULL, "Cannot read sysctl \"vm.stats.vm.v_page_count\"");
+@@ -313,6 +320,7 @@
+ 	if (info.cpu_usage == NULL) {
+ 		CRIT_ERR(NULL, NULL, "malloc");
  	}
++	cpu_setup = 1;
+ }
  
-+	pthread_mutex_lock(&kvm_proc_mutex);
- 	p = kvm_getprocs(kd, KERN_PROC_PROC, 0, &n_processes);
- 	processes = malloc(n_processes * sizeof(struct process));
- 
-@@ -764,6 +769,7 @@
- 			j++;
- 		}
- 	}
-+	pthread_mutex_unlock(&kvm_proc_mutex);
+ struct cpu_info {
+@@ -330,11 +338,7 @@
+ 	unsigned int malloc_cpu_size = 0;
+ 	extern void* global_cpu;
+ 
+-	/* add check for !info.cpu_usage since that mem is freed on a SIGUSR1 */
+-	if ((cpu_setup == 0) || (!info.cpu_usage)) {
+-		get_cpu_count();
+-		cpu_setup = 1;
+-	}
++	get_cpu_count();
  
- 	qsort(processes, j - 1, sizeof(struct process), comparemem);
- 	for (i = 0; i < 10 && i < n_processes; i++) {
+ 	if (!global_cpu) {
+ 		malloc_cpu_size = (info.cpu_count + 1) * sizeof(struct cpu_info);

Modified: head/sysutils/conky/files/patch-src-freebsd.h
==============================================================================
--- head/sysutils/conky/files/patch-src-freebsd.h	Fri Feb  8 07:09:43 2013	(r311908)
+++ head/sysutils/conky/files/patch-src-freebsd.h	Fri Feb  8 07:11:05 2013	(r311909)
@@ -1,16 +1,10 @@
---- src/freebsd.h.orig	2010-10-24 03:14:11.000000000 +0300
-+++ src/freebsd.h	2010-10-24 03:13:05.000000000 +0300
-@@ -9,11 +9,13 @@
- #include <sys/ucred.h>
+--- src/freebsd.h.orig	2012-12-04 04:24:41.000000000 +0200
++++ src/freebsd.h	2012-12-04 04:24:52.000000000 +0200
+@@ -10,6 +10,7 @@
  #include <fcntl.h>
  #include <kvm.h>
-+#include <pthread.h>
+ #include <pthread.h>
++#include <stdbool.h>
  #if (defined(i386) || defined(__i386__))
  #include <machine/apm_bios.h>
  #endif /* i386 || __i386__ */
- 
- kvm_t *kd;
-+pthread_mutex_t kvm_proc_mutex;
- 
- int get_entropy_avail(unsigned int *);
- int get_entropy_poolsize(unsigned int *);

Modified: head/sysutils/conky/files/patch-src-xmms2.c
==============================================================================
--- head/sysutils/conky/files/patch-src-xmms2.c	Fri Feb  8 07:09:43 2013	(r311908)
+++ head/sysutils/conky/files/patch-src-xmms2.c	Fri Feb  8 07:11:05 2013	(r311909)
@@ -1,11 +0,0 @@
---- src/xmms2.c.orig	2010-09-29 04:54:10.000000000 +0300
-+++ src/xmms2.c	2010-09-29 04:55:19.000000000 +0300
-@@ -223,7 +223,7 @@
- 				break;
- 			case XMMS_PLAYBACK_STATUS_STOP:
- 				strncpy(ptr->xmms2.status, "Stopped", text_buffer_size - 1);
--				ptr->xmms2.elapsed = ptr->xmms2.progress = ptr->xmms2.percent = 0;
-+				ptr->xmms2.elapsed = ptr->xmms2.progress = 0;
- 				break;
- 			default:
- 				strncpy(ptr->xmms2.status, "Unknown", text_buffer_size - 1);
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"