View | Details | Raw Unified | Return to bug 168161 | Differences between
and this patch

Collapse All | Expand All

(-)conky/Makefile (-2 / +1 lines)
Lines 6-13 Link Here
6
#
6
#
7
7
8
PORTNAME=	conky
8
PORTNAME=	conky
9
PORTVERSION=	1.8.1
9
PORTVERSION=	1.9.0
10
PORTREVISION=	5
11
CATEGORIES=	sysutils
10
CATEGORIES=	sysutils
12
MASTER_SITES=	SF
11
MASTER_SITES=	SF
13
12
(-)conky/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (conky-1.8.1.tar.bz2) = f85a278f2869596b1fd68b6d26d58c93af8dcc39d5186bbcfd587d4c545e5e43
1
SHA256 (conky-1.9.0.tar.bz2) = baf1b550f135fbfb53e5e286a33aadc03a667d63bf6c4d52ba7637366295bb6f
2
SIZE (conky-1.8.1.tar.bz2) = 612481
2
SIZE (conky-1.9.0.tar.bz2) = 626555
(-)conky/files/patch-configure (-45 / +28 lines)
Lines 1-6 Link Here
1
--- configure.orig
1
--- configure.orig	2012-05-04 00:47:40.000000000 +0300
2
+++ configure
2
+++ configure	2012-12-06 04:26:37.000000000 +0200
3
@@ -1002,6 +1002,7 @@
3
@@ -895,6 +895,7 @@
4
 enable_xft
4
 enable_xft
5
 enable_nvidia
5
 enable_nvidia
6
 enable_alsa
6
 enable_alsa
Lines 8-14 Link Here
8
 enable_debug
8
 enable_debug
9
 enable_testing
9
 enable_testing
10
 enable_profiling
10
 enable_profiling
11
@@ -1729,6 +1730,7 @@
11
@@ -1620,6 +1621,7 @@
12
   --enable-nvidia         enable if you want nvidia support [default=no]
12
   --enable-nvidia         enable if you want nvidia support [default=no]
13
   --disable-alsa          disable if you do not want ALSA support
13
   --disable-alsa          disable if you do not want ALSA support
14
                           [default=yes]
14
                           [default=yes]
Lines 16-40 Link Here
16
   --enable-debug          compile with debug symbols [default=no]
16
   --enable-debug          compile with debug symbols [default=no]
17
   --enable-testing        use strict compiler flags for testing [default=no]
17
   --enable-testing        use strict compiler flags for testing [default=no]
18
   --enable-profiling      specify compiler flags for use with gprof and gcov
18
   --enable-profiling      specify compiler flags for use with gprof and gcov
19
@@ -11647,7 +11649,7 @@
19
@@ -11930,7 +11932,11 @@
20
 
20
   Linux*)
21
 
21
     WANT_SYSINFO=yes
22
 if test x$want_apcupsd = xyes; then
22
     ;;
23
-  if test x"$uname" != xLinux; then
23
-  FreeBSD*|GNU/kFreeBSD*)
24
+  if test x"$uname" != xLinux -a x"$uname" != xFreeBSD; then
24
+  FreeBSD*)
25
       { $as_echo "$as_me:${as_lineno-$LINENO}: apcupsd not supported on $uname... disabling" >&5
25
+    WANT_KVM=yes
26
 $as_echo "$as_me: apcupsd not supported on $uname... disabling" >&6;}
26
+    WANT_DEVSTAT=yes
27
       want_apcupsd="not supported on $uname"
27
+    ;;
28
@@ -11675,7 +11675,7 @@
28
+  GNU/kFreeBSD*)
29
 
29
     WANT_KVM=yes
30
 
30
     WANT_DEVSTAT=yes
31
 if test x$want_iostats = xyes; then
31
     WANT_OPTRESET=yes
32
-  if test x"$uname" != xLinux; then
32
@@ -16998,18 +17004,63 @@
33
+  if test x"$uname" != xLinux -a x"$uname" != xFreeBSD; then
34
       { $as_echo "$as_me:${as_lineno-$LINENO}: iostats not supported on $uname... disabling" >&5
35
 $as_echo "$as_me: iostats not supported on $uname... disabling" >&6;}
36
       want_iostats="not supported on $uname"
37
@@ -16071,20 +16073,65 @@
38
 
33
 
39
 done
34
 done
40
 
35
 
Lines 42-70 Link Here
42
-for ac_header in sys/inotify.h
37
-for ac_header in sys/inotify.h
43
-do :
38
-do :
44
-  ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
39
-  ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
45
-if test "x$ac_cv_header_sys_inotify_h" = x""yes; then :
40
+
46
-  cat >>confdefs.h <<_ACEOF
47
-#define HAVE_SYS_INOTIFY_H 1
48
-_ACEOF
49
 
50
+# Check whether --enable-inotify was given.
41
+# Check whether --enable-inotify was given.
51
+if test "${enable_inotify+set}" = set; then :
42
+if test "${enable_inotify+set}" = set; then :
52
+  enableval=$enable_inotify; want_inotify="$enableval"
43
+  enableval=$enable_inotify; want_inotify="$enableval"
53
+else
44
+else
54
+  want_inotify=no
45
+  want_inotify=no
55
 fi
46
+fi
56
 
47
+
57
-done
58
+if test x$want_inotify = xyes; then
48
+if test x$want_inotify = xyes; then
59
+    ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
49
+    ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
60
+if test "x$ac_cv_header_sys_inotify_h" = xyes; then :
50
 if test "x$ac_cv_header_sys_inotify_h" = xyes; then :
51
-  cat >>confdefs.h <<_ACEOF
52
-#define HAVE_SYS_INOTIFY_H 1
53
-_ACEOF
61
+ 
54
+ 
62
+else
55
+else
63
+  want_inotify=no
56
+  want_inotify=no
64
+fi
57
+fi
65
 
58
 
66
 
59
 fi
67
+fi
68
+if test x$want_inotify = xyes; then
60
+if test x$want_inotify = xyes; then
69
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inotify_init in -linotify" >&5
61
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inotify_init in -linotify" >&5
70
+$as_echo_n "checking for inotify_init in -linotify... " >&6; }
62
+$as_echo_n "checking for inotify_init in -linotify... " >&6; }
Lines 75-81 Link Here
75
+LIBS="-linotify  $LIBS"
67
+LIBS="-linotify  $LIBS"
76
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
68
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
77
+/* end confdefs.h.  */
69
+/* end confdefs.h.  */
78
+
70
 
71
-done
79
+#include <sys/inotify.h>
72
+#include <sys/inotify.h>
80
+
73
+
81
+char inotify_init ();
74
+char inotify_init ();
Lines 105-120 Link Here
105
+fi
98
+fi
106
+
99
+
107
+fi
100
+fi
108
+
109
 
110
 
111
 $as_echo "#define DEFAULTNETDEV \"eth0\"" >>confdefs.h
112
@@ -16102,7 +16153,7 @@
113
 $as_echo "#define DEFAULT_TEXT_BUFFER_SIZE 256" >>confdefs.h
114
 
115
 
116
-$as_echo "#define MAX_NET_INTERFACES 16" >>confdefs.h
117
+$as_echo "#define MAX_NET_INTERFACES 64" >>confdefs.h
118
 
101
 
119
 
102
 
120
 
103
 
(-)conky/files/patch-src-ccurl_thread.c (-10 lines)
Lines 1-10 Link Here
1
--- src/ccurl_thread.c.orig	2010-10-06 00:29:36.000000000 +0300
2
+++ src/ccurl_thread.c	2012-03-05 01:08:23.000000000 +0200
3
@@ -33,7 +33,6 @@
4
 #endif /* DEBUG */
5
 
6
 #include <curl/curl.h>
7
-#include <curl/types.h>
8
 #include <curl/easy.h>
9
 
10
 /*
(-)conky/files/patch-src-conky.c (-43 / +17 lines)
Lines 1-5 Link Here
1
--- src/conky.c.orig	2010-10-06 00:29:36.000000000 +0300
1
--- src/conky.c.orig	2012-05-04 00:22:21.000000000 +0300
2
+++ src/conky.c	2012-03-05 01:03:43.000000000 +0200
2
+++ src/conky.c	2012-12-04 11:09:20.000000000 +0200
3
@@ -119,7 +119,7 @@
3
@@ -119,7 +119,7 @@
4
 #include "openbsd.h"
4
 #include "openbsd.h"
5
 #endif
5
 #endif
Lines 9-59 Link Here
9
 #include <bsd/bsd.h>
9
 #include <bsd/bsd.h>
10
 #endif
10
 #endif
11
 
11
 
12
@@ -2072,9 +2072,11 @@
12
@@ -4292,7 +4292,8 @@
13
 			OBJ(xmms2_percent) {
14
 				snprintf(p, p_max_size, "%2.0f", cur->xmms2.progress * 100);
15
 			}
16
+#ifdef X11
17
 			OBJ(xmms2_bar) {
18
 				new_bar(obj, p, p_max_size, (int) (cur->xmms2.progress * 255.0f));
19
 			}
20
+#endif /* X11 */
21
 			OBJ(xmms2_playlist) {
22
 				snprintf(p, p_max_size, "%s", cur->xmms2.playlist);
23
 			}
24
@@ -2150,6 +2152,7 @@
25
 				snprintf(p, p_max_size, "%s",
26
 					cur->audacious.items[AUDACIOUS_MAIN_VOLUME]);
27
 			}
28
+#ifdef X11
29
 			OBJ(audacious_bar) {
30
 				double progress;
31
 
32
@@ -2158,6 +2161,7 @@
33
 					atof(cur->audacious.items[AUDACIOUS_LENGTH_SECONDS]);
34
 				new_bar(obj, p, p_max_size, (int) (progress * 255.0f));
35
 			}
36
+#endif /* X11 */
37
 #endif /* AUDACIOUS */
38
 
39
 #ifdef BMPX
40
@@ -5716,6 +5720,7 @@
41
 			"kvm_open")) == NULL) {
42
 		CRIT_ERR(NULL, NULL, "cannot read kvm");
43
 	}
44
+	pthread_mutex_init(&kvm_proc_mutex, NULL);
45
 #endif
46
 
13
 
47
 	while (1) {
14
 	free_templates();
48
@@ -5999,6 +6004,7 @@
49
 
15
 
50
 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
16
-	free(current_mail_spool);
51
 	kvm_close(kd);
17
+	if (current_mail_spool)
52
+	pthread_mutex_destroy(&kvm_proc_mutex);
18
+		free(current_mail_spool);
19
 	{
20
 		char buf[256];
21
 
22
@@ -5662,6 +5663,7 @@
23
 			current_mail_spool = strndup(buf, text_buffer_size);
24
 		}
25
 	}
26
+	pthread_mutex_init(&kvm_proc_mutex, NULL);
53
 #endif
27
 #endif
54
 
28
 
55
 	return 0;
29
 	/* handle other command line arguments */
56
@@ -6007,7 +6013,7 @@
30
@@ -5971,7 +5973,7 @@
57
 
31
 
58
 void alarm_handler(void) {
32
 void alarm_handler(void) {
59
 	if(childpid > 0) {
33
 	if(childpid > 0) {
(-)conky/files/patch-src-core.c (-59 lines)
Lines 1-59 Link Here
1
--- src/core.c.orig	2010-10-06 00:29:36.000000000 +0300
2
+++ src/core.c	2010-10-09 23:51:18.000000000 +0300
3
@@ -541,11 +541,11 @@
4
 		parse_platform_sensor(obj, arg);
5
 	END OBJ_ARG(hwmon, 0, "hwmon needs argumanets")
6
 		parse_hwmon_sensor(obj, arg);
7
-	END OBJ(addr, &update_net_stats)
8
-		parse_net_stat_arg(obj, arg, free_at_crash);
9
 	END OBJ(addrs, &update_net_stats)
10
 		parse_net_stat_arg(obj, arg, free_at_crash);
11
 #endif /* __linux__ */
12
+	END OBJ(addr, &update_net_stats)
13
+		parse_net_stat_arg(obj, arg, free_at_crash);
14
 	END
15
 	/* we have four different types of top (top, top_mem, top_time and top_io). To
16
 	 * avoid having almost-same code four times, we have this special
17
@@ -577,7 +577,7 @@
18
 		obj->data.s = strndup(arg, text_buffer_size);
19
 	END OBJ_IF_ARG(if_mounted, 0, "if_mounted needs an argument")
20
 		obj->data.s = strndup(arg, text_buffer_size);
21
-#ifdef __linux__
22
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
23
 	END OBJ_IF_ARG(if_running, &update_top, "if_running needs an argument")
24
 		top_running = 1;
25
 		obj->data.s = strndup(arg, text_buffer_size);
26
@@ -787,9 +787,9 @@
27
 		obj->sub = malloc(sizeof(struct text_object));
28
 		extract_variable_text_internal(obj->sub, arg);
29
 	END OBJ(processes, &update_total_processes)
30
+#ifdef __linux__
31
 	END OBJ(running_processes, &update_top)
32
 		top_running = 1;
33
-#ifdef __linux__
34
 	END OBJ(threads, &update_threads)
35
 	END OBJ(running_threads, &update_stat)
36
 #else
37
@@ -967,8 +967,10 @@
38
 	END OBJ(xmms2_size, &update_xmms2)
39
 	END OBJ(xmms2_status, &update_xmms2)
40
 	END OBJ(xmms2_percent, &update_xmms2)
41
+#ifdef X11
42
 	END OBJ(xmms2_bar, &update_xmms2)
43
 		scan_bar(obj, arg);
44
+#endif
45
 	END OBJ(xmms2_smart, &update_xmms2)
46
 	END OBJ(xmms2_playlist, &update_xmms2)
47
 	END OBJ(xmms2_timesplayed, &update_xmms2)
48
@@ -994,9 +996,11 @@
49
 	END OBJ(audacious_playlist_length, &update_audacious)
50
 	END OBJ(audacious_playlist_position, &update_audacious)
51
 	END OBJ(audacious_main_volume, &update_audacious)
52
+#ifdef X11
53
 	END OBJ(audacious_bar, &update_audacious)
54
 		scan_bar(obj, arg);
55
 #endif
56
+#endif
57
 #ifdef BMPX
58
 	END OBJ(bmpx_title, &update_bmpx)
59
 		memset(&(info.bmpx), 0, sizeof(struct bmpx_s));
(-)conky/files/patch-src-exec.c (-28 lines)
Lines 1-28 Link Here
1
--- src/exec.c.orig	2010-10-27 20:19:48.000000000 +0300
2
+++ src/exec.c	2010-10-27 20:19:52.000000000 +0300
3
@@ -93,6 +93,7 @@
4
 		} else {
5
 			close(1);
6
 		}
7
+		close(parentend);
8
 		dup(childend);	//by dupping childend, the returned fd will have close-on-exec turned off
9
 		execl("/bin/sh", "sh", "-c", command, (char *) NULL);
10
 		_exit(EXIT_FAILURE); //child should die here, (normally execl will take care of this but it can fail)
11
@@ -156,7 +157,7 @@
12
 		int length;
13
 
14
 		length = fread(buf, 1, size, fp);
15
-		pclose(fp);
16
+		fclose(fp);
17
 		buf[length] = '\0';
18
 		if (length > 0 && buf[length - 1] == '\n') {
19
 			buf[length - 1] = '\0';
20
@@ -320,7 +321,7 @@
21
 			ed->buffer = malloc(text_buffer_size);
22
 
23
 		length = fread(ed->buffer, 1, text_buffer_size, fp);
24
-		pclose(fp);
25
+		fclose(fp);
26
 
27
 		output = ed->buffer;
28
 		output[length] = '\0';
(-)conky/files/patch-src-freebsd.c (-39 / +26 lines)
Lines 1-5 Link Here
1
--- src/freebsd.c.orig	2010-10-06 00:29:36.000000000 +0300
1
--- src/freebsd.c.orig	2012-05-04 00:08:27.000000000 +0300
2
+++ src/freebsd.c	2012-03-05 01:02:25.000000000 +0200
2
+++ src/freebsd.c	2012-12-04 11:09:20.000000000 +0200
3
@@ -38,6 +38,11 @@
3
@@ -38,6 +38,11 @@
4
 #include <sys/types.h>
4
 #include <sys/types.h>
5
 #include <sys/user.h>
5
 #include <sys/user.h>
Lines 12-32 Link Here
12
 #include <net/if.h>
12
 #include <net/if.h>
13
 #include <net/if_mib.h>
13
 #include <net/if_mib.h>
14
 #include <net/if_media.h>
14
 #include <net/if_media.h>
15
@@ -266,7 +271,9 @@
15
@@ -283,7 +288,7 @@
16
 {
16
 	pthread_mutex_lock(&kvm_proc_mutex);
17
 	int n_processes;
18
 
19
+	pthread_mutex_lock(&kvm_proc_mutex);
20
 	kvm_getprocs(kd, KERN_PROC_ALL, 0, &n_processes);
21
+	pthread_mutex_unlock(&kvm_proc_mutex);
22
 
23
 	info.procs = n_processes;
24
 	return 0;
25
@@ -278,9 +285,10 @@
26
 	int n_processes;
27
 	int i, cnt = 0;
28
 
29
+	pthread_mutex_lock(&kvm_proc_mutex);
30
 	p = kvm_getprocs(kd, KERN_PROC_ALL, 0, &n_processes);
17
 	p = kvm_getprocs(kd, KERN_PROC_ALL, 0, &n_processes);
31
 	for (i = 0; i < n_processes; i++) {
18
 	for (i = 0; i < n_processes; i++) {
32
-#if (__FreeBSD__ < 5) && (__FreeBSD_kernel__ < 5)
19
-#if (__FreeBSD__ < 5) && (__FreeBSD_kernel__ < 5)
Lines 34-68 Link Here
34
 		if (p[i].kp_proc.p_stat == SRUN) {
21
 		if (p[i].kp_proc.p_stat == SRUN) {
35
 #else
22
 #else
36
 		if (p[i].ki_stat == SRUN) {
23
 		if (p[i].ki_stat == SRUN) {
37
@@ -288,6 +296,7 @@
24
@@ -300,7 +305,9 @@
38
 			cnt++;
39
 		}
40
 	}
41
+	pthread_mutex_unlock(&kvm_proc_mutex);
42
 
43
 	info.run_procs = cnt;
44
 	return 0;
45
@@ -296,7 +305,6 @@
46
 void get_cpu_count(void)
25
 void get_cpu_count(void)
47
 {
26
 {
48
 	int cpu_count = 0;
27
 	int cpu_count = 0;
49
-	size_t cpu_count_len = sizeof(cpu_count);
28
-	size_t cpu_count_len = sizeof(cpu_count);
29
+	/* add check for !info.cpu_usage since that mem is freed on a SIGUSR1 */
30
+	if ((cpu_setup == 1) && (info.cpu_usage))
31
+		return;
50
 
32
 
51
 	if (GETSYSCTL("hw.ncpu", cpu_count) == 0) {
33
 	if (GETSYSCTL("hw.ncpu", cpu_count) == 0) {
52
 		info.cpu_count = cpu_count;
34
 		info.cpu_count = cpu_count;
53
@@ -748,6 +756,7 @@
35
@@ -313,6 +320,7 @@
54
 		CRIT_ERR(NULL, NULL, "Cannot read sysctl \"vm.stats.vm.v_page_count\"");
36
 	if (info.cpu_usage == NULL) {
37
 		CRIT_ERR(NULL, NULL, "malloc");
55
 	}
38
 	}
39
+	cpu_setup = 1;
40
 }
56
 
41
 
57
+	pthread_mutex_lock(&kvm_proc_mutex);
42
 struct cpu_info {
58
 	p = kvm_getprocs(kd, KERN_PROC_PROC, 0, &n_processes);
43
@@ -330,11 +338,7 @@
59
 	processes = malloc(n_processes * sizeof(struct process));
44
 	unsigned int malloc_cpu_size = 0;
60
 
45
 	extern void* global_cpu;
61
@@ -764,6 +769,7 @@
46
 
62
 			j++;
47
-	/* add check for !info.cpu_usage since that mem is freed on a SIGUSR1 */
63
 		}
48
-	if ((cpu_setup == 0) || (!info.cpu_usage)) {
64
 	}
49
-		get_cpu_count();
65
+	pthread_mutex_unlock(&kvm_proc_mutex);
50
-		cpu_setup = 1;
51
-	}
52
+	get_cpu_count();
66
 
53
 
67
 	qsort(processes, j - 1, sizeof(struct process), comparemem);
54
 	if (!global_cpu) {
68
 	for (i = 0; i < 10 && i < n_processes; i++) {
55
 		malloc_cpu_size = (info.cpu_count + 1) * sizeof(struct cpu_info);
(-)conky/files/patch-src-freebsd.h (-11 / +5 lines)
Lines 1-16 Link Here
1
--- src/freebsd.h.orig	2010-10-24 03:14:11.000000000 +0300
1
--- src/freebsd.h.orig	2012-12-04 04:24:41.000000000 +0200
2
+++ src/freebsd.h	2010-10-24 03:13:05.000000000 +0300
2
+++ src/freebsd.h	2012-12-04 04:24:52.000000000 +0200
3
@@ -9,11 +9,13 @@
3
@@ -10,6 +10,7 @@
4
 #include <sys/ucred.h>
5
 #include <fcntl.h>
4
 #include <fcntl.h>
6
 #include <kvm.h>
5
 #include <kvm.h>
7
+#include <pthread.h>
6
 #include <pthread.h>
7
+#include <stdbool.h>
8
 #if (defined(i386) || defined(__i386__))
8
 #if (defined(i386) || defined(__i386__))
9
 #include <machine/apm_bios.h>
9
 #include <machine/apm_bios.h>
10
 #endif /* i386 || __i386__ */
10
 #endif /* i386 || __i386__ */
11
 
12
 kvm_t *kd;
13
+pthread_mutex_t kvm_proc_mutex;
14
 
15
 int get_entropy_avail(unsigned int *);
16
 int get_entropy_poolsize(unsigned int *);
(-)conky/files/patch-src-fs.c (+18 lines)
Line 0 Link Here
1
--- src/fs.c.orig	2012-05-04 00:08:27.000000000 +0300
2
+++ src/fs.c	2012-07-18 20:24:10.000000000 +0300
3
@@ -118,9 +118,15 @@
4
 
5
 static void update_fs_stat(struct fs_stat *fs)
6
 {
7
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
8
+	struct statfs s;
9
+
10
+	if (statfs(fs->path, &s) == 0) {
11
+#else
12
 	struct statfs64 s;
13
 
14
 	if (statfs64(fs->path, &s) == 0) {
15
+#endif
16
 		fs->size = (long long)s.f_blocks * s.f_bsize;
17
 		/* bfree (root) or bavail (non-roots) ? */
18
 		fs->avail = (long long)s.f_bavail * s.f_bsize;
(-)conky/files/patch-src-xmms2.c (-11 lines)
Lines 1-11 Link Here
1
--- src/xmms2.c.orig	2010-09-29 04:54:10.000000000 +0300
2
+++ src/xmms2.c	2010-09-29 04:55:19.000000000 +0300
3
@@ -223,7 +223,7 @@
4
 				break;
5
 			case XMMS_PLAYBACK_STATUS_STOP:
6
 				strncpy(ptr->xmms2.status, "Stopped", text_buffer_size - 1);
7
-				ptr->xmms2.elapsed = ptr->xmms2.progress = ptr->xmms2.percent = 0;
8
+				ptr->xmms2.elapsed = ptr->xmms2.progress = 0;
9
 				break;
10
 			default:
11
 				strncpy(ptr->xmms2.status, "Unknown", text_buffer_size - 1);

Return to bug 168161