openbsd-ports/sysutils/xosview/patches/patch-configure
form 8e8feccbec Battery meter support.
Thanks to mpech@ for testing.
2002-06-13 02:54:58 +00:00

74 lines
1.6 KiB
Plaintext

$OpenBSD: patch-configure,v 1.4 2002/06/13 02:54:58 form Exp $
--- configure.orig Mon Feb 25 05:05:05 2002
+++ configure Thu Jun 6 13:39:14 2002
@@ -1869,20 +1869,66 @@ EOF
host_dir=bsd
host_os=freebsd ;;
+
+## Check for OpenBSD 2.0-2.5
+openbsd2.[012345]*)
+ EXTRALIBS="-lkvm $XPMLIB"
+ INSTALL_ARGS='-s -g kmem -m 02555'
+ cat >> confdefs.h <<\EOF
+#define XOSVIEW_OPENBSD 1
+EOF
+
+ host_dir=bsd
+ host_os=openbsd ;;
+
+openbsd2.[6-9]*)
+ EXTRALIBS="-lkvm $XPMLIB"
+ INSTALL_ARGS='-s -g kmem -m 02555'
+ NetMeter_Default_Setting=True
+ cat >> confdefs.h <<\EOF
+#define XOSVIEW_OPENBSD 1
+#define HAVE_SWAPCTL 1
+EOF
+ ## Also check for the existence of UVM. This is a nasty,
+ ## complicated check. This could be avoided by having the *BSD
+ ## platform-specific Makefiles include <bsd.own.mk> on their own.
+
+ cat > confmkfile <<\EOF
+.include <bsd.own.mk>
+all:
+.if defined(UVM) && ${UVM:U} == YES
+ @echo UVMyes
+.endif
+EOF
+ uvmstring=`make -f confmkfile`
+ rm confmkfile
+ if test x$uvmstring != x ; then
+ cat >> confdefs.h <<\EOF
+#define UVM 1
+EOF
+ fi
+
+ host_dir=bsd
+ host_os=openbsd ;;
+
openbsd*)
EXTRALIBS="-lkvm $XPMLIB"
INSTALL_ARGS='-s -g kmem -m 02555'
NetMeter_Default_Setting=True
+ BTRYMETER=btrymeter.o
cat >> confdefs.h <<\EOF
#define XOSVIEW_OPENBSD 1
+#define HAVE_SWAPCTL 1
+#define UVM 1
+#define HAVE_BATTERY_METER 1
+#define APM_BATT_ABSENT APM_BATTERY_ABSENT
EOF
-
-
EXTRA_CXXFLAGS="-Wall -O4 -pipe"
- host_dir=bsd
+ host_dir=bsd
host_os=openbsd ;;
+
bsdi*)
EXTRALIBS="-lkvm $XPMLIB"
INSTALL_ARGS='-s -g kmem -m 02555'