summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--x11/icewm/Makefile11
-rw-r--r--x11/icewm/files/patch-sum8
-rw-r--r--x11/icewm/patches/patch-aa10
-rw-r--r--x11/icewm/patches/patch-ab68
-rw-r--r--x11/icewm/patches/patch-ac15
-rw-r--r--x11/icewm/patches/patch-ad12
-rw-r--r--x11/icewm/patches/patch-ae16
7 files changed, 133 insertions, 7 deletions
diff --git a/x11/icewm/Makefile b/x11/icewm/Makefile
index 933d1ee1b7a..18720ae4d41 100644
--- a/x11/icewm/Makefile
+++ b/x11/icewm/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2000/02/20 17:56:16 wiz Exp $
+# $NetBSD: Makefile,v 1.6 2000/03/07 03:35:43 jlam Exp $
#
DISTNAME= icewm-1.0.2
@@ -17,6 +17,15 @@ CONFLICTS+= icewm-gnome-[0-9]*
GNU_CONFIGURE= YES
USE_X11BASE= YES
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "NetBSD"
+.if exists(/usr/include/machine/apmvar.h)
+CPPFLAGS+= -DCONFIG_APM
+CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}"
+.endif
+.endif
+
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/icewm
.for f in BUGS CHANGES COPYING FAQ README TODO doc/icewm.html
diff --git a/x11/icewm/files/patch-sum b/x11/icewm/files/patch-sum
index 2d664f4ef12..78003fc6862 100644
--- a/x11/icewm/files/patch-sum
+++ b/x11/icewm/files/patch-sum
@@ -1,3 +1,7 @@
-$NetBSD: patch-sum,v 1.1 2000/03/03 15:55:39 jlam Exp $
+$NetBSD: patch-sum,v 1.2 2000/03/07 03:35:44 jlam Exp $
-MD5 (patch-aa) = 222d576ff3f645a87fd3c37c5a988861
+MD5 (patch-aa) = e14f55369b97e470dba2ec2941124c9a
+MD5 (patch-ab) = c4341b61b19b4a16ac86a85a64f8426e
+MD5 (patch-ac) = 89fa90d5957d5f6fbb50a9de63237741
+MD5 (patch-ad) = 4d5a4ad0a012707a3851a89e1e1d0159
+MD5 (patch-ae) = 3a1818b96e9a2c40fa1c9e05168273a0
diff --git a/x11/icewm/patches/patch-aa b/x11/icewm/patches/patch-aa
index 94c45da1160..035f33f1746 100644
--- a/x11/icewm/patches/patch-aa
+++ b/x11/icewm/patches/patch-aa
@@ -1,10 +1,12 @@
-$NetBSD: patch-aa,v 1.1 2000/03/03 15:55:40 jlam Exp $
+$NetBSD: patch-aa,v 1.2 2000/03/07 03:35:44 jlam Exp $
--- sysdep.in.orig Mon Nov 8 06:45:52 1999
-+++ sysdep.in Fri Mar 3 02:21:51 2000
-@@ -2,5 +2,5 @@
++++ sysdep.in Mon Mar 6 22:20:48 2000
+@@ -1,6 +1,6 @@
+ CXX = @CXX@
LD = @CXX_LINK@
- SYS_CFLAGS = @CXXFLAGS@ @DEFS@
+-SYS_CFLAGS = @CXXFLAGS@ @DEFS@
++SYS_CFLAGS = @CXXFLAGS@ @CPPFLAGS@ @DEFS@
SYS_INCDIRS =
-SYS_LIBDIRS =
+SYS_LIBDIRS = @LDFLAGS@
diff --git a/x11/icewm/patches/patch-ab b/x11/icewm/patches/patch-ab
new file mode 100644
index 00000000000..e35766a7b1d
--- /dev/null
+++ b/x11/icewm/patches/patch-ab
@@ -0,0 +1,68 @@
+$NetBSD: patch-ab,v 1.1 2000/03/07 03:35:45 jlam Exp $
+
+--- src/aapm.cc.orig Sun Feb 13 10:28:36 2000
++++ src/aapm.cc Mon Mar 6 22:22:36 2000
+@@ -22,11 +22,18 @@
+
+ #ifdef CONFIG_APM
+
++#if defined(__NetBSD__)
++#include <sys/ioctl.h>
++#include <machine/apmvar.h>
++#include <fcntl.h>
++#endif
++
+ YColor *YApm::apmBg = 0;
+ YColor *YApm::apmFg = 0;
+ YFont *YApm::apmFont = 0;
+
+ void ApmStr(char *s, bool Tool) {
++#ifdef __linux__
+ char buf[45];
+ int len, i, fd = open("/proc/apm", O_RDONLY);
+ char driver[16];
+@@ -97,6 +104,44 @@
+ strcat(s," - Charging");
+ else
+ strcat(s,"M");
++#elif defined(__NetBSD__)
++ struct apm_power_info aip;
++ int fd = open(APMDEV, O_RDONLY);
++
++ if (fd == -1) {
++ return;
++ }
++
++ if (ioctl(fd, APM_IOC_GETPOWER, &aip) == -1) {
++ fprintf(stderr, "ioctl failed on APMDEV");
++ return;
++ }
++
++ if (!Tool) {
++ if (taskBarShowApmTime) {
++ if (aip.minutes_left == 0) {
++ sprintf(s, "%02d", aip.battery_life);
++ } else
++ sprintf(s, "%d:%02d", aip.minutes_left/60, aip.minutes_left%60);
++ } else
++ sprintf(s, "%02d", aip.battery_life);
++ } else {
++ sprintf(s, "%d%%", aip.battery_life);
++ }
++
++ if (aip.ac_state == APM_AC_ON)
++ if (Tool)
++ strcat(s," - Power");
++ else
++ strcat(s,"P");
++ if (aip.battery_state == APM_BATT_CHARGING)
++ if (Tool)
++ strcat(s," - Charging");
++ else
++ strcat(s,"M");
++
++ close(fd);
++#endif
+ }
+
+ YApm::YApm(YWindow *aParent): YWindow(aParent) {
diff --git a/x11/icewm/patches/patch-ac b/x11/icewm/patches/patch-ac
new file mode 100644
index 00000000000..abc6f49e4ff
--- /dev/null
+++ b/x11/icewm/patches/patch-ac
@@ -0,0 +1,15 @@
+$NetBSD: patch-ac,v 1.1 2000/03/07 03:35:45 jlam Exp $
+
+--- src/aapm.h.orig Sun Dec 5 11:47:02 1999
++++ src/aapm.h Mon Mar 6 22:20:48 2000
+@@ -3,6 +3,10 @@
+ #include "ytimer.h"
+
+ #ifdef CONFIG_APM
++#if defined(__NetBSD__)
++#define APMDEV "/dev/apm"
++#endif
++
+ class YApm: public YWindow, public YTimerListener {
+ public:
+ YApm(YWindow *aParent = 0);
diff --git a/x11/icewm/patches/patch-ad b/x11/icewm/patches/patch-ad
new file mode 100644
index 00000000000..7b3840c5f7f
--- /dev/null
+++ b/x11/icewm/patches/patch-ad
@@ -0,0 +1,12 @@
+$NetBSD: patch-ad,v 1.1 2000/03/07 03:35:45 jlam Exp $
+
+--- src/config.h.orig Mon Nov 8 06:45:52 1999
++++ src/config.h Mon Mar 6 22:20:48 2000
+@@ -31,6 +31,6 @@
+ #define CONFIG_NET_STATUS
+
+ /* apm status */
+-#define CONFIG_APM
++/* #define CONFIG_APM */
+
+ #endif
diff --git a/x11/icewm/patches/patch-ae b/x11/icewm/patches/patch-ae
new file mode 100644
index 00000000000..86cfa70c25e
--- /dev/null
+++ b/x11/icewm/patches/patch-ae
@@ -0,0 +1,16 @@
+$NetBSD: patch-ae,v 1.1 2000/03/07 03:35:45 jlam Exp $
+
+--- src/wmtaskbar.cc.orig Sun Feb 6 11:15:45 2000
++++ src/wmtaskbar.cc Mon Mar 6 22:20:48 2000
+@@ -253,7 +253,11 @@
+ } else
+ fClock = 0;
+ #ifdef CONFIG_APM
++#ifdef __linux__
+ if (taskBarShowApm && access("/proc/apm", 0) == 0) {
++#elif defined(__NetBSD__)
++ if (taskBarShowApm && access(APMDEV, 0) == 0) {
++#endif
+ fApm = new YApm(this);
+ if (fApm->height() + ADD1 > ht) ht = fApm->height() + ADD1;
+ } else