[widelands] Rebase to new upstream release build17
Nils Philippsen
nphilipp at fedoraproject.org
Mon Jun 25 13:36:59 UTC 2012
commit f70d11b10d6c4ba86a0d8d26bb835245316df377
Author: Nils Philippsen <nils at redhat.com>
Date: Mon Jun 25 15:35:21 2012 +0200
Rebase to new upstream release build17
Unclutter, versionize requirements.
.gitignore | 1 +
sources | 2 +-
widelands-build16-src-crash-on-messagebox.patch | 22 -------
widelands-build16-src-libpng15.patch | 68 -----------------------
widelands-build17-src-crash-on-messagebox.patch | 22 +++++++
widelands-build17-src-includes.patch | 13 ++++
widelands.spec | 65 +++++++++++++++------
7 files changed, 83 insertions(+), 110 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 4247aed..43d8c77 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
Widelands-Build14-src.7z
/widelands-build15-src.tar.bz2
/widelands-build16-src.tar.bz2
+/widelands-build17-src.tar.bz2
diff --git a/sources b/sources
index 966201e..2c8c03c 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-3d8c28e145b73c64d8ed1625319d25a2 widelands-build16-src.tar.bz2
+bdc9bc0aa631af1aa7fb450507611a58 widelands-build17-src.tar.bz2
diff --git a/widelands-build17-src-crash-on-messagebox.patch b/widelands-build17-src-crash-on-messagebox.patch
new file mode 100644
index 0000000..45dea29
--- /dev/null
+++ b/widelands-build17-src-crash-on-messagebox.patch
@@ -0,0 +1,22 @@
+diff -up widelands-build17-src/src/ui_basic/window.cc.crash-on-messagebox widelands-build17-src/src/ui_basic/window.cc
+--- widelands-build17-src/src/ui_basic/window.cc.crash-on-messagebox 2012-04-23 11:46:49.000000000 +0200
++++ widelands-build17-src/src/ui_basic/window.cc 2012-06-25 14:00:05.677491646 +0200
+@@ -252,12 +252,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
+- ((static_cast<int32_t>(parent.get_inner_w()) - get_w()) / 2,
+- (static_cast<int32_t>(parent.get_inner_h()) - get_h()) / 2));
++ ((static_cast<int32_t>(parent->get_inner_w()) - get_w()) / 2,
++ (static_cast<int32_t>(parent->get_inner_h()) - get_h()) / 2));
+ }
+
+
diff --git a/widelands-build17-src-includes.patch b/widelands-build17-src-includes.patch
new file mode 100644
index 0000000..620612f
--- /dev/null
+++ b/widelands-build17-src-includes.patch
@@ -0,0 +1,13 @@
+diff -up widelands-build17-src/src/main.cc.includes widelands-build17-src/src/main.cc
+--- widelands-build17-src/src/main.cc.includes 2012-04-23 11:46:49.000000000 +0200
++++ widelands-build17-src/src/main.cc 2012-06-25 14:10:48.344023268 +0200
+@@ -29,6 +29,9 @@
+ #include <stdexcept>
+ #include <typeinfo>
+
++// fork, setsid, close, dup
++#include <unistd.h>
++
+ #include <SDL_main.h>
+
+ #ifndef WIN32
diff --git a/widelands.spec b/widelands.spec
index 8e477a7..20d477a 100644
--- a/widelands.spec
+++ b/widelands.spec
@@ -1,35 +1,58 @@
-%define build_id build16
+%global buildno 17
+%global buildid build%{buildno}
+%global build_id build-%{buildno}
+
Name: widelands
Version: 0
-Release: 0.30.%{build_id}%{?dist}
+Release: 0.31.%{buildid}%{?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
-# Reported upstream: https://bugs.launchpad.net/widelands/+bug/900767
-Patch1: widelands-build16-src-libpng15.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
+Source0: http://launchpad.net/widelands/%{buildid}/%{build_id}/+download/widelands-%{buildid}-src.tar.bz2
+# Reported upstream: https://bugs.launchpad.net/widelands/+bug/1017497
+# https://bugzilla.redhat.com/show_bug.cgi?id=718130
+Patch0: widelands-build17-src-crash-on-messagebox.patch
+# Build issue with gcc 4.7, already fixed upstream
+Patch1: widelands-build17-src-includes.patch
+
+BuildRequires: SDL-devel >= 1.2.11
+BuildRequires: SDL_gfx-devel
+BuildRequires: SDL_image-devel
+BuildRequires: SDL_mixer-devel >= 1.2.6
+BuildRequires: SDL_net-devel
+BuildRequires: SDL_sound-devel
+BuildRequires: SDL_ttf-devel >= 2.0.0
+BuildRequires: boost-devel >= 1.47.0
+BuildRequires: boost-static >= 1.47.0
+BuildRequires: cmake
+BuildRequires: ctags
+BuildRequires: desktop-file-utils
+BuildRequires: gettext
+BuildRequires: ggz-base-libs-devel
+BuildRequires: glew-devel
+BuildRequires: libjpeg-devel
+BuildRequires: libpng-devel
+BuildRequires: libtiff-devel
+BuildRequires: lua-devel
+BuildRequires: optipng
Requires: drehatlas-widelands-fonts
+Requires: gnu-free-serif-fonts
+Requires: gnu-free-sans-fonts
+Requires: hicolor-icon-theme
%description
Widelands is an open source (GPLed), realtime-strategy game, using SDL and
other free libraries, which is still under development. Widelands is inspired
by Settlers II (Bluebyte) and is partly similar to it, so if you know it, you
-perhaps will have a thought, what Widelands is all about.
+perhaps will have a thought, what Widelands is all about.
%prep
-%setup -q -n widelands-%{build_id}-src
-%patch0 -p1
-%patch1 -p1
+%setup -q -n widelands-%{buildid}-src
+%patch0 -p1 -b .crash-on-messagebox
+%patch1 -p1 -b .includes
%build
@@ -73,9 +96,9 @@ 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
+find usr/share/widelands/locale/ -maxdepth 1 -type d -name \*_\* | sed -n 's#\(usr/share/widelands/locale/\(.*\)_.*\)#%lang(\2) /\1#p' > %{_builddir}/widelands-%{buildid}-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-%{buildid}-src/%{name}.files
+find usr/share/widelands/ -mindepth 1 -maxdepth 1 -not -name locale | sed -n 's#\(usr/share/widelands/*\)#/\1#p' >> %{_builddir}/widelands-%{buildid}-src/%{name}.files
popd
@@ -126,6 +149,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%changelog
+* Mon Jun 25 2012 Nils Philippsen <nils at redhat.com> - 0-0.31.build17
+- Rebase to new upstream release build17
+- Unclutter, versionize requirements
+
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0-0.30.build16
- Rebuilt for c++ ABI breakage
More information about the scm-commits
mailing list