rpms/vdr-tvonscreen/devel tvonscreen-1.0.141-1.5.3.diff, NONE, 1.1 vdr-tvonscreen.spec, 1.2, 1.3
Ville-Pekka Vainio (vpv)
fedora-extras-commits at redhat.com
Tue Apr 8 17:58:52 UTC 2008
Author: vpv
Update of /cvs/pkgs/rpms/vdr-tvonscreen/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31074
Modified Files:
vdr-tvonscreen.spec
Added Files:
tvonscreen-1.0.141-1.5.3.diff
Log Message:
Fix dependency problem, add patch, rebuild against new VDR
tvonscreen-1.0.141-1.5.3.diff:
--- NEW FILE tvonscreen-1.0.141-1.5.3.diff ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 90_tvonscreen-1.0.141-1.5.3.dpatch by Thomas Günther <tom at toms-cafe.de>
## http://toms-cafe.de/vdr/download/tvonscreen-1.0.141-1.5.3.diff
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Changes for VDR >= 1.5.3.
@DPATCH@
diff -Naurp tvonscreen-1.0.141/anyfont.c tvonscreen-1.0.141-vdr153/anyfont.c
--- tvonscreen-1.0.141/anyfont.c 2004-07-08 13:54:56.000000000 +0000
+++ tvonscreen-1.0.141-vdr153/anyfont.c 2007-09-14 12:46:58.000000000 +0000
@@ -10,20 +10,36 @@
#include "anyfont.h"
#include "magazine.h"
-#if VDRVERSNUM >= 10307
+#if VDRVERSNUM >= 10503
+anyFont::anyFont(cOsd *_osd,int fheight,int transparent)
+#elif VDRVERSNUM >= 10307
anyFont::anyFont(cOsd *_osd,const cFont::tPixelData *fd,int fheight,int transparent)
#else
anyFont::anyFont(cOsdBase *_osd,const cFont::tPixelData *fd,int fheight,int transparent)
#endif
{
osd=_osd;
+#if VDRVERSNUM >= 10503
+#if VDRVERSNUM >= 10504
+ Font = cFont::CreateFont(Setup.FontOsd, fheight);
+#else
+ Font = new cFreetypeFont(*AddDirectory(FONTDIR, Setup.FontOsd, fheight);
+#endif
+ if (!Font || !Font->Height())
+ Font = cFont::GetFont(fontSml);
+#else
FontData=fd;
FontHeight=fheight;
+#endif
trans=transparent;
}
int anyFont::Height(void)
{
+#if VDRVERSNUM >= 10503
+ return Font->Height();
+#else
return FontHeight-2-2;
+#endif
}
int anyFont::Width(const char *txt)
{
@@ -39,21 +55,29 @@ int anyFont::LargeWidth(const char *txt)
}
int anyFont::Width(char c)
{
+#if VDRVERSNUM >= 10503
+ return Font->Width(c);
+#else
if ((int)FontData[(((unsigned char)c)-32)*(FontHeight)]>100)
{
mzlog(1," big letter error %c: %d",c,(int)FontData[(((unsigned char)c)-32)*(FontHeight)]);
return 100;
}
return (int)FontData[(((unsigned char)c)-32)*(FontHeight)];
+#endif
}
int anyFont::LargeWidth(char c)
{
+#if VDRVERSNUM >= 10503
+ return Font->Width(c);
+#else
if ((int)FontData[(((unsigned char)c)-32)*(FontHeight)]>100)
{
mzlog(1," big letter error %c: %d",c,(int)FontData[(((unsigned char)c)-32)*(FontHeight)]);
return 100;
}
return (int)FontData[(((unsigned char)c)-32)*(FontHeight)]*2;
+#endif
}
#if VDRVERSNUM >= 10307
int anyFont::Text(int x, int y, const char *txt, tColor fg, tColor bg)
@@ -61,6 +85,10 @@ int anyFont::Text(int x, int y, const ch
int anyFont::Text(int x, int y, const char *txt, eDvbColor fg, eDvbColor bg, tWindowHandle wh)
#endif
{
+#if VDRVERSNUM >= 10503
+ osd->DrawText(x, y, txt, fg, trans ? clrTransparent : bg, Font);
+ return x += Font->Width(txt);
+#else
unsigned int pxl;
int row,col;
@@ -85,6 +113,7 @@ int anyFont::Text(int x, int y, const ch
x += Width(*txt++);
}
return x;
+#endif
}
#if VDRVERSNUM >= 10307
int anyFont::LargeText(int x, int y, const char *txt, tColor fg, tColor bg)
@@ -92,6 +121,10 @@ int anyFont::LargeText(int x, int y, con
int anyFont::LargeText(int x, int y, const char *txt, eDvbColor fg, eDvbColor bg, tWindowHandle wh)
#endif
{
+#if VDRVERSNUM >= 10503
+ osd->DrawText(x, y, txt, fg, trans ? clrTransparent : bg, Font);
+ return x + Font->Width(txt);
+#else
unsigned int pxl;
int row,col;
@@ -116,6 +149,7 @@ int anyFont::LargeText(int x, int y, con
x += LargeWidth(*txt++);
}
return x;
+#endif
}
#if VDRVERSNUM >= 10307
int anyFont::Text(int x, int y, int w, int h, const char *txt, tColor fg, tColor bg)
diff -Naurp tvonscreen-1.0.141/anyfont.h tvonscreen-1.0.141-vdr153/anyfont.h
--- tvonscreen-1.0.141/anyfont.h 2004-07-08 13:54:56.000000000 +0000
+++ tvonscreen-1.0.141-vdr153/anyfont.h 2007-09-14 12:47:38.000000000 +0000
@@ -19,11 +19,17 @@ class anyFont
#else
cOsdBase *osd;
#endif
+#if VDRVERSNUM >= 10503
+ const cFont *Font;
+#else
const cFont::tPixelData *FontData;
int FontHeight;
+#endif
int trans;
public:
-#if VDRVERSNUM >= 10307
+#if VDRVERSNUM >= 10503
+ anyFont(cOsd *o,int fheight,int transparent=0);
+#elif VDRVERSNUM >= 10307
anyFont(cOsd *o,const cFont::tPixelData *fd,int fheight,int transparent=0);
#else
anyFont(cOsdBase *o,const cFont::tPixelData *fd,int fheight,int transparent=0);
diff -Naurp tvonscreen-1.0.141/magazine.c tvonscreen-1.0.141-vdr153/magazine.c
--- tvonscreen-1.0.141/magazine.c 2006-06-18 13:59:36.000000000 +0000
+++ tvonscreen-1.0.141-vdr153/magazine.c 2007-09-13 20:04:34.000000000 +0000
@@ -812,10 +812,12 @@ void magazine::autoTimer(const class cEv
}
}
+#if VDRVERSNUM < 10503
#include "fontosd/fontosd-arial18.c"
#include "fontosd/fontosd-verdana16.c"
#include "fontosd/fontosd-tahoma16.c"
#include "fontosd/fontosd-timesNewRoman16.c"
+#endif
void magazine::Show(void)
{
@@ -850,10 +852,17 @@ void magazine::Show(void)
delete f3;
delete f4;
+#if VDRVERSNUM >= 10503
+ f1=new anyFont(osd,18,1); // Sendung
+ f2=new anyFont(osd,16,1); // Extra-Info
+ f3=new anyFont(osd,20,1); // Sender
+ f4=new anyFont(osd,16); // Tasten
+#else
f1=new anyFont(osd,(cFont::tPixelData *)fontosd_arial18,FONTOSD_ARIAL18,1); // Sendung
f2=new anyFont(osd,(cFont::tPixelData *)fontosd_verdana16,FONTOSD_VERDANA16,1); // Extra-Info
f3=new anyFont(osd,(cFont::tPixelData *)fontosd_tahoma16,FONTOSD_TAHOMA16,1); // Sender
f4=new anyFont(osd,(cFont::tPixelData *)fontosd_newroman16,FONTOSD_NEWROMAN16); // Tasten
+#endif
for (int i=0; i < (int)(sizeof(Areas)/sizeof(tArea)); i++)
{
// cBitmap *b=osd->GetBitmap(i);
Index: vdr-tvonscreen.spec
===================================================================
RCS file: /cvs/pkgs/rpms/vdr-tvonscreen/devel/vdr-tvonscreen.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vdr-tvonscreen.spec 15 Feb 2008 23:34:53 -0000 1.2
+++ vdr-tvonscreen.spec 8 Apr 2008 17:58:11 -0000 1.3
@@ -5,7 +5,7 @@
Name: vdr-%{pname}
Version: 1.0.141
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Enhanced EPG data viewer for VDR
Group: Applications/Multimedia
@@ -13,9 +13,11 @@
URL: http://www.js-home.org/vdr/tvonscreen/
Source0: http://www.js-home.org/vdr/tvonscreen/%{name}-%{version}.tar.gz
Source1: %{name}.conf
+# VDR 1.6 compatibility patch
+Patch0: http://toms-cafe.de/vdr/download/%{pname}-%{version}-1.5.3.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: vdr-devel >= 1.4.1
+BuildRequires: vdr-devel >= 1.6.0
Requires: vdr(abi) = %{apiver}
%description
@@ -26,6 +28,7 @@
%prep
%setup -q -n %{pname}-%{version}
+%patch0 -p1
sed -i -e 's|^\(.*ConfigDirectory=\).*"logos".*|\1"%{datadir}/logos";|' \
magazine.c
sed -i -e 's|<configDir>/plugins/logos|%{datadir}/logos|' README
@@ -57,6 +60,9 @@
%changelog
+* Tue Apr 08 2008 - Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> 1.0.141-3
+- Add VDR 1.6.0 compatibility patch and rebuild against new VDR
+
* Sat Feb 16 2008 - Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> 1.0.141-2
- Rebuild for GCC 4.3
More information about the fedora-extras-commits
mailing list