aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/conky
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2008-06-04 06:03:31 +0800
committerpav <pav@FreeBSD.org>2008-06-04 06:03:31 +0800
commit35bba2473c08920c7f5cdedec7eb0eea9674c34f (patch)
treeded3c4c94c95da7b26eb8d95895b2317f5b88b5d /sysutils/conky
parent48382a43410da296f610456192b2ababb5c0a120 (diff)
downloadfreebsd-ports-gnome-35bba2473c08920c7f5cdedec7eb0eea9674c34f.tar.gz
freebsd-ports-gnome-35bba2473c08920c7f5cdedec7eb0eea9674c34f.tar.zst
freebsd-ports-gnome-35bba2473c08920c7f5cdedec7eb0eea9674c34f.zip
- Update to 1.5.1
Submitted by: adamw Approved by: maintainer (novel)
Diffstat (limited to 'sysutils/conky')
-rw-r--r--sysutils/conky/Makefile5
-rw-r--r--sysutils/conky/distinfo6
-rw-r--r--sysutils/conky/files/patch-src_common.c14
-rw-r--r--sysutils/conky/files/patch-src_conky.c34
-rw-r--r--sysutils/conky/files/patch-src_diskio.c17
-rw-r--r--sysutils/conky/files/patch-src_freebsd.c20
-rw-r--r--sysutils/conky/files/patch-src_fs.c12
-rw-r--r--sysutils/conky/files/patch-src_users.c144
8 files changed, 246 insertions, 6 deletions
diff --git a/sysutils/conky/Makefile b/sysutils/conky/Makefile
index 17efda2529c1..882282b3c2cd 100644
--- a/sysutils/conky/Makefile
+++ b/sysutils/conky/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= conky
-PORTVERSION= 1.4.9
-PORTREVISION= 1
+PORTVERSION= 1.5.1
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
@@ -102,7 +101,7 @@ do-install:
post-install:
@${MKDIR} ${EXAMPLESDIR}
- @${INSTALL_DATA} ${WRKSRC}/doc/conkyrc.sample ${EXAMPLESDIR}
+ @${INSTALL_DATA} ${WRKSRC}/doc/conky.conf ${EXAMPLESDIR}/conkyrc.sample
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
diff --git a/sysutils/conky/distinfo b/sysutils/conky/distinfo
index e3b8f1f09eb2..edc31a979991 100644
--- a/sysutils/conky/distinfo
+++ b/sysutils/conky/distinfo
@@ -1,3 +1,3 @@
-MD5 (conky-1.4.9.tar.bz2) = 42d966fce5aa5c5a326575ec214bff07
-SHA256 (conky-1.4.9.tar.bz2) = a6c98aa34932c8684e19e97fad460c04c2b7848c897bdaa293d37fbcc4d7949b
-SIZE (conky-1.4.9.tar.bz2) = 412510
+MD5 (conky-1.5.1.tar.bz2) = afc121a67e4405cb44b7738be79946ac
+SHA256 (conky-1.5.1.tar.bz2) = ca8b1dbc87e7c2c44d06f70e2b195f59ae8b09f8d490cc92cfac8df10f7bc239
+SIZE (conky-1.5.1.tar.bz2) = 422965
diff --git a/sysutils/conky/files/patch-src_common.c b/sysutils/conky/files/patch-src_common.c
new file mode 100644
index 000000000000..2b79e69de71d
--- /dev/null
+++ b/sysutils/conky/files/patch-src_common.c
@@ -0,0 +1,14 @@
+--- src/common.c.orig 2008-03-31 00:56:41.000000000 -0400
++++ src/common.c 2008-06-03 14:30:34.000000000 -0400
+@@ -353,9 +353,11 @@
+ if (NEED(INFO_USERS)) {
+ update_users();
+ }
++#ifdef __linux__
+ if (NEED(INFO_GW)) {
+ update_gateway_info();
+ }
++#endif
+ if (NEED(INFO_DNS)) {
+ update_dns_data();
+ }
diff --git a/sysutils/conky/files/patch-src_conky.c b/sysutils/conky/files/patch-src_conky.c
new file mode 100644
index 000000000000..7a7f601cfcfe
--- /dev/null
+++ b/sysutils/conky/files/patch-src_conky.c
@@ -0,0 +1,34 @@
+--- src/conky.c.orig 2008-05-27 00:30:59.000000000 -0400
++++ src/conky.c 2008-05-27 00:32:49.000000000 -0400
+@@ -56,6 +56,7 @@
+ #include <netdb.h>
+ #include <fcntl.h>
+ #include <getopt.h>
++#include <stdarg.h>
+
+ #ifdef HAVE_ICONV
+ #include <iconv.h>
+@@ -3529,9 +3530,11 @@ static struct text_object *construct_tex
+ END OBJ(user_times, INFO_USERS)
+ END OBJ(user_terms, INFO_USERS)
+ END OBJ(user_number, INFO_USERS)
++#ifdef __linux__
+ END OBJ(gw_iface, INFO_GW)
+ END OBJ(gw_ip, INFO_GW)
+ END OBJ(if_gw, INFO_GW)
++#endif /* __linux__ */
+ #ifndef __OpenBSD__
+ END OBJ(adt746xcpu, 0)
+ END OBJ(adt746xfan, 0)
+@@ -5375,9 +5378,11 @@ static void generate_text_internal(char
+ if_jumped = 0;
+ }
+ }
++#ifdef __linux__
+ OBJ(ioscheduler) {
+ snprintf(p, p_max_size, "%s", get_ioscheduler(obj->data.s));
+ }
++#endif
+ OBJ(kernel) {
+ snprintf(p, p_max_size, "%s", cur->uname_s.release);
+ }
diff --git a/sysutils/conky/files/patch-src_diskio.c b/sysutils/conky/files/patch-src_diskio.c
new file mode 100644
index 000000000000..77c79f66ac3e
--- /dev/null
+++ b/sysutils/conky/files/patch-src_diskio.c
@@ -0,0 +1,17 @@
+--- src/diskio.c.orig 2008-05-26 11:36:44.000000000 -0400
++++ src/diskio.c 2008-05-26 11:43:00.000000000 -0400
+@@ -73,11 +73,11 @@ struct diskio_stat *prepare_diskio_stat(
+ free(new->dev);
+ new->dev = 0;
+ }
+- if (strncmp(s, "/dev/", 5) == 0) {
++ if (strncmp(s, "/dev/", 5) == 0 && strlen(s) > 5) {
+ // supplied a /dev/device arg, so cut off the /dev part
+- new->dev = strndup(s + 5, text_buffer_size);
++ new->dev = strdup(s + 5);
+ } else {
+- new->dev = strndup(s, text_buffer_size);
++ new->dev = strdup(s);
+ }
+ /*
+ * check that device actually exists
diff --git a/sysutils/conky/files/patch-src_freebsd.c b/sysutils/conky/files/patch-src_freebsd.c
new file mode 100644
index 000000000000..9e119eca443c
--- /dev/null
+++ b/sysutils/conky/files/patch-src_freebsd.c
@@ -0,0 +1,20 @@
+--- src/freebsd.c.orig 2008-05-26 11:23:57.000000000 -0400
++++ src/freebsd.c 2008-05-26 11:35:56.000000000 -0400
+@@ -519,7 +519,7 @@ __inline__ unsigned long long int rdtsc(
+
+ /* return system frequency in MHz (use divisor=1) or GHz (use divisor=1000) */
+ void get_freq_dynamic(char *p_client_buffer, size_t client_buffer_size,
+- char *p_format, int divisor)
++ const char *p_format, int divisor)
+ {
+ #if defined(__i386) || defined(__x86_64)
+ struct timezone tz;
+@@ -549,7 +549,7 @@ void get_freq_dynamic(char *p_client_buf
+ }
+
+ /* void */
+-char get_freq(char *p_client_buffer, size_t client_buffer_size, char *p_format,
++char get_freq(char *p_client_buffer, size_t client_buffer_size, const char *p_format,
+ int divisor, unsigned int cpu)
+ {
+ int freq;
diff --git a/sysutils/conky/files/patch-src_fs.c b/sysutils/conky/files/patch-src_fs.c
new file mode 100644
index 000000000000..384f38588ae6
--- /dev/null
+++ b/sysutils/conky/files/patch-src_fs.c
@@ -0,0 +1,12 @@
+--- src/fs.c.orig 2008-05-26 11:45:37.000000000 -0400
++++ src/fs.c 2008-05-26 11:48:35.000000000 -0400
+@@ -45,6 +45,9 @@
+ #ifdef HAVE_SYS_MOUNT_H
+ #include <sys/mount.h>
+ #endif
++#if defined(HAVE_SYS_PARAM_H) && defined(HAVE_SYS_MOUNT_H)
++#define HAVE_STRUCT_STATFS_F_FSTYPENAME
++#endif
+
+ #ifndef HAVE_STRUCT_STATFS_F_FSTYPENAME
+ #include <mntent.h>
diff --git a/sysutils/conky/files/patch-src_users.c b/sysutils/conky/files/patch-src_users.c
new file mode 100644
index 000000000000..12e205fd5308
--- /dev/null
+++ b/sysutils/conky/files/patch-src_users.c
@@ -0,0 +1,144 @@
+--- src/users.c.orig 2008-03-31 00:56:42.000000000 -0400
++++ src/users.c 2008-06-03 17:04:27.000000000 -0400
+@@ -34,6 +34,123 @@
+ #include <stdlib.h>
+ #include <time.h>
+
++#ifdef __FreeBSD__
++/* The code for this is adapted directly from src/usr.bin/users/users.c */
++#include <sys/types.h>
++#include <unistd.h>
++
++FILE *_utmp_file = NULL;
++char (*_ut_names)[UT_NAMESIZE];
++char (*_ut_lines)[UT_LINESIZE];
++int _ut_ncnt = 0;
++int _ut_lcnt = 0;
++
++int nscmp(const void *, const void *);
++int lscmp(const void *, const void *);
++void slurputmp(void);
++
++int nscmp(const void *p, const void *q)
++{
++ return(strncmp(p, q, UT_NAMESIZE));
++}
++
++int lscmp(const void *p, const void *q)
++{
++ return(strncmp(p, q, UT_LINESIZE));
++}
++
++void slurputmp(void)
++{
++ struct utmp _ut;
++ int nmax = 0;
++ int lmax = 0;
++
++ _ut_ncnt = 0;
++ _ut_lcnt = 0;
++
++ if (_utmp_file == NULL)
++ if (!(_utmp_file = fopen(_PATH_UTMP, "r")))
++ ERR("error opening utmp");
++
++ while (fread((char*)&_ut, sizeof(_ut), 1, _utmp_file) == 1) {
++ if (*_ut.ut_name) {
++ if (_ut_ncnt >= nmax) {
++ nmax += 32;
++ _ut_names = realloc(_ut_names, sizeof(*_ut_names) * nmax);
++ if (!_ut_names)
++ ERR("error realloc'ing");
++ }
++ (void)strncpy(_ut_names[_ut_ncnt], _ut.ut_name, UT_NAMESIZE);
++ ++_ut_ncnt;
++
++ }
++ if (*_ut.ut_line) {
++ if (_ut_lcnt >= lmax) {
++ lmax += 32;
++ _ut_lines = realloc(_ut_lines, sizeof(*_ut_lines) * lmax);
++ if (!_ut_lines)
++ ERR("error realloc'ing");
++ }
++ (void)strncpy(_ut_lines[_ut_lcnt], _ut.ut_line, UT_LINESIZE);
++ ++_ut_lcnt;
++ }
++ }
++
++ fclose(_utmp_file);
++ _utmp_file = NULL;
++}
++
++static void user_name(char *ptr)
++{
++ int cnt;
++ char buf[UT_NAMESIZE + 1];
++
++ if (_ut_ncnt) {
++ qsort(_ut_names, _ut_ncnt, UT_NAMESIZE, nscmp);
++ for (cnt = 0; cnt < _ut_ncnt; ++cnt)
++ if (cnt == 0 || strncmp(_ut_names[cnt], _ut_names[cnt - 1], UT_NAMESIZE)) {
++ (void)snprintf(buf, sizeof(buf), "%s ", _ut_names[cnt]);
++ (void)strncat(ptr, buf, sizeof(buf));
++ }
++ }
++}
++
++static void user_num(int *ptr)
++{
++ int cnt;
++ *ptr = 0;
++
++ if (_ut_ncnt) {
++ qsort(_ut_names, _ut_ncnt, UT_NAMESIZE, nscmp);
++ for (cnt = 0; cnt < _ut_ncnt; ++cnt)
++ if (cnt == 0 || strncmp(_ut_names[cnt], _ut_names[cnt - 1], UT_NAMESIZE))
++ ++*ptr;
++ }
++}
++
++static void user_term(char *ptr)
++{
++ int cnt;
++ char buf[UT_LINESIZE + 1];
++
++ if (_ut_lcnt) {
++ qsort(_ut_lines, _ut_lcnt, UT_LINESIZE, lscmp);
++ for (cnt = 0; cnt < _ut_lcnt; ++cnt)
++ if (cnt == 0 || strncmp(_ut_lines[cnt], _ut_lines[cnt - 1], UT_LINESIZE)) {
++ (void)snprintf(buf, sizeof(buf), "%s ", _ut_lines[cnt]);
++ (void)strncat(ptr, buf, sizeof(buf));
++ }
++ }
++}
++
++static void user_time(char *ptr)
++{
++ /* idk my bff jill? */
++ strncpy(ptr, "Not implemented", 16);
++}
++
++#else /* __FreeBSD__ */
++
+ static void user_name(char *ptr)
+ {
+ const struct utmp *usr = 0;
+@@ -101,6 +218,7 @@
+ }
+ }
+ }
++#endif /* !__FreeBSD__ */
+
+ static void users_alloc(struct information *ptr)
+ {
+@@ -122,6 +240,9 @@
+ char temp[512] = "";
+ int t;
+ users_alloc(current_info);
++#ifdef __FreeBSD__
++ slurputmp();
++#endif
+ user_name(temp);
+ if (temp != NULL) {
+ if (current_info->users.names) {