# $Id: Portfile 154190 2016-10-23 19:18:35Z ctreleaven@macports.org $ PortSystem 1.0 PortGroup cxx11 1.0 name lirc version 0.9.4c categories sysutils net license {GPL-2+ OpenSSLException} maintainers ctreleaven openmaintainer platforms darwin description Linux Infrared Remote Control long_description \ 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 d83dfec714d4e50c97b8f63b76df0bc472df0123 \ sha256 8974fe5dc8eaa717daab6785d2aefeec27615f01ec24b96d31e3381b2f70726a livecheck.distname LIRC set lircuser _lirc set pythonbranch 3.4 set pythonver python${pythonbranch} set pythonbin ${prefix}/bin/${pythonver} set pymodver py34 use_autoreconf yes autoreconf.cmd ./autogen.sh # setting autoreconf.cmd means that autotools build dependencies are not added depends_build-append \ port:autoconf \ port:automake \ port:gsed \ 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 755 -d ${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 } 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 " 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. Any clients of lirc must be able to read and write the pipe at\ ${prefix}/var/run/lircd "