Gentoo Archives: gentoo-commits

From: Michael Palimaka <kensington@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/lirc/
Date: Sat, 04 Mar 2017 00:55:58
Message-Id: 1488588940.490c8a5d7d43496a2681219633c7356dd0ddf7ca.kensington@gentoo
1 commit: 490c8a5d7d43496a2681219633c7356dd0ddf7ca
2 Author: Craig Andrews <candrews <AT> integralblue <DOT> com>
3 AuthorDate: Fri Mar 3 22:11:25 2017 +0000
4 Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org>
5 CommitDate: Sat Mar 4 00:55:40 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=490c8a5d
7
8 app-misc/lirc: 0.9.4d version bump
9
10 Package-Manager: Portage-2.3.4, Repoman-2.3.2
11
12 app-misc/lirc/Manifest | 1 +
13 app-misc/lirc/lirc-0.9.4d.ebuild | 150 +++++++++++++++++++++++++++++++++++++++
14 2 files changed, 151 insertions(+)
15
16 diff --git a/app-misc/lirc/Manifest b/app-misc/lirc/Manifest
17 index 7cb5196abee..79f643bb7fd 100644
18 --- a/app-misc/lirc/Manifest
19 +++ b/app-misc/lirc/Manifest
20 @@ -1,3 +1,4 @@
21 DIST lirc-0.9.0.tar.bz2 857286 SHA256 6323afae6ad498d4369675f77ec3dbb680fe661bea586aa296e67f2e2daba4ff SHA512 e91534c63e6065bd7da3b15e1676edf1672b8beb21864a6825df86247d7d165bf2dee6f8191732933e24e42a406e46afc55559948e4061eed2de7b08fac13431 WHIRLPOOL 0a1c00b07898aa7a5d78865fb73c6d26c6331dd0a4945773a801d29e40298b365eb58cae113a95fcf73be678a24ac082ad0868e8051303d732882fb82a859a7b
22 DIST lirc-0.9.4a.tar.bz2 2292119 SHA256 386086a74c7d12e7e8f26f7dbc8f40d20b9968c9ad2a42599483a51dd2da03ba SHA512 16be0ac5dd9b07d717ceba63cdc38c0db4a2bdcfc373ca6346d7cd4ab2cd2973aa7585d10b045fcaea952a3aabf7617c564ccb8268db6c62b172683a4b2cc188 WHIRLPOOL 93431c43d2dd31081e97113e2d49134de7feb29be53508900b3360408f7a099becf169fcebd0f6fc196280c594dc83d1299617ee54b65452828492db9bcd09ad
23 DIST lirc-0.9.4c.tar.bz2 2311300 SHA256 8974fe5dc8eaa717daab6785d2aefeec27615f01ec24b96d31e3381b2f70726a SHA512 0a0d0e025b87a55ec919c92824d8288bfaf35cfebae0ee97d86e344109f584baa72a2eff6d24fbc526900671d6092e0eebef8d1566559b0d153e122e3127c0cb WHIRLPOOL a614fc10b0e40831e81c558439ea528ae0628d64e55b272b9b5a97cb93cba2b8759062a5258c732fa97c2be7966226c3aca2efe2de84aad1f62211146d202efc
24 +DIST lirc-0.9.4d.tar.bz2 2489704 SHA256 c68f18c35b489b865c0a741d119b136e8702191538cd3551b977a7af6c4e41ab SHA512 fb3892e12fbe5277e04c451694f1ea4ed45cc424d66ea57b11c4ac4760afa7df4b37897f380b4ade464a82523a0cee336f216d2009ea9431333fd7ca74a8336c WHIRLPOOL c5b1d803d4bb8e269ae96a69f351b304298fd6577fd1d8871f024f1b118e71f392945153cb397a840c5f1b71d1fa475db1bb04d381c18c8580c9e148238cfeea
25
26 diff --git a/app-misc/lirc/lirc-0.9.4d.ebuild b/app-misc/lirc/lirc-0.9.4d.ebuild
27 new file mode 100644
28 index 00000000000..0d55080f738
29 --- /dev/null
30 +++ b/app-misc/lirc/lirc-0.9.4d.ebuild
31 @@ -0,0 +1,150 @@
32 +# Copyright 1999-2017 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=6
36 +
37 +PYTHON_COMPAT=( python3_4 python3_5 )
38 +
39 +inherit eutils flag-o-matic python-single-r1 systemd xdg-utils
40 +
41 +DESCRIPTION="decode and send infra-red signals of many commonly used remote controls"
42 +HOMEPAGE="http://www.lirc.org/"
43 +
44 +LIRC_DRIVER_DEVICE="/dev/lirc0"
45 +
46 +MY_P=${PN}-${PV/_/}
47 +
48 +if [[ "${PV/_pre/}" = "${PV}" ]]; then
49 + SRC_URI="mirror://sourceforge/lirc/${MY_P}.tar.bz2"
50 +else
51 + SRC_URI="http://www.lirc.org/software/snapshots/${MY_P}.tar.bz2"
52 +fi
53 +
54 +LICENSE="GPL-2"
55 +SLOT="0"
56 +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
57 +IUSE="audio doc ftdi gtk inputlirc static-libs systemd usb X"
58 +
59 +REQUIRED_USE="
60 + ${PYTHON_REQUIRED_USE}
61 + gtk? ( X )
62 +"
63 +
64 +S="${WORKDIR}/${MY_P}"
65 +
66 +COMMON_DEPEND="
67 + ${PYTHON_DEPS}
68 + audio? (
69 + >media-libs/portaudio-18
70 + media-libs/alsa-lib
71 + )
72 + dev-python/pyyaml[${PYTHON_USEDEP}]
73 + ftdi? ( dev-embedded/libftdi:0 )
74 + systemd? ( sys-apps/systemd )
75 + usb? ( virtual/libusb:0 )
76 + X? (
77 + x11-libs/libICE
78 + x11-libs/libSM
79 + x11-libs/libX11
80 + )
81 +"
82 +
83 +DEPEND="
84 + ${COMMON_DEPEND}
85 + dev-libs/libxslt
86 + doc? ( app-doc/doxygen )
87 + sys-apps/kmod
88 + sys-kernel/linux-headers
89 +"
90 +
91 +RDEPEND="
92 + ${COMMON_DEPEND}
93 + gtk? (
94 + x11-libs/vte[introspection]
95 + dev-python/pygobject[${PYTHON_USEDEP}]
96 + )
97 + inputlirc? ( app-misc/inputlircd )
98 +"
99 +
100 +PATCHES=(
101 + # https://bugs.gentoo.org/show_bug.cgi?id=589246 https://sourceforge.net/p/lirc/tickets/214/
102 + "${FILESDIR}"/lirc-0.9.4-doc-path-fix.patch
103 +)
104 +
105 +src_configure() {
106 + xdg_environment_reset
107 + econf \
108 + --localstatedir="${EPREFIX}/var" \
109 + $(use_enable static-libs static) \
110 + $(use_with X x)
111 +}
112 +
113 +src_install() {
114 + default
115 +
116 + if use !gtk ; then
117 + # lirc-setup requires gtk
118 + rm "${ED%/}"/usr/bin/lirc-setup || die
119 + fi
120 +
121 + newinitd "${FILESDIR}"/lircd-0.8.6-r2 lircd
122 + newinitd "${FILESDIR}"/lircmd-0.9.4a-r2 lircmd
123 + newconfd "${FILESDIR}"/lircd.conf.4 lircd
124 + newconfd "${FILESDIR}"/lircmd.conf lircmd
125 +
126 + insinto /etc/modprobe.d/
127 + newins "${FILESDIR}"/modprobed.lirc lirc.conf
128 +
129 + newinitd "${FILESDIR}"/irexec-initd-0.9.4a-r2 irexec
130 + newconfd "${FILESDIR}"/irexec-confd irexec
131 +
132 + keepdir /etc/lirc
133 + if [[ -e "${ED%/}"/etc/lirc/lircd.conf ]]; then
134 + newdoc "${ED%/}"/etc/lirc/lircd.conf lircd.conf.example
135 + fi
136 +
137 + find "${ED}" -name '*.la' -delete || die
138 +
139 + # Avoid QA notice
140 + rm -d "${ED%/}"/var/run/lirc || die
141 + rm -d "${ED%/}"/var/run || die
142 +}
143 +
144 +pkg_preinst() {
145 + local dir="${EROOT%/}/etc/modprobe.d"
146 + if [[ -a "${dir}"/lirc && ! -a "${dir}"/lirc.conf ]]; then
147 + elog "Renaming ${dir}/lirc to lirc.conf"
148 + mv -f "${dir}/lirc" "${dir}/lirc.conf" || die
149 + fi
150 +
151 + # copy the first file that can be found
152 + if [[ -f "${EROOT%/}"/etc/lirc/lircd.conf ]]; then
153 + cp "${EROOT%/}"/etc/lirc/lircd.conf "${T}"/lircd.conf || die
154 + elif [[ -f "${EROOT%/}"/etc/lircd.conf ]]; then
155 + cp "${EROOT%/}"/etc/lircd.conf "${T}"/lircd.conf || die
156 + MOVE_OLD_LIRCD_CONF=1
157 + elif [[ -f "${ED%/}"/etc/lirc/lircd.conf ]]; then
158 + cp "${ED%/}"/etc/lirc/lircd.conf "${T}"/lircd.conf || die
159 + fi
160 +
161 + # stop portage from touching the config file
162 + if [[ -e "${ED%/}"/etc/lirc/lircd.conf ]]; then
163 + rm -f "${ED%/}"/etc/lirc/lircd.conf || die
164 + fi
165 +}
166 +
167 +pkg_postinst() {
168 + # copy config file to new location
169 + # without portage knowing about it
170 + # so it will not delete it on unmerge or ever touch it again
171 + if [[ -e "${T}"/lircd.conf ]]; then
172 + cp "${T}"/lircd.conf "${EROOT%/}"/etc/lirc/lircd.conf || die
173 + if [[ "$MOVE_OLD_LIRCD_CONF" = "1" ]]; then
174 + elog "Moved /etc/lircd.conf to /etc/lirc/lircd.conf"
175 + rm -f "${EROOT%/}"/etc/lircd.conf || die
176 + fi
177 + fi
178 +
179 + einfo "The new default location for lircd.conf is inside of"
180 + einfo "${EROOT%/}/etc/lirc/ directory"
181 +}