Compare commits

..

3 commits

Author SHA1 Message Date
Fedora Release Engineering
41b97bb642 dist-git conversion 2010-07-29 14:56:19 +00:00
Bill Nottingham
d349ee3166 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:12:57 +00:00
Jesse Keating
3e15e6a7dd Initialize branch F-10 for vdr-text2skin 2008-11-07 04:37:57 +00:00
9 changed files with 415 additions and 2 deletions

2
.gitignore vendored
View file

@ -1 +1 @@
/*.tgz
vdr-text2skin-1.1-cvs_ext-0.10.tgz

View file

@ -1 +0,0 @@
This package was retired on 2013-03-11 due to a lack of a willing Fedora maintainer.

1
sources Normal file
View file

@ -0,0 +1 @@
92d5e0612f59f16190db93ae817f08ae vdr-text2skin-1.1-cvs_ext-0.10.tgz

View file

@ -0,0 +1,30 @@
Index: cache.h
===================================================================
RCS file: /var/cvsroot/text2skin/cache.h,v
retrieving revision 1.7
diff -u -r1.7 cache.h
--- cache.h 31 Jan 2005 14:40:29 -0000 1.7
+++ cache.h 3 Jan 2008 23:07:01 -0000
@@ -5,6 +5,7 @@
#ifndef VDR_TEXT2SKIN_CACHE_HPP
#define VDR_TEXT2SKIN_CACHE_HPP
+#include <cstdlib>
#include <map>
#include <vector>
#include <string>
Index: xml/type.h
===================================================================
RCS file: /var/cvsroot/text2skin/xml/type.h,v
retrieving revision 1.7
diff -u -r1.7 type.h
--- xml/type.h 31 Jan 2005 14:39:23 -0000 1.7
+++ xml/type.h 3 Jan 2008 23:07:02 -0000
@@ -5,6 +5,7 @@
#ifndef VDR_TEXT2SKIN_XML_TYPE_H
#define VDR_TEXT2SKIN_XML_TYPE_H
+#include <cstdlib>
#include <string>
#include <vdr/tools.h>
#include <stdio.h>

View file

@ -0,0 +1,45 @@
--- text2skin-1.1-cvs/README.de~ 2004-12-20 00:03:08.000000000 +0200
+++ text2skin-1.1-cvs/README.de 2006-11-19 18:42:54.000000000 +0200
@@ -77,6 +77,9 @@
Wo die Skins hingehören:
------------------------
+*** rpm package note: this text2skin package has been patched to load skins
+*** from /usr/share/vdr/text2skin instead of the path documented below.
+
Wie Sie vielleicht wissen, hat VDR einen Unterordner "plugins" innerhalb seines
Konfigurationsordners, in dem alle Dateien, die zu Plugins gehören, enthalten
sein sollten. Wenn Sie nicht wissen, wo das sein könnte, schauen Sie in dem
--- text2skin-1.1-cvs/README~ 2005-01-31 16:39:45.000000000 +0200
+++ text2skin-1.1-cvs/README 2006-11-19 18:42:36.000000000 +0200
@@ -82,6 +82,9 @@
Where to put the skins:
-----------------------
+*** rpm package note: this text2skin package has been patched to load skins
+*** from /usr/share/vdr/text2skin instead of the path documented below.
+
As you might know, VDR has a subfolder "plugins" inside it's configuration
folder, where all plugin-related files should reside. If you don't know, where
this could be, look into the folder you gave to VDR with the -v parameter
@@ -109,6 +112,9 @@
Where to put the fonts:
-----------------------
+*** rpm package note: this text2skin package has been patched to load fonts
+*** from /usr/share/vdr/text2skin instead of the path documented below.
+
Font files (.ttf) can be placed either in the directory of the skin itself or
in a subfolder fonts inside the text2skin directory.
--- text2skin-1.1-cvs/common.c~ 2005-01-07 23:46:51.000000000 +0200
+++ text2skin-1.1-cvs/common.c 2006-11-19 18:38:31.000000000 +0200
@@ -8,7 +8,7 @@
const std::string &SkinPath(void)
{
// should never change
- static std::string path = cPlugin::ConfigDirectory(PLUGIN_NAME_I18N);
+ static std::string path = "/usr/share/vdr/text2skin";
return path;
}

View file

@ -0,0 +1,73 @@
#! /bin/sh /usr/share/dpatch/dpatch-run
## 94_text2skin-1.1-cvs_ext-0.10-vdr-1.5.4.dpatch by Stone <syphyr@gmail.com>
##
## Thomas Günther <tom@toms-cafe.de>
## - Added compatibility to VDR < 1.5.4
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Changes for VDR >= 1.5.4.
@DPATCH@
--- text2skin/graphtft/font.c
+++ text2skin/graphtft/font.c
@@ -41,6 +41,7 @@
if ( _cache.find(CacheName) != _cache.end() )
return true;
+#if VDRVERSNUM < 10503
int error = FT_New_Face(_library, Filename.c_str(), format, &_face);
// every thing ok?
@@ -187,6 +188,17 @@
delete(font_data);
// Something went wrong!
return false;
+#else
+#if VDRVERSNUM < 10504
+ cFont* newFont = new cFreetypeFont(*AddDirectory(FONTDIR, Filename.c_str()), Size);
+#else
+ cFont* newFont = cFont::CreateFont(Filename.c_str(), Size);
+#endif
+ if ( newFont == NULL )
+ return false;
+ _cache[CacheName] = newFont;
+ return true;
+#endif
}
const cFont* cGraphtftFont::GetFont(string CacheName){
@@ -210,10 +222,12 @@
delete((*it).second);
_cache.clear();
+#if VDRVERSNUM < 10503
del_map::iterator del_it = _del.begin();
for (; del_it != _del.end(); ++del_it)
delete((*del_it).second);
_del.clear();
+#endif
}
cGraphtftFont GraphtftFont;
--- text2skin/graphtft/font.h
+++ text2skin/graphtft/font.h
@@ -24,7 +24,9 @@
{
private:
typedef map<string,cFont*> cache_map;
+#if VDRVERSNUM < 10503
typedef map<string,cFont::tPixelData*> del_map;
+#endif
public:
cGraphtftFont();
@@ -40,7 +42,9 @@
FT_Face _face;
FT_GlyphSlot _slot;
cache_map _cache;
+#if VDRVERSNUM < 10503
del_map _del;
+#endif
};

View file

@ -0,0 +1,101 @@
#! /bin/sh /usr/share/dpatch/dpatch-run
## 95_text2skin-1.1-cvs_ext-0.10-20070620.3-vdr-1.5.7-1.dpatch by Stone <syphyr@gmail.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Changes for VDR >= 1.5.7.
@DPATCH@
--- text2skin-1.1-cvs_ext-0.10-20070620.3/font.c.orig 2007-08-13 08:54:41.000000000 -0700
+++ text2skin-1.1-cvs_ext-0.10-20070620.3/font.c 2007-08-13 09:17:43.000000000 -0700
@@ -31,8 +31,13 @@
const cFont *res = NULL;
#ifdef HAVE_FREETYPE
char *cachename;
+#if VDRVERSNUM >= 10507
+ asprintf(&cachename, "%s_%d_%d_%d", Filename.c_str(), Size, Width, I18nCurrentLanguage());
+ if (mFontCache.Load(Path + "/" + Filename, cachename, Size, I18nCurrentLanguage(), Width))
+#else
asprintf(&cachename, "%s_%d_%d_%d", Filename.c_str(), Size, Width, Setup.OSDLanguage);
if (mFontCache.Load(Path + "/" + Filename, cachename, Size, Setup.OSDLanguage, Width))
+#endif
res = mFontCache.GetFont(cachename);
else
esyslog("ERROR: Text2Skin: Couldn't load font %s:%d", Filename.c_str(), Size);
--- text2skin-1.1-cvs_ext-0.10-20070620.3/i18n.c.orig 2007-08-13 07:34:10.000000000 -0700
+++ text2skin-1.1-cvs_ext-0.10-20070620.3/i18n.c 2007-08-13 08:53:31.000000000 -0700
@@ -491,7 +491,11 @@
cText2SkinI18n::~cText2SkinI18n() {
for (int i = 0; mPhrases[i][0]; ++i) {
+#if VDRVERSNUM >= 10507
+ for (int j = 0; j < I18nLanguages()->Size(); ++j)
+#else
for (int j = 0; j < I18nNumLanguages; ++j)
+#endif
free((void*)mPhrases[i][j]);
}
free(mPhrases);
@@ -507,7 +511,11 @@
memset(&p, 0, sizeof(tI18nPhrase));
Text += 17;
+#if VDRVERSNUM >= 10507
+ for (i = 0; i < I18nLanguages()->Size(); ++i) {
+#else
for (i = 0; i < I18nNumLanguages; ++i) {
+#endif
char *langs = strdup(I18nLanguageCode(i));
char *ptr = langs, *ep;
std::string text;
@@ -525,7 +533,11 @@
}
int idx = mNumPhrases++;
+#if VDRVERSNUM >= 10507
+ for (i = 0; i < I18nLanguages()->Size(); ++i)
+#else
for (i = 0; i < I18nNumLanguages; ++i)
+#endif
if (!p[i]) p[i] = "";
mPhrases = (tI18nPhrase*)realloc(mPhrases, (mNumPhrases + 1) * sizeof(tI18nPhrase));
memcpy(mPhrases[idx], p, sizeof(tI18nPhrase));
@@ -539,7 +551,9 @@
bool cText2SkinI18n::Load(const std::string &Filename) {
if (cText2SkinFile::Load(Filename)) {
+#if VDRVERSNUM <= 10506
I18nRegister(mPhrases, mIdentity.c_str());
+#endif
return true;
}
return false;
--- text2skin-1.1-cvs_ext-0.10-20070620.3/status.c.orig 2007-08-13 09:54:04.000000000 -0700
+++ text2skin-1.1-cvs_ext-0.10-20070620.3/status.c 2007-08-13 09:57:10.000000000 -0700
@@ -130,8 +130,13 @@
void cText2SkinStatus::OsdClear(void)
{
+#if VDRVERSNUM >= 10507
+ if (I18nCurrentLanguage() != mLastLanguage) {
+ mLastLanguage = I18nCurrentLanguage();
+#else
if (Setup.OSDLanguage != mLastLanguage) {
mLastLanguage = Setup.OSDLanguage;
+#endif
cxString::Reparse();
}
--- text2skin-1.1-cvs_ext-0.10-20070620.3/text2skin.c.orig 2007-08-13 09:46:25.000000000 -0700
+++ text2skin-1.1-cvs_ext-0.10-20070620.3/text2skin.c 2007-08-13 10:30:11.000000000 -0700
@@ -49,7 +49,11 @@
bool cText2SkinPlugin::Start(void) {
RegisterI18n(Phrases);
+#if VDRVERSNUM >= 10507
+ Text2SkinStatus.SetLanguage(I18nCurrentLanguage());
+#else
Text2SkinStatus.SetLanguage(Setup.OSDLanguage);
+#endif
cText2SkinLoader::Start();
return true;
}

5
vdr-text2skin.conf Normal file
View file

@ -0,0 +1,5 @@
# Configuration snippet for vdr-text2skin -*- sh -*-
#
# Add command line options to pass to the text2skin plugin to PLUGIN_OPTIONS.
PLUGIN_OPTIONS=""

159
vdr-text2skin.spec Normal file
View file

@ -0,0 +1,159 @@
%define pname text2skin
%define plugindir %(vdr-config --plugindir 2>/dev/null || echo ERROR)
%define configdir %(vdr-config --configdir 2>/dev/null || echo ERROR)
%define datadir %(vdr-config --datadir 2>/dev/null || echo ERROR)
%define apiver %(vdr-config --apiversion 2>/dev/null || echo ERROR)
%define ext 0.10
Name: vdr-%{pname}
Version: 1.1
Release: 23.cvsext%{ext}%{?dist}
Summary: OSD skin plugin for VDR
Group: Applications/Multimedia
License: GPL+
URL: http://linux.kompiliert.net/index.php?view=text2skin
#Source0: http://linux.kompiliert.net/files/%{name}-%{version}.tgz
#Source0: http://linux.kompiliert.net/contrib/%{name}-%{version}cvs-%{cvs}.tgz
Source0: http://brougs78.vdr-developer.org/tmp/vdr-text2skin-%{version}-cvs_ext-%{ext}.tgz
Source1: %{name}.conf
Patch0: %{name}-1.1cvs-vdr154.patch
Patch1: %{name}-1.1cvs-vdr157.patch
Patch2: %{name}-1.1cvs-skindir.patch
Patch3: %{name}-1.1cvs-includes.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if 0%{?_with_imagemagick:1}
BuildRequires: ImageMagick-c++-devel
%else
BuildRequires: imlib2-devel
%endif
BuildRequires: freetype-devel
BuildRequires: vdr-devel >= 1.3.47
BuildRequires: sed >= 3.95
BuildRequires: which
BuildRequires: gawk
Requires: vdr(abi) = %{apiver}
%description
This plugin is designed to load and interpret a set of files
describing the layout of VDR's on screen display and to make this
"skin" available to VDR via Setup -> OSD in the main menu. Of course
it is possible to load more than one text-based skin this way and to
choose between them while running VDR. All skins may be themeable
(you can create your own color-theme) and translateable as the author
of the skin wishes.
%prep
%setup -q -c
cd text2skin
%patch0 -p1
%patch1 -p1
sed -e 's|/usr/share/vdr/|%{datadir}/|' %{PATCH2} | patch -p1
%patch3 -p0
find . -depth -type d -name CVS | xargs rm -r
for f in HISTORY README.de Docs/*.txt ; do
iconv -f iso-8859-1 -t utf-8 $f > $f.utf8 ; mv $f.utf8 $f
done
chmod -x contrib/*.pl
sed -i -e /strip/d -e /O2/d Makefile
sed -i -e '/^DVBDIR/d' -e 's|-I$(DVBDIR)\(/linux\)\?/include||g' Makefile
cd ..
%build
opts=
%if 0%{!?_with_imagemagick:1}
opts="HAVE_IMLIB2=1 HAVE_IMAGEMAGICK="
%endif
make -C text2skin %{?_smp_mflags} $opts LIBDIR=. VDRDIR=%{_libdir}/vdr all
%install
rm -rf $RPM_BUILD_ROOT
cd text2skin
install -dm 755 $RPM_BUILD_ROOT%{plugindir}
install -pm 755 libvdr-%{pname}.so.%{apiver} $RPM_BUILD_ROOT%{plugindir}
cd ..
install -Dpm 644 %{SOURCE1} \
$RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/vdr-plugins.d/%{pname}.conf
install -dm 755 $RPM_BUILD_ROOT%{datadir}/text2skin/fonts
%clean
rm -rf $RPM_BUILD_ROOT
%pre
if [ $1 -gt 1 -a -d %{configdir}/plugins/text2skin ] ; then
# Migrate skins (can't overwrite a dir with a symlink)
mkdir -p %{datadir}/text2skin && \
cp -a %{configdir}/plugins/text2skin/* %{datadir}/text2skin || :
rm -rf %{configdir}/plugins/text2skin
fi
%files
%defattr(-,root,root,-)
%doc text2skin/CONTRIBUTORS text2skin/COPYING text2skin/HISTORY
%doc text2skin/README text2skin/Docs/*.txt text2skin/contrib/skin_to_10.pl
%lang(de) %doc text2skin/README.de
%config(noreplace) %{_sysconfdir}/sysconfig/vdr-plugins.d/%{pname}.conf
%{plugindir}/libvdr-%{pname}.so.%{apiver}
%{datadir}/text2skin/
%changelog
* Mon Apr 7 2008 Ville Skyttä <ville.skytta at iki.fi> - 1.1-23.cvsext0.10
- Update to 1.1-cvs_ext-0.10.
- Build for VDR 1.6.0.
* Sun Apr 6 2008 Ville Skyttä <ville.skytta at iki.fi> - 1.1-22.20051217cvs
- Apply VDR 1.5+ patches from e-tobi.net Debian package.
* Fri Jan 4 2008 Ville Skyttä <ville.skytta at iki.fi> - 1.1-21.20051217cvs
- Fix build with gcc 4.3's cleaned up C++ headers.
* Wed Aug 22 2007 Ville Skyttä <ville.skytta at iki.fi> - 1.1-20.20051217cvs
- BuildRequires: gawk for extracting APIVERSION.
* Tue Aug 7 2007 Ville Skyttä <ville.skytta at iki.fi> - 1.1-19.20051217cvs
- License: GPL+
* Sun Apr 8 2007 Ville Skyttä <ville.skytta at iki.fi> - 1.1-18.20051217cvs
- Grab potential XML parse buffer overflow fix from upstream CVS.
* Sun Nov 19 2006 Ville Skyttä <ville.skytta at iki.fi> - 1.1-16.20051217cvs
- Migrate real skins directory to /usr/share/vdr/text2skin.
- Patch for freetype 2.2 compatibility.
* Sat Nov 4 2006 Ville Skyttä <ville.skytta at iki.fi> - 1.1-15.20051217
- Build with imlib2 instead of imagemagick by default due to #212478.
- Build for VDR 1.4.4.
* Fri Oct 06 2006 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> 1.1-14
- rebuilt for unwind info generation, broken in gcc-4.1.1-21
* Sat Sep 23 2006 Ville Skyttä <ville.skytta at iki.fi> - 1.1-13.20051217
- Rebuild for VDR 1.4.3.
* Sun Aug 6 2006 Ville Skyttä <ville.skytta at iki.fi> - 1.1-12.20051217
- Rebuild for VDR 1.4.1-3.
* Sun Jun 11 2006 Ville Skyttä <ville.skytta at iki.fi> - 1.1-11.20051217
- Rebuild for VDR 1.4.1.
* Sun Apr 30 2006 Ville Skyttä <ville.skytta at iki.fi> - 1.1-10.20051217
- Rebuild for VDR 1.4.0.