commit 4e3e8842a099cc3ef8c0b12e14ce99ee70068b6e
Author: Ville Skyttä <ville.skytta(a)iki.fi>
Date: Tue May 31 23:17:31 2011 +0300
Patch to fix cache initialization crash when built with GCC 4.6.
Use __provides_exclude_from to filter Provides.
Clean up some no longer needed specfile cruft.
vdr-text2skin-1.3.1-cache-init.patch | 43 ++++++++++++++++++++++++++++++++++
vdr-text2skin.spec | 18 ++++++++------
2 files changed, 53 insertions(+), 8 deletions(-)
---
diff --git a/vdr-text2skin-1.3.1-cache-init.patch b/vdr-text2skin-1.3.1-cache-init.patch
new file mode 100644
index 0000000..5254190
--- /dev/null
+++ b/vdr-text2skin-1.3.1-cache-init.patch
@@ -0,0 +1,43 @@
+commit 99093d5ac8dc4307769c324c2dbaf18849ad8706
+Author: Ville Skyttä <ville.skytta(a)iki.fi>
+Date: Sat May 28 14:39:31 2011 +0300
+
+ (Re?)set bitmap cache size when initializing bitmaps.
+
+ Without something like this, when built with gcc 4.6, the cache's max
+ size ends up set to 0 (it's initialized before setup is done) and we
+ crash in cache[].
+
+diff --git a/bitmap.c b/bitmap.c
+index 5319333..8159536 100644
+--- a/bitmap.c
++++ b/bitmap.c
+@@ -90,6 +90,7 @@ void cText2SkinBitmap::Init(void) {
+ #ifdef HAVE_IMAGEMAGICK
+ InitializeMagick(NULL);
+ #endif
++ mCache.SetMaxItems(Text2SkinSetup.MaxCacheFill);
+ }
+
+ cText2SkinBitmap::cText2SkinBitmap(void) {
+diff --git a/cache.h b/cache.h
+index b3cc782..f37e693 100644
+--- a/cache.h
++++ b/cache.h
+@@ -31,6 +31,7 @@ public:
+ bool Contains(const key_type &Key);
+ data_type &operator[](const key_type &Key);
+ uint Count(void) { return mUsage.size(); }
++ void SetMaxItems(uint MaxItems) { mMaxItems = MaxItems; }
+ };
+
+ template<class key_type, class data_type>
+@@ -85,7 +86,7 @@ data_type &cxCache<key_type, data_type>::operator[](const
key_type &Key)
+ return it->second;
+ }
+
+- if (mUsage.size() == mMaxItems) {
++ while (mUsage.size() >= mMaxItems) {
+ item_iterator it = mItems.find(*mUsage.begin());
+ DeleteObject(it->first, it->second);
+ mUsage.erase(mUsage.begin());
diff --git a/vdr-text2skin.spec b/vdr-text2skin.spec
index 398b793..574e0eb 100644
--- a/vdr-text2skin.spec
+++ b/vdr-text2skin.spec
@@ -2,12 +2,13 @@
%global plugindir %(vdr-config --plugindir 2>/dev/null || echo ERROR)
%global datadir %(vdr-config --datadir 2>/dev/null || echo ERROR)
%global apiver %(vdr-config --apiversion 2>/dev/null || echo ERROR)
+%global __provides_exclude_from ^%{plugindir}/
# imagelib: imagemagick, graphicsmagick, imlib2 or %%{nil}
%{!?imagelib: %global imagelib graphicsmagick}
Name: vdr-%{pname}
Version: 1.3.1
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: OSD skin plugin for VDR
Group: Applications/Multimedia
@@ -16,6 +17,8 @@ URL:
http://projects.vdr-developer.org/projects/show/plg-text2skin
Source0:
http://projects.vdr-developer.org/attachments/download/344/%{name}-%{vers...
Source1: %{name}.conf
Patch0: %{name}-1.3-skindir.patch
+# In upstream post-1.3.1 git
+Patch1: %{name}-1.3.1-cache-init.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if "%{imagelib}" == "imagemagick"
@@ -23,8 +26,6 @@ BuildRequires: ImageMagick-c++-devel
%endif
%if "%{imagelib}" == "graphicsmagick"
BuildRequires: GraphicsMagick-c++-devel
-# Dependency missing in GraphicsMagick-devel <= 1.1.14-4.fc11
-BuildRequires: freetype-devel
%endif
%if "%{imagelib}" == "imlib2"
BuildRequires: imlib2-devel
@@ -34,10 +35,6 @@ BuildRequires: gawk
BuildRequires: gettext
Requires: vdr(abi)%{?_isa} = %{apiver}
-%{?filter_setup:
-%filter_provides_in %{plugindir}/.*\.so
-%filter_setup}
-
%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
@@ -51,6 +48,7 @@ of the skin wishes.
%prep
%setup -q -n %{pname}-%{version}
sed -e 's|/usr/share/vdr/|%{datadir}/|' %{PATCH0} | patch -p1
+%patch1 -p1
chmod -c -x contrib/*.pl
@@ -80,7 +78,6 @@ rm -rf $RPM_BUILD_ROOT
%files -f %{name}.lang
-%defattr(-,root,root,-)
%doc CONTRIBUTORS COPYING HISTORY README Docs/*.txt contrib/skin_to_10.pl
%lang(de) %doc README.de
%config(noreplace) %{_sysconfdir}/sysconfig/vdr-plugins.d/%{pname}.conf
@@ -89,6 +86,11 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Tue May 31 2011 Ville Skyttä <ville.skytta(a)iki.fi> - 1.3.1-3
+- Patch to fix cache initialization crash when built with GCC 4.6.
+- Use __provides_exclude_from to filter Provides.
+- Clean up some no longer needed specfile cruft.
+
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.3.1-2
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild