summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--x11/bbapm/DESCR3
-rw-r--r--x11/bbapm/Makefile31
-rw-r--r--x11/bbapm/PLIST8
-rw-r--r--x11/bbapm/distinfo18
-rw-r--r--x11/bbapm/patches/patch-aa35
-rw-r--r--x11/bbapm/patches/patch-ab64
-rw-r--r--x11/bbapm/patches/patch-ac38
-rw-r--r--x11/bbapm/patches/patch-ad26
-rw-r--r--x11/bbapm/patches/patch-ae13
-rw-r--r--x11/bbapm/patches/patch-af119
-rw-r--r--x11/bbapm/patches/patch-ag14
-rw-r--r--x11/bbapm/patches/patch-ah26
-rw-r--r--x11/bbapm/patches/patch-ai18
-rw-r--r--x11/bbapm/patches/patch-aj26
-rw-r--r--x11/bbapm/patches/patch-ak25
-rw-r--r--x11/bbapm/patches/patch-al74
-rw-r--r--x11/bbapm/patches/patch-am14
-rw-r--r--x11/bbapm/patches/patch-an8
18 files changed, 560 insertions, 0 deletions
diff --git a/x11/bbapm/DESCR b/x11/bbapm/DESCR
new file mode 100644
index 00000000000..df43f6ce968
--- /dev/null
+++ b/x11/bbapm/DESCR
@@ -0,0 +1,3 @@
+bbapm is an APM meter for Blackbox, which shows the battery status of your
+laptop in a decorated window, simulating the look of the Blackbox toolbar.
+bbapm is based on bbsload.
diff --git a/x11/bbapm/Makefile b/x11/bbapm/Makefile
new file mode 100644
index 00000000000..444038432b5
--- /dev/null
+++ b/x11/bbapm/Makefile
@@ -0,0 +1,31 @@
+# $NetBSD: Makefile,v 1.1.1.1 2002/09/07 20:22:52 jschauma Exp $
+# based on
+# FreeBSD port:
+# ID: ports/x11-wm/bbapm/Makefile,v 1.5 2002/09/02 01:30:15 lioux Exp
+# OpenBSD patch for apm, available from:
+# http://bbtools.windsofstorm.net/sources/bbapm-0.0.1-openbsd-patch.diff
+
+DISTNAME= bbapm-0.0.1
+CATEGORIES= x11 wm
+MASTER_SITES= http://bbtools.windsofstorm.net/sources/
+
+MAINTAINER= jschauma@netbsd.org
+HOMEPAGE= http://bbtools.windsofstorm.net/
+COMMENT= APM monitor for Blackbox
+
+GNU_CONFIGURE= yes
+LDFLAGS+= -Wl,-R${X11BASE}/lib
+
+post-patch:
+ ${SED} -e 's,@PREFIX@,${PREFIX},' ${WRKSRC}/data/bbapm.1.tmp > \
+ ${WRKSRC}/data/bbapm.1
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/bbapm ${PREFIX}/bin
+ ${INSTALL_MAN} ${WRKSRC}/data/bbapm.1 ${PREFIX}/man/man1/
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/bbtools
+.for a in README.bbapm bbapm.conf bbapm.nobb bbapm.style
+ ${INSTALL_DATA} ${WRKSRC}/data/${a} ${PREFIX}/share/bbtools
+.endfor
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/x11/bbapm/PLIST b/x11/bbapm/PLIST
new file mode 100644
index 00000000000..0bef7818c3e
--- /dev/null
+++ b/x11/bbapm/PLIST
@@ -0,0 +1,8 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2002/09/07 20:22:52 jschauma Exp $
+bin/bbapm
+man/man1/bbapm.1
+share/bbtools/README.bbapm
+share/bbtools/bbapm.conf
+share/bbtools/bbapm.nobb
+share/bbtools/bbapm.style
+@unexec ${RMDIR} %D/share/bbtools 2>/dev/null || true
diff --git a/x11/bbapm/distinfo b/x11/bbapm/distinfo
new file mode 100644
index 00000000000..5122c468322
--- /dev/null
+++ b/x11/bbapm/distinfo
@@ -0,0 +1,18 @@
+$NetBSD: distinfo,v 1.1.1.1 2002/09/07 20:22:52 jschauma Exp $
+
+MD5 (bbapm-0.0.1.tar.gz) = 4d2629959bd907696c7765b7c34bc54f
+MD5 (bbapm-0.0.1-freebsd-patch-2.diff) = 8b9242c0fa6067d9d7c10dcbdc0cb8c7
+SHA1 (patch-aa) = 82be3cca979f6a8ecef1c15f85af44865c998587
+SHA1 (patch-ab) = 147dd5cfebdbbd62440d0303959fbc2e369bb203
+SHA1 (patch-ac) = c13aac44362ea859c04d1357dea8e3f2d1aeb2c6
+SHA1 (patch-ad) = efa754eadabb8e7778332aa5b9fba45ba9657ce0
+SHA1 (patch-ae) = d8ab975ead13f9a0e3d6493a1ac4de8ad10baea0
+SHA1 (patch-af) = b17cb4c3a6b12f1e387783bd62b9ef582d9eb2c3
+SHA1 (patch-ag) = e3655cf7fae22b4c5279af2d4cad954f76e17912
+SHA1 (patch-ah) = 4f0d79388e262d3063a1313024d3eb1e885880d4
+SHA1 (patch-ai) = 9cfdfbef21513ac8135b01068f2cc9eb18b99df2
+SHA1 (patch-aj) = c7d41606be458658460119e47f53ee68c91126e7
+SHA1 (patch-ak) = 7087de90b4464bd7f5983b02bd55f4396a2fa692
+SHA1 (patch-al) = 1f6c7f6833f4a79d63f8f53273d670fbc6acfbe6
+SHA1 (patch-am) = 71db1ba7e9caa9c0fd1481a06ee4ba27029bb84b
+SHA1 (patch-an) = 90188e66af22e603aa75c724c2ec68593939d0de
diff --git a/x11/bbapm/patches/patch-aa b/x11/bbapm/patches/patch-aa
new file mode 100644
index 00000000000..d91634a3819
--- /dev/null
+++ b/x11/bbapm/patches/patch-aa
@@ -0,0 +1,35 @@
+$NetBSD: patch-aa,v 1.1.1.1 2002/09/07 20:22:54 jschauma Exp $
+
+--- Baseresource.cc.orig Mon Aug 16 13:40:24 1999
++++ Baseresource.cc Sat Sep 7 15:58:39 2002
+@@ -27,6 +27,9 @@
+ {
+ bbtool = toolwindow;
+
++ style.conf_filename = NULL;
++ style.style_filename = NULL;
++
+ if (bbtool->default_config) {
+ ReadDefaultResource();
+ ResourceType = DEFAULT;
+@@ -210,7 +213,7 @@
+ char *
+ value_type;
+
+- if (!ReadResourceFromFilename("bbsload.styleFile", "Bbsload.StyleFile")) {
++ if (!ReadResourceFromFilename("bbapm.styleFile", "Bbapm.StyleFile")) {
+ /*
+ * use default stylefile
+ */
+@@ -278,9 +281,9 @@
+ fprintf(stderr, "Using internal defaults.\n");
+ } else {
+ XrmCombineDatabase(db, &resource_db, False);
+- if (!ReadResourceFromFilename("bbsload.styleFile", "Bbsload.StyleFile")) {
++ if (!ReadResourceFromFilename("bbapm.styleFile", "Bbapm.StyleFile")) {
+ fprintf(stderr,
+- "Could not open default style file bbsload.styleFile: in %s\n",
++ "Could not open default style file bbapm.styleFile: in %s\n",
+ style.conf_filename);
+ fprintf(stderr, "Using internal defaults.\n");
+ } else
diff --git a/x11/bbapm/patches/patch-ab b/x11/bbapm/patches/patch-ab
new file mode 100644
index 00000000000..e7afe54542b
--- /dev/null
+++ b/x11/bbapm/patches/patch-ab
@@ -0,0 +1,64 @@
+$NetBSD: patch-ab,v 1.1.1.1 2002/09/07 20:22:54 jschauma Exp $
+
+--- Basewindow.cc.orig Sun Aug 15 10:43:55 1999
++++ Basewindow.cc Sat Sep 7 16:14:34 2002
+@@ -23,6 +23,11 @@
+
+ Basewindow::Basewindow(int argc,char **argv)
+ {
++ dpy = NULL;
++ v = NULL;
++ image_control = NULL;
++ bbconfig_filename = NULL;
++
+ display_name=NULL;
+ config_filename=NULL;
+ position=NULL;
+@@ -112,18 +117,6 @@
+ if (bbconfig_filename||default_config) { Usage(); exit(2); };
+ config_filename=argv[i];
+ }
+- else if ((!strcmp(argv[i],"-default"))|(!strcmp(argv[i],"-d")))
+- {
+- if (bbconfig_filename||config_filename) { Usage(); exit(2); };
+- { Usage(); exit(2); };
+- default_config=True;
+- }
+- else if ((!strcmp(argv[i],"-mailbox"))|(!strcmp(argv[i],"-m")))
+- {
+- if(++i==argc) { Usage(); exit(2); };
+- spooldir=argv[i];
+- }
+-
+ else if ( (!strcmp(argv[i],"-v")) || (!strcmp(argv[i],"-version")))
+ {
+ fprintf(stderr," %s version %s\n",BBTOOL,BBTOOL_VERSION);
+@@ -153,19 +146,19 @@
+ void Basewindow::Usage()
+ {
+ fprintf(stderr,"%s version %s \n\n",BBTOOL,BBTOOL_VERSION);
+- fprintf(stderr,"%s [-display <display name>] [-config <filename>]\n",BBTOOL);
+- fprintf(stderr," [-spooldir] [-version] [-help]\n");
+- fprintf(stderr," [[-position] | [-pos]] <position>\n\n");
+- fprintf(stderr,"-d[isplay] <display name> X server to connect to\n");
+- fprintf(stderr,"-c[onfig] <filename> Alternate config file\n");
++ fprintf(stderr,"%s [-bb[config] <filename>] [-config <filename>]\n",BBTOOL);
++ fprintf(stderr," [-d[isplay] <display>] [-h[elp]]\n");
++ fprintf(stderr," [-p[osition] <position>]\n");
++ fprintf(stderr," [-s[hape]] [-v[ersion]]\n");
++ fprintf(stderr," [-w[ithdrawn]]\n");
+ fprintf(stderr,"-bb[config] <filename> Alternate Blackbox config file\n");
+- fprintf(stderr,"-def[ault] Fall back on default configuration\n");
+- fprintf(stderr,"-m[ailbox] <filename> Filename of mailbox.\n");
+- fprintf(stderr,"-v[ersion] Display version number\n");
++ fprintf(stderr,"-c[onfig] <filename> Alternate config file\n");
++ fprintf(stderr,"-d[isplay] <display> Specify display\n");
+ fprintf(stderr,"-h[elp] Display this help\n");
+ fprintf(stderr,"-p[osition] <position> Set position of window\n");
+ fprintf(stderr," <position> = [+]|[-]x[+]|[-]y\n");
+- fprintf(stderr,"-w[withdrawn] Place tool in the Slit\n");
+ fprintf(stderr,"-s[hape] Don't display groundplate\n\n");
++ fprintf(stderr,"-v[ersion] Display version number\n");
++ fprintf(stderr,"-w[withdrawn] Place tool in the Slit\n");
+ }
+
diff --git a/x11/bbapm/patches/patch-ac b/x11/bbapm/patches/patch-ac
new file mode 100644
index 00000000000..86a2e3fe46e
--- /dev/null
+++ b/x11/bbapm/patches/patch-ac
@@ -0,0 +1,38 @@
+$NetBSD: patch-ac,v 1.1.1.1 2002/09/07 20:22:54 jschauma Exp $
+
+--- Image.cc.orig Sun Aug 15 07:43:55 1999
++++ Image.cc Sat Aug 4 20:52:40 2001
+@@ -50,6 +50,17 @@
+ BImage::BImage(BImageControl *c, unsigned int w, unsigned int h) {
+ control = c;
+
++ colors = NULL;
++ red = NULL;
++ green = NULL;
++ blue = NULL;
++ tr = NULL;
++ tg = NULL;
++ tb = NULL;
++
++ from.allocated = 0;
++ to.allocated = 0;
++
+ width = ((signed) w > 0) ? w : 1;
+ height = ((signed) h > 0) ? h : 1;
+
+@@ -843,7 +854,14 @@
+ window = blackbox->getRootWindow();
+ screen_number = blackbox->getScreenNumber();
+
+- colors = 0;
++ colors = NULL;
++ red_err = NULL;
++ green_err = NULL;
++ blue_err = NULL;
++ next_red_err = NULL;
++ next_green_err = NULL;
++ next_blue_err = NULL;
++ cache = NULL;
+ colors_per_channel = ncolors = 0;
+
+ int count;
diff --git a/x11/bbapm/patches/patch-ad b/x11/bbapm/patches/patch-ad
new file mode 100644
index 00000000000..c79a868b147
--- /dev/null
+++ b/x11/bbapm/patches/patch-ad
@@ -0,0 +1,26 @@
+$NetBSD: patch-ad,v 1.1.1.1 2002/09/07 20:22:54 jschauma Exp $
+
+--- Image.hh.orig Sun Aug 15 07:43:55 1999
++++ Image.hh Sat Aug 4 20:52:40 2001
+@@ -35,11 +35,21 @@
+ class BImage;
+ class BImageControl;
+
++#if 0
+ typedef struct BColor {
+ int allocated;
+ unsigned char red, green, blue;
+ unsigned long pixel;
+ };
++#else
++class BColor {
++public:
++ int allocated;
++ unsigned char red, green, blue;
++ unsigned long pixel;
++ BColor::BColor() { allocated = False; }
++};
++#endif
+
+ typedef struct BTexture {
+ BColor color, colorTo, hiColor, loColor;
diff --git a/x11/bbapm/patches/patch-ae b/x11/bbapm/patches/patch-ae
new file mode 100644
index 00000000000..7626074a8c0
--- /dev/null
+++ b/x11/bbapm/patches/patch-ae
@@ -0,0 +1,13 @@
+$NetBSD: patch-ae,v 1.1.1.1 2002/09/07 20:22:54 jschauma Exp $
+
+--- LinkedList.hh.orig Fri Sep 6 20:14:52 2002
++++ LinkedList.hh Fri Sep 6 20:14:58 2002
+@@ -63,7 +63,7 @@
+ int elements;
+ __llist_node *_first, *_last;
+
+- friend __llist_iterator;
++ friend class __llist_iterator;
+
+
+ protected:
diff --git a/x11/bbapm/patches/patch-af b/x11/bbapm/patches/patch-af
new file mode 100644
index 00000000000..da9ef2aafda
--- /dev/null
+++ b/x11/bbapm/patches/patch-af
@@ -0,0 +1,119 @@
+$NetBSD: patch-af,v 1.1.1.1 2002/09/07 20:22:53 jschauma Exp $
+
+--- bbapm.cc.orig Sat Sep 7 13:50:55 2002
++++ bbapm.cc Sat Sep 7 14:04:14 2002
+@@ -28,6 +28,9 @@
+ ToolWindow::ToolWindow(int argc, char **argv):
+ Basewindow(argc, argv)
+ {
++ resource = NULL;
++ load = NULL;
++
+ close_app = False;
+ broken = False;
+
+@@ -308,13 +311,14 @@
+
+ if (!broken) {
+
++#if !(defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__))
+ if (apm_exists() < 0)
+ broken = True;
+- else {
++ else
++#endif
+ if ((apm_read(&apm))<0)
+ broken = True;
+ }
+- }
+
+ if (redraw)
+ Redraw();
+@@ -336,7 +340,11 @@
+ // loadbar to show that the battery is loading. A bit like GSM. But
+ // in this case the label will show how far the loading is done.
+ if ((resource->show.loading) &&
++#if !(defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__))
+ (apm.ac_line_status==1) &&
++#else
++ (apm.ac_state==1) &&
++#endif
+ (resource->show.percentage)) {
+ for (i=0; i < resource->loadbar.number_of_bars; i++) {
+ if (noLoadBarFilled>=i) {
+@@ -357,11 +365,23 @@
+ if (resource->show.percentage) {
+ #ifdef DEBUG
+ cerr << "Toolwindow::Redraw: drawing percentage " <<
++#if defined(__NetBSD__) || defined(__OpenBSD__)
++ apm.battery_life << " " <<
++#elif defined(__FreeBSD__)
++ apm.ai_batt_life << " " <<
++#else
+ apm.battery_percentage << " " <<
++#endif
+ resource->loadbar.number_of_bars << endl;
+ #endif
+ for (i = 0; i < resource->loadbar.number_of_bars; i++) {
++#if defined(__NetBSD__) || defined(__OpenBSD__)
++ if (apm.battery_life >= load[i].level)
++#elif defined(__FreeBSD__)
++ if (apm.ai_batt_life >= load[i].level)
++#else
+ if (apm.battery_percentage >= load[i].level)
++#endif
+ XCopyArea(dpy, pixmap.loadbar_active, framewin, frameGC,
+ 2, load[i].y - 1,
+ load[i].width, load[i].height, load[i].x,
+@@ -389,7 +409,13 @@
+ XSetForeground(dpy, frameGC,
+ resource->label.percentage_textColor.pixel);
+
++#if defined(__NetBSD__) || defined(__OpenBSD__)
++ sprintf(t, "%03d%%", apm.battery_life);
++#elif defined(__FreeBSD__)
++ sprintf(t, "%03d%%", apm.ai_batt_life);
++#else
+ sprintf(t, "%03d%%", apm.battery_percentage);
++#endif
+ XDrawString(dpy, labelwin, frameGC, label.space_width,
+ (label.height + resource->label.font->ascent -
+ resource->label.font->descent) / 2,
+@@ -413,7 +439,13 @@
+ XSetForeground(dpy, frameGC,
+ resource->label.time_textColor.pixel);
+
++#if defined(__NetBSD__) || defined(__OpenBSD__)
++ sprintf(t, "%02d:%02d", apm.minutes_left/60, apm.minutes_left%60);
++#elif defined(__FreeBSD__)
++ sprintf(t, "%02d:%02d", apm.ai_batt_time/60, apm.ai_batt_time%60);
++#else
+ sprintf(t, "%02d:%02d", apm.battery_time/60, apm.battery_time%60);
++#endif
+ XDrawString(dpy, labelwin, frameGC, xposition,
+ (label.height + resource->label.font->ascent -
+ resource->label.font->descent) / 2, t, strlen(t));
+@@ -519,7 +551,11 @@
+ }
+ }
+
++#if !(defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__))
+ if (apm.ac_line_status==1) {
++#else
++ if (apm.ac_state==1) {
++#endif
+ if (time(NULL) - lastLoadingTime > resource->show.loadingTime) {
+ ReadAPM();
+ lastLoadingTime = time(NULL);
+@@ -565,6 +601,11 @@
+ int
+ main(int argc, char **argv)
+ {
++#if defined(__NetBSD__) || defined(__OpenBSD__)
++ apm_init();
++#elif defined(__FreeBSD__)
++ apm_exists();
++#endif
+ ToolWindow *
+ AppWindow = new ToolWindow(argc, argv);
+
diff --git a/x11/bbapm/patches/patch-ag b/x11/bbapm/patches/patch-ag
new file mode 100644
index 00000000000..ed41cf7200b
--- /dev/null
+++ b/x11/bbapm/patches/patch-ag
@@ -0,0 +1,14 @@
+$NetBSD: patch-ag,v 1.1.1.1 2002/09/07 20:22:53 jschauma Exp $
+
+--- resource.cc.orig Sat Sep 7 13:22:49 2002
++++ resource.cc Sat Sep 7 13:23:26 2002
+@@ -28,6 +28,9 @@
+ Resource::Resource(ToolWindow * toolwindow):
+ BaseResource(toolwindow)
+ {
++ frame.font = NULL;
++ label.font = NULL;
++
+ Load();
+ }
+
diff --git a/x11/bbapm/patches/patch-ah b/x11/bbapm/patches/patch-ah
new file mode 100644
index 00000000000..3ddc9f4c26b
--- /dev/null
+++ b/x11/bbapm/patches/patch-ah
@@ -0,0 +1,26 @@
+$NetBSD: patch-ah,v 1.1.1.1 2002/09/07 20:22:53 jschauma Exp $
+
+--- Makefile.in.orig Fri Aug 20 18:28:11 1999
++++ Makefile.in Sat Sep 7 15:36:22 2002
+@@ -70,10 +70,10 @@
+
+ SUBDIRS = data
+ bin_PROGRAMS = bbapm
+-bbapm_SOURCES = bbapm.cc Image.cc LinkedList.cc bbapm.hh Image.hh LinkedList.hh resource.cc resource.hh Baseresource.cc Baseresource.hh Basewindow.cc Basewindow.hh blackboxstyle.hh
++bbapm_SOURCES = bbapm.cc Image.cc LinkedList.cc bbapm.hh Image.hh LinkedList.hh resource.cc resource.hh Baseresource.cc Baseresource.hh Basewindow.cc Basewindow.hh blackboxstyle.hh net_apm.h net_apm.cc
+
+ EXTRA_DIST = BUGS TODO
+-bbapm_LDADD = @X_LIBS@ -lapm
++bbapm_LDADD = @X_LIBS@
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+ CONFIG_CLEAN_FILES = version.h
+@@ -88,7 +88,7 @@
+ X_EXTRA_LIBS = @X_EXTRA_LIBS@
+ X_PRE_LIBS = @X_PRE_LIBS@
+ bbapm_OBJECTS = bbapm.o Image.o LinkedList.o resource.o Baseresource.o \
+-Basewindow.o
++Basewindow.o net_apm.o
+ bbapm_DEPENDENCIES =
+ bbapm_LDFLAGS =
+ CXXFLAGS = @CXXFLAGS@
diff --git a/x11/bbapm/patches/patch-ai b/x11/bbapm/patches/patch-ai
new file mode 100644
index 00000000000..fe96f9d4db2
--- /dev/null
+++ b/x11/bbapm/patches/patch-ai
@@ -0,0 +1,18 @@
+$NetBSD: patch-ai,v 1.1.1.1 2002/09/07 20:22:53 jschauma Exp $
+
+--- bbapm.hh.orig Sat Sep 7 14:05:10 2002
++++ bbapm.hh Sat Sep 7 14:06:15 2002
+@@ -21,9 +21,13 @@
+ #ifndef __MAIN_HH
+ #define __MAIN_HH
+
++#if defined(__NetBSD__)
++#include "net_apm.h"
++#else
+ extern "C" {
+ #include <apm.h>
+ }
++#endif
+
+ #include "Image.hh"
+ #include "Basewindow.hh"
diff --git a/x11/bbapm/patches/patch-aj b/x11/bbapm/patches/patch-aj
new file mode 100644
index 00000000000..995a539c6ba
--- /dev/null
+++ b/x11/bbapm/patches/patch-aj
@@ -0,0 +1,26 @@
+$NetBSD: patch-aj,v 1.1.1.1 2002/09/07 20:22:53 jschauma Exp $
+
+--- /dev/null Sat Sep 7 13:47:40 2002
++++ net_apm.cc Sat Sep 7 14:08:07 2002
+@@ -0,0 +1,21 @@
++#include "net_apm.h"
++
++int apm_desc = -1;
++
++void apm_init() {
++ if ( (apm_desc = open( "/dev/apm", O_RDONLY ) ) == -1 ) {
++ printf("Error: cannot open APM device: /dev/apm: %s\n",
++ strerror( errno ) );
++ exit( 1 );
++ }
++}
++
++int apm_read( apm_info* a_info ) {
++ if( apm_desc < 0 )
++ return -1;
++
++ if ( ioctl( apm_desc, APM_IOC_GETPOWER, a_info ) == -1 )
++ return -1;
++ else
++ return 0;
++}
diff --git a/x11/bbapm/patches/patch-ak b/x11/bbapm/patches/patch-ak
new file mode 100644
index 00000000000..a38ca6ce4e3
--- /dev/null
+++ b/x11/bbapm/patches/patch-ak
@@ -0,0 +1,25 @@
+$NetBSD: patch-ak,v 1.1.1.1 2002/09/07 20:22:54 jschauma Exp $
+
+--- /dev/null Sat Sep 7 13:47:40 2002
++++ net_apm.h Sat Sep 7 14:09:49 2002
+@@ -0,0 +1,20 @@
++/* based on OpenBSD patch available form http://bbtools.windsofstorm.net */
++#ifndef _NET_APM_H
++#define _NET_APM_H
++
++#include <stdio.h>
++#include <sys/file.h>
++#include <sys/ioctl.h>
++#include <string.h>
++#include <i386/apmvar.h>
++
++typedef struct apm_power_info apm_info;
++
++extern int apm_desc;
++extern int errno;
++
++void apm_init();
++
++int apm_read( apm_info* );
++
++#endif
diff --git a/x11/bbapm/patches/patch-al b/x11/bbapm/patches/patch-al
new file mode 100644
index 00000000000..74e763f62bf
--- /dev/null
+++ b/x11/bbapm/patches/patch-al
@@ -0,0 +1,74 @@
+$NetBSD: patch-al,v 1.1.1.1 2002/09/07 20:22:54 jschauma Exp $
+
+--- /dev/null Sat Sep 7 15:09:14 2002
++++ data/bbapm.1.tmp Sat Sep 7 15:10:35 2002
+@@ -0,0 +1,69 @@
++.TH BBAPM 1 "Spetmeber 07, 2002" bbapm "bbtools"
++.SH NAME
++bbapm \- APM monitor for Blackbox
++
++.SH SYNOPSIS
++.B bbapm
++[\fIOPTIONS\fR]
++
++.SH DESCRIPTION
++\fBbbapm\fR is an APM monitor for the Blackbox window manager.
++It displays the current battery status for your laptop.
++
++.SH USAGE
++By default \fBbbapm\fR reads the Blackbox style-file as defined in
++\fI$HOME/.blackboxrc\fR and copies as much of the style as possible. The
++result is an application which looks a lot like the toolbar.
++
++.SH OPTIONS
++A summary of the options supported by \fBbbapm\fR is included below.
++
++.TP
++\fB\-c[onfig]\fR \fIfilename\fR
++use alternate config file
++.TP
++.B \-d[ecorated]
++Show 'normal' decorated window
++.TP
++\fB\-d[isplay]\fR \fIdisplay name\fR
++X server to connect to
++.TP
++\fB\-p[osition]\fR \fIposition\fR
++Set position of window using +x+y
++.TP
++\fB\-h[elp]\fR
++Show summary of options and exit.
++.TP
++\fB\-n[obb]\fR
++fall back on default configuration
++.TP
++\fB\-s[hape]\fR
++Don't display groundplate
++.TP
++\fB\-v[ersion]\fR
++Display version number
++.TP
++\fB\-w[ithdrawn]\fR
++Place bbtool in the Slit
++
++.SH FILES
++.SS "Under Blackbox"
++.nf
++\fI@PREFIX@/share/bbtools/bbapm.conf\fR the global configuration file
++\fI$HOME/.bbtools/bbapm.bb\fR a local configuration file
++
++.SS "Under other Window managers"
++.nf
++\fI@PREFIX@/share/bbtools/bbappconf.nobb\fR the global configuration file
++\fI$HOME/.bbtools/bbappconf.nobb\fR a local configuration file
++
++.SH VERSION
++0.0.1
++
++.SH "SEE ALSO"
++.BR blackbox(1)
++
++.SH AUTHOR
++EJ <kojak@oakhill.demon.nl> - bbapm
++.br
++Jan Schaumann <jschauma@netmeister.org> - this man page
diff --git a/x11/bbapm/patches/patch-am b/x11/bbapm/patches/patch-am
new file mode 100644
index 00000000000..0ba1874f5c9
--- /dev/null
+++ b/x11/bbapm/patches/patch-am
@@ -0,0 +1,14 @@
+$NetBSD: patch-am,v 1.1.1.1 2002/09/07 20:22:54 jschauma Exp $
+
+--- Basewindow.hh.orig Sat Sep 7 15:28:39 2002
++++ Basewindow.hh Sat Sep 7 15:28:54 2002
+@@ -78,9 +78,7 @@
+
+ char *position;
+ char *config_filename;
+- char *nobb_filename;
+ char *bbconfig_filename;
+- char *spooldir;
+ bool default_config;
+ bool withdrawn;
+ bool shape;
diff --git a/x11/bbapm/patches/patch-an b/x11/bbapm/patches/patch-an
new file mode 100644
index 00000000000..3d9d89a4d98
--- /dev/null
+++ b/x11/bbapm/patches/patch-an
@@ -0,0 +1,8 @@
+$NetBSD: patch-an,v 1.1.1.1 2002/09/07 20:22:54 jschauma Exp $
+
+--- version.h.in.orig Sat Sep 7 15:57:33 2002
++++ version.h.in Sat Sep 7 15:57:43 2002
+@@ -1,2 +1,2 @@
+-#define BBTOOL "bbsload"
++#define BBTOOL "bbapm"
+ #define BBTOOL_VERSION "@VERSION@"