diff options
author | Craig Andrews <candrews@gentoo.org> | 2022-10-16 16:42:39 -0400 |
---|---|---|
committer | Craig Andrews <candrews@gentoo.org> | 2022-10-16 16:45:23 -0400 |
commit | 2fc7d78983cf5f7a07262bd0a40966bbdbd18239 (patch) | |
tree | 7742cbd582f884106943c74f220f4aa785161623 /app-misc | |
parent | dev-ml/camlidl: respect CPP (diff) | |
download | gentoo-2fc7d78983cf5f7a07262bd0a40966bbdbd18239.tar.gz gentoo-2fc7d78983cf5f7a07262bd0a40966bbdbd18239.tar.bz2 gentoo-2fc7d78983cf5f7a07262bd0a40966bbdbd18239.zip |
app-misc/lirc: add 0.10.2
Signed-off-by: Craig Andrews <candrews@gentoo.org>
Diffstat (limited to 'app-misc')
-rw-r--r-- | app-misc/lirc/Manifest | 1 | ||||
-rw-r--r-- | app-misc/lirc/lirc-0.10.2.ebuild | 181 |
2 files changed, 182 insertions, 0 deletions
diff --git a/app-misc/lirc/Manifest b/app-misc/lirc/Manifest index a094fcac0030..feb080bf858d 100644 --- a/app-misc/lirc/Manifest +++ b/app-misc/lirc/Manifest @@ -1,2 +1,3 @@ DIST lirc-0.10.1.tar.bz2 2523226 BLAKE2B 47b7ee87de8f64f7f829af519c0d296a85cf91790148927e850965177d4984bb994a0ad122cb59c3db508813d0824ffec45126e794abd08174a052361cea53e5 SHA512 31c0b6ee169b302b99994a2a3fa0ebcae0e01cb83c02fe02acf1de5ba8cf77a091a0221c7d8104448c30930adafe654cd08afb7d0df6b5b7ec2d47df26e5df9d +DIST lirc-0.10.2.tar.bz2 2418298 BLAKE2B fa067ff3de9779962e34a87f948b978eae73056d567abb708baac953b0551735cae9610c9d83af17bc9bc44031b8ad43e338665897d86fc8adf81b8ae2c7c983 SHA512 99eb2d4496df8ab6b71f11edb2990fff53d0ccc63060119aa7bb6461f7b8488c3f45012e2fa8f393f5928ea4c4ace91a6b0daeb766a868d420455dacad78512d DIST lirc_0.10.1-7.debian.tar.xz 39392 BLAKE2B cb7527bb33a1d724fea487ca468f98f406c8af894b185580dd285ed46ee0d7f6eeb5c2d66ae09c917d580485568f6510ef968283c56511dc9b4281c77fcc4563 SHA512 9bcd7dc2d30647ab807a65036c02d4adc425af288046d8f0b9bee2f38389f39be21103e4980684827e736b4b76a05688ae870f0871bc50213de429c35b70211e diff --git a/app-misc/lirc/lirc-0.10.2.ebuild b/app-misc/lirc/lirc-0.10.2.ebuild new file mode 100644 index 000000000000..38716618961c --- /dev/null +++ b/app-misc/lirc/lirc-0.10.2.ebuild @@ -0,0 +1,181 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) + +inherit linux-info python-single-r1 xdg-utils + +DESCRIPTION="decode and send infra-red signals of many commonly used remote controls" +HOMEPAGE="https://www.lirc.org/" + +LIRC_DRIVER_DEVICE="/dev/lirc0" + +MY_P=${PN}-${PV/_/-} +S="${WORKDIR}/${MY_P}" + +if [[ ${PV} == *_pre* ]] ; then + SRC_URI="https://www.lirc.org/software/snapshots/${MY_P}.tar.bz2" +elif [[ ${PV} == *_p* ]] ; then + inherit autotools + SRC_URI="mirror://sourceforge/lirc/${PN}-$(ver_cut 1-3).tar.bz2" + SRC_URI+=" mirror://debian/pool/main/l/${PN}/${PN}_$(ver_cut 1-3)-$(ver_cut 5-).debian.tar.xz" + S="${WORKDIR}"/${PN}-$(ver_cut 1-3) +else + SRC_URI="mirror://sourceforge/lirc/${MY_P}.tar.bz2" +fi + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="amd64 ~arm ~arm64 ppc ppc64 ~riscv x86" +IUSE="audio +devinput doc ftdi gtk inputlirc static-libs systemd +uinput usb X" + +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + gtk? ( X ) +" + +COMMON_DEPEND=" + ${PYTHON_DEPS} + audio? ( + >media-libs/portaudio-18 + media-libs/alsa-lib + ) + $(python_gen_cond_dep ' + dev-python/pyyaml[${PYTHON_USEDEP}] + ') + ftdi? ( dev-embedded/libftdi:0 ) + systemd? ( sys-apps/systemd ) + usb? ( virtual/libusb:0 ) + X? ( + x11-libs/libICE + x11-libs/libSM + x11-libs/libX11 + ) +" + +DEPEND=" + ${COMMON_DEPEND} + dev-libs/libxslt + $(python_gen_cond_dep ' + dev-python/setuptools[${PYTHON_USEDEP}] + ') + doc? ( app-doc/doxygen ) + sys-apps/kmod + sys-kernel/linux-headers +" + +RDEPEND=" + ${COMMON_DEPEND} + gtk? ( + x11-libs/vte[introspection] + $(python_gen_cond_dep ' + dev-python/pygobject[${PYTHON_USEDEP}] + ') + ) + inputlirc? ( app-misc/inputlircd ) +" + +PATCHES=( + "${FILESDIR}/${PN}-0.10.1-runtimedirectory.patch" +) + +MAKEOPTS+=" -j1" + +pkg_setup() { + use uinput && CONFIG_CHECK="~INPUT_UINPUT" + python-single-r1_pkg_setup + linux-info_pkg_setup +} + +src_prepare() { + default + + # Keep eautoreconf until a new release to fix Python macros + # bug #849788 + if [[ -d "${WORKDIR}"/debian/patches ]] ; then + eapply $(sed -e 's:^:../debian/patches/:' ../debian/patches/series || die) + eautoreconf + fi +} + +src_configure() { + xdg_environment_reset + econf \ + --localstatedir="${EPREFIX}/var" \ + $(use_enable static-libs static) \ + $(use_enable devinput) \ + $(use_enable uinput) \ + $(use_with X x) +} + +src_install() { + default + + if use !gtk ; then + # lirc-setup requires gtk + rm "${ED}"/usr/bin/lirc-setup || die + fi + + newinitd "${FILESDIR}"/lircd-0.8.6-r2 lircd + newinitd "${FILESDIR}"/lircmd-0.9.4a-r2 lircmd + newconfd "${FILESDIR}"/lircd.conf.4 lircd + newconfd "${FILESDIR}"/lircmd-0.10.0.conf lircmd + + insinto /etc/modprobe.d/ + newins "${FILESDIR}"/modprobed.lirc lirc.conf + + newinitd "${FILESDIR}"/irexec-initd-0.9.4a-r2 irexec + newconfd "${FILESDIR}"/irexec-confd irexec + + keepdir /etc/lirc + if [[ -e "${ED}"/etc/lirc/lircd.conf ]]; then + newdoc "${ED}"/etc/lirc/lircd.conf lircd.conf.example + fi + + find "${ED}" -name '*.la' -delete || die + + # Avoid QA notice + rm -d "${ED}"/var/run/lirc || die + rm -d "${ED}"/var/run || die +} + +pkg_preinst() { + local dir="${EROOT}/etc/modprobe.d" + if [[ -a "${dir}"/lirc && ! -a "${dir}"/lirc.conf ]]; then + elog "Renaming ${dir}/lirc to lirc.conf" + mv -f "${dir}/lirc" "${dir}/lirc.conf" || die + fi + + # copy the first file that can be found + if [[ -f "${EROOT}"/etc/lirc/lircd.conf ]]; then + cp "${EROOT}"/etc/lirc/lircd.conf "${T}"/lircd.conf || die + elif [[ -f "${EROOT}"/etc/lircd.conf ]]; then + cp "${EROOT}"/etc/lircd.conf "${T}"/lircd.conf || die + MOVE_OLD_LIRCD_CONF=1 + elif [[ -f "${ED}"/etc/lirc/lircd.conf ]]; then + cp "${ED}"/etc/lirc/lircd.conf "${T}"/lircd.conf || die + fi + + # stop portage from touching the config file + if [[ -e "${ED}"/etc/lirc/lircd.conf ]]; then + rm -f "${ED}"/etc/lirc/lircd.conf || die + fi +} + +pkg_postinst() { + # copy config file to new location + # without portage knowing about it + # so it will not delete it on unmerge or ever touch it again + if [[ -e "${T}"/lircd.conf ]]; then + cp "${T}"/lircd.conf "${EROOT}"/etc/lirc/lircd.conf || die + if [[ "$MOVE_OLD_LIRCD_CONF" = "1" ]]; then + elog "Moved /etc/lircd.conf to /etc/lirc/lircd.conf" + rm -f "${EROOT}"/etc/lircd.conf || die + fi + fi + + einfo "The new default location for lircd.conf is inside of" + einfo "${EROOT}/etc/lirc/ directory" +} |