update to 1.7.0 and add no_x11 flavour (useful for dwm's status bar
or with dzen2). ok jasper@, Vlad Glagolev (maintainer).
This commit is contained in:
parent
8177e9bf50
commit
5fd4c6e743
@ -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:
|
||||
|
@ -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
|
||||
|
14
sysutils/conky/patches/patch-src_conf_cookie_c
Normal file
14
sysutils/conky/patches/patch-src_conf_cookie_c
Normal file
@ -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,
|
||||
-};
|
||||
-
|
@ -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 <sys/mount.h>
|
||||
#endif
|
||||
|
||||
-#if !defined(HAVE_STRUCT_STATFS_F_FSTYPENAME) && !defined(__FreeBSD__)
|
||||
+#if !defined(HAVE_STRUCT_STATFS_F_FSTYPENAME) && !defined (__OpenBSD__) && !defined(__FreeBSD__)
|
||||
#include <mntent.h>
|
||||
#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) {
|
@ -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 <net80211/ieee80211_ioctl.h>
|
||||
|
||||
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++;
|
||||
}
|
||||
|
@ -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 <sys/sysctl.h>
|
||||
+#include <sys/sensors.h>
|
||||
+#include <machine/apmvar.h>
|
||||
+
|
||||
+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 <sys/param.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/sensors.h>
|
||||
#include <machine/apmvar.h>
|
||||
|
Loading…
Reference in New Issue
Block a user