summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Schwarzott <zzam@gentoo.org>2005-07-23 16:50:22 +0000
committerMatthias Schwarzott <zzam@gentoo.org>2005-07-23 16:50:22 +0000
commita995e634c3de4b2dc8fd8873fad3d28b48afee8b (patch)
treed81c8ee885648d20097321a3d4577ff05c5ee5f3 /media-video/vdr
parentadded 7 local use flags for media-video/vdr (diff)
downloadhistorical-a995e634c3de4b2dc8fd8873fad3d28b48afee8b.tar.gz
historical-a995e634c3de4b2dc8fd8873fad3d28b48afee8b.tar.bz2
historical-a995e634c3de4b2dc8fd8873fad3d28b48afee8b.zip
new version with completely new ebuild, but without init and other additional scripts
Package-Manager: portage-2.0.51.22-r2
Diffstat (limited to 'media-video/vdr')
-rw-r--r--media-video/vdr/ChangeLog10
-rw-r--r--media-video/vdr/Manifest10
-rw-r--r--media-video/vdr/files/1.3.27/vdr-1.3.27-SourceCaps-lnb-sharing.diff208
-rw-r--r--media-video/vdr/files/1.3.27/vdr-1.3.27-SourceCaps.diff206
-rw-r--r--media-video/vdr/files/digest-vdr-1.3.275
-rw-r--r--media-video/vdr/vdr-1.3.27.ebuild149
6 files changed, 584 insertions, 4 deletions
diff --git a/media-video/vdr/ChangeLog b/media-video/vdr/ChangeLog
index 3574d9ae0b4a..eb3f26b028e5 100644
--- a/media-video/vdr/ChangeLog
+++ b/media-video/vdr/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for media-video/vdr
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/vdr/ChangeLog,v 1.13 2005/05/21 15:14:23 blubb Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/vdr/ChangeLog,v 1.14 2005/07/23 16:50:22 zzam Exp $
+
+*vdr-1.3.27 (23 Jul 2005)
+
+ 23 Jul 2005; Matthias Schwarzott <zzam@gentoo.org>
+ +files/1.3.27/vdr-1.3.27-SourceCaps.diff,
+ +files/1.3.27/vdr-1.3.27-SourceCaps-lnb-sharing.diff, +vdr-1.3.27.ebuild:
+ new version with completely new ebuild, but without init and other
+ additional scripts
21 May 2005; Simon Stelling <blubb@gentoo.org> vdr-1.2.6-r1.ebuild:
added ~amd64 keyword
diff --git a/media-video/vdr/Manifest b/media-video/vdr/Manifest
index efc1b266e924..7595f7c9abfd 100644
--- a/media-video/vdr/Manifest
+++ b/media-video/vdr/Manifest
@@ -1,6 +1,10 @@
-MD5 d6a2540d361f0388086fc8bbb71ffc00 ChangeLog 1704
-MD5 9ef4af14dad87b03fde8e43f19e08d26 metadata.xml 225
MD5 ed73745f0560d6fcecae19dfd61babe0 vdr-1.2.6-r1.ebuild 1404
+MD5 30b075c869af39290b85446619b472b1 vdr-1.3.27.ebuild 3700
+MD5 b3a1567f02f675cab5989b04ca6ffaf7 ChangeLog 1994
+MD5 9ef4af14dad87b03fde8e43f19e08d26 metadata.xml 225
+MD5 aa18122fb081cdc19d419d53ad1f63de files/vdr-1.2.6_CAN-2005-0071.patch 893
+MD5 4e0e788481ae4a07c9260bcdbaab3465 files/digest-vdr-1.3.27 370
MD5 5df3de1f888e3fc8f8ba27623a19f40b files/digest-vdr-1.2.6-r1 62
MD5 aa8d0f66c8831be73c049584d6143c8b files/vdr-1.2.6-gentoo.diff 1995
-MD5 aa18122fb081cdc19d419d53ad1f63de files/vdr-1.2.6_CAN-2005-0071.patch 893
+MD5 0d386d3861b6fc42122c42da4bef26f8 files/1.3.27/vdr-1.3.27-SourceCaps-lnb-sharing.diff 7138
+MD5 f45571c5192376c05c3acc204fbdfef8 files/1.3.27/vdr-1.3.27-SourceCaps.diff 7152
diff --git a/media-video/vdr/files/1.3.27/vdr-1.3.27-SourceCaps-lnb-sharing.diff b/media-video/vdr/files/1.3.27/vdr-1.3.27-SourceCaps-lnb-sharing.diff
new file mode 100644
index 000000000000..f9c011352b6d
--- /dev/null
+++ b/media-video/vdr/files/1.3.27/vdr-1.3.27-SourceCaps-lnb-sharing.diff
@@ -0,0 +1,208 @@
+diff -u vdr-1.3.27-before/config.c vdr-1.3.27/config.c
+--- vdr-1.3.27-before/config.c 2005-06-28 23:45:26.000000000 +0200
++++ vdr-1.3.27/config.c 2005-06-28 23:50:08.000000000 +0200
+@@ -14,6 +14,7 @@
+ #include "interface.h"
+ #include "plugin.h"
+ #include "recording.h"
++#include "sources.h"
+
+ // IMPORTANT NOTE: in the 'sscanf()' calls there is a blank after the '%d'
+ // format characters in order to allow any number of blanks after a numeric
+@@ -299,6 +300,7 @@
+ MultiSpeedMode = 0;
+ ShowReplayMode = 0;
+ ResumeID = 0;
++ memset(SourceCaps, 0, sizeof(SourceCaps));
+ CurrentChannel = -1;
+ CurrentVolume = MAXVOLUME;
+ CurrentDolby = 0;
+@@ -370,6 +372,54 @@
+ return false;
+ }
+
++void cSetup::StoreSourceCaps(const char *Name)
++{
++ cSetupLine *l;
++ while ((l = Get(Name)) != NULL)
++ Del(l);
++
++ for(int i = 0; i < MAXDEVICES; i++)
++ {
++ char buffer[MAXPARSEBUFFER]={0,}, *q = buffer;
++ int j = 0;
++ while(SourceCaps[i][j] && j < MAXSOURCECAPS)
++ {
++ if(j==0) q += snprintf(buffer, sizeof(buffer), "%i ", i+1);
++ q += snprintf(q, sizeof(buffer) - (q-buffer), "%s ",
++ *cSource::ToString(SourceCaps[i][j++]));
++ }
++ if(*buffer)
++ Store(Name, buffer, NULL, true);
++ }
++
++}
++
++bool cSetup::ParseSourceCaps(const char *Value)
++{
++ bool erg = true;
++ char *p;
++ int d = strtol(Value, &p, 10), i = 0;
++ d--;
++ while(p<Value+strlen(Value))
++ {
++ if(*p==0) return erg;
++ if(isblank(*p)) ++p;
++ if(isalpha(*p))
++ {
++ int source = cSource::FromString(p);
++ if(source != cSource::stNone)
++ SourceCaps[d][i++] = source;
++ else
++ return false;
++ //printf("SourceCaps[%i][%i] = %i ... p = %s\n", d, i-1, SourceCaps[d][i-1], p);
++ while(!isblank(*p) && *p)
++ ++p;
++ if(i>MAXSOURCECAPS) return false;
++ }
++ }
++ return true;
++}
++
+ void cSetup::StoreLanguages(const char *Name, int *Values)
+ {
+ char buffer[I18nNumLanguages * 4];
+@@ -462,6 +512,7 @@
+ else if (!strcasecmp(Name, "MultiSpeedMode")) MultiSpeedMode = atoi(Value);
+ else if (!strcasecmp(Name, "ShowReplayMode")) ShowReplayMode = atoi(Value);
+ else if (!strcasecmp(Name, "ResumeID")) ResumeID = atoi(Value);
++ else if (!strcasecmp(Name, "SourceCaps")) return ParseSourceCaps(Value);
+ else if (!strcasecmp(Name, "CurrentChannel")) CurrentChannel = atoi(Value);
+ else if (!strcasecmp(Name, "CurrentVolume")) CurrentVolume = atoi(Value);
+ else if (!strcasecmp(Name, "CurrentDolby")) CurrentDolby = atoi(Value);
+@@ -541,6 +592,7 @@
+ Store("MultiSpeedMode", MultiSpeedMode);
+ Store("ShowReplayMode", ShowReplayMode);
+ Store("ResumeID", ResumeID);
++ StoreSourceCaps("SourceCaps");
+ Store("CurrentChannel", CurrentChannel);
+ Store("CurrentVolume", CurrentVolume);
+ Store("CurrentDolby", CurrentDolby);
+diff -u vdr-1.3.27-before/config.h vdr-1.3.27/config.h
+--- vdr-1.3.27-before/config.h 2005-06-28 23:45:26.000000000 +0200
++++ vdr-1.3.27/config.h 2005-06-28 23:50:08.000000000 +0200
+@@ -198,6 +198,8 @@
+ private:
+ void StoreLanguages(const char *Name, int *Values);
+ bool ParseLanguages(const char *Value, int *Values);
++ void StoreSourceCaps(const char *Name);
++ bool ParseSourceCaps(const char *Value);
+ bool Parse(const char *Name, const char *Value);
+ cSetupLine *Get(const char *Name, const char *Plugin = NULL);
+ void Store(const char *Name, const char *Value, const char *Plugin = NULL, bool AllowMultiple = false);
+@@ -253,6 +255,7 @@
+ int MultiSpeedMode;
+ int ShowReplayMode;
+ int ResumeID;
++ int SourceCaps[MAXDEVICES][MAXSOURCECAPS];
+ int CurrentChannel;
+ int CurrentVolume;
+ int CurrentDolby;
+diff -u vdr-1.3.27-before/device.c vdr-1.3.27/device.c
+--- vdr-1.3.27-before/device.c 2005-06-28 23:45:26.000000000 +0200
++++ vdr-1.3.27/device.c 2005-06-28 23:50:08.000000000 +0200
+@@ -187,8 +187,10 @@
+ for (int i = 0; i < MAXRECEIVERS; i++)
+ receiver[i] = NULL;
+
+- if (numDevices < MAXDEVICES)
++ if (numDevices < MAXDEVICES) {
+ device[numDevices++] = this;
++ SetSourceCaps(cardIndex);
++ }
+ else
+ esyslog("ERROR: too many devices!");
+ }
+@@ -430,6 +432,17 @@
+ return d;
+ }
+
++void cDevice::SetSourceCaps(int Index)
++{
++ for (int d = 0; d < numDevices; d++) {
++ if (Index < 0 || Index == device[d]->CardIndex()) {
++ for (int i = 0; i < MAXSOURCECAPS; i++)
++ device[d]->sourceCaps[i] = Setup.SourceCaps[device[d]->CardIndex()][i];
++ }
++ }
++}
++
++
+ void cDevice::Shutdown(void)
+ {
+ primaryDevice = NULL;
+diff -u vdr-1.3.27-before/device.h vdr-1.3.27/device.h
+--- vdr-1.3.27-before/device.h 2005-06-28 23:45:26.000000000 +0200
++++ vdr-1.3.27/device.h 2005-06-28 23:53:14.000000000 +0200
+@@ -23,6 +23,7 @@
+ #include "tools.h"
+
+ #define MAXDEVICES 16 // the maximum number of devices in the system
++#define MAXSOURCECAPS 128 // the maximum number of different sources per device
+ #define MAXPIDHANDLES 64 // the maximum number of different PIDs per device
+ #define MAXRECEIVERS 16 // the maximum number of receivers per device
+ #define MAXVOLUME 255
+@@ -127,7 +128,10 @@
+ ///< given Priority.
+ ///< See ProvidesChannel() for more information on how
+ ///< priorities are handled, and the meaning of NeedsDetachReceivers.
+-
++ static void SetSourceCaps(int Index = -1);
++ ///< Sets the SourceCaps of the given device according to the Setup data.
++ ///< By default the SourceCaps of all devices are set.
++
+ //ML
+ private:
+ char LNBstate; // Frequenzband und Polarisation des DVB-Empfängers
+@@ -152,6 +156,8 @@
+ static int nextCardIndex;
+ int cardIndex;
+ protected:
++ int sourceCaps[MAXSOURCECAPS];
++protected:
+ cDevice(void);
+ virtual ~cDevice();
+ static int NextCardIndex(int n = 0);
+diff -u vdr-1.3.27-before/dvbdevice.c vdr-1.3.27/dvbdevice.c
+--- vdr-1.3.27-before/dvbdevice.c 2005-06-28 23:45:26.000000000 +0200
++++ vdr-1.3.27/dvbdevice.c 2005-06-28 23:50:08.000000000 +0200
+@@ -772,9 +772,16 @@
+ bool cDvbDevice::ProvidesSource(int Source) const
+ {
+ int type = Source & cSource::st_Mask;
++ if(type == cSource::stSat && frontendType == FE_QPSK)
++ {
++ for(int i = 0;i<MAXSOURCECAPS; i++)
++ if(sourceCaps[i] == Source)
++ return true;
++ return false;
++ }
++ else
+ return type == cSource::stNone
+ || type == cSource::stCable && frontendType == FE_QAM
+- || type == cSource::stSat && frontendType == FE_QPSK
+ || type == cSource::stTerr && frontendType == FE_OFDM;
+ }
+
+diff -u vdr-1.3.27-before/sources.c vdr-1.3.27/sources.c
+--- vdr-1.3.27-before/sources.c 2005-06-28 23:45:26.000000000 +0200
++++ vdr-1.3.27/sources.c 2005-06-28 23:50:08.000000000 +0200
+@@ -68,7 +68,7 @@
+ int pos = 0;
+ bool dot = false;
+ bool neg = false;
+- while (*++s) {
++ while (*++s && !isblank(*s)) {
+ switch (toupper(*s)) {
+ case '0' ... '9': pos *= 10;
+ pos += *s - '0';
diff --git a/media-video/vdr/files/1.3.27/vdr-1.3.27-SourceCaps.diff b/media-video/vdr/files/1.3.27/vdr-1.3.27-SourceCaps.diff
new file mode 100644
index 000000000000..a7f5b9c01d59
--- /dev/null
+++ b/media-video/vdr/files/1.3.27/vdr-1.3.27-SourceCaps.diff
@@ -0,0 +1,206 @@
+diff -Nur vdr-1.3.21/config.c vdr-1.3.21-SC/config.c
+--- vdr-1.3.21/config.c 2005-02-05 11:43:04.000000000 +0100
++++ vdr-1.3.21-SC/config.c 2005-02-16 00:29:02.631359088 +0100
+@@ -14,6 +14,7 @@
+ #include "interface.h"
+ #include "plugin.h"
+ #include "recording.h"
++#include "sources.h"
+
+ // IMPORTANT NOTE: in the 'sscanf()' calls there is a blank after the '%d'
+ // format characters in order to allow any number of blanks after a numeric
+@@ -297,6 +298,7 @@
+ MultiSpeedMode = 0;
+ ShowReplayMode = 0;
+ ResumeID = 0;
++ memset(SourceCaps, 0, sizeof(SourceCaps));
+ CurrentChannel = -1;
+ CurrentVolume = MAXVOLUME;
+ CurrentDolby = 0;
+@@ -363,6 +365,54 @@
+ return false;
+ }
+
++void cSetup::StoreSourceCaps(const char *Name)
++{
++ cSetupLine *l;
++ while ((l = Get(Name)) != NULL)
++ Del(l);
++
++ for(int i = 0; i < MAXDEVICES; i++)
++ {
++ char buffer[MAXPARSEBUFFER]={0,}, *q = buffer;
++ int j = 0;
++ while(SourceCaps[i][j] && j < MAXSOURCECAPS)
++ {
++ if(j==0) q += snprintf(buffer, sizeof(buffer), "%i ", i+1);
++ q += snprintf(q, sizeof(buffer) - (q-buffer), "%s ",
++ *cSource::ToString(SourceCaps[i][j++]));
++ }
++ if(*buffer)
++ Store(Name, buffer, NULL, true);
++ }
++
++}
++
++bool cSetup::ParseSourceCaps(const char *Value)
++{
++ bool erg = true;
++ char *p;
++ int d = strtol(Value, &p, 10), i = 0;
++ d--;
++ while(p<Value+strlen(Value))
++ {
++ if(*p==0) return erg;
++ if(isblank(*p)) ++p;
++ if(isalpha(*p))
++ {
++ int source = cSource::FromString(p);
++ if(source != cSource::stNone)
++ SourceCaps[d][i++] = source;
++ else
++ return false;
++ //printf("SourceCaps[%i][%i] = %i ... p = %s\n", d, i-1, SourceCaps[d][i-1], p);
++ while(!isblank(*p) && *p)
++ ++p;
++ if(i>MAXSOURCECAPS) return false;
++ }
++ }
++ return true;
++}
++
+ void cSetup::StoreLanguages(const char *Name, int *Values)
+ {
+ char buffer[I18nNumLanguages * 4];
+@@ -453,6 +503,7 @@
+ else if (!strcasecmp(Name, "MultiSpeedMode")) MultiSpeedMode = atoi(Value);
+ else if (!strcasecmp(Name, "ShowReplayMode")) ShowReplayMode = atoi(Value);
+ else if (!strcasecmp(Name, "ResumeID")) ResumeID = atoi(Value);
++ else if (!strcasecmp(Name, "SourceCaps")) return ParseSourceCaps(Value);
+ else if (!strcasecmp(Name, "CurrentChannel")) CurrentChannel = atoi(Value);
+ else if (!strcasecmp(Name, "CurrentVolume")) CurrentVolume = atoi(Value);
+ else if (!strcasecmp(Name, "CurrentDolby")) CurrentDolby = atoi(Value);
+@@ -516,6 +567,7 @@
+ Store("MultiSpeedMode", MultiSpeedMode);
+ Store("ShowReplayMode", ShowReplayMode);
+ Store("ResumeID", ResumeID);
++ StoreSourceCaps("SourceCaps");
+ Store("CurrentChannel", CurrentChannel);
+ Store("CurrentVolume", CurrentVolume);
+ Store("CurrentDolby", CurrentDolby);
+diff -Nur vdr-1.3.21/config.h vdr-1.3.21-SC/config.h
+--- vdr-1.3.21/config.h 2005-02-08 12:22:14.000000000 +0100
++++ vdr-1.3.21-SC/config.h 2005-02-16 00:29:02.634358632 +0100
+@@ -198,6 +198,8 @@
+ private:
+ void StoreLanguages(const char *Name, int *Values);
+ bool ParseLanguages(const char *Value, int *Values);
++ void StoreSourceCaps(const char *Name);
++ bool ParseSourceCaps(const char *Value);
+ bool Parse(const char *Name, const char *Value);
+ cSetupLine *Get(const char *Name, const char *Plugin = NULL);
+ void Store(const char *Name, const char *Value, const char *Plugin = NULL, bool AllowMultiple = false);
+@@ -251,6 +253,7 @@
+ int MultiSpeedMode;
+ int ShowReplayMode;
+ int ResumeID;
++ int SourceCaps[MAXDEVICES][MAXSOURCECAPS];
+ int CurrentChannel;
+ int CurrentVolume;
+ int CurrentDolby;
+diff -Nur vdr-1.3.21/device.c vdr-1.3.21-SC/device.c
+--- vdr-1.3.21/device.c 2005-02-13 10:51:48.000000000 +0100
++++ vdr-1.3.21-SC/device.c 2005-02-16 00:29:02.639357872 +0100
+@@ -175,8 +175,10 @@
+ for (int i = 0; i < MAXRECEIVERS; i++)
+ receiver[i] = NULL;
+
+- if (numDevices < MAXDEVICES)
++ if (numDevices < MAXDEVICES) {
+ device[numDevices++] = this;
++ SetSourceCaps(cardIndex);
++ }
+ else
+ esyslog("ERROR: too many devices!");
+ }
+@@ -313,6 +315,17 @@
+ return d;
+ }
+
++void cDevice::SetSourceCaps(int Index)
++{
++ for (int d = 0; d < numDevices; d++) {
++ if (Index < 0 || Index == device[d]->CardIndex()) {
++ for (int i = 0; i < MAXSOURCECAPS; i++)
++ device[d]->sourceCaps[i] = Setup.SourceCaps[device[d]->CardIndex()][i];
++ }
++ }
++}
++
++
+ void cDevice::Shutdown(void)
+ {
+ primaryDevice = NULL;
+diff -Nur vdr-1.3.21/device.h vdr-1.3.21-SC/device.h
+--- vdr-1.3.21/device.h 2005-02-06 12:43:04.000000000 +0100
++++ vdr-1.3.21-SC/device.h 2005-02-16 00:29:02.644357112 +0100
+@@ -22,6 +22,7 @@
+ #include "tools.h"
+
+ #define MAXDEVICES 16 // the maximum number of devices in the system
++#define MAXSOURCECAPS 128 // the maximum number of different sources per device
+ #define MAXPIDHANDLES 64 // the maximum number of different PIDs per device
+ #define MAXRECEIVERS 16 // the maximum number of receivers per device
+ #define MAXVOLUME 255
+@@ -122,6 +123,9 @@
+ ///< given Priority.
+ ///< See ProvidesChannel() for more information on how
+ ///< priorities are handled, and the meaning of NeedsDetachReceivers.
++ static void SetSourceCaps(int Index = -1);
++ ///< Sets the SourceCaps of the given device according to the Setup data.
++ ///< By default the SourceCaps of all devices are set.
+ static void Shutdown(void);
+ ///< Closes down all devices.
+ ///< Must be called at the end of the program.
+@@ -129,6 +133,8 @@
+ static int nextCardIndex;
+ int cardIndex;
+ protected:
++ int sourceCaps[MAXSOURCECAPS];
++protected:
+ cDevice(void);
+ virtual ~cDevice();
+ static int NextCardIndex(int n = 0);
+diff -Nur vdr-1.3.21/dvbdevice.c vdr-1.3.21-SC/dvbdevice.c
+--- vdr-1.3.21/dvbdevice.c 2005-02-13 15:26:37.000000000 +0100
++++ vdr-1.3.21-SC/dvbdevice.c 2005-02-16 00:29:02.647356656 +0100
+@@ -707,9 +707,16 @@
+ bool cDvbDevice::ProvidesSource(int Source) const
+ {
+ int type = Source & cSource::st_Mask;
++ if(type == cSource::stSat && frontendType == FE_QPSK)
++ {
++ for(int i = 0;i<MAXSOURCECAPS; i++)
++ if(sourceCaps[i] == Source)
++ return true;
++ return false;
++ }
++ else
+ return type == cSource::stNone
+ || type == cSource::stCable && frontendType == FE_QAM
+- || type == cSource::stSat && frontendType == FE_QPSK
+ || type == cSource::stTerr && frontendType == FE_OFDM;
+ return true;
+ }
+diff -Nur vdr-1.3.21/sources.c vdr-1.3.21-SC/sources.c
+--- vdr-1.3.21/sources.c 2004-12-26 12:58:52.000000000 +0100
++++ vdr-1.3.21-SC/sources.c 2005-02-16 00:29:02.652355896 +0100
+@@ -68,7 +68,7 @@
+ int pos = 0;
+ bool dot = false;
+ bool neg = false;
+- while (*++s) {
++ while (*++s && !isblank(*s)) {
+ switch (toupper(*s)) {
+ case '0' ... '9': pos *= 10;
+ pos += *s - '0';
diff --git a/media-video/vdr/files/digest-vdr-1.3.27 b/media-video/vdr/files/digest-vdr-1.3.27
new file mode 100644
index 000000000000..420ef938cfbc
--- /dev/null
+++ b/media-video/vdr/files/digest-vdr-1.3.27
@@ -0,0 +1,5 @@
+MD5 071534050dcf4018ee71bbb51bf1dd72 vdr-1.3.27.tar.bz2 491983
+MD5 accced96061d71b6eb33448428cbd633 BETA-configurableLNBshare-VDR_1.3.26.patch 17651
+MD5 969fb761f3dd0d83b637877f3818f70f vdr-1.3.27-enAIO-2.4.diff.gz 9821
+MD5 09c24560792a3a0e99433ddc7da59241 vdr-1.3.27-bigpatch-test4.diff.bz2 68563
+MD5 08f1340e9dc3c5078f334d19ca223bff vdr-jumpplay-0.6-1.3.24.diff 18680
diff --git a/media-video/vdr/vdr-1.3.27.ebuild b/media-video/vdr/vdr-1.3.27.ebuild
new file mode 100644
index 000000000000..9009fe56ee9b
--- /dev/null
+++ b/media-video/vdr/vdr-1.3.27.ebuild
@@ -0,0 +1,149 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/vdr/vdr-1.3.27.ebuild,v 1.1 2005/07/23 16:50:22 zzam Exp $
+
+inherit eutils
+
+IUSE="lirc vfat rcu
+ lnbsharing sourcecaps aio bigpatch jumpplay"
+
+# Names of patches
+FNAME_AIO="vdr-1.3.27-enAIO-2.4.diff"
+FNAME_BIGPATCH="vdr-1.3.27-bigpatch-test4.diff"
+FNAME_JUMPPLAY="vdr-jumpplay-0.6-1.3.24.diff"
+FNAME_LNBSHARING="BETA-configurableLNBshare-VDR_1.3.26.patch"
+FNAME_SOURCECAPS_NORMAL="vdr-1.3.27-SourceCaps.diff"
+FNAME_SOURCECAPS_LNBSHARING="vdr-1.3.27-SourceCaps-lnb-sharing.diff"
+
+DESCRIPTION="The Video Disk Recorder"
+HOMEPAGE="http://www.cadsoft.de/vdr/"
+SRC_URI="ftp://ftp.cadsoft.de/vdr/Developer/${P}.tar.bz2
+ lnbsharing? ( http://xn--ltzke-jua.de/dvb/VDR_LNB_sharing_patch/${FNAME_LNBSHARING} )
+ aio? ( http://www.saunalahti.fi/~rahrenbe/vdr/patches/${FNAME_AIO}.gz )
+ bigpatch? ( http://bigpatch.vdr-developer.org/1.3.27/BETA/${FNAME_BIGPATCH}.bz2 )
+ jumpplay? ( http://www.toms-cafe.de/vdr/download/${FNAME_JUMPPLAY} )"
+
+KEYWORDS="~x86"
+SLOT="0"
+LICENSE="GPL-2"
+
+
+RDEPEND="media-libs/jpeg
+ lirc? ( app-misc/lirc )
+ dev-lang/perl"
+
+DEPEND="${RDEPEND}
+ || (
+ >=sys-kernel/linux-headers-2.6.11-r2
+ media-tv/linuxtv-dvb
+ )
+ sys-apps/gawk"
+
+# Relevant Pathes for vdr on gentoo
+DVBDIR=/usr/include
+VDRDIR=/usr/include/vdr
+PLUGINDIR=/usr/lib/vdr/plugins
+CONFDIR=/etc/vdr
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ ebegin "Changing pathes for gentoo"
+ sed -e 's-$(DVBDIR)/include-$(DVBDIR)-' -i Makefile
+
+ sed \
+ -e 's-ConfigDirectory = VideoDirectory;-ConfigDirectory = CONFIGDIR;-' \
+ -i vdr.c
+
+ cat > Make.config <<-EOT
+ #
+ # Generated by ebuild ${PF}
+ #
+ DVBDIR = ${DVBDIR}
+ PLUGINLIBDIR = ${PLUGINDIR}
+ CONFIGDIR = ${CONFDIR}
+
+ DEFINES += -DCONFIGDIR=\"\$(CONFIGDIR)\"
+ EOT
+ eend 0
+
+
+ # apply standard patches
+ local PATCHDIR=${FILESDIR}/${PV}
+ local MY_SOURCECAPS="${PATCHDIR}/${FNAME_SOURCECAPS_NORMAL}"
+
+ if use bigpatch; then
+ epatch "../${FNAME_BIGPATCH}"
+ else
+ # All these patches are included in bigpatch
+ if use aio; then
+ if use lnbsharing; then
+ ewarn "At the moment lnbsharing can not be combined with aio, dropping aio patch!"
+ else
+ epatch "../${FNAME_AIO}"
+ fi
+ fi
+
+ if use lnbsharing; then
+ epatch "${DISTDIR}/${FNAME_LNBSHARING}"
+ MY_SOURCECAPS="${PATCHDIR}/${FNAME_SOURCECAPS_LNBSHARING}"
+ fi
+
+ use sourcecaps && epatch "${MY_SOURCECAPS}"
+
+ if use jumpplay; then
+ if use sourcecaps; then
+ ewarn "At the moment sourcecaps can not be combined with jumpplay, dropping jumpplay patch."
+ else
+ epatch "${DISTDIR}/${FNAME_JUMPPLAY}"
+ fi
+ fi
+ fi
+
+
+
+ # apply local patches defined by variable VDR_LOCAL_PATCHES_DIR
+ if test -n "${VDR_LOCAL_PATCHES_DIR}"; then
+ echo
+ einfo "Applying local patches"
+ for LOCALPATCH in ${VDR_LOCAL_PATCHES_DIR}/${PV}/*.{diff,patch}; do
+ test -f "${LOCALPATCH}" && epatch "${LOCALPATCH}"
+ done
+ fi
+}
+
+
+src_compile() {
+ local myconf=""
+ if use rcu; then
+ myconf="${myconf} REMOTE=RCU"
+ use lirc && ewarn "Only one remotes can be used: dropping lirc and keeping rcu"
+ else
+ use lirc && myconf="${myconf} REMOTE=LIRC"
+ fi
+ use vfat && myconf="${myconf} VFAT=1"
+
+ test -n "${myconf}" && einfo "Compiling with: ${myconf}"
+ emake ${myconf} || die "compilation failed"
+}
+
+src_install() {
+ exeinto /usr/bin
+ doexe vdr
+ doexe svdrpsend.pl
+
+ insinto /usr/include/vdr
+ doins *.h
+ doins Make.config
+
+ insinto /etc/vdr
+ doins *.conf channels.conf.*
+
+ doman vdr.1 vdr.5
+}
+
+pkg_postinst() {
+ einfo "Up to now this ebuild does not contain any scripts needed for use"
+ einfo "of vdr as a STB (no scripts for init, shutdown, automatic wakeup, ...)."
+}