126 lines (106 sloc) 4.56 KB
PortSystem 1.0
PortGroup cxx11 1.1
name lirc
version 0.9.4d
revision 4
categories sysutils net
license {GPL-2+ OpenSSLException}
maintainers {ctreleaven @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.
master_sites sourceforge
#use_bzip2 yes
checksums rmd160 998a726823a90ad79bde50fce3bd0417c950ab59 \
sha256 e225c8a6ed004ee0b3180d9bc8d8129dbc2b9ac3e0daccc2ca5e61ca16aae8d3
livecheck.distname LIRC
set lircuser _lirc
set pythonbranch 3.6
set pythonver python${pythonbranch}
set pythonbin ${prefix}/bin/${pythonver}
set pymodver py36
use_autoreconf yes
autoreconf.cmd ./
# 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:man \
depends_lib port:libusb \
port:libusb-compat \
port:libftdi1 \
patchfiles patch-commandir_support.diff
if {${os.platform} eq "darwin" && ${os.major} < 12} {
patchfiles-append old-scandir.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/ \
${worksrcpath}/tools/ \
${worksrcpath}/tools/irdb-get \
${worksrcpath}/tools/lirc-setup/lirc-setup \
${worksrcpath}/tools/lircd-setup \
${worksrcpath}/tools/ \
configure.env-append \
# consider variant for X programs (irxevent xmode2)
configure.args --without-x --disable-silent-rules
post-destroot {
xinstall -m 777 -d ${destroot}${prefix}/var/log/${name}
xinstall -m 777 -d ${destroot}${prefix}/var/run/${name}
destroot.keepdirs ${destroot}${prefix}/var/log/${name} \
move ${destroot}${prefix}/etc/lirc/lirc_options.conf \
if {![variant_isset gui]} {
delete ${destroot}${prefix}/bin/lirc-setup
delete ${destroot}${prefix}/lib/python3.4
post-activate {
if ![file exists ${prefix}/etc/lirc/lirc_options.conf] {
copy ${prefix}/etc/lirc/lirc_options.conf.template \
variant gui description { include experimental gui tools } {
depends_run-append port:gtk3 \
port:${pymodver}-gobject3 \
port:${pymodver}-yaml \
configure.args-replace --without-x --with-x
add_users ${lircuser} group=${lircuser} realname=LIRC\ user
startupitem.create yes
startupitem.executable ${prefix}/sbin/lircd \
--nodaemon --logfile=${prefix}/var/log/${name}/lircd.log \
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\