ports/55132: New port: sysutils/xfce4-battery-plugin
Thorsten Greiner
thorsten.greiner at web.de
Thu Jul 31 21:10:19 UTC 2003
>Number: 55132
>Category: ports
>Synopsis: New port: sysutils/xfce4-battery-plugin
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Thu Jul 31 14:10:16 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Thorsten Greiner
>Release: FreeBSD 5.1-CURRENT i386
>Organization:
n/a
>Environment:
System: FreeBSD tybalt 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Wed Jul 30 21:02:42 CEST 2003 root at tybalt:/usr/src/sys/i386/compile/TYBALT i386
>Description:
Battery monitor panel plugin for XFce4
>How-To-Repeat:
n/a
>Fix:
Unpack the shar archive
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# xfce4-battery-plugin
# xfce4-battery-plugin/Makefile
# xfce4-battery-plugin/distinfo
# xfce4-battery-plugin/files
# xfce4-battery-plugin/files/patch-battmon.c
# xfce4-battery-plugin/files/patch-apmlib.c
# xfce4-battery-plugin/pkg-plist
# xfce4-battery-plugin/pkg-descr
#
echo c - xfce4-battery-plugin
mkdir -p xfce4-battery-plugin > /dev/null 2>&1
echo x - xfce4-battery-plugin/Makefile
sed 's/^X//' >xfce4-battery-plugin/Makefile << 'END-of-xfce4-battery-plugin/Makefile'
X# New ports collection makefile for: xfce-battery-plugin
X# Date created: 31 June 2003
X# Whom: Thorsten Greiner <thorsten.greiner at web.de>
X#
X# $FreeBSD$
X#
X
XPORTNAME= xfce4-battery-plugin
XPORTVERSION= 0.1.2
XCATEGORIES= sysutils
XMASTER_SITES= http://download.berlios.de/xfce-goodies/
XDISTNAME= xfce4-battery-plugin-${PORTVERSION}
XDIST_SUBDIR= xfce4
X
XMAINTAINER= ports at FreeBSD.org
XCOMMENT= Battery monitor panel plugin for XFce4
X
XBUILD_DEPENDS= xfce4-panel:${PORTSDIR}/x11-wm/xfce4-panel
XLIB_DEPENDS= xfce4util:${PORTSDIR}/x11/libxfce4util
X
XUSE_GNOME= gtk20
XUSE_X_PREFIX= yes
XGNU_CONFIGURE= yes
XCONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL}
X
X.include <bsd.port.mk>
END-of-xfce4-battery-plugin/Makefile
echo x - xfce4-battery-plugin/distinfo
sed 's/^X//' >xfce4-battery-plugin/distinfo << 'END-of-xfce4-battery-plugin/distinfo'
XMD5 (xfce4/xfce4-battery-plugin-0.1.2.tar.gz) = 387ddb80deff5b9cbf5c5ac94dddbd8f
END-of-xfce4-battery-plugin/distinfo
echo c - xfce4-battery-plugin/files
mkdir -p xfce4-battery-plugin/files > /dev/null 2>&1
echo x - xfce4-battery-plugin/files/patch-battmon.c
sed 's/^X//' >xfce4-battery-plugin/files/patch-battmon.c << 'END-of-xfce4-battery-plugin/files/patch-battmon.c'
X--- panel-plugin/battmon.c.orig Thu Jul 31 09:34:31 2003
X+++ panel-plugin/battmon.c Thu Jul 31 09:22:21 2003
X@@ -32,6 +32,10 @@
X
X #ifdef __FreeBSD__
X #include <machine/apm_bios.h>
X+#include <fcntl.h>
X+#ifndef APMDEVICE
X+#define APMDEVICE "/dev/apm"
X+#endif
X #elif __OpenBSD__
X #include <sys/param.h>
X #include <machine/apmvar.h>
X@@ -232,6 +236,14 @@
X time_remaining = apm.ai_batt_time;
X time_remaining = time_remaining / 60; /* convert from seconds to minutes */
X charge = apm.ai_batt_life;
X+
X+ /*
X+ * Work around a bug in the FreeBSD ACPI APM emulation layer which will
X+ * sometimes return funny values for the battery life.
X+ */
X+ if(charge > 100) {
X+ charge = 100;
X+ }
X #elif __OpenBSD__
X /* Code for OpenBSD by Joe Ammond <jra at twinight.org>. Using the same
X procedure as for FreeBSD.
END-of-xfce4-battery-plugin/files/patch-battmon.c
echo x - xfce4-battery-plugin/files/patch-apmlib.c
sed 's/^X//' >xfce4-battery-plugin/files/patch-apmlib.c << 'END-of-xfce4-battery-plugin/files/patch-apmlib.c'
X--- panel-plugin/apmlib.c.orig Thu Jul 31 09:34:47 2003
X+++ panel-plugin/apmlib.c Thu Jul 31 09:18:25 2003
X@@ -18,6 +18,9 @@
X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X *
X */
X+
X+#if defined(__linux__)
X+
X #include <stdio.h>
X #include <stdlib.h>
X #include <unistd.h>
X@@ -463,3 +466,5 @@
X
X return buffer;
X }
X+
X+#endif
END-of-xfce4-battery-plugin/files/patch-apmlib.c
echo x - xfce4-battery-plugin/pkg-plist
sed 's/^X//' >xfce4-battery-plugin/pkg-plist << 'END-of-xfce4-battery-plugin/pkg-plist'
Xlib/xfce4/panel-plugins/libbattmon.a
Xlib/xfce4/panel-plugins/libbattmon.la
Xlib/xfce4/panel-plugins/libbattmon.so
X at unexec rmdir %D/lib/xfce4/panel-plugins 2>/dev/null || true
X at unexec rmdir %D/lib/xfce4 2>/dev/null || true
END-of-xfce4-battery-plugin/pkg-plist
echo x - xfce4-battery-plugin/pkg-descr
sed 's/^X//' >xfce4-battery-plugin/pkg-descr << 'END-of-xfce4-battery-plugin/pkg-descr'
XBattery monitor panel plugin for XFce4.
X
XWWW: http://www.xfce.org
END-of-xfce4-battery-plugin/pkg-descr
exit
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list