media-plugins/vdr-vcd: fix usage of cControl::Control()

introduce subslot dependency on media-video/vdr

Closes: https://bugs.gentoo.org/963496
Signed-off-by: Martin Dummer <martin.dummer@gmx.net>
Part-of: https://github.com/gentoo/gentoo/pull/43960
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Martin Dummer 2025-09-27 15:52:18 +02:00 committed by Sam James
parent 1ca21c1cbe
commit f10a6dcb44
No known key found for this signature in database
GPG Key ID: 738409F520DF9190
3 changed files with 88 additions and 1 deletions

View File

@ -0,0 +1,56 @@
diff '--color=auto' -Naur vcd-0.9.orig/menucontrol.c vcd-0.9/menucontrol.c
--- vcd-0.9.orig/menucontrol.c 2025-09-27 15:32:52.262205083 +0200
+++ vcd-0.9/menucontrol.c 2025-09-27 15:39:34.901524119 +0200
@@ -56,7 +56,8 @@
void cMenuSpiControl::SetItem(int Spi, cVcd *Vcd)
{
- cControl *control = cControl::Control();
+ cMutexLock MutexLock;
+ cControl *control = cControl::Control(MutexLock);
if (control && typeid(*control)==typeid(cMenuVcdControl))
static_cast<cMenuVcdControl*>(control)->Stop();
if (control && typeid(*control)==typeid(cMenuSpiControl)
@@ -146,7 +147,8 @@
void cMenuVcdControl::SetTrack(int Track, cVcd *Vcd)
{
- cControl *control = cControl::Control();
+ cMutexLock MutexLock;
+ cControl *control = cControl::Control(MutexLock);
if (control && typeid(*control)==typeid(cMenuSpiControl))
static_cast<cMenuSpiControl*>(control)->Stop();
if (control && typeid(*control)==typeid(cMenuVcdControl) &&
diff '--color=auto' -Naur vcd-0.9.orig/psdcontrol.c vcd-0.9/psdcontrol.c
--- vcd-0.9.orig/psdcontrol.c 2025-09-27 15:43:52.708831004 +0200
+++ vcd-0.9/psdcontrol.c 2025-09-27 15:47:19.216149801 +0200
@@ -100,7 +100,8 @@
void cPsdSpiControl::SetItem(int Spi, cVcd *Vcd, union psd_vcd *PsdVcd)
{
- cControl *control = cControl::Control();
+ cMutexLock MutexLock;
+ cControl *control = cControl::Control(MutexLock);
if (control && typeid(*control)==typeid(cPsdVcdControl))
static_cast<cPsdVcdControl*>(control)->Stop();
@@ -262,7 +263,8 @@
void cPsdVcdControl::SetTrack(int Track, cVcd *Vcd, union psd_vcd *PsdVcd)
{
- cControl *control = cControl::Control();
+ cMutexLock MutexLock;
+ cControl *control = cControl::Control(MutexLock);
if (control && typeid(*control)==typeid(cPsdSpiControl))
static_cast<cPsdSpiControl*>(control)->Stop();
@@ -298,7 +300,8 @@
void cPsdVcdControl::SetEntry(int Entry, cVcd *Vcd, union psd_vcd *PsdVcd)
{
- cControl *control = cControl::Control();
+ cMutexLock MutexLock;
+ cControl *control = cControl::Control(MutexLock);
if (control && typeid(*control)==typeid(cPsdSpiControl))
static_cast<cPsdSpiControl*>(control)->Stop();

View File

@ -1,4 +1,4 @@
# Copyright 1999-2023 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8

View File

@ -0,0 +1,31 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit vdr-plugin-2
DESCRIPTION="VDR plugin: play video cds"
HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
SRC_URI="http://vdr.websitec.de/download/vdr-vcd/${P}.tgz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
DEPEND="media-video/vdr:="
RDEPEND="${DEPEND}"
PATCHES=( "${FILESDIR}/${P}_xgettext.diff"
"${FILESDIR}/${P}_vdr-1.7.2.diff"
"${FILESDIR}/${P}_devicetrickspeed.patch"
"${FILESDIR}/${P}_gcc-6.patch"
"${FILESDIR}/${P}_Control.patch" )
src_prepare() {
vdr-plugin-2_src_prepare
# Patch Makefile, as VDRDIR is no well known variable name
# to stop spare -I in gcc cmdline
sed -e 's:$(VDRINC):$(VDRDIR)/include:' -i Makefile || die
}