diff --git a/sysutils/conky/Makefile b/sysutils/conky/Makefile index 5e663da48c0..1f9feafa241 100644 --- a/sysutils/conky/Makefile +++ b/sysutils/conky/Makefile @@ -1,10 +1,11 @@ -# $OpenBSD: Makefile,v 1.13 2010/03/21 11:35:26 ajacoutot Exp $ +# $OpenBSD: Makefile,v 1.14 2010/04/27 20:56:11 sthen Exp $ ONLY_FOR_ARCHS= ${APM_ARCHS} COMMENT= light-weight system monitor DISTNAME= conky-1.7.2 +PKGNAME= ${DISTNAME}p0 CATEGORIES= sysutils HOMEPAGE= http://conky.sourceforge.net/ diff --git a/sysutils/conky/patches/patch-configure b/sysutils/conky/patches/patch-configure index 03a301e43e2..de658c73577 100644 --- a/sysutils/conky/patches/patch-configure +++ b/sysutils/conky/patches/patch-configure @@ -1,7 +1,7 @@ -$OpenBSD: patch-configure,v 1.1 2009/11/23 16:46:24 benoit Exp $ ---- configure.orig Mon Sep 21 11:48:29 2009 -+++ configure Mon Sep 21 11:48:54 2009 -@@ -19845,7 +19845,7 @@ +$OpenBSD: patch-configure,v 1.2 2010/04/27 20:56:11 sthen Exp $ +--- configure.orig Tue Aug 25 00:01:58 2009 ++++ configure Tue Apr 27 19:50:09 2010 +@@ -19845,7 +19845,7 @@ $as_echo "$ac_cv_search_clock_gettime" >&6; } ac_res=$ac_cv_search_clock_gettime if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" diff --git a/sysutils/conky/patches/patch-src_openbsd_c b/sysutils/conky/patches/patch-src_openbsd_c new file mode 100644 index 00000000000..150fbc24cae --- /dev/null +++ b/sysutils/conky/patches/patch-src_openbsd_c @@ -0,0 +1,33 @@ +$OpenBSD: patch-src_openbsd_c,v 1.8 2010/04/27 20:56:11 sthen Exp $ +--- src/openbsd.c.orig Sat Aug 8 21:05:55 2009 ++++ src/openbsd.c Tue Apr 27 20:40:38 2010 +@@ -454,14 +454,13 @@ void update_obsd_sensors() + + dev = obsd_sensors.device; // FIXME: read more than one device + +- /* for (dev = 0; dev < MAXSENSORDEVICES; dev++) { */ ++ for (dev = 0; dev < MAXSENSORDEVICES; dev++) { + mib[2] = dev; + if (sysctl(mib, 3, &sensordev, &sdlen, NULL, 0) == -1) { +- if (errno != ENOENT) { +- warn("sysctl"); +- } +- return; +- // continue; ++ if (errno == ENOENT) /* end of sensors */ ++ return; ++ if (errno == ENXIO) /* missing e.g. usb sensor that was unplugged */ ++ continue; + } + for (type = 0; type < SENSOR_MAX_TYPES; type++) { + mib[3] = type; +@@ -496,7 +495,8 @@ void update_obsd_sensors() + sensor_cnt++; + } + } +- /* } */ ++ break; // FIXME: read more than one device ++ } + + init_sensors = 1; + } diff --git a/sysutils/conky/patches/patch-src_openbsd_h b/sysutils/conky/patches/patch-src_openbsd_h index 2129a07ac30..0ffe5ecc456 100644 --- a/sysutils/conky/patches/patch-src_openbsd_h +++ b/sysutils/conky/patches/patch-src_openbsd_h @@ -1,11 +1,45 @@ -$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_ +$OpenBSD: patch-src_openbsd_h,v 1.3 2010/04/27 20:56:11 sthen Exp $ +--- src/openbsd.h.orig Sat Aug 8 21:05:55 2009 ++++ src/openbsd.h Tue Apr 27 20:38:57 2010 +@@ -11,38 +11,15 @@ 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); + ++#ifndef MAXSENSORDEVICES ++#define MAXSENSORDEVICES 1024 ++#endif + #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_*/ +-#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; - #include "common.h" -+#include - #include - #include - #include