svn commit: r425045 - in head/deskutils/tpb: . files
Dmitry Marakasov
amdmi3 at FreeBSD.org
Tue Nov 1 09:04:22 UTC 2016
Author: amdmi3
Date: Tue Nov 1 09:04:19 2016
New Revision: 425045
URL: https://svnweb.freebsd.org/changeset/ports/425045
Log:
- Fix LICENSE
- Add LICENSE_FILE
- Switch to options helpers
- Add missing depends
- Regenerate patches
- Install example as EXAMPLES, not docs
Modified:
head/deskutils/tpb/Makefile
head/deskutils/tpb/files/patch-Makefile.in
head/deskutils/tpb/files/patch-man-tpb.1
head/deskutils/tpb/files/patch-src-Makefile.in
head/deskutils/tpb/files/patch-src-cfg.c
head/deskutils/tpb/files/patch-src-cfg.h
head/deskutils/tpb/files/patch-src-tpb.c
head/deskutils/tpb/files/patch-src-tpb.h
head/deskutils/tpb/pkg-plist
Modified: head/deskutils/tpb/Makefile
==============================================================================
--- head/deskutils/tpb/Makefile Tue Nov 1 08:06:16 2016 (r425044)
+++ head/deskutils/tpb/Makefile Tue Nov 1 09:04:19 2016 (r425045)
@@ -10,21 +10,20 @@ MASTER_SITES= SAVANNAH
MAINTAINER= ports at 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>
Modified: head/deskutils/tpb/files/patch-Makefile.in
==============================================================================
--- head/deskutils/tpb/files/patch-Makefile.in Tue Nov 1 08:06:16 2016 (r425044)
+++ head/deskutils/tpb/files/patch-Makefile.in Tue Nov 1 09:04:19 2016 (r425045)
@@ -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@
Modified: head/deskutils/tpb/files/patch-man-tpb.1
==============================================================================
--- head/deskutils/tpb/files/patch-man-tpb.1 Tue Nov 1 08:06:16 2016 (r425044)
+++ head/deskutils/tpb/files/patch-man-tpb.1 Tue Nov 1 09:04:19 2016 (r425045)
@@ -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"
Modified: head/deskutils/tpb/files/patch-src-Makefile.in
==============================================================================
--- head/deskutils/tpb/files/patch-src-Makefile.in Tue Nov 1 08:06:16 2016 (r425044)
+++ head/deskutils/tpb/files/patch-src-Makefile.in Tue Nov 1 09:04:19 2016 (r425045)
@@ -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@
Modified: head/deskutils/tpb/files/patch-src-cfg.c
==============================================================================
--- head/deskutils/tpb/files/patch-src-cfg.c Tue Nov 1 08:06:16 2016 (r425044)
+++ head/deskutils/tpb/files/patch-src-cfg.c Tue Nov 1 09:04:19 2016 (r425045)
@@ -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) {
Modified: head/deskutils/tpb/files/patch-src-cfg.h
==============================================================================
--- head/deskutils/tpb/files/patch-src-cfg.h Tue Nov 1 08:06:16 2016 (r425044)
+++ head/deskutils/tpb/files/patch-src-cfg.h Tue Nov 1 09:04:19 2016 (r425045)
@@ -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 */
Modified: head/deskutils/tpb/files/patch-src-tpb.c
==============================================================================
--- head/deskutils/tpb/files/patch-src-tpb.c Tue Nov 1 08:06:16 2016 (r425044)
+++ head/deskutils/tpb/files/patch-src-tpb.c Tue Nov 1 09:04:19 2016 (r425045)
@@ -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);
Modified: head/deskutils/tpb/files/patch-src-tpb.h
==============================================================================
--- head/deskutils/tpb/files/patch-src-tpb.h Tue Nov 1 08:06:16 2016 (r425044)
+++ head/deskutils/tpb/files/patch-src-tpb.h Tue Nov 1 09:04:19 2016 (r425045)
@@ -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 */
Modified: head/deskutils/tpb/pkg-plist
==============================================================================
--- head/deskutils/tpb/pkg-plist Tue Nov 1 08:06:16 2016 (r425044)
+++ head/deskutils/tpb/pkg-plist Tue Nov 1 09:04:19 2016 (r425045)
@@ -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
More information about the svn-ports-head
mailing list