[widelands] Rebuild for new SDL_gfx Require and link to drehatlas-widelands-fonts instead of shipping a private

Hans de Goede jwrdegoede at fedoraproject.org
Sat Jul 16 14:37:35 UTC 2011


commit 51f56dbeacb0e9d38241e2a88c95ca680226c557
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Sat Jul 16 16:38:40 2011 +0200

    Rebuild for new SDL_gfx
    Require and link to drehatlas-widelands-fonts instead of shipping
    a private copy (#477483)
    Fix a patch on toplevel messageboxes (#718130)

 widelands-build16-src-crash-on-messagebox.patch |   22 ++++++++++++++++++++++
 widelands.spec                                  |   13 ++++++++++++-
 2 files changed, 34 insertions(+), 1 deletions(-)
---
diff --git a/widelands-build16-src-crash-on-messagebox.patch b/widelands-build16-src-crash-on-messagebox.patch
new file mode 100644
index 0000000..cd163c2
--- /dev/null
+++ b/widelands-build16-src-crash-on-messagebox.patch
@@ -0,0 +1,22 @@
+diff -up widelands-build16-src/src/ui_basic/window.cc~ widelands-build16-src/src/ui_basic/window.cc
+--- widelands-build16-src/src/ui_basic/window.cc~	2011-04-15 20:40:26.000000000 +0200
++++ widelands-build16-src/src/ui_basic/window.cc	2011-07-16 15:35:18.976363248 +0200
+@@ -250,12 +250,15 @@ void Window::move_inside_parent() {
+ */
+ void Window::center_to_parent()
+ {
+-	Panel & parent = *get_parent();
++	Panel *parent = get_parent();
++
++	if (!parent)
++		return;
+ 
+ 	set_pos
+ 		(Point
+-		 	((parent.get_inner_w() - get_w()) / 2,
+-		 	 (parent.get_inner_h() - get_h()) / 2));
++		 	((parent->get_inner_w() - get_w()) / 2,
++		 	 (parent->get_inner_h() - get_h()) / 2));
+ }
+ 
+ 
diff --git a/widelands.spec b/widelands.spec
index e3dcc70..3951300 100644
--- a/widelands.spec
+++ b/widelands.spec
@@ -1,19 +1,21 @@
 %define build_id build16
 Name:           widelands
 Version:        0
-Release:        0.25.%{build_id}%{?dist}
+Release:        0.26.%{build_id}%{?dist}
 Summary:        Open source realtime-strategy game
 
 Group:          Amusements/Games
 License:        GPLv2+
 URL:            http://www.widelands.org
 Source0:        http://launchpad.net/widelands/%{build_id}/%{build_id}/+download/widelands-%{build_id}-src.tar.bz2
+Patch0:         widelands-build16-src-crash-on-messagebox.patch
 
 BuildRequires: SDL_mixer-devel SDL_image-devel SDL_net-devel SDL_ttf-devel
 BuildRequires: SDL_gfx-devel boost-devel ggz-base-libs-devel libpng-devel
 BuildRequires: libjpeg-devel libtiff-devel lua-devel glew-devel
 BuildRequires: desktop-file-utils cmake gettext ctags optipng
 Requires:      hicolor-icon-theme gnu-free-serif-fonts gnu-free-sans-fonts
+Requires:      drehatlas-widelands-fonts
 
 %description
 Widelands is an open source (GPLed), realtime-strategy game, using SDL and
@@ -24,6 +26,7 @@ perhaps will have a thought, what Widelands is all about.
 
 %prep
 %setup -q -n widelands-%{build_id}-src
+%patch0 -p1
 
 
 %build
@@ -63,8 +66,10 @@ desktop-file-install --vendor="fedora" \
 pushd $RPM_BUILD_ROOT
 rm usr/share/widelands/fonts/FreeSans.ttf
 rm usr/share/widelands/fonts/FreeSerif.ttf
+rm usr/share/widelands/fonts/Widelands/*
 ln -s /usr/share/fonts/gnu-free/FreeSans.ttf usr/share/widelands/fonts/FreeSans.ttf
 ln -s /usr/share/fonts/gnu-free/FreeSerif.ttf usr/share/widelands/fonts/FreeSerif.ttf
+ln -s /usr/share/fonts/drehatlas-widelands/Widelands.otf usr/share/widelands/fonts/Widelands/Widelands.ttf
 find usr/share/widelands/locale/ -maxdepth 1 -type d -name \*_\* | sed -n 's#\(usr/share/widelands/locale/\(.*\)_.*\)#%lang(\2) /\1#p' > %{_builddir}/widelands-%{build_id}-src/%{name}.files
 find usr/share/widelands/locale/ -maxdepth 1 -type d ! -name "*_*" | sed -n -e 's#\(usr/share/widelands/locale/\(.\+\)\)#%lang(\2) /\1#p' >> %{_builddir}/widelands-%{build_id}-src/%{name}.files
 find usr/share/widelands/ -mindepth 1 -maxdepth 1 -not -name locale | sed -n 's#\(usr/share/widelands/*\)#/\1#p' >> %{_builddir}/widelands-%{build_id}-src/%{name}.files
@@ -117,6 +122,12 @@ fi
 
 
 %changelog
+* Sat Jul 16 2011 Hans de Goede <hdegoede at redhat.com> - 0-0.26.build16
+- Rebuild for new SDL_gfx
+- Require and link to drehatlas-widelands-fonts instead of shipping
+  a private copy (#477483)
+- Fix a patch on toplevel messageboxes (#718130)
+
 * Mon Jun 20 2011 ajax at redhat.com - 0-0.25.build16
 - Rebuild for new glew soname
 


More information about the scm-commits mailing list