diff options
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/conky/Makefile | 2 | ||||
-rw-r--r-- | sysutils/conky/distinfo | 6 | ||||
-rw-r--r-- | sysutils/conky/files/patch-src-conky.h | 10 | ||||
-rw-r--r-- | sysutils/conky/files/patch-src_common.c | 14 | ||||
-rw-r--r-- | sysutils/conky/files/patch-src_conky.c | 34 | ||||
-rw-r--r-- | sysutils/conky/files/patch-src_diskio.c | 17 | ||||
-rw-r--r-- | sysutils/conky/files/patch-src_freebsd.c | 20 | ||||
-rw-r--r-- | sysutils/conky/files/patch-src_fs.c | 12 | ||||
-rw-r--r-- | sysutils/conky/files/patch-src_users.c | 144 |
9 files changed, 14 insertions, 245 deletions
diff --git a/sysutils/conky/Makefile b/sysutils/conky/Makefile index 21c64c42b3fe..a353dec588a0 100644 --- a/sysutils/conky/Makefile +++ b/sysutils/conky/Makefile @@ -6,7 +6,7 @@ # PORTNAME= conky -PORTVERSION= 1.5.1 +PORTVERSION= 1.6.1 CATEGORIES= sysutils MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} diff --git a/sysutils/conky/distinfo b/sysutils/conky/distinfo index edc31a979991..d4be509ef10c 100644 --- a/sysutils/conky/distinfo +++ b/sysutils/conky/distinfo @@ -1,3 +1,3 @@ -MD5 (conky-1.5.1.tar.bz2) = afc121a67e4405cb44b7738be79946ac -SHA256 (conky-1.5.1.tar.bz2) = ca8b1dbc87e7c2c44d06f70e2b195f59ae8b09f8d490cc92cfac8df10f7bc239 -SIZE (conky-1.5.1.tar.bz2) = 422965 +MD5 (conky-1.6.1.tar.bz2) = b2839f21cec18e5eaa338c7440a1ba28 +SHA256 (conky-1.6.1.tar.bz2) = e4acdd61e6971b7bf194c673828ef6de09f82abb95d3ece6e37e7eafab23b063 +SIZE (conky-1.6.1.tar.bz2) = 442180 diff --git a/sysutils/conky/files/patch-src-conky.h b/sysutils/conky/files/patch-src-conky.h new file mode 100644 index 000000000000..82ee8caefe40 --- /dev/null +++ b/sysutils/conky/files/patch-src-conky.h @@ -0,0 +1,10 @@ +--- src/conky.h.orig 2008-08-16 10:49:12.000000000 +0400 ++++ src/conky.h 2008-08-16 10:49:24.000000000 +0400 +@@ -44,6 +44,7 @@ + #include "config.h" + #include <sys/utsname.h> + #include <stdlib.h> ++#include <stdio.h> + #include <string.h> + #include <locale.h> + #include <langinfo.h> diff --git a/sysutils/conky/files/patch-src_common.c b/sysutils/conky/files/patch-src_common.c deleted file mode 100644 index 2b79e69de71d..000000000000 --- a/sysutils/conky/files/patch-src_common.c +++ /dev/null @@ -1,14 +0,0 @@ ---- 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 deleted file mode 100644 index 7a7f601cfcfe..000000000000 --- a/sysutils/conky/files/patch-src_conky.c +++ /dev/null @@ -1,34 +0,0 @@ ---- 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 deleted file mode 100644 index 77c79f66ac3e..000000000000 --- a/sysutils/conky/files/patch-src_diskio.c +++ /dev/null @@ -1,17 +0,0 @@ ---- 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 deleted file mode 100644 index 9e119eca443c..000000000000 --- a/sysutils/conky/files/patch-src_freebsd.c +++ /dev/null @@ -1,20 +0,0 @@ ---- 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 deleted file mode 100644 index 384f38588ae6..000000000000 --- a/sysutils/conky/files/patch-src_fs.c +++ /dev/null @@ -1,12 +0,0 @@ ---- 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 deleted file mode 100644 index 12e205fd5308..000000000000 --- a/sysutils/conky/files/patch-src_users.c +++ /dev/null @@ -1,144 +0,0 @@ ---- 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) { |