| 1 | # $Id: Portfile 154190 2016-10-23 19:18:35Z ctreleaven@macports.org $ |
|---|
| 2 | |
|---|
| 3 | PortSystem 1.0 |
|---|
| 4 | PortGroup cxx11 1.0 |
|---|
| 5 | |
|---|
| 6 | name lirc |
|---|
| 7 | version 0.9.4c |
|---|
| 8 | |
|---|
| 9 | categories sysutils net |
|---|
| 10 | license {GPL-2+ OpenSSLException} |
|---|
| 11 | maintainers ctreleaven openmaintainer |
|---|
| 12 | platforms darwin |
|---|
| 13 | description Linux Infrared Remote Control |
|---|
| 14 | long_description \ |
|---|
| 15 | LIRC enables receiving and/or sending infra-red remote controls signals.\ |
|---|
| 16 | The only hardware is known to work (on the Mac operating system) includes the\ |
|---|
| 17 | IR receiver in older HDHomerun tuner boxes and the Sony Vaio PCVA-IR5U receiver.\ |
|---|
| 18 | Other hardware _could_ work but is untested. Lirc does not currently work with\ |
|---|
| 19 | the IR receiver built into various Mac models.\ |
|---|
| 20 | Lirc on OSX can also receive signals relayed from another Lirc server. |
|---|
| 21 | |
|---|
| 22 | homepage http://www.lirc.org |
|---|
| 23 | master_sites sourceforge |
|---|
| 24 | use_bzip2 yes |
|---|
| 25 | checksums rmd160 d83dfec714d4e50c97b8f63b76df0bc472df0123 \ |
|---|
| 26 | sha256 8974fe5dc8eaa717daab6785d2aefeec27615f01ec24b96d31e3381b2f70726a |
|---|
| 27 | |
|---|
| 28 | livecheck.distname LIRC |
|---|
| 29 | |
|---|
| 30 | set lircuser _lirc |
|---|
| 31 | set pythonbranch 3.4 |
|---|
| 32 | set pythonver python${pythonbranch} |
|---|
| 33 | set pythonbin ${prefix}/bin/${pythonver} |
|---|
| 34 | set pymodver py34 |
|---|
| 35 | |
|---|
| 36 | use_autoreconf yes |
|---|
| 37 | autoreconf.cmd ./autogen.sh |
|---|
| 38 | # setting autoreconf.cmd means that autotools build dependencies are not added |
|---|
| 39 | |
|---|
| 40 | depends_build-append \ |
|---|
| 41 | port:autoconf \ |
|---|
| 42 | port:automake \ |
|---|
| 43 | port:gsed \ |
|---|
| 44 | port:libtool \ |
|---|
| 45 | port:pkgconfig \ |
|---|
| 46 | port:doxygen \ |
|---|
| 47 | port:man2html |
|---|
| 48 | |
|---|
| 49 | depends_lib port:libftdi1 \ |
|---|
| 50 | port:gtk3 \ |
|---|
| 51 | port:portaudio \ |
|---|
| 52 | port:${pymodver}-gobject3 \ |
|---|
| 53 | port:${pymodver}-yaml \ |
|---|
| 54 | port:vte |
|---|
| 55 | |
|---|
| 56 | patchfiles patch-lirc_options.diff \ |
|---|
| 57 | patch-ftdi_support.diff |
|---|
| 58 | |
|---|
| 59 | post-patch { |
|---|
| 60 | reinplace -locale C "s|@PREFIX@|${prefix}|g" ${worksrcpath}/lirc_options.conf |
|---|
| 61 | reinplace -locale C "s|#!/usr/bin/env python3\$|#!${pythonbin}|" \ |
|---|
| 62 | ${worksrcpath}/doc/data2hwdb \ |
|---|
| 63 | ${worksrcpath}/doc/data2table \ |
|---|
| 64 | ${worksrcpath}/doc/make_rel_symlink.py \ |
|---|
| 65 | ${worksrcpath}/tools/check_configs.py \ |
|---|
| 66 | ${worksrcpath}/tools/irdb-get \ |
|---|
| 67 | ${worksrcpath}/tools/lirc-setup/lirc-setup \ |
|---|
| 68 | ${worksrcpath}/tools/lircd-setup \ |
|---|
| 69 | ${worksrcpath}/tools/make_rel_symlink.py \ |
|---|
| 70 | ${worksrcpath}/tools/pronto2lirc |
|---|
| 71 | } |
|---|
| 72 | |
|---|
| 73 | configure.env-append \ |
|---|
| 74 | PYTHON=${pythonbin} |
|---|
| 75 | configure.args --disable-silent-rules |
|---|
| 76 | |
|---|
| 77 | post-destroot { |
|---|
| 78 | xinstall -m 755 -d ${destroot}${prefix}/var/log |
|---|
| 79 | xinstall -m 755 -d ${destroot}${prefix}/var/run/lirc |
|---|
| 80 | destroot.keepdirs ${destroot}${prefix}/var/log \ |
|---|
| 81 | ${destroot}${prefix}/var/run/lirc |
|---|
| 82 | move ${destroot}${prefix}/etc/lirc/lirc_options.conf \ |
|---|
| 83 | ${destroot}${prefix}/etc/lirc/lirc_options.conf.template |
|---|
| 84 | } |
|---|
| 85 | |
|---|
| 86 | post-activate { |
|---|
| 87 | if ![file exists ${prefix}/etc/lirc/lirc_options.conf] { |
|---|
| 88 | copy ${prefix}/etc/lirc/lirc_options.conf.template \ |
|---|
| 89 | ${prefix}/etc/lirc/lirc_options.conf |
|---|
| 90 | } |
|---|
| 91 | } |
|---|
| 92 | |
|---|
| 93 | add_users ${lircuser} group=${lircuser} realname=LIRC\ user |
|---|
| 94 | |
|---|
| 95 | startupitem.create yes |
|---|
| 96 | startupitem.executable ${prefix}/sbin/lircd \ |
|---|
| 97 | --nodaemon --effective-user=${lircuser} |
|---|
| 98 | |
|---|
| 99 | notes " |
|---|
| 100 | Before starting the lircd background process, two configuration steps need to be\ |
|---|
| 101 | completed. First, edit ${prefix}/etc/lirc/lirc_options.conf to specify the driver\ |
|---|
| 102 | and device being used. Second, add at least one remote configuration file to\ |
|---|
| 103 | ${prefix}/etc/lirc/lircd.conf.d so lirc can interpret the infrared pulses that your remote\ |
|---|
| 104 | sends. The script irdb-get can help find existing remote configuration files or the\ |
|---|
| 105 | program irrecord can help create a configuration file for a particular remote. |
|---|
| 106 | |
|---|
| 107 | Any clients of lirc must be able to read and write the pipe at\ |
|---|
| 108 | ${prefix}/var/run/lircd |
|---|
| 109 | " |
|---|