diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2012-05-25 17:02:03 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2012-05-25 17:02:03 +0000 |
commit | 4f8366dd7d07393cc72c285d506e7f9c17659452 (patch) | |
tree | f584c033d723b466b27e572de969c15e431168a9 /sysutils/xfce4-battery-plugin | |
parent | 777989440f5adc07f533233609f36514392df5ea (diff) | |
download | ports-4f8366dd7d07393cc72c285d506e7f9c17659452.tar.gz ports-4f8366dd7d07393cc72c285d506e7f9c17659452.zip |
Notes
Diffstat (limited to 'sysutils/xfce4-battery-plugin')
-rw-r--r-- | sysutils/xfce4-battery-plugin/Makefile | 10 | ||||
-rw-r--r-- | sysutils/xfce4-battery-plugin/distinfo | 4 | ||||
-rw-r--r-- | sysutils/xfce4-battery-plugin/files/patch-panel-plugin_libacpi.c | 82 | ||||
-rw-r--r-- | sysutils/xfce4-battery-plugin/pkg-plist | 54 |
4 files changed, 54 insertions, 96 deletions
diff --git a/sysutils/xfce4-battery-plugin/Makefile b/sysutils/xfce4-battery-plugin/Makefile index e2fb8146be93..3acd4ca056d8 100644 --- a/sysutils/xfce4-battery-plugin/Makefile +++ b/sysutils/xfce4-battery-plugin/Makefile @@ -6,11 +6,10 @@ # PORTNAME= xfce4-battery-plugin -PORTVERSION= 1.0.0 -PORTREVISION= 1 +PORTVERSION= 1.0.4 CATEGORIES= sysutils xfce MASTER_SITES= ${MASTER_SITE_XFCE} -MASTER_SITE_SUBDIR=/src/panel-plugins/${PORTNAME}/${PORTVERSION:R} +MASTER_SITE_SUBDIR=src/panel-plugins/${PORTNAME}/${PORTVERSION:R} DIST_SUBDIR= xfce4 MAINTAINER= xfce@FreeBSD.org @@ -18,16 +17,13 @@ COMMENT= Battery monitor panel plugin for Xfce4 ONLY_FOR_ARCHS= i386 amd64 -USE_AUTOTOOLS= libtool GNU_CONFIGURE= yes USE_BZIP2= yes USE_GMAKE= yes USE_GNOME= gnomehack gtk20 glib20 intltool intlhack pkgconfig -USE_XFCE= configenv libgui libutil panel +USE_XFCE= configenv libmenu libutil panel INSTALLS_ICONS= yes -CONFIGURE_ARGS= --disable-debug - OPTIONS= NLS "Enable Native Language Support" on .include <bsd.port.pre.mk> diff --git a/sysutils/xfce4-battery-plugin/distinfo b/sysutils/xfce4-battery-plugin/distinfo index e9435616d898..e9c724a38c33 100644 --- a/sysutils/xfce4-battery-plugin/distinfo +++ b/sysutils/xfce4-battery-plugin/distinfo @@ -1,2 +1,2 @@ -SHA256 (xfce4/xfce4-battery-plugin-1.0.0.tar.bz2) = c28bb580e6b932c017b5bc6b2e75de8c3557e08d9606c7a70134aa035f8a121f -SIZE (xfce4/xfce4-battery-plugin-1.0.0.tar.bz2) = 358338 +SHA256 (xfce4/xfce4-battery-plugin-1.0.4.tar.bz2) = 2682d634f30511d09e65f70b3cb3bd7748cc684a745a252c47c4118b3adf6dd6 +SIZE (xfce4/xfce4-battery-plugin-1.0.4.tar.bz2) = 402261 diff --git a/sysutils/xfce4-battery-plugin/files/patch-panel-plugin_libacpi.c b/sysutils/xfce4-battery-plugin/files/patch-panel-plugin_libacpi.c deleted file mode 100644 index b9109422b000..000000000000 --- a/sysutils/xfce4-battery-plugin/files/patch-panel-plugin_libacpi.c +++ /dev/null @@ -1,82 +0,0 @@ ---- panel-plugin/libacpi.c.orig 2011-01-03 23:38:40.000000000 +1100 -+++ panel-plugin/libacpi.c 2011-03-21 15:38:01.000000000 +1100 -@@ -30,6 +30,16 @@ - #include <dirent.h> - #include <glob.h> - -+#ifdef __FreeBSD__ -+#include <fcntl.h> -+#include <sys/ioctl.h> -+#include <dev/acpica/acpiio.h> -+#define ACPIDEV "/dev/acpi" -+static int acpifd; -+#define UNKNOWN_CAP 0xffffffff -+#define UNKNOWN_VOLTAGE 0xffffffff -+#endif -+ - #if HAVE_SYSCTL - - #if defined(__NetBSD__) || defined (__OpenBSD__) -@@ -484,6 +494,7 @@ - } - - return 1; -+ - #else - #ifdef HAVE_SYSCTL - static char buf[BUFSIZ]; -@@ -730,6 +741,24 @@ - #endif - } - acpiinfo->present = retval; -+ -+#ifdef __FreeBSD__ -+ union acpi_battery_ioctl_arg battio; -+ acpifd = open(ACPIDEV, O_RDONLY); -+ -+ battio.unit = battery; -+ if (ioctl(acpifd, ACPIIO_BATT_GET_BIF, &battio) == -1) { -+ return 0; -+ } -+ close(acpifd); -+ -+ acpiinfo->design_capacity = battio.bif.dcap; -+ acpiinfo->last_full_capacity = battio.bif.lfcap; -+ acpiinfo->battery_technology = battio.bif.btech; -+ acpiinfo->design_voltage = battio.bif.dvol; -+ acpiinfo->design_capacity_warning = battio.bif.wcap; -+ acpiinfo->design_capacity_low = battio.bif.lcap; -+#endif - return 1; - #else - return 0; -@@ -966,6 +995,29 @@ - #endif - } - acpistate->percentage =retval; -+ -+#ifdef __FreeBSD__ -+ union acpi_battery_ioctl_arg battio; -+ acpifd = open(ACPIDEV, O_RDONLY); -+ -+ battio.unit = battery; -+ if (ioctl(acpifd, ACPIIO_BATT_GET_BATTINFO, &battio) == -1) { -+ return 0; -+ } -+ -+ acpistate->state = battio.battinfo.state; -+ acpistate->prate = battio.battinfo.rate; -+ acpistate->rcapacity = acpiinfo->last_full_capacity * battio.battinfo.cap / 100; -+ acpistate->rtime = battio.battinfo.min; -+ acpistate->percentage = battio.battinfo.cap; -+ -+ battio.unit = battery; -+ if (ioctl(acpifd, ACPIIO_BATT_GET_BATTINFO, &battio) == -1) { -+ return 0; -+ } -+ close(acpifd); -+ acpistate->pvoltage = battio.bst.volt; -+#endif - return 1; - #else - return 0; diff --git a/sysutils/xfce4-battery-plugin/pkg-plist b/sysutils/xfce4-battery-plugin/pkg-plist index a8e68973c4e0..8e92a687e4d1 100644 --- a/sysutils/xfce4-battery-plugin/pkg-plist +++ b/sysutils/xfce4-battery-plugin/pkg-plist @@ -1,11 +1,49 @@ -libexec/xfce4/panel-plugins/xfce4-battery-plugin +lib/xfce4/panel/plugins/libbattery.la +lib/xfce4/panel/plugins/libbattery.so +share/icons/hicolor/16x16/apps/xfce4-battery-critical-charging.png +share/icons/hicolor/16x16/apps/xfce4-battery-critical.png +share/icons/hicolor/16x16/apps/xfce4-battery-full-charging.png +share/icons/hicolor/16x16/apps/xfce4-battery-full.png +share/icons/hicolor/16x16/apps/xfce4-battery-low-charging.png +share/icons/hicolor/16x16/apps/xfce4-battery-low.png +share/icons/hicolor/16x16/apps/xfce4-battery-missing.png +share/icons/hicolor/16x16/apps/xfce4-battery-ok-charging.png +share/icons/hicolor/16x16/apps/xfce4-battery-ok.png share/icons/hicolor/16x16/apps/xfce4-battery-plugin.png +share/icons/hicolor/22x22/apps/xfce4-battery-critical-charging.png +share/icons/hicolor/22x22/apps/xfce4-battery-critical.png +share/icons/hicolor/22x22/apps/xfce4-battery-full-charging.png +share/icons/hicolor/22x22/apps/xfce4-battery-full.png +share/icons/hicolor/22x22/apps/xfce4-battery-low-charging.png +share/icons/hicolor/22x22/apps/xfce4-battery-low.png +share/icons/hicolor/22x22/apps/xfce4-battery-missing.png +share/icons/hicolor/22x22/apps/xfce4-battery-ok-charging.png +share/icons/hicolor/22x22/apps/xfce4-battery-ok.png share/icons/hicolor/22x22/apps/xfce4-battery-plugin.png +share/icons/hicolor/24x24/apps/xfce4-battery-critical-charging.png +share/icons/hicolor/24x24/apps/xfce4-battery-critical.png +share/icons/hicolor/24x24/apps/xfce4-battery-full-charging.png +share/icons/hicolor/24x24/apps/xfce4-battery-full.png +share/icons/hicolor/24x24/apps/xfce4-battery-low-charging.png +share/icons/hicolor/24x24/apps/xfce4-battery-low.png +share/icons/hicolor/24x24/apps/xfce4-battery-missing.png +share/icons/hicolor/24x24/apps/xfce4-battery-ok-charging.png +share/icons/hicolor/24x24/apps/xfce4-battery-ok.png share/icons/hicolor/24x24/apps/xfce4-battery-plugin.png share/icons/hicolor/32x32/apps/xfce4-battery-plugin.png +share/icons/hicolor/scalable/apps/xfce4-battery-critical-charging.svg +share/icons/hicolor/scalable/apps/xfce4-battery-critical.svg +share/icons/hicolor/scalable/apps/xfce4-battery-full-charging.svg +share/icons/hicolor/scalable/apps/xfce4-battery-full.svg +share/icons/hicolor/scalable/apps/xfce4-battery-low-charging.svg +share/icons/hicolor/scalable/apps/xfce4-battery-low.svg +share/icons/hicolor/scalable/apps/xfce4-battery-missing.svg +share/icons/hicolor/scalable/apps/xfce4-battery-ok-charging.svg +share/icons/hicolor/scalable/apps/xfce4-battery-ok.svg share/icons/hicolor/scalable/apps/xfce4-battery-plugin.svg %%NLS%%share/locale/ar/LC_MESSAGES/xfce4-battery-plugin.mo %%NLS%%share/locale/ast/LC_MESSAGES/xfce4-battery-plugin.mo +%%NLS%%share/locale/bg/LC_MESSAGES/xfce4-battery-plugin.mo %%NLS%%share/locale/ca/LC_MESSAGES/xfce4-battery-plugin.mo %%NLS%%share/locale/cs/LC_MESSAGES/xfce4-battery-plugin.mo %%NLS%%share/locale/da/LC_MESSAGES/xfce4-battery-plugin.mo @@ -20,12 +58,16 @@ share/icons/hicolor/scalable/apps/xfce4-battery-plugin.svg %%NLS%%share/locale/hr/LC_MESSAGES/xfce4-battery-plugin.mo %%NLS%%share/locale/hu/LC_MESSAGES/xfce4-battery-plugin.mo %%NLS%%share/locale/id/LC_MESSAGES/xfce4-battery-plugin.mo +%%NLS%%share/locale/is/LC_MESSAGES/xfce4-battery-plugin.mo %%NLS%%share/locale/it/LC_MESSAGES/xfce4-battery-plugin.mo %%NLS%%share/locale/ja/LC_MESSAGES/xfce4-battery-plugin.mo %%NLS%%share/locale/kk/LC_MESSAGES/xfce4-battery-plugin.mo +%%NLS%%share/locale/ko/LC_MESSAGES/xfce4-battery-plugin.mo +%%NLS%%share/locale/lt/LC_MESSAGES/xfce4-battery-plugin.mo %%NLS%%share/locale/lv/LC_MESSAGES/xfce4-battery-plugin.mo %%NLS%%share/locale/nb/LC_MESSAGES/xfce4-battery-plugin.mo %%NLS%%share/locale/nl/LC_MESSAGES/xfce4-battery-plugin.mo +%%NLS%%share/locale/nn/LC_MESSAGES/xfce4-battery-plugin.mo %%NLS%%share/locale/pa/LC_MESSAGES/xfce4-battery-plugin.mo %%NLS%%share/locale/pl/LC_MESSAGES/xfce4-battery-plugin.mo %%NLS%%share/locale/pt/LC_MESSAGES/xfce4-battery-plugin.mo @@ -42,8 +84,9 @@ share/icons/hicolor/scalable/apps/xfce4-battery-plugin.svg %%NLS%%share/locale/vi/LC_MESSAGES/xfce4-battery-plugin.mo %%NLS%%share/locale/zh_CN/LC_MESSAGES/xfce4-battery-plugin.mo %%NLS%%share/locale/zh_TW/LC_MESSAGES/xfce4-battery-plugin.mo -share/xfce4/panel-plugins/battmon.desktop -@dirrmtry share/xfce4/panel-plugins +share/xfce4/panel/plugins/battery.desktop +@dirrmtry share/xfce4/panel/plugins +@dirrmtry share/xfce4/panel @dirrmtry share/xfce4 %%NLS%%@dirrmtry share/locale/ur_PK/LC_MESSAGES %%NLS%%@dirrmtry share/locale/ur_PK @@ -55,5 +98,6 @@ share/xfce4/panel-plugins/battmon.desktop %%NLS%%@dirrmtry share/locale/kk %%NLS%%@dirrmtry share/locale/ast/LC_MESSAGES %%NLS%%@dirrmtry share/locale/ast -@dirrmtry libexec/xfce4/panel-plugins -@dirrmtry libexec/xfce4 +@dirrmtry lib/xfce4/panel/plugins +@dirrmtry lib/xfce4/panel +@dirrmtry lib/xfce4 |