aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoramdmi3 <amdmi3@FreeBSD.org>2016-11-01 17:04:19 +0800
committeramdmi3 <amdmi3@FreeBSD.org>2016-11-01 17:04:19 +0800
commit3cb9b1ec2d9cc4b1bf68bf04073df72177c7da03 (patch)
tree4597bce574c7d3ac734e09b20202d9053f6fd560
parent69df10137da17b1c89ab8ccee4a7945a600b5ae2 (diff)
downloadfreebsd-ports-gnome-3cb9b1ec2d9cc4b1bf68bf04073df72177c7da03.tar.gz
freebsd-ports-gnome-3cb9b1ec2d9cc4b1bf68bf04073df72177c7da03.tar.zst
freebsd-ports-gnome-3cb9b1ec2d9cc4b1bf68bf04073df72177c7da03.zip
- Fix LICENSE
- Add LICENSE_FILE - Switch to options helpers - Add missing depends - Regenerate patches - Install example as EXAMPLES, not docs
-rw-r--r--deskutils/tpb/Makefile23
-rw-r--r--deskutils/tpb/files/patch-Makefile.in6
-rw-r--r--deskutils/tpb/files/patch-man-tpb.112
-rw-r--r--deskutils/tpb/files/patch-src-Makefile.in6
-rw-r--r--deskutils/tpb/files/patch-src-cfg.c6
-rw-r--r--deskutils/tpb/files/patch-src-cfg.h6
-rw-r--r--deskutils/tpb/files/patch-src-tpb.c22
-rw-r--r--deskutils/tpb/files/patch-src-tpb.h6
-rw-r--r--deskutils/tpb/pkg-plist2
9 files changed, 44 insertions, 45 deletions
diff --git a/deskutils/tpb/Makefile b/deskutils/tpb/Makefile
index 5ce6db6db63a..d027d5c832cd 100644
--- a/deskutils/tpb/Makefile
+++ b/deskutils/tpb/Makefile
@@ -10,21 +10,20 @@ MASTER_SITES= SAVANNAH
MAINTAINER= ports@FreeBSD.org
COMMENT= On-Screen-Display for hotkeys of IBM ThinkPads
-LICENSE= GPLv2
+LICENSE= GPLv2+
+LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libxosd.so:misc/xosd
-OPTIONS_DEFINE= DOCS NLS
-OPTIONS_SUB= yes
-
ONLY_FOR_ARCHS= i386 amd64
-USES= gmake iconv pkgconfig
+USES= gmake iconv localbase pkgconfig
GNU_CONFIGURE= yes
CONFIGURE_ARGS= ${ICONV_CONFIGURE_ARG}
+USE_XORG= x11 sm ice xext
-CPPFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALABASE}/lib
+OPTIONS_DEFINE= EXAMPLES NLS
+OPTIONS_SUB= yes
NLS_USES= gettext
NLS_CONFIGURE_OFF= --disable-nls
@@ -39,10 +38,10 @@ post-patch:
's|void test()||' ${WRKSRC}/configure
post-install:
- (cd ${WRKSRC}/doc && ${INSTALL_DATA} tpbrc \
- ${STAGEDIR}${PREFIX}/etc/tpbrc.default)
- @${MKDIR} ${STAGEDIR}${DOCSDIR}
- (cd ${WRKSRC}/doc && ${INSTALL_DATA} callback_example.sh \
- ${STAGEDIR}${DOCSDIR})
+ ${INSTALL_DATA} ${WRKSRC}/doc/tpbrc ${STAGEDIR}${PREFIX}/etc/tpbrc.default
+
+post-install-EXAMPLES-on:
+ @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+ ${INSTALL_DATA} ${WRKSRC}/doc/callback_example.sh ${STAGEDIR}${EXAMPLESDIR}
.include <bsd.port.mk>
diff --git a/deskutils/tpb/files/patch-Makefile.in b/deskutils/tpb/files/patch-Makefile.in
index 84ea9699997a..243a87d3819c 100644
--- a/deskutils/tpb/files/patch-Makefile.in
+++ b/deskutils/tpb/files/patch-Makefile.in
@@ -1,6 +1,6 @@
---- Makefile.in.orig Thu Jun 9 01:19:36 2005
-+++ Makefile.in Thu Jun 9 01:19:52 2005
-@@ -92,7 +92,7 @@
+--- Makefile.in.orig 2005-07-25 08:55:38 UTC
++++ Makefile.in
+@@ -92,7 +92,7 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIB
USE_NLS = @USE_NLS@
VERSION = @VERSION@
diff --git a/deskutils/tpb/files/patch-man-tpb.1 b/deskutils/tpb/files/patch-man-tpb.1
index 755aee1d3cc3..726b7246d314 100644
--- a/deskutils/tpb/files/patch-man-tpb.1
+++ b/deskutils/tpb/files/patch-man-tpb.1
@@ -1,6 +1,6 @@
---- man/tpb.1.orig 2005-07-25 10:40:53.000000000 +0200
-+++ man/tpb.1 2009-11-12 23:50:29.000000000 +0100
-@@ -7,7 +7,7 @@
+--- man/tpb.1.orig 2005-07-25 08:40:53 UTC
++++ man/tpb.1
+@@ -7,7 +7,7 @@ tpb \- program to use the IBM ThinkPad (
With TPB it is possible to bind a program to the ThinkPad, Mail, Home and Search button.
TPB can also run a callback program on each state change with the changed state and the new state as options.
So it is possible to trigger several actions on different events.
@@ -9,7 +9,7 @@
Furthermore TPB supports a software mixer, as the R series ThinkPads have no hardware mixer to change the volume.
.SH OPTIONS
.TP 8
-@@ -94,7 +94,7 @@
+@@ -94,7 +94,7 @@ The priority of the configuration option
builtin defaults
.TP
\(bu
@@ -18,7 +18,7 @@
.TP
\(bu
configuration in $HOME/.tpbrc
-@@ -121,7 +121,7 @@
+@@ -121,7 +121,7 @@ Keywords are:
.TP 8
.B NVRAM
Should define the nvram device from where the information about the key states
@@ -27,7 +27,7 @@
.TP 8
.B POLLTIME
Defines the delay between polls in microseconds.
-@@ -332,14 +332,18 @@
+@@ -332,14 +332,18 @@ Defines the alignment of the osd.
Possible values are left, center and right.
Default is left.
.SH "NOTES"
diff --git a/deskutils/tpb/files/patch-src-Makefile.in b/deskutils/tpb/files/patch-src-Makefile.in
index 21ec7cc6d523..d1b9f8cbee4a 100644
--- a/deskutils/tpb/files/patch-src-Makefile.in
+++ b/deskutils/tpb/files/patch-src-Makefile.in
@@ -1,6 +1,6 @@
---- src/Makefile.in.orig Thu Jun 9 00:42:42 2005
-+++ src/Makefile.in Thu Jun 9 00:45:44 2005
-@@ -106,7 +106,7 @@
+--- src/Makefile.in.orig 2005-07-25 08:55:38 UTC
++++ src/Makefile.in
+@@ -106,7 +106,7 @@ PROGRAMS = $(bin_PROGRAMS)
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
diff --git a/deskutils/tpb/files/patch-src-cfg.c b/deskutils/tpb/files/patch-src-cfg.c
index c241d865e5b0..4842cf4377c1 100644
--- a/deskutils/tpb/files/patch-src-cfg.c
+++ b/deskutils/tpb/files/patch-src-cfg.c
@@ -1,6 +1,6 @@
---- src/cfg.c.orig 2009-11-12 09:26:15.000000000 +0100
-+++ src/cfg.c 2009-11-12 08:33:55.000000000 +0100
-@@ -1548,12 +1548,14 @@
+--- src/cfg.c.orig 2005-07-18 14:15:59 UTC
++++ src/cfg.c
+@@ -1548,12 +1548,14 @@ void find_nvram(config *cfg) /* {{{ */
_exit(1);
}
if((fdsc=open(cfg->nvram, O_RDONLY|O_NONBLOCK) == -1) && errno == ENOENT) {
diff --git a/deskutils/tpb/files/patch-src-cfg.h b/deskutils/tpb/files/patch-src-cfg.h
index f8ca4d34219c..94c8d59c58a3 100644
--- a/deskutils/tpb/files/patch-src-cfg.h
+++ b/deskutils/tpb/files/patch-src-cfg.h
@@ -1,6 +1,6 @@
---- src/cfg.h.orig Mon May 30 00:06:16 2005
-+++ src/cfg.h Mon May 30 00:06:32 2005
-@@ -67,7 +67,7 @@
+--- src/cfg.h.orig 2005-07-18 14:15:59 UTC
++++ src/cfg.h
+@@ -74,7 +74,7 @@ enum mode {MODE_COMMENT, MODE_INDENT, MO
#ifdef SYSCONFDIR
#define GLOBAL_CONFIG_FILE SYSCONFDIR "/tpbrc"
#else /* SYSCONFDIR */
diff --git a/deskutils/tpb/files/patch-src-tpb.c b/deskutils/tpb/files/patch-src-tpb.c
index d2e50bbe33d4..8f2040c7021a 100644
--- a/deskutils/tpb/files/patch-src-tpb.c
+++ b/deskutils/tpb/files/patch-src-tpb.c
@@ -1,5 +1,5 @@
---- src/tpb.c.orig 2005-07-18 16:15:59.000000000 +0200
-+++ src/tpb.c 2009-11-13 02:18:58.000000000 +0100
+--- src/tpb.c.orig 2005-07-18 14:15:59 UTC
++++ src/tpb.c
@@ -34,6 +34,16 @@
#include <unistd.h>
#include "config.h"
@@ -17,7 +17,7 @@
#if ENABLE_NLS
#include <libintl.h>
#endif /* ENABLE_NLS */
-@@ -161,6 +171,9 @@
+@@ -161,6 +171,9 @@ int main(int argc, char **argv) /* {{{ *
/* to initialize struct */
memset(&last_thinkpad_state, 0x00, sizeof(t_thinkpad_state));
if(get_nvram_state(&thinkpad_state) != 0) {
@@ -27,7 +27,7 @@
_exit(1);
}
if(cfg.apm == STATE_ON) {
-@@ -449,6 +462,25 @@
+@@ -449,6 +462,25 @@ int main(int argc, char **argv) /* {{{ *
#endif /* HAVE_LIBXOSD */
} /* }}} */
@@ -53,7 +53,7 @@
/* determine the state of display {{{ */
if((thinkpad_state.display_toggle != last_thinkpad_state.display_toggle ||
thinkpad_state.display_state != last_thinkpad_state.display_state) &&
-@@ -981,6 +1013,11 @@
+@@ -981,6 +1013,11 @@ Display *init_xgrabkey(void) /* {{{ */
int get_nvram_state(t_thinkpad_state *thinkpad_state) /* {{{ */
{
static int fdsc = -1; /* -1 -> file not opened */
@@ -65,7 +65,7 @@
unsigned char buffer[114];
struct {
int pos;
-@@ -1040,13 +1077,51 @@
+@@ -1040,13 +1077,51 @@ int get_nvram_state(t_thinkpad_state *th
thinkpad_state->powermgt_battery = (( buffer[0x39] & 0x38) >> 3);
return 0;
@@ -118,14 +118,14 @@
char buffer[38];
char *tokens[9];
-@@ -1122,7 +1197,30 @@
+@@ -1122,7 +1197,30 @@ int get_apm_state(t_thinkpad_state *thin
thinkpad_state->ac_state = STATE_ON;
break;
}
+#else
+ u_long addr;
+ size_t len = sizeof(addr);
-+
+
+ if ( fdsc != -1 || sysctlbyname("hw.acpi.acline", &addr, &len, NULL, 0) == -1 ) {
+#ifdef __i386__
+ // Try APM
@@ -133,7 +133,7 @@
+ if((fdsc = open("/dev/apm", O_RDONLY)) == -1)
+ return -1;
+ }
-
++
+ struct apm_info info;
+ if (ioctl(fdsc, APMIO_GETINFO, &info) == -1)
+ return -1;
@@ -149,7 +149,7 @@
return 0;
} /* }}} */
-@@ -1285,6 +1383,13 @@
+@@ -1285,6 +1383,13 @@ void set_nvram_volume_level(t_thinkpad_s
/* only use writeback to nvram when cfg.mixersteps is different from DEFAULT_MIXERSTEPS */
if(cfg.mixersteps != DEFAULT_MIXERSTEPS) {
@@ -163,7 +163,7 @@
/* open nvram */
if((fdsc = open(cfg.nvram, O_RDWR|O_NONBLOCK)) == -1) {
fprintf(stderr, _("Unable to open device %s: "), cfg.nvram);
-@@ -1326,8 +1431,10 @@
+@@ -1326,8 +1431,10 @@ void set_nvram_volume_level(t_thinkpad_s
}
close(fdsc);
diff --git a/deskutils/tpb/files/patch-src-tpb.h b/deskutils/tpb/files/patch-src-tpb.h
index 66d2d8e62d5e..00e28626212d 100644
--- a/deskutils/tpb/files/patch-src-tpb.h
+++ b/deskutils/tpb/files/patch-src-tpb.h
@@ -1,6 +1,6 @@
---- src/tpb.h.orig Mon Jun 13 14:32:31 2005
-+++ src/tpb.h Mon Jun 13 14:44:47 2005
-@@ -70,6 +70,7 @@
+--- src/tpb.h.orig 2005-07-18 14:15:59 UTC
++++ src/tpb.h
+@@ -70,6 +70,7 @@ typedef struct {
unsigned int ac_state; /* ac connected */
unsigned int powermgt_ac; /* power management mode ac */
unsigned int powermgt_battery; /* power management mode battery */
diff --git a/deskutils/tpb/pkg-plist b/deskutils/tpb/pkg-plist
index 1bacec52b3ed..12078ebc9ba3 100644
--- a/deskutils/tpb/pkg-plist
+++ b/deskutils/tpb/pkg-plist
@@ -1,7 +1,7 @@
bin/tpb
etc/tpbrc.default
man/man1/tpb.1.gz
-%%PORTDOCS%%%%DOCSDIR%%/callback_example.sh
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/callback_example.sh
%%NLS%%share/locale/da/LC_MESSAGES/tpb.mo
%%NLS%%share/locale/de/LC_MESSAGES/tpb.mo
%%NLS%%share/locale/ru/LC_MESSAGES/tpb.mo