diff options
author | oliver <oliver@FreeBSD.org> | 2003-08-01 14:32:00 +0000 |
---|---|---|
committer | oliver <oliver@FreeBSD.org> | 2003-08-01 14:32:00 +0000 |
commit | 683ae547194a114026ee5ed09d9fa3ff0a67b7bf (patch) | |
tree | 629b6cfa0ef9daf29ead4f1beb53178b6013e8f4 /sysutils/xfce4-battery-plugin | |
parent | 9a38f30299dc3c5a9f7187e0db75253633ed0688 (diff) | |
download | FreeBSD-ports-683ae547194a114026ee5ed09d9fa3ff0a67b7bf.zip FreeBSD-ports-683ae547194a114026ee5ed09d9fa3ff0a67b7bf.tar.gz |
Add xfce4-battery-plugin 0.1.2,
battery monitor panel plugin for
XFce4.
PR: 55132
Submitted by: Thorsten Greiner <thorsten.greiner@web.de>
Diffstat (limited to 'sysutils/xfce4-battery-plugin')
-rw-r--r-- | sysutils/xfce4-battery-plugin/Makefile | 29 | ||||
-rw-r--r-- | sysutils/xfce4-battery-plugin/distinfo | 1 | ||||
-rw-r--r-- | sysutils/xfce4-battery-plugin/files/patch-configure | 21 | ||||
-rw-r--r-- | sysutils/xfce4-battery-plugin/files/patch-panel-plugin::apmlib.c | 18 | ||||
-rw-r--r-- | sysutils/xfce4-battery-plugin/files/patch-panel-plugin::battmon.c | 53 | ||||
-rw-r--r-- | sysutils/xfce4-battery-plugin/patch-panel-plugin::Makefile.in | 13 | ||||
-rw-r--r-- | sysutils/xfce4-battery-plugin/pkg-descr | 3 | ||||
-rw-r--r-- | sysutils/xfce4-battery-plugin/pkg-plist | 3 |
8 files changed, 141 insertions, 0 deletions
diff --git a/sysutils/xfce4-battery-plugin/Makefile b/sysutils/xfce4-battery-plugin/Makefile new file mode 100644 index 0000000..32f3dd6 --- /dev/null +++ b/sysutils/xfce4-battery-plugin/Makefile @@ -0,0 +1,29 @@ +# New ports collection makefile for: xfce-battery-plugin +# Date created: 31 June 2003 +# Whom: Thorsten Greiner <thorsten.greiner@web.de> +# +# $FreeBSD$ +# + +PORTNAME= xfce4-battery-plugin +PORTVERSION= 0.1.2 +CATEGORIES= sysutils +MASTER_SITES= http://download.berlios.de/xfce-goodies/ +DIST_SUBDIR= xfce4 + +MAINTAINER= thorsten.greiner@web.de +COMMENT= Battery monitor panel plugin for XFce4 + +BUILD_DEPENDS= xfce4-panel:${PORTSDIR}/x11-wm/xfce4-panel +LIB_DEPENDS= xml2.5:${PORTSDIR}/textproc/libxml2 \ + xfce4util.1:${PORTSDIR}/x11/libxfce4util \ + xfcegui4.1:${PORTSDIR}/x11-toolkits/libxfce4gui + +USE_GNOME= gtk20 +USE_X_PREFIX= yes +GNU_CONFIGURE= yes +USE_LIBTOOL= yes +INSTALLS_SHLIB= yes +CONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL} + +.include <bsd.port.mk> diff --git a/sysutils/xfce4-battery-plugin/distinfo b/sysutils/xfce4-battery-plugin/distinfo new file mode 100644 index 0000000..f920ea0 --- /dev/null +++ b/sysutils/xfce4-battery-plugin/distinfo @@ -0,0 +1 @@ +MD5 (xfce4/xfce4-battery-plugin-0.1.2.tar.gz) = 387ddb80deff5b9cbf5c5ac94dddbd8f diff --git a/sysutils/xfce4-battery-plugin/files/patch-configure b/sysutils/xfce4-battery-plugin/files/patch-configure new file mode 100644 index 0000000..a1d6a0e --- /dev/null +++ b/sysutils/xfce4-battery-plugin/files/patch-configure @@ -0,0 +1,21 @@ +--- configure.orig Wed Jul 23 22:20:56 2003 ++++ configure Fri Aug 1 12:56:48 2003 +@@ -19273,7 +19273,8 @@ + + + # This can be used to rebuild libtool when needed +-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" ++LIBTOOL_DEPS="--disable-ltlibs /usr/local/share/libtool13/ltmain.sh" ++$ac_aux_dir/ltconfig $LIBTOOL_DEPS + + # Always use our own libtool. + LIBTOOL='$(SHELL) $(top_builddir)/libtool' +@@ -19567,7 +19568,7 @@ + + echo "$as_me:$LINENO: checking where to install panel plugins" >&5 + echo $ECHO_N "checking where to install panel plugins... $ECHO_C" >&6 +- XFCE4_PANEL_PLUGINSDIR=`$PKG_CONFIG --variable=pluginsdir xfce4-panel-1.0` ++ XFCE4_PANEL_PLUGINSDIR=${prefix}/lib/xfce4/panel-plugins + + echo "$as_me:$LINENO: result: $XFCE4_PANEL_PLUGINSDIR" >&5 + echo "${ECHO_T}$XFCE4_PANEL_PLUGINSDIR" >&6 diff --git a/sysutils/xfce4-battery-plugin/files/patch-panel-plugin::apmlib.c b/sysutils/xfce4-battery-plugin/files/patch-panel-plugin::apmlib.c new file mode 100644 index 0000000..43870a2 --- /dev/null +++ b/sysutils/xfce4-battery-plugin/files/patch-panel-plugin::apmlib.c @@ -0,0 +1,18 @@ +--- panel-plugin/apmlib.c.orig Thu Jul 31 09:34:47 2003 ++++ panel-plugin/apmlib.c Thu Jul 31 09:18:25 2003 +@@ -18,6 +18,9 @@ + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ ++ ++#if defined(__linux__) ++ + #include <stdio.h> + #include <stdlib.h> + #include <unistd.h> +@@ -463,3 +466,5 @@ + + return buffer; + } ++ ++#endif diff --git a/sysutils/xfce4-battery-plugin/files/patch-panel-plugin::battmon.c b/sysutils/xfce4-battery-plugin/files/patch-panel-plugin::battmon.c new file mode 100644 index 0000000..036526d --- /dev/null +++ b/sysutils/xfce4-battery-plugin/files/patch-panel-plugin::battmon.c @@ -0,0 +1,53 @@ +--- panel-plugin/battmon.c.orig Fri Jul 18 15:15:29 2003 ++++ panel-plugin/battmon.c Fri Aug 1 12:14:50 2003 +@@ -32,6 +32,10 @@ + + #ifdef __FreeBSD__ + #include <machine/apm_bios.h> ++#include <fcntl.h> ++#ifndef APMDEVICE ++#define APMDEVICE "/dev/apm" ++#endif + #elif __OpenBSD__ + #include <sys/param.h> + #include <machine/apmvar.h> +@@ -187,6 +191,9 @@ + #else + struct apm_info apm; + #endif ++#if defined(__FreeBSD__) || defined(__OpenBSD__) ++ int fd; ++#endif + int charge; + int time_remaining; + gboolean acline; +@@ -217,8 +224,6 @@ + FreeBSD. Each time this functions is called (once every second) + the APM device is opened, read from and then closed. + */ +- int fd; +- + battmon->method = BM_BROKEN; + fd = open(APMDEVICE, O_RDONLY); + if (fd == -1) return TRUE; +@@ -232,12 +237,18 @@ + time_remaining = apm.ai_batt_time; + time_remaining = time_remaining / 60; /* convert from seconds to minutes */ + charge = apm.ai_batt_life; ++ ++ /* ++ * Work around a bug in the FreeBSD ACPI APM emulation layer which will ++ * sometimes return funny values for the battery life. ++ */ ++ if(charge > 100) { ++ charge = 100; ++ } + #elif __OpenBSD__ + /* Code for OpenBSD by Joe Ammond <jra@twinight.org>. Using the same + procedure as for FreeBSD. + */ +- int fd; +- + battmon->method = BM_BROKEN; + fd = open(APMDEVICE, O_RDONLY); + if (fd == -1) return TRUE; diff --git a/sysutils/xfce4-battery-plugin/patch-panel-plugin::Makefile.in b/sysutils/xfce4-battery-plugin/patch-panel-plugin::Makefile.in new file mode 100644 index 0000000..db6ffea --- /dev/null +++ b/sysutils/xfce4-battery-plugin/patch-panel-plugin::Makefile.in @@ -0,0 +1,13 @@ +--- panel-plugin/Makefile.in.orig Fri Aug 1 12:37:32 2003 ++++ panel-plugin/Makefile.in Fri Aug 1 12:38:09 2003 +@@ -209,8 +209,8 @@ + @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ +- echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(plugindir)/$$f"; \ +- $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(plugindir)/$$f; \ ++ echo " $(LIBTOOL) $(LIBTOOLFLAGS) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(plugindir)/$$f"; \ ++ $(LIBTOOL) $(LIBTOOLFLAGS) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(plugindir)/$$f; \ + else :; fi; \ + done + diff --git a/sysutils/xfce4-battery-plugin/pkg-descr b/sysutils/xfce4-battery-plugin/pkg-descr new file mode 100644 index 0000000..f5b9e49 --- /dev/null +++ b/sysutils/xfce4-battery-plugin/pkg-descr @@ -0,0 +1,3 @@ +Battery monitor panel plugin for XFce4. + +WWW: http://www.xfce.org diff --git a/sysutils/xfce4-battery-plugin/pkg-plist b/sysutils/xfce4-battery-plugin/pkg-plist new file mode 100644 index 0000000..d9f565c --- /dev/null +++ b/sysutils/xfce4-battery-plugin/pkg-plist @@ -0,0 +1,3 @@ +lib/xfce4/panel-plugins/libbattmon.so +@unexec rmdir %D/lib/xfce4/panel-plugins 2>/dev/null || true +@unexec rmdir %D/lib/xfce4 2>/dev/null || true |