From 5fd4c6e74350d34cb2fd4f70a8e731b72529f770 Mon Sep 17 00:00:00 2001 From: sthen Date: Sun, 10 May 2009 19:07:47 +0000 Subject: [PATCH] update to 1.7.0 and add no_x11 flavour (useful for dwm's status bar or with dzen2). ok jasper@, Vlad Glagolev (maintainer). --- sysutils/conky/Makefile | 20 ++++-- sysutils/conky/distinfo | 10 +-- .../conky/patches/patch-src_conf_cookie_c | 14 ++++ sysutils/conky/patches/patch-src_fs_c | 21 ------ sysutils/conky/patches/patch-src_openbsd_c | 66 +++++-------------- sysutils/conky/patches/patch-src_openbsd_h | 41 ++++-------- 6 files changed, 61 insertions(+), 111 deletions(-) create mode 100644 sysutils/conky/patches/patch-src_conf_cookie_c delete mode 100644 sysutils/conky/patches/patch-src_fs_c diff --git a/sysutils/conky/Makefile b/sysutils/conky/Makefile index a9498c2baee..1be3d15f99d 100644 --- a/sysutils/conky/Makefile +++ b/sysutils/conky/Makefile @@ -1,12 +1,11 @@ -# $OpenBSD: Makefile,v 1.9 2008/10/01 20:14:09 landry Exp $ +# $OpenBSD: Makefile,v 1.10 2009/05/10 19:07:47 sthen Exp $ # we use "macppc" and not "powerpc" on purpose here ; i.e. apm(4) needed ONLY_FOR_ARCHS= amd64 arm i386 macppc sparc sparc64 COMMENT= light-weight system monitor -DISTNAME= conky-1.6.1 -PKGNAME= ${DISTNAME}p0 +DISTNAME= conky-1.7.0 CATEGORIES= sysutils HOMEPAGE= http://conky.sourceforge.net/ @@ -21,8 +20,7 @@ PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes -WANTLIB= X11 Xau Xdamage Xdmcp Xext Xfixes Xft Xrender c crypto \ - expat fontconfig freetype kvm m ossaudio pthread ssl z +WANTLIB= c crypto kvm m ossaudio pthread ssl z MODULES= devel/gettext @@ -32,11 +30,23 @@ LIB_DEPENDS= glib-2.0::devel/glib2 \ xml2::textproc/libxml USE_LIBTOOL= Yes + +FLAVORS= no_x11 +FLAVOR?= + +.if ${FLAVOR:L:Mno_x11} +CONFIGURE_ARGS+=--disable-double-buffer \ + --disable-x11 +.else +WANTLIB+= X11 Xau Xdamage Xdmcp Xext Xfixes Xft Xrender \ + expat fontconfig freetype USE_X11= Yes +.endif CONFIGURE_STYLE=gnu CONFIGURE_ARGS+=--enable-mpd \ --enable-rss \ + --disable-config-output \ --disable-portmon post-install: diff --git a/sysutils/conky/distinfo b/sysutils/conky/distinfo index 67669f7800d..6ec190e0b37 100644 --- a/sysutils/conky/distinfo +++ b/sysutils/conky/distinfo @@ -1,5 +1,5 @@ -MD5 (conky-1.6.1.tar.gz) = xV5CKbcdOFbK0JPO/ozTiw== -RMD160 (conky-1.6.1.tar.gz) = TpfpePYPHk7Ecaf3DOyn2RVfxgM= -SHA1 (conky-1.6.1.tar.gz) = lMhZQwSBi0rQrf8luM1hTFnOsP0= -SHA256 (conky-1.6.1.tar.gz) = PH9bKcexl4Gko8Jt7VNLZ3KsUTQ+V7LCz2W8+NNTLz0= -SIZE (conky-1.6.1.tar.gz) = 605922 +MD5 (conky-1.7.0.tar.gz) = RNfUGuVW+4wZ5h6VBslqYA== +RMD160 (conky-1.7.0.tar.gz) = qVPFj0M/DkYOaWXL8gUr4gChLdg= +SHA1 (conky-1.7.0.tar.gz) = +e1SnsX+ZomAYbZjcG77XviV6zg= +SHA256 (conky-1.7.0.tar.gz) = 67k3rJQ0c9L/0WNXQWjuXprzNvFTITgobs3udOAUVb4= +SIZE (conky-1.7.0.tar.gz) = 601306 diff --git a/sysutils/conky/patches/patch-src_conf_cookie_c b/sysutils/conky/patches/patch-src_conf_cookie_c new file mode 100644 index 00000000000..9e7eef71780 --- /dev/null +++ b/sysutils/conky/patches/patch-src_conf_cookie_c @@ -0,0 +1,14 @@ +$OpenBSD: patch-src_conf_cookie_c,v 1.1 2009/05/10 19:07:47 sthen Exp $ +--- src/conf_cookie.c.orig Sun May 10 11:57:54 2009 ++++ src/conf_cookie.c Sun May 10 12:03:11 2009 +@@ -24,10 +24,3 @@ ssize_t conf_read(void *cookie, char *buf, size_t size + return i; + } + +-cookie_io_functions_t conf_cookie = { +- .read = &conf_read, +- .write = NULL, +- .seek = NULL, +- .close = NULL, +-}; +- diff --git a/sysutils/conky/patches/patch-src_fs_c b/sysutils/conky/patches/patch-src_fs_c deleted file mode 100644 index d67e0c067db..00000000000 --- a/sysutils/conky/patches/patch-src_fs_c +++ /dev/null @@ -1,21 +0,0 @@ -$OpenBSD: patch-src_fs_c,v 1.1 2008/09/30 09:54:19 landry Exp $ ---- src/fs.c.orig Mon Sep 22 22:20:03 2008 -+++ src/fs.c Mon Sep 22 22:21:42 2008 -@@ -44,7 +44,7 @@ - #include - #endif - --#if !defined(HAVE_STRUCT_STATFS_F_FSTYPENAME) && !defined(__FreeBSD__) -+#if !defined(HAVE_STRUCT_STATFS_F_FSTYPENAME) && !defined (__OpenBSD__) && !defined(__FreeBSD__) - #include - #endif - -@@ -124,7 +124,7 @@ static void update_fs_stat(struct fs_stat *fs) - void get_fs_type(const char *path, char *result) - { - --#if defined(HAVE_STRUCT_STATFS_F_FSTYPENAME) || defined(__FreeBSD__) -+#if defined(HAVE_STRUCT_STATFS_F_FSTYPENAME) || defined(__FreeBSD__) || defined (__OpenBSD__) - - struct statfs s; - if (statfs(path, &s) == 0) { diff --git a/sysutils/conky/patches/patch-src_openbsd_c b/sysutils/conky/patches/patch-src_openbsd_c index 65c24105323..23976fdad99 100644 --- a/sysutils/conky/patches/patch-src_openbsd_c +++ b/sysutils/conky/patches/patch-src_openbsd_c @@ -1,59 +1,25 @@ -$OpenBSD: patch-src_openbsd_c,v 1.5 2008/09/30 09:54:19 landry Exp $ ---- src/openbsd.c.orig Tue Jul 29 20:01:18 2008 -+++ src/openbsd.c Mon Sep 22 22:38:31 2008 -@@ -598,6 +598,7 @@ char get_freq(char *p_client_buffer, size_t client_buf +$OpenBSD: patch-src_openbsd_c,v 1.6 2009/05/10 19:07:47 sthen Exp $ +--- src/openbsd.c.orig Mon Mar 30 05:55:51 2009 ++++ src/openbsd.c Sun May 10 12:23:14 2009 +@@ -56,6 +56,10 @@ + #include - void update_top() - { -+ kvm_init(); - proc_find_top(info.cpu, info.memu); - } + #include "conky.h" ++#include "diskio.h" ++#include "logging.h" ++#include "openbsd.h" ++#include "top.h" -@@ -654,6 +655,10 @@ cleanup: - } + #define MAXSHOWDEVS 16 + +@@ -656,6 +660,10 @@ cleanup: #endif -+void clear_diskio_stats() + void clear_diskio_stats() +{ +} + - void update_diskio() ++struct diskio_stat *prepare_diskio_stat(const char *s) { - return; /* XXX: implement? hifi: not sure how */ -@@ -695,18 +700,22 @@ inline void proc_find_top(struct process **cpu, struct - struct process *processes; - int mib[2]; + } -- int total_pages; -+ u_int total_pages; -+ int64_t usermem; - int pagesize = getpagesize(); - - /* we get total pages count again to be sure it is up to date */ - mib[0] = CTL_HW; -- mib[1] = HW_USERMEM; -- size_t size = sizeof(total_pages); -+ mib[1] = HW_USERMEM64; -+ size_t size = sizeof(usermem); - -- if (sysctl(mib, 2, &total_pages, &size, NULL, 0) == -1) { -- ERR("error reading nmempages"); -+ if (sysctl(mib, 2, &usermem, &size, NULL, 0) == -1) { -+ ERR("error reading usermem"); - } - -+ /* translate bytes into page count */ -+ total_pages = usermem / pagesize; -+ - int max_size = sizeof(struct kinfo_proc2); - - p = kvm_getproc2(kd, KERN_PROC_ALL, 0, max_size, &n_processes); -@@ -717,7 +726,7 @@ inline void proc_find_top(struct process **cpu, struct - processes[j].pid = p[i].p_pid; - processes[j].name = strndup(p[i].p_comm, text_buffer_size); - processes[j].amount = 100.0 * p[i].p_pctcpu / FSCALE; -- processes[j].totalmem = (float) (p[i].p_vm_rssize * pagesize / -+ processes[j].totalmem = (float) (p[i].p_vm_rssize / - (float) total_pages) * 100.0; - j++; - } diff --git a/sysutils/conky/patches/patch-src_openbsd_h b/sysutils/conky/patches/patch-src_openbsd_h index e7472aedc60..2129a07ac30 100644 --- a/sysutils/conky/patches/patch-src_openbsd_h +++ b/sysutils/conky/patches/patch-src_openbsd_h @@ -1,30 +1,11 @@ -$OpenBSD: patch-src_openbsd_h,v 1.1 2008/09/30 09:54:19 landry Exp $ ---- src/openbsd.h.orig Mon Sep 22 22:16:43 2008 -+++ src/openbsd.h Mon Sep 22 22:16:24 2008 -@@ -0,0 +1,26 @@ -+#ifndef OPENBSD_H_ -+#define OPENBSD_H_ -+ -+#include "common.h" -+#include -+#include -+#include -+ -+void update_obsd_sensors(void); -+void get_obsd_vendor(char *buf, size_t client_buffer_size); -+void get_obsd_product(char *buf, size_t client_buffer_size); -+ -+#define OBSD_MAX_SENSORS 256 -+struct obsd_sensors_struct { -+ int device; -+ float temp[MAXSENSORDEVICES][OBSD_MAX_SENSORS]; -+ unsigned int fan[MAXSENSORDEVICES][OBSD_MAX_SENSORS]; -+ float volt[MAXSENSORDEVICES][OBSD_MAX_SENSORS]; -+}; -+struct obsd_sensors_struct obsd_sensors; -+ -+#if defined(i386) || defined(__i386__) -+typedef struct apm_power_info *apm_info_t; -+#endif -+ -+#endif /*OPENBSD_H_*/ +$OpenBSD: patch-src_openbsd_h,v 1.2 2009/05/10 19:07:47 sthen Exp $ +--- src/openbsd.h.orig Mon Mar 30 05:44:25 2009 ++++ src/openbsd.h Sun May 10 12:07:14 2009 +@@ -2,6 +2,7 @@ + #define OPENBSD_H_ + + #include "common.h" ++#include + #include + #include + #include