summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2022-06-03 06:26:43 +0100
committerSam James <sam@gentoo.org>2022-06-03 06:30:14 +0100
commitce2a7001cbdf5d23f626fc99bad66898b8a058e8 (patch)
treef12c67cac5762583f482b4d2cdebd86e7c19ad12 /media-plugins
parentapp-crypt/moolticute: Improve OpenRC script (diff)
downloadgentoo-ce2a7001cbdf5d23f626fc99bad66898b8a058e8.tar.gz
gentoo-ce2a7001cbdf5d23f626fc99bad66898b8a058e8.tar.bz2
gentoo-ce2a7001cbdf5d23f626fc99bad66898b8a058e8.zip
media-plugins/vdr-xineliboutput: Improve OpenRC script
The attached script updates a couple things which effectively is the same as the current model however it follows the modular nature of the declarative syntax. Changes: * Replaces start_stop_daemon_args with command_background and command_user Closes: https://bugs.gentoo.org/828075 Signed-off-by: Brian Evans <grknight@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-plugins')
-rw-r--r--media-plugins/vdr-xineliboutput/files/vdr-frontend-r113
-rw-r--r--media-plugins/vdr-xineliboutput/vdr-xineliboutput-2.2.0-r5.ebuild160
-rw-r--r--media-plugins/vdr-xineliboutput/vdr-xineliboutput-9999.ebuild2
3 files changed, 174 insertions, 1 deletions
diff --git a/media-plugins/vdr-xineliboutput/files/vdr-frontend-r1 b/media-plugins/vdr-xineliboutput/files/vdr-frontend-r1
new file mode 100644
index 000000000000..9f1bd6a227e8
--- /dev/null
+++ b/media-plugins/vdr-xineliboutput/files/vdr-frontend-r1
@@ -0,0 +1,13 @@
+#!/sbin/openrc-run
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+description="Start xineliboutput sxfe/sxfb remote frontend"
+
+. /etc/conf.d/vdr.xineliboutput
+
+command="/usr/bin/vdr-sxfe"
+command_args="${REMOTE_FRONTEND}"
+pidfile="/var/run/vdr-frontend.pid"
+command_background="yes"
+command_user="vdr:vdr"
diff --git a/media-plugins/vdr-xineliboutput/vdr-xineliboutput-2.2.0-r5.ebuild b/media-plugins/vdr-xineliboutput/vdr-xineliboutput-2.2.0-r5.ebuild
new file mode 100644
index 000000000000..d230fd885fb0
--- /dev/null
+++ b/media-plugins/vdr-xineliboutput/vdr-xineliboutput-2.2.0-r5.ebuild
@@ -0,0 +1,160 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs vdr-plugin-2
+
+GENTOO_VDR_CONDITIONAL=yes
+
+DESCRIPTION="VDR Plugin: Xinelib PlugIn"
+HOMEPAGE="https://sourceforge.net/projects/xineliboutput/"
+SRC_URI="mirror://sourceforge/${PN#vdr-}/${P}.tgz
+ http://vdr.websitec.de/download/${PN}/${P}_clang.patch.bz2"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="bluray caps cec dbus fbcon jpeg libextractor nls opengl +vdr vaapi vdpau +X +xine xinerama"
+
+COMMON_DEPEND="
+ vdr? (
+ media-video/vdr
+ libextractor? ( >=media-libs/libextractor-0.5.20 )
+ caps? ( sys-libs/libcap )
+ )
+
+ xine? (
+ ( >=media-libs/xine-lib-1.2
+ media-video/ffmpeg )
+ fbcon? ( jpeg? ( virtual/jpeg:* ) )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXrender
+ bluray? ( media-libs/libbluray )
+ dbus? ( dev-libs/dbus-glib dev-libs/glib:2 )
+ jpeg? ( virtual/jpeg:* )
+ opengl? ( virtual/opengl )
+ vaapi? ( x11-libs/libva >=media-libs/xine-lib-1.2[vaapi] )
+ vdpau? ( x11-libs/libvdpau >=media-libs/xine-lib-1.2[vdpau] )
+ xinerama? ( x11-libs/libXinerama )
+ )
+ )"
+
+DEPEND="${COMMON_DEPEND}
+ sys-kernel/linux-headers
+ nls? ( sys-devel/gettext )
+ xine? (
+ X? (
+ x11-base/xorg-proto
+ x11-libs/libXxf86vm
+ )
+ )"
+RDEPEND="${COMMON_DEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+REQUIRED_USE=" || ( vdr xine )"
+
+VDR_CONFD_FILE="${FILESDIR}/confd-2.0.0"
+
+pkg_setup() {
+ vdr-plugin-2_pkg_setup
+
+ if use xine; then
+ XINE_PLUGIN_DIR=$($(tc-getPKG_CONFIG) --variable=plugindir libxine)
+ [ -z "${XINE_PLUGIN_DIR}" ] && die "Could not find xine plugin dir"
+ fi
+}
+
+src_prepare() {
+ vdr-plugin-2_src_prepare
+
+ # bug 711978
+ sed -e "s:X11 opengl:X11 OpenGl:" -i configure || die
+
+ # bug 771036,780462 do not call cc directly
+ eapply "${FILESDIR}/${P}_no-gcc.patch"
+ eapply "${WORKDIR}/${P}_clang.patch"
+}
+
+src_configure() {
+ local myconf
+
+ if has_version ">=media-libs/xine-lib-1.2"; then
+ myconf="${myconf} --enable-libavutil"
+ else
+ myconf="${myconf} --disable-libavutil"
+ fi
+
+ # No autotools based configure script
+ ./configure \
+ --cc="$(tc-getCC)" \
+ --cxx="$(tc-getCXX)" \
+ $(use_enable X x11) \
+ $(use_enable X xshm) \
+ $(use_enable X xdpms) \
+ $(use_enable X xshape) \
+ $(use_enable X xrandr) \
+ $(use_enable X xrender) \
+ $(use_enable fbcon fb) \
+ $(use_enable vdr) \
+ $(use_enable xine libxine) \
+ $(use_enable libextractor) \
+ $(use_enable caps libcap) \
+ $(use_enable cec libcec) \
+ $(use_enable jpeg libjpeg) \
+ $(use_enable xinerama) \
+ $(use_enable dbus dbus-glib-1) \
+ $(use_enable nls i18n) \
+ $(use_enable bluray libbluray) \
+ $(use_enable opengl) \
+ ${myconf} \
+ || die
+
+ # UINT64_C is needed by ffmpeg headers
+ append-cxxflags -D__STDC_CONSTANT_MACROS
+}
+
+src_install() {
+ if use vdr; then
+ vdr-plugin-2_src_install
+
+ # bug 346989
+ insinto /etc/vdr/plugins/xineliboutput/
+ doins examples/allowed_hosts.conf
+ fowners -R vdr:vdr /etc/vdr/
+
+ if use nls; then
+ emake DESTDIR="${D}" i18n
+ fi
+
+ if use xine; then
+ newinitd "${FILESDIR}"/vdr-frontend-r1 vdr-frontend
+
+ insinto $XINE_PLUGIN_DIR
+ doins xineplug_inp_xvdr.so
+
+ insinto $XINE_PLUGIN_DIR/post
+ doins xineplug_post_*.so
+
+ if use fbcon; then
+ dobin vdr-fbfe
+
+ insinto $VDR_PLUGIN_DIR
+ doins libxineliboutput-fbfe.so.*
+ fi
+
+ if use X; then
+ dobin vdr-sxfe
+
+ insinto $VDR_PLUGIN_DIR
+ doins libxineliboutput-sxfe.so.*
+ fi
+ fi
+ else
+ emake DESTDIR="${D}" install
+
+ dodoc HISTORY README
+ fi
+}
diff --git a/media-plugins/vdr-xineliboutput/vdr-xineliboutput-9999.ebuild b/media-plugins/vdr-xineliboutput/vdr-xineliboutput-9999.ebuild
index c95ba6bb45b1..6e879e10e9a7 100644
--- a/media-plugins/vdr-xineliboutput/vdr-xineliboutput-9999.ebuild
+++ b/media-plugins/vdr-xineliboutput/vdr-xineliboutput-9999.ebuild
@@ -131,7 +131,7 @@ src_install() {
fi
if use xine; then
- doinitd "${FILESDIR}"/vdr-frontend
+ newinitd "${FILESDIR}"/vdr-frontend-r1 vdr-frontend
insinto $XINE_PLUGIN_DIR
doins xineplug_inp_xvdr.so