aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/vdr-plugin-reelchannelscan
diff options
context:
space:
mode:
authornox <nox@FreeBSD.org>2012-04-21 22:10:58 +0800
committernox <nox@FreeBSD.org>2012-04-21 22:10:58 +0800
commit924c145f00dbffd2cf75c51b012da537e66eeb59 (patch)
treecc31bad1ffbb82e5842e86e01df2130cdb240379 /multimedia/vdr-plugin-reelchannelscan
parentf83e7ff1a627091f341195ca2018fcc2a906fb22 (diff)
downloadfreebsd-ports-gnome-924c145f00dbffd2cf75c51b012da537e66eeb59.tar.gz
freebsd-ports-gnome-924c145f00dbffd2cf75c51b012da537e66eeb59.tar.zst
freebsd-ports-gnome-924c145f00dbffd2cf75c51b012da537e66eeb59.zip
- Update multimedia/vdr and multimedia/vdr-plugins to 1.7.27 .
- Update multimedia/vdr-plugin-epgsearch to 1.0.1s20120322 git snapshot. - Update multimedia/vdr-plugin-femon to 1.7.15 . - Update multimedia/vdr-plugin-iptv to 0.5.0 . - Update multimedia/vdr-plugin-osdteletext to 0.9.2 . - Update multimedia/vdr-plugin-streamdev to 0.5.1p20120311 git snapthot. - Update multimedia/vdr-plugin-xineliboutput to 1.0.90s20111129.1002 cvs snapshot. - Bump PORTREVISION for all other plugins and add vdr 1.7.27 compatibility/bugfix patches where necessary.
Diffstat (limited to 'multimedia/vdr-plugin-reelchannelscan')
-rw-r--r--multimedia/vdr-plugin-reelchannelscan/Makefile2
-rw-r--r--multimedia/vdr-plugin-reelchannelscan/files/patch-channelscan.c66
-rw-r--r--multimedia/vdr-plugin-reelchannelscan/files/patch-channelscan.h22
-rw-r--r--multimedia/vdr-plugin-reelchannelscan/files/patch-i18n.c18
-rw-r--r--multimedia/vdr-plugin-reelchannelscan/files/patch-i18n.h11
-rw-r--r--multimedia/vdr-plugin-reelchannelscan/files/patch-scan.c14
-rw-r--r--multimedia/vdr-plugin-reelchannelscan/pkg-plist2
7 files changed, 131 insertions, 4 deletions
diff --git a/multimedia/vdr-plugin-reelchannelscan/Makefile b/multimedia/vdr-plugin-reelchannelscan/Makefile
index 2c0fedfbef4c..7705b99df7f7 100644
--- a/multimedia/vdr-plugin-reelchannelscan/Makefile
+++ b/multimedia/vdr-plugin-reelchannelscan/Makefile
@@ -7,7 +7,7 @@
PORTNAME= vdr-plugin-reelchannelscan
PORTVERSION= 0.6.1b1.7.15
-PORTREVISION= 7
+PORTREVISION= 8
CATEGORIES= multimedia
MASTER_SITES= LOCAL/nox \
http://ppa.launchpad.net/yavdr/stable-vdr/ubuntu/pool/main/v/vdr-plugin-reelchannelscan/
diff --git a/multimedia/vdr-plugin-reelchannelscan/files/patch-channelscan.c b/multimedia/vdr-plugin-reelchannelscan/files/patch-channelscan.c
new file mode 100644
index 000000000000..89362e6fc64d
--- /dev/null
+++ b/multimedia/vdr-plugin-reelchannelscan/files/patch-channelscan.c
@@ -0,0 +1,66 @@
+--- a/channelscan.c
++++ b/channelscan.c
+@@ -37,6 +37,11 @@
+ eAutoScanStat
+ cPluginChannelscan::AutoScanStat = AssNone;
+
++#if APIVERSNUM > 10723
++cStringList
++ cPluginChannelscan::Nodes;
++#endif
++
+ cScanSetup ScanSetup;
+ bool OnlyChannelList=false;
+
+@@ -117,11 +122,51 @@ cPluginChannelscan::Initialize(void)
+ return true;
+ }
+
++#if APIVERSNUM > 10723
++bool
++cPluginChannelscan::GetAdapterFrontend(int CardIndex, int &Adapter, int &Frontend) {
++ Adapter = Frontend = -1;
++ if (CardIndex < 0)
++ return false;
++ if (CardIndex < Nodes.Size() &&
++ 2 == sscanf(Nodes[CardIndex], "%d %d", &Adapter, &Frontend)) {
++ return true;
++ }
++ return false;
++}
++#endif
++
+ bool
+ cPluginChannelscan::Start(void)
+ {
+ // Start any background activities the plugin shall perform.
++#if (APIVERSNUM < 10507)
+ RegisterI18n(Phrases);
++#endif
++#if APIVERSNUM > 10723
++ cReadDir DvbDir(DEV_DVB_BASE);
++ if (DvbDir.Ok()) {
++ struct dirent *a;
++ while ((a = DvbDir.Next()) != NULL) {
++ if (strstr(a->d_name, DEV_DVB_ADAPTER) == a->d_name) {
++ int Adapter = strtol(a->d_name + strlen(DEV_DVB_ADAPTER), NULL, 10);
++ cReadDir AdapterDir(AddDirectory(DEV_DVB_BASE, a->d_name));
++ if (AdapterDir.Ok()) {
++ struct dirent *f;
++ while ((f = AdapterDir.Next()) != NULL) {
++ if (strstr(f->d_name, DEV_DVB_FRONTEND) == f->d_name) {
++ int Frontend = strtol(f->d_name + strlen(DEV_DVB_FRONTEND), NULL, 10);
++ Nodes.Append(strdup(cString::sprintf("%2d %2d", Adapter, Frontend)));
++ }
++ }
++ }
++ }
++ }
++ }
++
++ if (Nodes.Size() > 0)
++ Nodes.Sort();
++#endif
+ return true;
+ }
+
diff --git a/multimedia/vdr-plugin-reelchannelscan/files/patch-channelscan.h b/multimedia/vdr-plugin-reelchannelscan/files/patch-channelscan.h
new file mode 100644
index 000000000000..922dd1b4a740
--- /dev/null
+++ b/multimedia/vdr-plugin-reelchannelscan/files/patch-channelscan.h
@@ -0,0 +1,22 @@
+--- a/channelscan.h
++++ b/channelscan.h
+@@ -68,6 +68,9 @@ class cPluginChannelscan:public cPlugin
+ {
+ private:
+ // Add any member variables or functions you may need here.
++#if APIVERSNUM > 10723
++ static cStringList Nodes;
++#endif
+ public:
+ cPluginChannelscan();
+ virtual ~ cPluginChannelscan();
+@@ -102,6 +105,9 @@ class cPluginChannelscan:public cPlugin
+ static eAutoScanStat AutoScanStat;
+ ChannelScanData channelData_;
+ bool channelDataPresent_;
++#if APIVERSNUM > 10723
++ static bool GetAdapterFrontend(int CardIndex, int &Adapter, int &Frontend);
++#endif
+ };
+
+ // --- cSetupMenu ------------------------------------------------------
diff --git a/multimedia/vdr-plugin-reelchannelscan/files/patch-i18n.c b/multimedia/vdr-plugin-reelchannelscan/files/patch-i18n.c
new file mode 100644
index 000000000000..12fdad0b08ce
--- /dev/null
+++ b/multimedia/vdr-plugin-reelchannelscan/files/patch-i18n.c
@@ -0,0 +1,18 @@
+--- a/i18n.c
++++ b/i18n.c
+@@ -23,8 +23,10 @@
+ *
+ ***************************************************************************/
+
++#include <vdr/config.h>
+ #include "i18n.h"
+
++#if (APIVERSNUM < 10507)
+ const tI18nPhrase Phrases[] = {
+ {"Channel Scan",
+ "Kanalsuche",
+@@ -1881,3 +1883,4 @@ const tI18nPhrase Phrases[] = {
+ },
+ {NULL}
+ };
++#endif
diff --git a/multimedia/vdr-plugin-reelchannelscan/files/patch-i18n.h b/multimedia/vdr-plugin-reelchannelscan/files/patch-i18n.h
new file mode 100644
index 000000000000..1ba299337cbf
--- /dev/null
+++ b/multimedia/vdr-plugin-reelchannelscan/files/patch-i18n.h
@@ -0,0 +1,11 @@
+--- i18n.h.orig
++++ i18n.h
+@@ -29,6 +29,8 @@
+ #include <vdr/i18n.h>
+ #include <vdr/config.h>
+
++#if (APIVERSNUM < 10507)
+ extern const tI18nPhrase Phrases[];
++#endif
+
+ #endif //_I18N__H
diff --git a/multimedia/vdr-plugin-reelchannelscan/files/patch-scan.c b/multimedia/vdr-plugin-reelchannelscan/files/patch-scan.c
index 70f6d1566ad0..024cb81c40b9 100644
--- a/multimedia/vdr-plugin-reelchannelscan/files/patch-scan.c
+++ b/multimedia/vdr-plugin-reelchannelscan/files/patch-scan.c
@@ -1,15 +1,25 @@
--- a/scan.c
+++ b/scan.c
-@@ -197,7 +197,7 @@ bool cScan::StartScanning(cScanParameter
+@@ -197,7 +197,17 @@ bool cScan::StartScanning(cScanParameter
#ifndef DEVICE_ATTRIBUTES
char buffer[265];
- snprintf(buffer, sizeof(buffer), "/dev/dvb/adapter%d/frontend0", cardnr);
++#if APIVERSNUM > 10723
++ int Adapter = -1, Frontend = -1;
++ if (!cPluginChannelscan::GetAdapterFrontend(cDevice::GetDevice(cardnr)->CardIndex(), Adapter, Frontend)) {
++ esyslog("GetAdapterFrontend() failed");
++ cMenuChannelscan::scanState = ssDeviceFailure;
++ return false;
++ }
++ snprintf(buffer, sizeof(buffer), "/dev/dvb/adapter%d/frontend%d", Adapter, Frontend);
++#else
+ snprintf(buffer, sizeof(buffer), "/dev/dvb/adapter%d/frontend0", cDevice::GetDevice(cardnr)->CardIndex());
++#endif
fd_frontend = open(buffer, O_RDONLY | O_NONBLOCK);
if (fd_frontend <= 0) {
-@@ -932,12 +932,12 @@ void cScan::Action()
+@@ -932,12 +942,12 @@ void cScan::Action()
char *strDate;
asprintf(&strDate,"%s", asctime(localtime(&tt)));
strDate[strlen(strDate)-1] = 0;
diff --git a/multimedia/vdr-plugin-reelchannelscan/pkg-plist b/multimedia/vdr-plugin-reelchannelscan/pkg-plist
index e9d33a931ec0..5eb1b947d07f 100644
--- a/multimedia/vdr-plugin-reelchannelscan/pkg-plist
+++ b/multimedia/vdr-plugin-reelchannelscan/pkg-plist
@@ -1,4 +1,4 @@
-lib/vdr/libvdr-reelchannelscan.so.1.7.22
+lib/vdr/libvdr-reelchannelscan.so.%%APIVERSION%%
etc/vdr/plugins/transponders/S0.8W.tpl
etc/vdr/plugins/transponders/S10.0E.tpl
etc/vdr/plugins/transponders/S100.5E.tpl