commit fdda60d56fcd2e9c8a47b2a19a8673c1616ea102
Author: Martin Gansser <mgansser(a)online.de>
Date: Tue Apr 24 17:25:52 2018 +0200
Rebuilt for vdr-2.4.0
Add tvguideng-vdr_2.4.0_compat.patch
clog | 2 -
tvguideng-vdr_2.4.0_compat.patch | 233 +++++++++++++++++++++++++++++++++++++++
vdr-tvguideng.spec | 8 +-
3 files changed, 240 insertions(+), 3 deletions(-)
---
diff --git a/tvguideng-vdr_2.4.0_compat.patch b/tvguideng-vdr_2.4.0_compat.patch
new file mode 100644
index 0000000..afc2eb5
--- /dev/null
+++ b/tvguideng-vdr_2.4.0_compat.patch
@@ -0,0 +1,233 @@
+diff -ruN vdr-plugin-tvguideng-0.3.0.orig/channelepg.c
vdr-plugin-tvguideng-0.3.0/channelepg.c
+--- vdr-plugin-tvguideng-0.3.0.orig/channelepg.c 2018-03-26 08:59:59.461144936 +0200
++++ vdr-plugin-tvguideng-0.3.0/channelepg.c 2018-03-26 03:22:10.000000000 +0200
+@@ -466,11 +466,21 @@
+ }
+ }
+
+-void cChannelEpg::SetTimer()
+-{
++void cChannelEpg::SetTimer() {
+ #if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
++ const cSchedule *Schedule = NULL;
++ LOCK_SCHEDULES_READ;
++ const cSchedules* schedules = Schedules;
++ if (!schedules)
++ hasTimer = false;
++ else {
++ Schedule = schedules->GetSchedule(channel);
++ if (!Schedule)
++ hasTimer = false;
++ else
++ hasTimer = Schedule->HasTimer();
++ }
+ #else
+- hasTimer = channel->HasTimer();
++ hasTimer = channel->HasTimer();
+ #endif
+-
+-};
++}
+diff -ruN vdr-plugin-tvguideng-0.3.0.orig/recmanager.c
vdr-plugin-tvguideng-0.3.0/recmanager.c
+--- vdr-plugin-tvguideng-0.3.0.orig/recmanager.c 2018-03-26 08:59:59.465144917 +0200
++++ vdr-plugin-tvguideng-0.3.0/recmanager.c 2018-03-26 11:03:02.000000000 +0200
+@@ -169,15 +169,25 @@
+
+ void cRecManager::DeleteTimer(int timerID) {
+ #if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
+- LOCK_TIMERS_READ;
+- const cTimer *t = Timers->Get(timerID);
+-#else
+- const cTimer *t = Timers.Get(timerID);
+-#endif
++ LOCK_TIMERS_WRITE;
++ cTimer *t = Timers->Get(timerID);
++
++ if (!t)
++ return;
+
++ if (t->Recording()) {
++ t->Skip();
++ cRecordControls::Process(Timers, time(NULL));
++ }
++
++ isyslog("deleting timer %s", *t->ToDescr());
++ Timers->Del(t, true);
++#else
++ cTimer *t = Timers.Get(timerID);
+ if (!t)
+ return;
+ DeleteTimer(t);
++#endif
+ }
+
+ void cRecManager::DeleteTimer(const cEvent *event) {
+@@ -192,39 +202,50 @@
+
+ void cRecManager::DeleteLocalTimer(const cEvent *event) {
+ #if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
+- LOCK_TIMERS_READ;
+- const cTimer *t = Timers->GetMatch(event);
+-#else
+- const cTimer *t = Timers.GetMatch(event);
+-#endif
++ LOCK_TIMERS_WRITE;
++ cTimer *t = Timers->GetMatch(event);
+
+ if (!t)
+ return;
+- DeleteTimer(t);
+-}
+
+-
+-void cRecManager::DeleteTimer(const cTimer *timer) {
+-#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
+- LOCK_TIMERS_WRITE;
+- cTimers* timers = Timers;
++ if (t->Recording()) {
++ t->Skip();
++ cRecordControls::Process(Timers, time(NULL));
++ }
++
++ isyslog("deleting timer %s", *t->ToDescr());
++ Timers->Del(t, true);
+ #else
+- cTimers* timers = &Timers;
++ cTimer *t = Timers.GetMatch(event);
++ if (!t)
++ return;
++ DeleteTimer(t);
+ #endif
++}
+
+- cTimer* t = timers->GetTimer((cTimer*)timer); // #TODO dirty cast
+-
+- if (t->Recording()) {
+- t->Skip();
++void cRecManager::DeleteTimer(const cTimer *timer) {
+ #if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
+- cRecordControls::Process(timers, time(NULL));
++ LOCK_TIMERS_WRITE;
++ cTimer *t = Timers->GetTimer(timer);
++ if (!t)
++ return;
++
++ if (t->Recording()) {
++ t->Skip();
++ cRecordControls::Process(Timers, time(NULL));
++ }
++
++ isyslog("deleting timer %s", *t->ToDescr());
++ Timers->Del(t, true);
+ #else
+- cRecordControls::Process(time(NULL));
+-#endif
+- }
++ if (timer->Recording()) {
++ timer->Skip();
++ cRecordControls::Process(time(NULL));
++ }
+ isyslog("timer %s deleted", *timer->ToDescr());
+- timers->Del(t, true);
+- timers->SetModified();
++ Timers.Del(timer, true);
++ Timers.SetModified();
++#endif
+ }
+
+ void cRecManager::DeleteRemoteTimer(const cEvent *event) {
+@@ -275,10 +296,10 @@
+ RefreshRemoteTimers();
+ } else {
+ #if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
+- LOCK_TIMERS_WRITE;
+- Timers->SetModified();
++ LOCK_TIMERS_WRITE;
++ Timers->SetModified();
+ #else
+- Timers.SetModified();
++ Timers.SetModified();
+ #endif
+ }
+ }
+@@ -287,6 +308,7 @@
+ bool cRecManager::IsRecorded(const cEvent *event) {
+ #if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
+ LOCK_TIMERS_WRITE;
++ Timers->SetExplicitModify();
+ cTimers* timers = Timers;
+ #else
+ cTimers* timers = &Timers;
+@@ -326,14 +348,13 @@
+ RefreshRemoteTimers();
+ } else {
+ #if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
+- LOCK_TIMERS_WRITE;
+- cTimers* timers = Timers;
++ LOCK_TIMERS_WRITE;
++ cTimers* timers = Timers;
++ timers->Add(seriesTimer);
+ #else
+- cTimers* timers = &Timers;
++ Timers.Add(seriesTimer);
++ Timers.SetModified();
+ #endif
+-
+- timers->Add(seriesTimer);
+- timers->SetModified();
+ }
+ }
+
+@@ -515,6 +536,7 @@
+ if (delTimers) {
+ #if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
+ LOCK_TIMERS_WRITE;
++ Timers->SetExplicitModify();
+ cTimers* timers = Timers;
+ #else
+ cTimers* timers = &Timers;
+--- vdr-plugin-tvguideng-0.3.0/channelgroups.h.orig 2018-04-19 08:29:00.966067416 +0200
++++ vdr-plugin-tvguideng-0.3.0/channelgroups.h 2018-04-19 08:29:56.075762715 +0200
+@@ -16,6 +16,19 @@
+ int channelStop;
+ string name;
+ public:
++ cChannelGroup(const cChannelGroup &ChannelGroup)
++ {
++ *this = ChannelGroup;
++ };
++ cChannelGroup& operator= (const cChannelGroup &ChannelGroup)
++ {
++ this->id = ChannelGroup.id;
++ this->channelStart = ChannelGroup.channelStart;
++ this->channelStop = ChannelGroup.channelStop;
++ this->name = ChannelGroup.name;
++
++ return *this;
++ };
+ cChannelGroup(string name, int id);
+ virtual ~cChannelGroup(void);
+ int GetId(void) { return id; };
+--- vdr-plugin-tvguideng-0.3.0/switchtimer.h.orig 2018-04-19 08:30:20.386220404 +0200
++++ vdr-plugin-tvguideng-0.3.0/switchtimer.h 2018-04-19 08:30:58.775449554 +0200
+@@ -11,6 +11,20 @@
+ tChannelID channelID;
+ int switchMinsBefore;
+ int announceOnly;
++ cSwitchTimer(const cSwitchTimer &SwitchTimer)
++ {
++ *this = SwitchTimer;
++ };
++ cSwitchTimer& operator= (const cSwitchTimer &SwitchTimer)
++ {
++ this->eventID = SwitchTimer.eventID;
++ this->startTime = SwitchTimer.startTime;
++ this->channelID = SwitchTimer.channelID;
++ this->switchMinsBefore = SwitchTimer.switchMinsBefore;
++ this->announceOnly = SwitchTimer.announceOnly;
++
++ return *this;
++ };
+ cSwitchTimer(void);
+ cSwitchTimer(const cEvent* Event);
+ bool Parse(const char *s);
diff --git a/vdr-tvguideng.spec b/vdr-tvguideng.spec
index e83ff34..5d2562c 100644
--- a/vdr-tvguideng.spec
+++ b/vdr-tvguideng.spec
@@ -2,7 +2,7 @@
Name: vdr-%{pname}
Version: 0.3.0
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: TvGuideNG is a highly customizable 2D EPG viewer plugin
Group: Applications/Multimedia
License: GPLv2+
@@ -10,6 +10,7 @@ URL:
http://projects.vdr-developer.org/projects/plg-tvguideng
Source0:
https://projects.vdr-developer.org/git/vdr-plugin-tvguideng.git/snapshot/...
#
https://projects.vdr-developer.org/issues/2427
Patch0: %{pname}-gcc6.patch
+Patch1: tvguideng-vdr_2.4.0_compat.patch
BuildRequires: vdr-devel >= 2.0.0
BuildRequires: libskindesignerapi-devel
@@ -26,6 +27,7 @@ timers in an convenient way.
%prep
%setup -qn vdr-plugin-%{pname}-%{version}
%patch0 -p1
+%patch1 -p1
# std::auto_ptr deprecation warning in libstdc++ 5.1
sed -i -e 's| std::auto_ptr| std::unique_ptr|g' services/epgsearch.h
@@ -44,6 +46,10 @@ make install DESTDIR=%{buildroot}
%{vdr_plugindir}/libvdr-*.so.%{vdr_apiversion}
%changelog
+* Thu Apr 19 2018 Martin Gansser <martinkg(a)fedoraproject.org> - 0.3.0-6
+- Rebuilt for vdr-2.4.0
+- Add tvguideng-vdr_2.4.0_compat.patch
+
* Thu Mar 01 2018 RPM Fusion Release Engineering <leigh123linux(a)googlemail.com> -
0.3.0-5
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild