[154172] trunk/dports/sysutils/lirc

ctreleaven at macports.org ctreleaven at macports.org
Sun Oct 23 15:38:03 CEST 2016


Revision: 154172
          https://trac.macports.org/changeset/154172
Author:   ctreleaven at macports.org
Date:     2016-10-23 15:38:02 +0200 (Sun, 23 Oct 2016)
Log Message:
-----------
lirc:  update to 0.9.4c with significant changes, especially plugin drivers.  IquanaIR no longer supported.

Modified Paths:
--------------
    trunk/dports/sysutils/lirc/Portfile

Added Paths:
-----------
    trunk/dports/sysutils/lirc/files/patch-ftdi_support.diff
    trunk/dports/sysutils/lirc/files/patch-lirc_options.diff

Removed Paths:
-------------
    trunk/dports/sysutils/lirc/files/patch-drivers-lirc.h.diff
    trunk/dports/sysutils/lirc/files/patch-inline_functions.diff
    trunk/dports/sysutils/lirc/files/patch-osx_patches.diff

Modified: trunk/dports/sysutils/lirc/Portfile
===================================================================
--- trunk/dports/sysutils/lirc/Portfile	2016-10-23 13:24:13 UTC (rev 154171)
+++ trunk/dports/sysutils/lirc/Portfile	2016-10-23 13:38:02 UTC (rev 154172)
@@ -3,7 +3,8 @@
 PortSystem 1.0
 
 name            lirc
-version         0.9.0
+version         0.9.4c
+
 categories      sysutils net
 license         GPL-2+
 maintainers     ctreleaven openmaintainer
@@ -10,62 +11,97 @@
 platforms       darwin
 description     Linux Infrared Remote Control
 long_description \
-    LIRC is a package that allows you to decode and send infra-red \
-    signals of many (but not all) commonly used remote controls.
+    LIRC enables receiving and/or sending infra-red remote controls signals.\
+    The only hardware is known to work (on the Mac operating system) includes the\
+    IR receiver in older HDHomerun tuner boxes and the Sony Vaio PCVA-IR5U receiver.\
+    Other hardware _could_ work but is untested.  Lirc does not currently work with\
+    the IR receiver built into various Mac models.\
+    Lirc on OSX can also receive signals relayed from another Lirc server.
 
 homepage        http://www.lirc.org
 master_sites    sourceforge
 use_bzip2       yes
-checksums           rmd160  d8f1cf3a03573be36787e87adc71beba3e678a37 \
-                    sha256  6323afae6ad498d4369675f77ec3dbb680fe661bea586aa296e67f2e2daba4ff
+checksums           rmd160  d83dfec714d4e50c97b8f63b76df0bc472df0123 \
+                    sha256  8974fe5dc8eaa717daab6785d2aefeec27615f01ec24b96d31e3381b2f70726a
 
 livecheck.distname  LIRC
 
-patchfiles          patch-osx_patches.diff patch-inline_functions.diff
+set lircuser        _lirc
+set pythonbranch    3.4
+set pythonver       python${pythonbranch}
+set pythonbin       ${prefix}/bin/${pythonver}
+set pymodver        py34
 
-configure.args  --with-driver=udp --with-devdir=${prefix}/var/run \
-                --sysconfdir=${prefix}/etc --localstatedir=${prefix}/var \
-                --mandir=${prefix}/share/man
+use_autoreconf      yes
+autoreconf.cmd      ./autogen.sh
+# setting autoreconf.cmd means that autotools build dependencies are not added
 
-variant iguanaIR \
-    description {Use IguanaIR USB device} {
-    configure.args-replace    --with-driver=udp --with-driver=iguanaIR
-    depends_lib-append        port:iguanaIR
-    patchfiles-append         patch-drivers-lirc.h.diff
+depends_build-append \
+                    port:autoconf \
+                    port:automake \
+                    port:libtool \
+                    port:pkgconfig \
+                    port:doxygen \
+                    port:man2html
+
+depends_lib         port:libftdi1 \
+                    port:gtk3 \
+                    port:portaudio \
+                    port:${pymodver}-gobject3 \
+                    port:${pymodver}-yaml \
+                    port:vte
+
+patchfiles          patch-lirc_options.diff \
+                    patch-ftdi_support.diff
+
+post-patch {
+    reinplace -locale C "s|@PREFIX@|${prefix}|g" ${worksrcpath}/lirc_options.conf
+    reinplace -locale C "s|#!/usr/bin/env python3\$|#!${pythonbin}|" \
+        ${worksrcpath}/doc/data2hwdb \
+        ${worksrcpath}/doc/data2table \
+        ${worksrcpath}/doc/make_rel_symlink.py \
+        ${worksrcpath}/tools/check_configs.py \
+        ${worksrcpath}/tools/irdb-get \
+        ${worksrcpath}/tools/lirc-setup/lirc-setup \
+        ${worksrcpath}/tools/lircd-setup \
+        ${worksrcpath}/tools/make_rel_symlink.py \
+        ${worksrcpath}/tools/pronto2lirc
 }
 
+configure.env-append \
+                    PYTHON=${pythonbin}
+configure.args      --disable-silent-rules
+
 post-destroot {
-    xinstall -m 644 ${worksrcpath}/contrib/lircd.conf \
-        ${destroot}${prefix}/etc/lircd.conf.sample
-    xinstall -m 644 ${worksrcpath}/contrib/lircmd.conf \
-        ${destroot}${prefix}/etc/lircmd.conf.sample
-    xinstall -m 644 ${worksrcpath}/contrib/lircrc \
-        ${destroot}${prefix}/etc/lircrc.sample
     xinstall -m 755 -d ${destroot}${prefix}/var/log
-    destroot.keepdirs ${destroot}${prefix}/var/log
+    xinstall -m 755 -d ${destroot}${prefix}/var/run/lirc
+    destroot.keepdirs ${destroot}${prefix}/var/log \
+        ${destroot}${prefix}/var/run/lirc
+    move ${destroot}${prefix}/etc/lirc/lirc_options.conf \
+        ${destroot}${prefix}/etc/lirc/lirc_options.conf.template
 }
 
-startupitem.create  yes
-startupitem.start   \
-    "#device=\"--connect=example.org:port\"  # remote lircd" \
-    "#device=\"--driver=udp --device=port\"  # UDP listener" \
-    "#device=\"--driver=iguanaIR --device=/tmp/iguanaIR/0 --nodaemon\"  # iguanaIR" \
-    "${prefix}/sbin/lircd --permission=0666 \$\{device\}" \
-    "\[ -r ${prefix}/etc/lircmd.conf \] && \\" \
-    "\t${prefix}/sbin/lircmd"
-startupitem.stop    \
-    "killall -TERM lircd" \
-    "killall -TERM lircmd"
+post-activate {
+    if ![file exists ${prefix}/etc/lirc/lirc_options.conf] {
+        copy ${prefix}/etc/lirc/lirc_options.conf.template \
+            ${prefix}/etc/lirc/lirc_options.conf
+    }
+}
 
+add_users ${lircuser} group=${lircuser} realname=LIRC\ user
+
+startupitem.create        yes
+startupitem.executable    ${prefix}/sbin/lircd \
+                          --nodaemon --effective-user=${lircuser}
+
 notes "
-After installing you must configure an IR device for lirc to use. Most\
-hardware devices are not supported on Mac OS X (known exceptions: IguanaIR).\
-Network sources (remote lircd, HD Homerun, etc) are fully supported.
+Before starting the lircd background process, two configuration steps need to be\
+completed.  First, edit ${prefix}/etc/lirc/lirc_options.conf to specify the driver\
+and device being used.  Second, add at least one remote configuration file to\
+${prefix}/etc/lirc/lircd.conf.d so lirc can interpret the infrared pulses that your remote\
+sends.  The script irdb-get can help find existing remote configuration files or the\
+program irrecord can help create a configuration file for a particular remote.
 
-Please edit ${prefix}/etc/LaunchDaemons/org.macports.${name}/${name}.wrapper\
-and specify a valid driver or remote lircd to connect to. Examples for\
-network, UDP, and IguanaIR are commented out.
-
 Any clients of lirc must be able to read and write the pipe at\
 ${prefix}/var/run/lircd
 "

Deleted: trunk/dports/sysutils/lirc/files/patch-drivers-lirc.h.diff
===================================================================
--- trunk/dports/sysutils/lirc/files/patch-drivers-lirc.h.diff	2016-10-23 13:24:13 UTC (rev 154171)
+++ trunk/dports/sysutils/lirc/files/patch-drivers-lirc.h.diff	2016-10-23 13:38:02 UTC (rev 154172)
@@ -1,11 +0,0 @@
---- drivers/lirc.h.org	2008-01-12 15:57:57.000000000 -0600
-+++ drivers/lirc.h	2010-01-21 10:03:23.000000000 -0600
-@@ -9,7 +9,7 @@
- #if defined(__linux__)
- #include <linux/types.h>
- #include <linux/ioctl.h>
--#elif defined(_NetBSD_)
-+#elif defined(_NetBSD_) || defined(__APPLE__)
- #include <sys/ioctl.h>
- #elif defined(_CYGWIN_)
- #define __USE_LINUX_IOCTL_DEFS

Added: trunk/dports/sysutils/lirc/files/patch-ftdi_support.diff
===================================================================
--- trunk/dports/sysutils/lirc/files/patch-ftdi_support.diff	                        (rev 0)
+++ trunk/dports/sysutils/lirc/files/patch-ftdi_support.diff	2016-10-23 13:38:02 UTC (rev 154172)
@@ -0,0 +1,30 @@
+$ diff -u include/media/lirc.h.orig include/media/lirc.h
+--- include/media/lirc.h.orig	2016-10-22 13:09:42.000000000 -0400
++++ include/media/lirc.h	2016-10-22 13:10:05.000000000 -0400
+@@ -6,8 +6,8 @@
+ #ifndef _LINUX_LIRC_H
+ #define _LINUX_LIRC_H
+ 
+-#include <linux/types.h>
+-#include <linux/ioctl.h>
++#include <sys/types.h>
++#include <sys/ioctl.h>
+ 
+ #define PULSE_BIT       0x01000000
+ #define PULSE_MASK      0x00FFFFFF
+~~~
+
+~~~
+$ diff -u plugins/ftdix.c.orig plugins/ftdix.c
+--- plugins/ftdix.c.orig	2016-10-22 13:18:40.000000000 -0400
++++ plugins/ftdix.c	2016-10-22 13:44:14.000000000 -0400
+@@ -51,7 +51,7 @@
+ 
+ #include <ftdi.h>
+ 
+-#define LIRC_FTDIX_SET_SCHEDULER 1
++/* #define LIRC_FTDIX_SET_SCHEDULER 1 */
+ #ifdef LIRC_FTDIX_SET_SCHEDULER
+ #include <sched.h>
+ #include <linux/sched.h>
+

Deleted: trunk/dports/sysutils/lirc/files/patch-inline_functions.diff
===================================================================
--- trunk/dports/sysutils/lirc/files/patch-inline_functions.diff	2016-10-23 13:24:13 UTC (rev 154171)
+++ trunk/dports/sysutils/lirc/files/patch-inline_functions.diff	2016-10-23 13:38:02 UTC (rev 154172)
@@ -1,58 +0,0 @@
---- daemons/receive.c.orig	2015-01-07 21:18:22.000000000 +1030
-+++ daemons/receive.c	2015-01-07 21:19:52.000000000 +1030
-@@ -286,7 +286,7 @@
- 	return (retval);
- }
- 
--inline int expectone(struct ir_remote *remote, int bit)
-+static inline int expectone(struct ir_remote *remote, int bit)
- {
- 	if (is_biphase(remote)) {
- 		int all_bits = bit_count(remote);
-@@ -332,7 +332,7 @@
- 	return (1);
- }
- 
--inline int expectzero(struct ir_remote *remote, int bit)
-+static inline int expectzero(struct ir_remote *remote, int bit)
- {
- 	if (is_biphase(remote)) {
- 		int all_bits = bit_count(remote);
-@@ -414,7 +414,7 @@
- 	return (deltas);
- }
- 
--inline int get_header(struct ir_remote *remote)
-+static inline int get_header(struct ir_remote *remote)
- {
- 	if (is_rcmm(remote)) {
- 		lirc_t deltap, deltas, sum;
-@@ -524,7 +524,7 @@
- 	return (1);
- }
- 
--inline int get_repeat(struct ir_remote *remote)
-+static inline int get_repeat(struct ir_remote *remote)
- {
- 	if (!get_lead(remote))
- 		return (0);
---- daemons/transmit.c.orig	2015-01-07 21:38:21.000000000 +1030
-+++ daemons/transmit.c	2015-01-07 21:38:34.000000000 +1030
-@@ -179,7 +179,7 @@
- 	}
- }
- 
--inline void send_data(struct ir_remote *remote, ir_code data, int bits, int done)
-+static inline void send_data(struct ir_remote *remote, ir_code data, int bits, int done)
- {
- 	int i;
- 	int all_bits = bit_count(remote);
-@@ -313,7 +313,7 @@
- 	send_trail(remote);
- }
- 
--inline void send_code(struct ir_remote *remote, ir_code code, int repeat)
-+static inline void send_code(struct ir_remote *remote, ir_code code, int repeat)
- {
- 	if (!repeat || !(remote->flags & NO_HEAD_REP))
- 		send_header(remote);

Added: trunk/dports/sysutils/lirc/files/patch-lirc_options.diff
===================================================================
--- trunk/dports/sysutils/lirc/files/patch-lirc_options.diff	                        (rev 0)
+++ trunk/dports/sysutils/lirc/files/patch-lirc_options.diff	2016-10-23 13:38:02 UTC (rev 154172)
@@ -0,0 +1,40 @@
+$ diff -u lirc_options.conf.orig lirc_options.conf
+--- lirc_options.conf.orig	2016-10-22 20:41:07.000000000 -0400
++++ lirc_options.conf	2016-10-22 20:45:57.000000000 -0400
+@@ -7,26 +7,26 @@
+ # in not defined elsewhere.
+ 
+ [lircd]
+-nodaemon        = False
+-driver          = devinput
+-device          = auto
+-output          = /var/run/lirc/lircd
+-pidfile         = /var/run/lirc/lircd.pid
+-plugindir       = /usr/lib/lirc/plugins
++nodaemon        = True
++driver          = udp
++device          = 5000
++output          = @PREFIX@/var/run/lirc/lircd
++pidfile         = @PREFIX@/var/run/lirc/lircd.pid
++plugindir       = @PREFIX@/lib/lirc/plugins
+ permission      = 666
+ allow-simulate  = No
+ repeat-max      = 600
+-#effective-user =
++logfile         = @PREFIX@/var/run/lirc/lircd.log
++#loglevel        = 5
++#effective-user = _lirc # set by launchd plist
+ #listen         = [address:]port
+ #connect        = host[:port]
+-#loglevel       = 6
+ #uinput         = ...
+ #release        = ...
+-#logfile        = ...
+ 
+ [lircmd]
+ uinput          = False
+-nodaemon        = False
++nodaemon        = True
+ 
+ # [modinit]
+ # code = /usr/sbin/modprobe lirc_serial

Deleted: trunk/dports/sysutils/lirc/files/patch-osx_patches.diff
===================================================================
--- trunk/dports/sysutils/lirc/files/patch-osx_patches.diff	2016-10-23 13:24:13 UTC (rev 154171)
+++ trunk/dports/sysutils/lirc/files/patch-osx_patches.diff	2016-10-23 13:38:02 UTC (rev 154172)
@@ -1,45 +0,0 @@
-Extracted from https://sourceforge.net/u/rico9999/lirc/ci/f7c2830bbd60692feedf0dc8924b795027eaf3af/
-
---- daemons/ir_remote_types.h
-+++ daemons/ir_remote_types.h
-@@ -14,7 +14,20 @@
- #ifndef IR_REMOTE_TYPES_H
- #define IR_REMOTE_TYPES_H
- 
-+#if defined(__linux__)
- #include <sys/types.h>
-+#else
-+#include <stdint.h>
-+typedef int8_t   __s8;
-+typedef uint8_t  __u8;
-+typedef int16_t  __s16;
-+typedef uint16_t __u16;
-+typedef int32_t  __s32;
-+typedef uint32_t __u32;
-+typedef int64_t  __s64;
-+typedef uint64_t __u64;
-+#endif
-+
- #include <sys/time.h>
- #include <unistd.h>
- #include <string.h>
-
---- daemons/lircmd.c
-+++ daemons/lircmd.c
-@@ -35,6 +35,16 @@
- #if defined(__linux__)
- #include <linux/input.h>
- #include <linux/uinput.h>
-+#else
-+#include <stdint.h>
-+typedef int8_t   __s8;
-+typedef uint8_t  __u8;
-+typedef int16_t  __s16;
-+typedef uint16_t __u16;
-+typedef int32_t  __s32;
-+typedef uint32_t __u32;
-+typedef int64_t  __s64;
-+typedef uint64_t __u64;
- #endif
- 
- #define CLICK_DELAY 50000	/* usecs */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-changes/attachments/20161023/1ebb87fa/attachment-0002.html>


More information about the macports-changes mailing list