aboutsummaryrefslogtreecommitdiffstats
path: root/comms
diff options
context:
space:
mode:
authornox <nox@FreeBSD.org>2011-06-29 02:12:32 +0800
committernox <nox@FreeBSD.org>2011-06-29 02:12:32 +0800
commit6a84cd73985d13aa87be58ac426d362704ec6add (patch)
treecacb6b4a74155d0d68148fe19e2fa6238a632b9b /comms
parentebcf83919eff7d112bdff1e9d6e0d67eb998f19b (diff)
downloadfreebsd-ports-gnome-6a84cd73985d13aa87be58ac426d362704ec6add.tar.gz
freebsd-ports-gnome-6a84cd73985d13aa87be58ac426d362704ec6add.tar.zst
freebsd-ports-gnome-6a84cd73985d13aa87be58ac426d362704ec6add.zip
- Update to 0.9.0 .
- Add devinput driver (/dev/input/eventX, -H devinput) in preparation for upcoming webcamd update that will support it. - Fix build with clang, and a few bugs it found too.
Diffstat (limited to 'comms')
-rw-r--r--comms/lirc/Makefile14
-rw-r--r--comms/lirc/distinfo4
-rw-r--r--comms/lirc/files/lircd.conf.in7
-rw-r--r--comms/lirc/files/patch-daemons::dump_config.c36
-rw-r--r--comms/lirc/files/patch-daemons::hw_devinput.c52
-rw-r--r--comms/lirc/files/patch-daemons::ir_remote.c11
-rw-r--r--comms/lirc/files/patch-daemons::lircd.c20
7 files changed, 137 insertions, 7 deletions
diff --git a/comms/lirc/Makefile b/comms/lirc/Makefile
index ed088cae4a0f..c81ea71e1b12 100644
--- a/comms/lirc/Makefile
+++ b/comms/lirc/Makefile
@@ -6,29 +6,33 @@
#
PORTNAME= lirc
-PORTVERSION= 0.9.0p1
-PORTREVISION= 7
+PORTVERSION= 0.9.0
+PORTEPOCH= 1
CATEGORIES= comms
-MASTER_SITES= http://lirc.org/software/snapshots/
+MASTER_SITES= SF/${PORTNAME}/LIRC/${PORTVERSION}
DISTNAME= ${PORTNAME}-${PORTVERSION:S/p1/-pre1/}
MAINTAINER= nox@FreeBSD.org
COMMENT= Linux Infrared Remote Control
+BUILD_DEPENDS= v4l_compat>=1.0.20110603:${PORTSDIR}/multimedia/v4l_compat
+
USE_AUTOTOOLS= libtool automake autoheader aclocal autoconf
ACLOCAL_ARGS= -I "${ACLOCAL_DIR}" -I ${LOCALBASE}/share/aclocal
USE_BZIP2= yes
USE_GMAKE= yes
USE_XORG= x11
USE_PYTHON= yes
+USE_CSTD= gnu89
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
MAKE_JOBS_SAFE= yes
-CONFIGURE_ARGS= --enable-sandboxed --with-devdir=/var/run/lirc
+CONFIGURE_ARGS= --enable-sandboxed --with-devdir=/var/run/lirc \
+ --sysconfdir=${PREFIX}/etc
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
-CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
+CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}"
OPTIONS= MINIMAL "Build with minmal dependencies" Off \
DEBUG "Build debug version" Off
diff --git a/comms/lirc/distinfo b/comms/lirc/distinfo
index e2b8bd5de767..2c4230341988 100644
--- a/comms/lirc/distinfo
+++ b/comms/lirc/distinfo
@@ -1,2 +1,2 @@
-SHA256 (lirc-0.9.0-pre1.tar.bz2) = 6724514d76077cc087bd4e12d880744442223e7e4ecfd0aa515c1610bc13b5f1
-SIZE (lirc-0.9.0-pre1.tar.bz2) = 837920
+SHA256 (lirc-0.9.0.tar.bz2) = 6323afae6ad498d4369675f77ec3dbb680fe661bea586aa296e67f2e2daba4ff
+SIZE (lirc-0.9.0.tar.bz2) = 857286
diff --git a/comms/lirc/files/lircd.conf.in b/comms/lirc/files/lircd.conf.in
index 6dfc9dfeb368..e80e52186013 100644
--- a/comms/lirc/files/lircd.conf.in
+++ b/comms/lirc/files/lircd.conf.in
@@ -556,3 +556,10 @@ end remote
# also support by default remotes coming with MCE USB receivers
include "%%EXAMPLESDIR%%/remotes/mceusb/lircd.conf.mceusb"
+
+# ..and the devinput driver that can be used with the updated webcamd
+# by setting the following in rc.conf(5):
+#
+# lircd_flags="-H devinput"
+# lircd_device="/dev/input/event0"
+include "%%EXAMPLESDIR%%/remotes/devinput/lircd.conf.devinput"
diff --git a/comms/lirc/files/patch-daemons::dump_config.c b/comms/lirc/files/patch-daemons::dump_config.c
new file mode 100644
index 000000000000..6e3e61dde355
--- /dev/null
+++ b/comms/lirc/files/patch-daemons::dump_config.c
@@ -0,0 +1,36 @@
+--- daemons/dump_config.c.orig
++++ daemons/dump_config.c
+@@ -120,11 +120,11 @@ void fprint_remote_head(FILE * f, struct
+ if (!is_raw(rem)) {
+ if (rem->pre_data_bits > 0) {
+ fprintf(f, " pre_data_bits %d\n", rem->pre_data_bits);
+- fprintf(f, " pre_data 0x%llX\n", rem->pre_data);
++ fprintf(f, " pre_data 0x%llX\n", (unsigned long long)rem->pre_data);
+ }
+ if (rem->post_data_bits > 0) {
+ fprintf(f, " post_data_bits %d\n", rem->post_data_bits);
+- fprintf(f, " post_data 0x%llX\n", rem->post_data);
++ fprintf(f, " post_data 0x%llX\n", (unsigned long long)rem->post_data);
+ }
+ if (rem->pre_p != 0 && rem->pre_s != 0) {
+ fprintf(f, " pre %5u %5u\n", (__u32) rem->pre_p, (__u32) rem->pre_s);
+@@ -151,15 +151,15 @@ void fprint_remote_head(FILE * f, struct
+ if (rem->min_code_repeat > 0) {
+ fprintf(f, " min_code_repeat %d\n", rem->min_code_repeat);
+ }
+- fprintf(f, " toggle_bit_mask 0x%llX\n", rem->toggle_bit_mask);
++ fprintf(f, " toggle_bit_mask 0x%llX\n", (unsigned long long)rem->toggle_bit_mask);
+ if (has_toggle_mask(rem)) {
+- fprintf(f, " toggle_mask 0x%llX\n", rem->toggle_mask);
++ fprintf(f, " toggle_mask 0x%llX\n", (unsigned long long)rem->toggle_mask);
+ }
+ if (rem->rc6_mask != 0) {
+- fprintf(f, " rc6_mask 0x%llX\n", rem->rc6_mask);
++ fprintf(f, " rc6_mask 0x%llX\n", (unsigned long long)rem->rc6_mask);
+ }
+ if (has_ignore_mask(rem)) {
+- fprintf(f, " ignore_mask 0x%llX\n", rem->ignore_mask);
++ fprintf(f, " ignore_mask 0x%llX\n", (unsigned long long)rem->ignore_mask);
+ }
+ if (is_serial(rem)) {
+ fprintf(f, " baud %d\n", rem->baud);
diff --git a/comms/lirc/files/patch-daemons::hw_devinput.c b/comms/lirc/files/patch-daemons::hw_devinput.c
new file mode 100644
index 000000000000..f87dcd3891e1
--- /dev/null
+++ b/comms/lirc/files/patch-daemons::hw_devinput.c
@@ -0,0 +1,52 @@
+--- daemons/hw_devinput.c.orig
++++ daemons/hw_devinput.c
+@@ -376,9 +376,15 @@ int devinput_decode(struct ir_remote *re
+ return 1;
+ }
+
++/* simulate key repeat if receiving the same scancode again */
++#define RPT_SCAN
++
+ char *devinput_rec(struct ir_remote *remotes)
+ {
+ struct input_event event;
++#ifdef RPT_SCAN
++ static struct input_event rptevent, scancodeevent;
++#endif
+ int rd;
+ ir_code value;
+
+@@ -399,6 +405,23 @@ char *devinput_rec(struct ir_remote *rem
+ LOGPRINTF(1, "time %ld.%06ld type %d code %d value %d", event.time.tv_sec, event.time.tv_usec, event.type,
+ event.code, event.value);
+
++#ifdef RPT_SCAN
++ repeat_state = RPT_UNKNOWN;
++ if (event.type == EV_KEY)
++ rptevent = event;
++ else if (event.type == EV_MSC && event.code == MSC_SCAN) {
++ if (scancodeevent.type == EV_MSC &&
++ event.value == scancodeevent.value) {
++ if (rptevent.type == EV_KEY && rptevent.value != 0) {
++ event = rptevent;
++ event.value = 2;
++ repeat_state = RPT_YES;
++ }
++ } else if (rptevent.type == EV_KEY && rptevent.value == 0) {
++ scancodeevent = event;
++ }
++ }
++#endif
+ value = (unsigned)event.value;
+ #ifdef EV_SW
+ if (value == 2 && (event.type == EV_KEY || event.type == EV_SW)) {
+@@ -418,6 +441,9 @@ char *devinput_rec(struct ir_remote *rem
+ if (event.value == 2) {
+ repeat_state = RPT_YES;
+ } else {
++#ifdef RPT_SCAN
++ if (repeat_state == RPT_UNKNOWN)
++#endif
+ repeat_state = RPT_NO;
+ }
+ } else {
diff --git a/comms/lirc/files/patch-daemons::ir_remote.c b/comms/lirc/files/patch-daemons::ir_remote.c
new file mode 100644
index 000000000000..bc587b5a229f
--- /dev/null
+++ b/comms/lirc/files/patch-daemons::ir_remote.c
@@ -0,0 +1,11 @@
+--- daemons/ir_remote.c.orig
++++ daemons/ir_remote.c
+@@ -490,7 +490,7 @@ int write_message(char *buffer, size_t s
+ {
+ int len;
+
+- len = snprintf(buffer, size, "%016llx %02x %s%s %s\n", code, reps, button_name, button_suffix, remote_name);
++ len = snprintf(buffer, size, "%016llx %02x %s%s %s\n", (unsigned long long)code, reps, button_name, button_suffix, remote_name);
+
+ return len;
+ }
diff --git a/comms/lirc/files/patch-daemons::lircd.c b/comms/lirc/files/patch-daemons::lircd.c
new file mode 100644
index 000000000000..b2b23d3d2fe2
--- /dev/null
+++ b/comms/lirc/files/patch-daemons::lircd.c
@@ -0,0 +1,20 @@
+--- daemons/lircd.c.orig
++++ daemons/lircd.c
+@@ -1318,7 +1318,7 @@ int send_remote(int fd, char *message, s
+
+ codes = remote->codes;
+ while (codes->name != NULL) {
+- len = snprintf(buffer, PACKET_SIZE, "%016llx %s\n", codes->code, codes->name);
++ len = snprintf(buffer, PACKET_SIZE, "%016llx %s\n", (unsigned long long)codes->code, codes->name);
+ if (len >= PACKET_SIZE + 1) {
+ len = sprintf(buffer, "code_too_long\n");
+ }
+@@ -1338,7 +1338,7 @@ int send_name(int fd, char *message, str
+ (write_socket_len(fd, protocol_string[P_BEGIN]) && write_socket_len(fd, message)
+ && write_socket_len(fd, protocol_string[P_SUCCESS]) && write_socket_len(fd, protocol_string[P_DATA])))
+ return (0);
+- len = snprintf(buffer, PACKET_SIZE, "1\n%016llx %s\n", code->code, code->name);
++ len = snprintf(buffer, PACKET_SIZE, "1\n%016llx %s\n", (unsigned long long)code->code, code->name);
+ if (len >= PACKET_SIZE + 1) {
+ len = sprintf(buffer, "1\ncode_too_long\n");
+ }