[widelands] - Rebase to new upstream release build15 - Fix compilation with gcc-4.6
Hans de Goede
jwrdegoede at fedoraproject.org
Tue Feb 15 22:37:12 UTC 2011
commit a8b4d2826c16e23f78cabb7e7041e88820d45cee
Author: Hans de Goede <hdegoede at redhat.com>
Date: Tue Feb 15 23:40:27 2011 +0100
- Rebase to new upstream release build15
- Fix compilation with gcc-4.6
.gitignore | 1 +
sources | 2 +-
widelands-boost.patch | 19 --------------
widelands-gcc45.patch | 19 ++++++++++----
widelands-gcc46.patch | 19 ++++++++++++++
widelands.flagfix.patch | 47 ------------------------------------
widelands.spec | 61 ++++++++++++++++++++++++++--------------------
7 files changed, 68 insertions(+), 100 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 197dac3..4d3e2ad 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
Widelands-Build14-src.7z
+/widelands-build15-src.tar.bz2
diff --git a/sources b/sources
index 7de6ed5..ee96a32 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-06d63783b82b68af7af26198bc0a5afa Widelands-Build14-src.7z
+5b2e2d0913272f66055e424f91360b1d widelands-build15-src.tar.bz2
diff --git a/widelands-gcc45.patch b/widelands-gcc45.patch
index 1542f61..4cbec9e 100644
--- a/widelands-gcc45.patch
+++ b/widelands-gcc45.patch
@@ -1,6 +1,5 @@
-diff -up widelands-0/widelands/src/editor/ui_menus/editor_main_menu_new_map.cc~ widelands-0/widelands/src/editor/ui_menus/editor_main_menu_new_map.cc
---- widelands-0/widelands/src/editor/ui_menus/editor_main_menu_new_map.cc~ 2009-07-11 23:34:13.000000000 +0200
-+++ widelands-0/widelands/src/editor/ui_menus/editor_main_menu_new_map.cc 2010-08-02 12:45:49.886789507 +0200
+--- widelands/src/editor/ui_menus/editor_main_menu_new_map.cc~ 2009-07-11 23:34:13.000000000 +0200
++++ widelands/src/editor/ui_menus/editor_main_menu_new_map.cc 2010-08-02 12:45:49.886789507 +0200
@@ -113,7 +113,7 @@ Main_Menu_New_Map::Main_Menu_New_Map(Edi
posx, posy, width, height,
g_gr->get_picture(PicMod_UI, "pics/but1.png"),
@@ -19,9 +18,8 @@ diff -up widelands-0/widelands/src/editor/ui_menus/editor_main_menu_new_map.cc~
());
break;
}
-diff -up widelands-0/widelands/src/editor/ui_menus/editor_main_menu_random_map.cc~ widelands-0/widelands/src/editor/ui_menus/editor_main_menu_random_map.cc
---- widelands-0/widelands/src/editor/ui_menus/editor_main_menu_random_map.cc~ 2009-07-11 23:34:13.000000000 +0200
-+++ widelands-0/widelands/src/editor/ui_menus/editor_main_menu_random_map.cc 2010-08-02 13:54:18.154997895 +0200
+--- widelands/src/editor/ui_menus/editor_main_menu_random_map.cc~ 2009-07-11 23:34:13.000000000 +0200
++++ widelands/src/editor/ui_menus/editor_main_menu_random_map.cc 2010-08-02 13:54:18.154997895 +0200
@@ -251,7 +251,7 @@ Main_Menu_New_Random_Map::Main_Menu_New_
posx, posy, width, height,
g_gr->get_picture(PicMod_UI, "pics/but1.png"),
@@ -40,3 +38,12 @@ diff -up widelands-0/widelands/src/editor/ui_menus/editor_main_menu_random_map.c
break;
case 9:
break;
+@@ -476,7 +476,7 @@ void Main_Menu_New_Random_Map::id_edit_b
+ (strcmp(mapInfo.worldName.c_str(), m_worlds[m_currentworld].c_str()))
+ ++m_currentworld;
+ m_world->set_title
+- (Widelands::World::World(m_worlds[m_currentworld].c_str()).get_name());
++ (Widelands::World(m_worlds[m_currentworld].c_str()).get_name());
+
+ button_clicked(-1); // Update other values in UI as well
+
diff --git a/widelands-gcc46.patch b/widelands-gcc46.patch
new file mode 100644
index 0000000..4245f23
--- /dev/null
+++ b/widelands-gcc46.patch
@@ -0,0 +1,19 @@
+--- widelands/src/compile_assert.h~ 2006-09-21 20:20:53.000000000 +0200
++++ widelands/src/compile_assert.h 2011-02-14 20:45:42.134710981 +0100
+@@ -18,5 +18,5 @@
+ */
+
+ #ifndef compile_assert
+-#define compile_assert(x) typedef bool COMPILE_ASSERT[(x) ? 1 : -1]
++#define compile_assert(x)
+ #endif
+--- widelands/src/economy/supply_list.h~ 2009-04-29 23:13:53.000000000 +0200
++++ widelands/src/economy/supply_list.h 2011-02-14 20:46:38.181711075 +0100
+@@ -20,6 +20,7 @@
+ #ifndef SUPPLY_LIST_H
+ #define SUPPLY_LIST_H
+
++#include <cstddef>
+ #include <vector>
+
+ namespace Widelands {
diff --git a/widelands.spec b/widelands.spec
index ff93eb8..0365d57 100644
--- a/widelands.spec
+++ b/widelands.spec
@@ -1,23 +1,21 @@
-%define build_id Build14
+%define build_id build15
Name: widelands
Version: 0
-Release: 0.22.%{build_id}%{?dist}
+Release: 0.23.%{build_id}%{?dist}
Summary: Open source realtime-strategy game
Group: Amusements/Games
License: GPLv2+
URL: http://www.widelands.org
-Source0: http://downloads.sourceforge.net/%{name}/Widelands-%{build_id}-src.7z
-Patch0: widelands.flagfix.patch
-Patch1: widelands-boost.patch
-Patch2: widelands-gcc45.patch
+Source0: http://launchpad.net/widelands/build15/build15/+download/widelands-%{build_id}-src.tar.bz2
+Patch0: widelands-gcc45.patch
+Patch1: widelands-gcc46.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
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: desktop-file-utils scons gettext ctags optipng p7zip
-
-Requires: hicolor-icon-theme
+BuildRequires: desktop-file-utils cmake gettext ctags optipng
+Requires: hicolor-icon-theme gnu-free-serif-fonts gnu-free-sans-fonts
%description
Widelands is an open source (GPLed), realtime-strategy game, using SDL and
@@ -27,27 +25,29 @@ perhaps will have a thought, what Widelands is all about.
%prep
-%setup -q -c -T
-7za x %{SOURCE0}
-pushd %{name}
+%setup -q -n widelands-%{build_id}-src
%patch0 -p1
%patch1 -p1
-%patch2 -p2
-sed -i 's#flagi#%{optflags}##' build/scons-tools/scons_configure.py
-popd
+chmod -x src/scripting/luna.h
%build
-pushd %{name}
-scons build=release datadir=%{_datadir}/%{name} bindir=%{_bindir} localedir=%{_datadir}/%{name}/locale install_prefix= prefer_localdata=0 build_id=%{build_id} %{?_smp_mflags}
+mkdir -p build/compile
+pushd build/compile
+%cmake \
+ -DWL_INSTALL_PREFIX=%{_prefix} \
+ -DWL_INSTALL_BINDIR=%{_bindir} \
+ -DWL_INSTALL_DATADIR=share/%{name} \
+ ../..
+make %{?_smp_mflags}
popd
%install
-pushd %{name}
rm -rf $RPM_BUILD_ROOT
-scons datadir=$RPM_BUILD_ROOT%{_datadir}/%{name} bindir=$RPM_BUILD_ROOT%{_bindir} localedir=$RPM_BUILD_ROOT%{_datadir}/%{name}/locale build_id=%{build_id} install
-rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/doc
+pushd build/compile
+make install DESTDIR=$RPM_BUILD_ROOT
+popd
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps
cp -a pics/wl-logo-64.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps/%{name}.png
@@ -63,14 +63,17 @@ Exec=widelands
Categories=Game;StrategyGame;
EOF
-desktop-file-install --vendor="fedora" \
- --dir=$RPM_BUILD_ROOT%{_datadir}/applications/ \
- %{name}.desktop
+desktop-file-install --vendor="fedora" \
+ --dir=$RPM_BUILD_ROOT%{_datadir}/applications/ %{name}.desktop
-popd
pushd $RPM_BUILD_ROOT
-find usr/share/widelands/locale/ -maxdepth 1 -type d -name \*_\* | sed -n 's#\(usr/share/widelands/\(.*\)_.*\)#%lang(\2) /\1#p' > %{_builddir}/%{name}-%{version}/%{name}.files
-find usr/share/widelands/ -mindepth 1 -maxdepth 1 -not -name locale | sed -n 's#\(usr/share/widelands/*\)#/\1#p' >> %{_builddir}/%{name}-%{version}/%{name}.files
+rm usr/share/widelands/fonts/FreeSans.ttf
+rm usr/share/widelands/fonts/FreeSerif.ttf
+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
+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
popd
@@ -115,7 +118,7 @@ fi
%files -f %{name}.files
%defattr(-,root,root,-)
-%doc %{name}/ChangeLog %{name}/COPYING %{name}/CREDITS
+%doc ChangeLog COPYING CREDITS
%{_bindir}/%{name}
%{_datadir}/icons/hicolor/64x64/apps/%{name}.png
%{_datadir}/applications/fedora-%{name}.desktop
@@ -124,6 +127,10 @@ fi
%changelog
+* Tue Feb 15 2011 Hans de Goede <hdegoede at redhat.com> - 0-0.23.build15
+- Rebase to new upstream release build15
+- Fix compilation with gcc-4.6
+
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0-0.22.Build14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
More information about the scm-commits
mailing list