public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-misc/lirc/, app-misc/lirc/files/
@ 2016-04-26 17:53 Austin English
  0 siblings, 0 replies; 3+ messages in thread
From: Austin English @ 2016-04-26 17:53 UTC (permalink / raw
  To: gentoo-commits

commit:     76f926d224d71fd07d0678f6187d6f3d7d4445d7
Author:     Austin English <wizardedit <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 26 17:52:12 2016 +0000
Commit:     Austin English <wizardedit <AT> gentoo <DOT> org>
CommitDate: Tue Apr 26 17:53:46 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76f926d2

app-misc/lirc: use #!/sbin/openrc-run instead of #!/sbin/runscript

Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=573846

Package-Manager: portage-2.2.26

 app-misc/lirc/files/irexec-initd-0.8.6-r2 |   2 +-
 app-misc/lirc/files/lircd-0.8.6-r2        |   4 +-
 app-misc/lirc/files/lircmd                |   4 +-
 app-misc/lirc/lirc-0.9.0-r6.ebuild        | 429 ++++++++++++++++++++++++++++++
 4 files changed, 434 insertions(+), 5 deletions(-)

diff --git a/app-misc/lirc/files/irexec-initd-0.8.6-r2 b/app-misc/lirc/files/irexec-initd-0.8.6-r2
index 8c940d7..95b1c07 100644
--- a/app-misc/lirc/files/irexec-initd-0.8.6-r2
+++ b/app-misc/lirc/files/irexec-initd-0.8.6-r2
@@ -1,4 +1,4 @@
-#!/sbin/runscript
+#!/sbin/openrc-run
 # Copyright 2003 Martin Hierling <mad@cc.fh-lippe.de>
 # Distributed under the terms of the GNU General Public License v2
 # $Id$

diff --git a/app-misc/lirc/files/lircd-0.8.6-r2 b/app-misc/lirc/files/lircd-0.8.6-r2
index ed47795..17e45ea 100644
--- a/app-misc/lirc/files/lircd-0.8.6-r2
+++ b/app-misc/lirc/files/lircd-0.8.6-r2
@@ -1,5 +1,5 @@
-#!/sbin/runscript
-# Copyright 1999-2014 Gentoo Foundation
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 

diff --git a/app-misc/lirc/files/lircmd b/app-misc/lirc/files/lircmd
index b9903b7..ffd73a6 100644
--- a/app-misc/lirc/files/lircmd
+++ b/app-misc/lirc/files/lircmd
@@ -1,5 +1,5 @@
-#!/sbin/runscript
-# Copyright 1999-2004 Gentoo Foundation
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 

diff --git a/app-misc/lirc/lirc-0.9.0-r6.ebuild b/app-misc/lirc/lirc-0.9.0-r6.ebuild
new file mode 100644
index 0000000..4cbefa6
--- /dev/null
+++ b/app-misc/lirc/lirc-0.9.0-r6.ebuild
@@ -0,0 +1,429 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils linux-mod linux-info systemd toolchain-funcs flag-o-matic autotools
+
+DESCRIPTION="decode and send infra-red signals of many commonly used remote controls"
+HOMEPAGE="http://www.lirc.org/"
+
+MY_P=${PN}-${PV/_/}
+
+if [[ "${PV/_pre/}" = "${PV}" ]]; then
+	SRC_URI="mirror://sourceforge/lirc/${MY_P}.tar.bz2"
+else
+	SRC_URI="http://www.lirc.org/software/snapshots/${MY_P}.tar.bz2"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE="debug doc hardware-carrier transmitter static-libs X"
+
+S="${WORKDIR}/${MY_P}"
+
+RDEPEND="
+	X? (
+		x11-libs/libX11
+		x11-libs/libSM
+		x11-libs/libICE
+	)
+	lirc_devices_alsa_usb? ( media-libs/alsa-lib )
+	lirc_devices_audio? ( >media-libs/portaudio-18 )
+	lirc_devices_irman? ( media-libs/libirman )"
+
+# 2012-07-17, Ian Stakenvicius
+# A helper script that scrapes out values for nearly all of the variables below
+# from lirc's configure.ac is available at
+# https://dev.gentoo.org/~axs/helper-for-lirc-iuse.sh
+
+# This are drivers with names matching the
+# parameter --with-driver=NAME
+IUSE_LIRC_DEVICES_DIRECT="
+	all userspace accent act200l act220l
+	adaptec alsa_usb animax asusdh atilibusb
+	atiusb audio audio_alsa avermedia avermedia_vdomate
+	avermedia98 awlibusb bestbuy bestbuy2 breakoutbox
+	bte bw6130 caraca chronos commandir
+	cph06x creative creative_infracd
+	devinput digimatrix dsp dvico ea65 ene0100
+	exaudio flyvideo ftdi gvbctv5pci hauppauge
+	hauppauge_dvb hercules_smarttv_stereo i2cuser
+	igorplugusb iguanaIR imon imon_24g imon_knob
+	imon_lcd imon_pad imon_rsc irdeo irdeo_remote
+	irlink irman irreal it87 ite8709
+	knc_one kworld leadtek_0007 leadtek_0010
+	leadtek_pvr2000 livedrive_midi
+	livedrive_seq logitech macmini
+	mediafocusI mouseremote
+	mouseremote_ps2 mp3anywhere mplay nslu2
+	packard_bell parallel pcmak pcmak_usb
+	pctv pixelview_bt878 pixelview_pak
+	pixelview_pro provideo realmagic
+	remotemaster sa1100 samsung sasem sb0540 serial
+	silitek sir slinke streamzap tekram
+	tekram_bt829 tira ttusbir tuxbox tvbox udp uirt2
+	uirt2_raw usb_uirt_raw usbx wpc8769l zotac"
+
+# drivers that need special handling and
+# must have another name specified for
+# parameter --with-driver=NAME
+IUSE_LIRC_DEVICES_SPECIAL="
+	serial_igor_cesko
+	remote_wonder_plus xboxusb inputlirc"
+
+IUSE_LIRC_DEVICES="${IUSE_LIRC_DEVICES_DIRECT} ${IUSE_LIRC_DEVICES_SPECIAL}"
+
+# The following are lists which are used to provide ewarns on incompatibilities
+# with the kernel:
+
+#drivers that do not build kernel modules
+NO_KMOD_BUILT_FOR_DEV="
+	accent bte creative creative_infracd devinput dsp ea65 exaudio
+	ftdi i2cuser irlink irreal livedrive_midi livedrive_seq logitech
+	mediafocusI mouseremote mouseremote_ps2 mp3anywhere mplay mplay2
+	pcmak pcmak_usb pctv realmagic remotemaster silitek tira tira_raw
+	tuxbox udp uirt2 uirt2_raw usb_uirt_raw usbx"
+
+#drivers that build lirc_dev and so will conflict with kernel lirc_dev
+LIRCDEV_BUILT_FOR_DEV="all
+	act200l act220l adaptec animax atiusb breakoutbox hauppauge
+	hauppauge_dvb hercules_smarttv_stereo igorplugusb imon imon_24g
+	imon_knob imon_lcd imon_pad imon_rsc irdeo irdeo_remote knc_one
+	leadtek_pvr2000 nslu2 packard_bell parallel pixelview_bt878
+	provideo sa1100 sasem serial sir tekram tekram_bt829 ttusbir
+	tvbox wpc8769l zotac"
+
+#lirc_gpio drivers, which cannot be supported on kernel >= 2.6.22
+LIRC_GPIO_DEV="
+	avermedia avermedia98 avermedia_vdomate bestbuy bestbuy2 chronos
+	cph03x cph06x flyvideo gvbctv5pci kworld leadtek_0007 leadtek_0010
+	pixelview_pak pixelview_pro"
+
+#device-driver which use libusb
+LIBUSB_USED_BY_DEV="
+	all atilibusb awlibusb sasem igorplugusb imon imon_lcd imon_pad
+	imon_rsc streamzap xboxusb irlink commandir"
+
+for dev in ${LIBUSB_USED_BY_DEV}; do
+	DEPEND="${DEPEND} lirc_devices_${dev}? ( virtual/libusb:0 )"
+done
+
+# adding only compile-time depends
+DEPEND="${RDEPEND} ${DEPEND}
+	virtual/linux-sources
+	lirc_devices_ftdi? ( dev-embedded/libftdi:0 )
+	lirc_devices_all? ( dev-embedded/libftdi:0 )"
+
+# adding only run-time depends
+RDEPEND="${RDEPEND}
+	lirc_devices_inputlirc? ( app-misc/inputlircd )
+	lirc_devices_iguanaIR? ( app-misc/iguanaIR )"
+
+# add all devices to IUSE
+# and ensure lirc_devices_all is not set alongside lirc_devices_*
+REQUIRED_USE="lirc_devices_all? ("
+for dev in ${IUSE_LIRC_DEVICES}; do
+	IUSE="${IUSE} lirc_devices_${dev}"
+	if [[ "${dev}" != "all" ]]; then
+		REQUIRED_USE="${REQUIRED_USE} !lirc_devices_${dev}"
+	fi
+done
+REQUIRED_USE="${REQUIRED_USE} )"
+
+add_device() {
+	local dev="${1}"
+	local desc="device ${dev}"
+	if [[ -n "${2}" ]]; then
+		desc="${2}"
+	fi
+
+	# Bug #187418
+	if kernel_is ge 2 6 22 && [[ " ${LIRC_GPIO_DEV} " == *" ${dev} "* ]]; then
+		eerror "${desc} uses lirc_gpio which fails with kernel 2.6.22 or above.  Not building."
+		eerror "Use 'devinput' instead, or use 'userspace' along with in-kernel drivers"
+		return 0
+	fi
+	: ${lirc_device_count:=0}
+	((lirc_device_count++))
+
+	elog "Compiling support for ${desc}"
+
+	if [[ " ${LIRCDEV_BUILT_FOR_DEV} " == *" ${dev} "* ]] ; then
+		if linux_chkconfig_present LIRC ; then
+			ewarn "${desc} builds lirc_dev and CONFIG_LIRC is set in the kernel -- this may conflict."
+		fi
+		if ! linux_chkconfig_present MODULE_UNLOAD ; then
+			ewarn "${desc} builds modules and CONFIG_MODULE_UNLOAD is unset in kernel."
+			ewarn "You will need MODULE_UNLOAD support in your kernel."
+		fi
+	fi
+	if [[ " ${NO_KMOD_BUILT_FOR_DEV} " == *" ${dev} "* ]] && ! linux_chkconfig_present IR_LIRC_CODEC ; then
+		ewarn "${desc} builds no kernel module and CONFIG_IR_LIRC_CODEC is unset in kernel."
+	fi
+
+	if [[ ${lirc_device_count} -eq 2 ]] ; then
+		ewarn
+		ewarn "LIRC_DEVICES has more than one entry."
+		ewarn "When selecting multiple devices for lirc to be supported,"
+		ewarn "it can not be guaranteed that the drivers play nice together."
+		ewarn "If this is not intended, then please adjust LIRC_DEVICES"
+		ewarn "and re-emerge."
+		ewarn
+	fi
+
+	MY_OPTS="${MY_OPTS} --with-driver=${dev}"
+}
+
+pkg_pretend() {
+	if [[ -n "${LIRC_OPTS}" ]] ; then
+		ewarn
+		ewarn "LIRC_OPTS is deprecated from lirc-0.8.0-r1 on."
+		ewarn
+		ewarn "Please use LIRC_DEVICES from now on."
+		ewarn "e.g. LIRC_DEVICES=\"serial sir\""
+		ewarn
+		ewarn "Flags are now set per use-flags."
+		ewarn "e.g. transmitter, hardware-carrier"
+
+		local opt
+		local unsupported_opts=""
+
+		# test for allowed options for LIRC_OPTS
+		for opt in ${LIRC_OPTS}; do
+			case ${opt} in
+				--with-port=*|--with-irq=*|--with-timer=*|--with-tty=*)
+					MY_OPTS="${MY_OPTS} ${opt}"
+					;;
+				*)
+					unsupported_opts="${unsupported_opts} ${opt}"
+					;;
+			esac
+		done
+		if [[ -n ${unsupported_opts} ]]; then
+			eerror "These options are no longer allowed to be set"
+			eerror "with LIRC_OPTS: ${unsupported_opts}"
+			die "LIRC_OPTS is no longer supported, use LIRC_DEVICES."
+		fi
+	fi
+}
+
+pkg_setup() {
+	linux-mod_pkg_setup
+
+	# set default configure options
+	MY_OPTS=""
+	LIRC_DRIVER_DEVICE="/dev/lirc0"
+
+	if use lirc_devices_all; then
+		# compile in drivers for a lot of devices
+		add_device all "a lot of devices"
+	else
+		# compile in only requested drivers
+		local dev
+		for dev in ${IUSE_LIRC_DEVICES_DIRECT}; do
+			if use lirc_devices_${dev}; then
+				add_device ${dev}
+			fi
+		done
+
+		if use lirc_devices_remote_wonder_plus; then
+			add_device atiusb "device Remote Wonder Plus (atiusb-based)"
+		fi
+
+		if use lirc_devices_serial_igor_cesko; then
+			add_device serial "serial with Igor Cesko design"
+			MY_OPTS="${MY_OPTS} --with-igor"
+		fi
+
+		if use lirc_devices_imon_pad; then
+			ewarn "The imon_pad driver has incorporated the previous pad2keys patch"
+			ewarn "and removed the pad2keys_active option for the lirc_imon module"
+			ewarn "because it is always active."
+			ewarn "If you have an older imon VFD device, you may need to add the module"
+			ewarn "option display_type=1 to override autodetection and force VFD mode."
+		fi
+
+		if use lirc_devices_xboxusb; then
+			add_device atiusb "device xboxusb"
+		fi
+
+		if [[ "${MY_OPTS}" == "" ]]; then
+			if [[ "${PROFILE_ARCH}" == "xbox" ]]; then
+				# on xbox: use special driver
+				add_device atiusb "device xboxusb"
+			else
+				# no driver requested
+				elog
+				elog "Compiling only the lirc-applications, but no drivers."
+				elog "Enable drivers with LIRC_DEVICES if you need them."
+				MY_OPTS="--with-driver=none"
+			fi
+		fi
+	fi
+
+	use hardware-carrier && MY_OPTS="${MY_OPTS} --without-soft-carrier"
+	use transmitter && MY_OPTS="${MY_OPTS} --with-transmitter"
+
+	einfo
+	einfo "lirc-configure-opts: ${MY_OPTS}"
+	elog  "Setting default lirc-device to ${LIRC_DRIVER_DEVICE}"
+
+	filter-flags -Wl,-O1
+}
+
+src_prepare() {
+	# Rip out dos CRLF
+	edos2unix contrib/lirc.rules
+
+	# Apply patches needed for some special device-types
+	use lirc_devices_audio || epatch "${FILESDIR}"/lirc-0.8.4-portaudio_check.patch
+	use lirc_devices_remote_wonder_plus && epatch "${FILESDIR}"/lirc-0.8.3_pre1-remotewonderplus.patch
+
+	# Apply fixes for kernel-2.6.39 and above
+	epatch "${FILESDIR}"/${P}-kernel-2.6.39-fixes.patch
+	# Slightly massaged upstream patch to fix kfifo issues >=2.6.38
+	# for bug 377033
+	epatch "${FILESDIR}"/${P}-atiusb_kfifo.patch
+	# Apply fixes for kernel-3.3 and above (bug 439538)
+	epatch "${FILESDIR}"/${P}-kernel-3.3.0-fixes.patch
+	# Apply fix for missing err() in usb.h for kernel 3.5+ (bug 444736)
+	epatch "${FILESDIR}"/${P}-kernel-3.5-err-fix.patch
+	# Apply fix for missing __devinit __devexit defines in kernel 3.8+ (bug 461532)
+	epatch "${FILESDIR}"/${P}-kernel-3.8-fixes.patch
+	# Add support for zotac remote, bug 342848
+	epatch "${FILESDIR}"/${P}-add-zotac-support.patch
+	# Use fixed font
+	epatch "${FILESDIR}"/${P}-fixed-font.patch
+
+	# Do not build drivers from the top-level Makefile
+	sed -i -e 's:\(SUBDIRS =\) drivers\(.*\):\1\2:' Makefile.am
+
+	# remove parallel driver on SMP systems
+	if linux_chkconfig_present SMP ; then
+		sed -i -e "s:lirc_parallel\.o::" drivers/lirc_parallel/Makefile.am
+	fi
+
+	# Bug #187418 - only need this part for lirc_devices_all as others die in pkg_setup
+	if use lirc_devices_all && kernel_is ge 2 6 22 ; then
+		ewarn "Disabling lirc_gpio driver as it does no longer work Kernel 2.6.22+"
+		sed -i -e "s:lirc_gpio\.o::" drivers/lirc_gpio/Makefile.am
+	fi
+
+	# respect CFLAGS
+	sed -i -e 's:CFLAGS="-O2:CFLAGS=""\n#CFLAGS="-O2:' configure.ac
+
+	# setting default device-node
+	local f
+	for f in configure.ac acconfig.h; do
+		[[ -f "$f" ]] && sed -i -e '/#define LIRC_DRIVER_DEVICE/d' "$f"
+	done
+	echo "#define LIRC_DRIVER_DEVICE \"${LIRC_DRIVER_DEVICE}\"" >> acconfig.h
+
+	sed -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" -i configure.ac || die # automake 1.13
+	eautoreconf
+}
+
+src_configure() {
+	econf \
+		--localstatedir=/var \
+		--with-syslog=LOG_DAEMON \
+		--enable-sandboxed \
+		--with-kerneldir="${KV_DIR}" \
+		--with-moduledir="/lib/modules/${KV_FULL}/misc" \
+		$(use_enable debug) \
+		$(use_enable static-libs static) \
+		$(use_with X x) \
+		${MY_OPTS} \
+		ABI="${KERNEL_ABI}" \
+		ARCH="$(tc-arch-kernel)"
+}
+
+src_compile() {
+	# force non-parallel make, Bug 196134 (confirmed valid for 0.9.0-r2)
+	emake -j1
+
+	MODULE_NAMES="lirc(misc:${S}/drivers)"
+	BUILD_TARGETS="all"
+	linux-mod_src_compile
+}
+
+src_install() {
+	emake DESTDIR="${D}" install
+	emake -C drivers DESTDIR="${D}" install
+
+	newinitd "${FILESDIR}"/lircd-0.8.6-r2 lircd
+	newinitd "${FILESDIR}"/lircmd lircmd
+	newconfd "${FILESDIR}"/lircd.conf.4 lircd
+
+	insinto /etc/modprobe.d/
+	newins "${FILESDIR}"/modprobed.lirc lirc.conf
+
+	newinitd "${FILESDIR}"/irexec-initd-0.8.6-r2 irexec
+	newconfd "${FILESDIR}"/irexec-confd irexec
+
+	systemd_dounit "${FILESDIR}"/irexec.service
+	systemd_dounit "${FILESDIR}"/lirc.service
+	systemd_dounit "${FILESDIR}"/lircm.service
+
+	if use doc ; then
+		dohtml doc/html/*.html
+		insinto /usr/share/doc/${PF}/images
+		doins doc/images/*
+	fi
+
+	insinto /usr/share/lirc/remotes
+	doins -r remotes/*
+
+	keepdir /etc/lirc
+	if [[ -e "${D}"/etc/lirc/lircd.conf ]]; then
+		newdoc "${D}"/etc/lirc/lircd.conf lircd.conf.example
+	fi
+
+	use static-libs || rm "${D}/usr/$(get_libdir)/liblirc_client.la"
+}
+
+pkg_preinst() {
+	linux-mod_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"
+	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
+	elif [[ -f "${EROOT}"/etc/lircd.conf ]]; then
+		cp "${EROOT}"/etc/lircd.conf "${T}"/lircd.conf
+		MOVE_OLD_LIRCD_CONF=1
+	elif [[ -f "${D}"/etc/lirc/lircd.conf ]]; then
+		cp "${D}"/etc/lirc/lircd.conf "${T}"/lircd.conf
+	fi
+
+	# stop portage from touching the config file
+	if [[ -e "${D}"/etc/lirc/lircd.conf ]]; then
+		rm -f "${D}"/etc/lirc/lircd.conf
+	fi
+}
+
+pkg_postinst() {
+	linux-mod_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
+		if [[ "$MOVE_OLD_LIRCD_CONF" = "1" ]]; then
+			elog "Moved /etc/lircd.conf to /etc/lirc/lircd.conf"
+			rm -f "${EROOT}"/etc/lircd.conf
+		fi
+	fi
+
+	einfo "The new default location for lircd.conf is inside of"
+	einfo "/etc/lirc/ directory"
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-misc/lirc/, app-misc/lirc/files/
@ 2016-07-30  8:31 David Seifert
  0 siblings, 0 replies; 3+ messages in thread
From: David Seifert @ 2016-07-30  8:31 UTC (permalink / raw
  To: gentoo-commits

commit:     b56cfd2afbca914c16a992678c4f203706254c75
Author:     Craig Andrews <candrews <AT> integralblue <DOT> com>
AuthorDate: Wed Jul 20 15:49:46 2016 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Jul 30 08:30:40 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b56cfd2a

app-misc/lirc-0.9.4a-r1 fix documentation and socket directories

set localstatedir to /var so lirc correctly uses /var/run instead of /var/lib/run
install documentation to /usr/share/doc/lirc-${PF}
use irexec-initd-0.9.4a-r1 instead of irexec-initd as the irexec initd script to resolve a QA notice

Gentoo-bug: 589246
Closes: https://github.com/gentoo/gentoo/pull/1922

Signed-off-by: David Seifert <soap <AT> gentoo.org>

 app-misc/lirc/files/irexec-initd-0.9.4a-r1        |  28 +++++
 app-misc/lirc/files/lirc-0.9.4-doc-path-fix.patch |  27 +++++
 app-misc/lirc/lirc-0.9.4a-r1.ebuild               | 131 ++++++++++++++++++++++
 3 files changed, 186 insertions(+)

diff --git a/app-misc/lirc/files/irexec-initd-0.9.4a-r1 b/app-misc/lirc/files/irexec-initd-0.9.4a-r1
new file mode 100644
index 0000000..203ad3a
--- /dev/null
+++ b/app-misc/lirc/files/irexec-initd-0.9.4a-r1
@@ -0,0 +1,28 @@
+#!/sbin/openrc-run
+# Copyright 2003 Martin Hierling <mad@cc.fh-lippe.de>
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+: ${IREXEC_USER:=root}
+
+depend() {
+	need lircd
+}
+
+start() {
+	if [ "x${IREXEC_USER}" = "xroot" -a "x${IREXEC_DISABLE_ROOT_WARNING}" != "xyes" ]; then
+		ewarn "Warning: Running irexec as root can open security holes"
+	fi
+
+	ebegin "Starting irexec"
+	start-stop-daemon --start --chuid ${IREXEC_USER} --user ${IREXEC_USER} --chdir / \
+		--exec /usr/bin/irexec -- --daemon ${IREXEC_OPTS}
+	eend $? "Failed to start irexec."
+}
+
+stop() {
+	ebegin "Stopping irexec"
+	start-stop-daemon --stop --exec /usr/bin/irexec --user ${IREXEC_USER}
+	eend $? "Failed to stop irexec."
+}
+

diff --git a/app-misc/lirc/files/lirc-0.9.4-doc-path-fix.patch b/app-misc/lirc/files/lirc-0.9.4-doc-path-fix.patch
new file mode 100644
index 0000000..9a2d6c2
--- /dev/null
+++ b/app-misc/lirc/files/lirc-0.9.4-doc-path-fix.patch
@@ -0,0 +1,27 @@
+https://sourceforge.net/p/lirc/tickets/214/
+
+diff --git a/doc/Makefile.am b/doc/Makefile.am
+index 53d0f21..f833b4b 100644
+--- a/doc/Makefile.am
++++ b/doc/Makefile.am
+@@ -33,7 +33,6 @@ nodist_man_MANS         += man/xmode2.1 man/irxevent.1
+ manpage_html            += man-html/irxevent.html man-html/xmode2.html
+ endif
+ 
+-docdir                  = @datadir@/doc/@PACKAGE@
+ dist_doc_DATA           = irxevent.keys
+ 
+ if HAVE_DOXYGEN
+@@ -58,10 +57,10 @@ if HAVE_PYMOD_YAML
+ nodist_website_html_DATA  += table.html
+ endif
+ 
+-vardocsdir              = $(localstatedir)/lib/lirc/plugins
++vardocsdir              = $(docdir)/plugins
+ vardocs_DATA            = index.html html-source/lirc.css
+ 
+-varimagedir             = $(localstatedir)/lib/lirc/images
++varimagedir             = $(docdir)/images
+ varimage_DATA           = $(dist_image_DATA)
+ 
+ website_imagedir        = $(docdir)/lirc.org/images

diff --git a/app-misc/lirc/lirc-0.9.4a-r1.ebuild b/app-misc/lirc/lirc-0.9.4a-r1.ebuild
new file mode 100644
index 0000000..e77f5fa
--- /dev/null
+++ b/app-misc/lirc/lirc-0.9.4a-r1.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit eutils flag-o-matic systemd
+
+DESCRIPTION="decode and send infra-red signals of many commonly used remote controls"
+HOMEPAGE="http://www.lirc.org/"
+
+LIRC_DRIVER_DEVICE="/dev/lirc0"
+
+MY_P=${PN}-${PV/_/}
+
+if [[ "${PV/_pre/}" = "${PV}" ]]; then
+	SRC_URI="mirror://sourceforge/lirc/${MY_P}.tar.bz2"
+else
+	SRC_URI="http://www.lirc.org/software/snapshots/${MY_P}.tar.bz2"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="doc static-libs X audio irman ftdi inputlirc iguanair systemd usb"
+
+S="${WORKDIR}/${MY_P}"
+
+REQUIRED_USE="
+	iguanair? ( irman )
+"
+DEPEND="
+	doc? ( app-doc/doxygen )
+"
+
+RDEPEND="
+	X? (
+		x11-libs/libX11
+		x11-libs/libSM
+		x11-libs/libICE
+	)
+	systemd? ( sys-apps/systemd )
+	audio? (
+		>media-libs/portaudio-18
+		media-libs/alsa-lib
+	)
+	irman? ( media-libs/libirman )
+	iguanair? ( app-misc/iguanaIR )
+	ftdi? ( dev-embedded/libftdi:0 )
+	inputlirc? ( app-misc/inputlircd )
+	usb? ( virtual/libusb:0 )
+"
+
+PATCHES=(
+	"${FILESDIR}"/lirc-0.9.4-doc-path-fix.patch # https://bugs.gentoo.org/show_bug.cgi?id=589246 https://sourceforge.net/p/lirc/tickets/214/
+)
+
+src_configure() {
+	filter-flags -Wl,-O1
+	econf \
+		--docdir=/usr/share/doc/${PF} \
+		--localstatedir=/var \
+		$(use_enable static-libs static) \
+		$(use_with X x)
+}
+
+src_install() {
+	default
+
+	newinitd "${FILESDIR}"/lircd-0.8.6-r2 lircd
+	newinitd "${FILESDIR}"/lircmd lircmd
+	newconfd "${FILESDIR}"/lircd.conf.4 lircd
+
+	insinto /etc/modprobe.d/
+	newins "${FILESDIR}"/modprobed.lirc lirc.conf
+
+	newinitd "${FILESDIR}"/irexec-initd-0.9.4a-r1 irexec
+	newconfd "${FILESDIR}"/irexec-confd irexec
+
+	keepdir /etc/lirc
+	if [[ -e "${D}"/etc/lirc/lircd.conf ]]; then
+		newdoc "${D}"/etc/lirc/lircd.conf lircd.conf.example
+	fi
+
+	if ! use static-libs; then
+		rm "${D}/usr/$(get_libdir)/liblirc_client.la" || die
+	fi
+
+	# Avoid QA notice
+	rm -d "${D}"/var/run/lirc || die
+	rm -d "${D}"/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 "${D}"/etc/lirc/lircd.conf ]]; then
+		cp "${D}"/etc/lirc/lircd.conf "${T}"/lircd.conf || die
+	fi
+
+	# stop portage from touching the config file
+	if [[ -e "${D}"/etc/lirc/lircd.conf ]]; then
+		rm -f "${D}"/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 "/etc/lirc/ directory"
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-misc/lirc/, app-misc/lirc/files/
@ 2019-09-15  1:32 Craig Andrews
  0 siblings, 0 replies; 3+ messages in thread
From: Craig Andrews @ 2019-09-15  1:32 UTC (permalink / raw
  To: gentoo-commits

commit:     31b7716e13228a7a36e9cbc53b7124d26137e137
Author:     Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 15 01:15:26 2019 +0000
Commit:     Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Sun Sep 15 01:32:24 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31b7716e

app-misc/lirc: Create the /run/lirc directory

Bug: https://sourceforge.net/p/lirc/git/merge-requests/42/
Closes: https://bugs.gentoo.org/694310
Package-Manager: Portage-2.3.76, Repoman-2.3.17
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>

 .../lirc/files/lirc-0.10.1-runtimedirectory.patch  |  18 +++
 app-misc/lirc/lirc-0.10.1-r2.ebuild                | 161 +++++++++++++++++++++
 2 files changed, 179 insertions(+)

diff --git a/app-misc/lirc/files/lirc-0.10.1-runtimedirectory.patch b/app-misc/lirc/files/lirc-0.10.1-runtimedirectory.patch
new file mode 100644
index 00000000000..256ac9eda20
--- /dev/null
+++ b/app-misc/lirc/files/lirc-0.10.1-runtimedirectory.patch
@@ -0,0 +1,18 @@
+https://sourceforge.net/p/lirc/git/merge-requests/42/
+
+Author: Craig Andrews <candrews@integralblue.com>
+Date:   Sat Sep 14 21:03:49 2019 -0400
+
+    systemd: ensure lirc runtime directory exists
+
+diff --git a/systemd/lircd.service b/systemd/lircd.service
+--- a/systemd/lircd.service
++++ b/systemd/lircd.service
+@@ -8,6 +8,7 @@
+ [Service]
+ Type=simple
+ ExecStart=/usr/sbin/lircd --nodaemon
++RuntimeDirectory=lirc
+ ; User=lirc
+ ; Group=lirc
+

diff --git a/app-misc/lirc/lirc-0.10.1-r2.ebuild b/app-misc/lirc/lirc-0.10.1-r2.ebuild
new file mode 100644
index 00000000000..1395b4dc65e
--- /dev/null
+++ b/app-misc/lirc/lirc-0.10.1-r2.ebuild
@@ -0,0 +1,161 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{5,6,7} )
+
+inherit eutils flag-o-matic linux-info python-single-r1 systemd xdg-utils
+
+DESCRIPTION="decode and send infra-red signals of many commonly used remote controls"
+HOMEPAGE="http://www.lirc.org/"
+
+LIRC_DRIVER_DEVICE="/dev/lirc0"
+
+MY_P=${PN}-${PV/_/-}
+
+if [[ "${PV/_pre/}" = "${PV}" ]]; then
+	SRC_URI="mirror://sourceforge/lirc/${MY_P}.tar.bz2"
+else
+	SRC_URI="http://www.lirc.org/software/snapshots/${MY_P}.tar.bz2"
+fi
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86"
+IUSE="audio +devinput doc ftdi gtk inputlirc static-libs systemd +uinput usb X"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	gtk? ( X )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+COMMON_DEPEND="
+	${PYTHON_DEPS}
+	audio? (
+		>media-libs/portaudio-18
+		media-libs/alsa-lib
+	)
+	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
+	dev-python/setuptools[${PYTHON_USEDEP}]
+	doc? ( app-doc/doxygen )
+	sys-apps/kmod
+	sys-kernel/linux-headers
+"
+
+RDEPEND="
+	${COMMON_DEPEND}
+	gtk? (
+		x11-libs/vte[introspection]
+		dev-python/pygobject[${PYTHON_USEDEP}]
+	)
+	inputlirc? ( app-misc/inputlircd )
+"
+
+PATCHES=(
+	"${FILESDIR}/${P}-unsafe-load.patch"
+	"${FILESDIR}/${P}-runtimedirectory.patch"
+)
+
+MAKEOPTS+=" -j1"
+
+pkg_setup() {
+	use uinput && CONFIG_CHECK="~INPUT_UINPUT"
+	python-single-r1_pkg_setup
+	linux-info_pkg_setup
+}
+
+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"
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-15  1:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-26 17:53 [gentoo-commits] repo/gentoo:master commit in: app-misc/lirc/, app-misc/lirc/files/ Austin English
  -- strict thread matches above, loose matches on Subject: below --
2016-07-30  8:31 David Seifert
2019-09-15  1:32 Craig Andrews

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox