From 80bbb76ec7971f5b639e8c736206a6f2145486074bbbe4590851b8be2deb568b Mon Sep 17 00:00:00 2001 From: Claes Backstrom Date: Tue, 4 Jul 2017 19:56:32 +0000 Subject: [PATCH] Accepting request 507934 from home:okurz:branches:games Update to build 19; Use more macros; Use ninja for faster build OBS-URL: https://build.opensuse.org/request/show/507934 OBS-URL: https://build.opensuse.org/package/show/games/widelands?expand=0&rev=36 --- fix-return-values.diff | 20 --------- widelands-build18-src.tar.bz2 | 3 -- widelands-build19-src.tar.bz2 | 3 ++ widelands.changes | 13 ++++++ widelands.spec | 76 ++++++++++++++++++----------------- 5 files changed, 55 insertions(+), 60 deletions(-) delete mode 100644 fix-return-values.diff delete mode 100644 widelands-build18-src.tar.bz2 create mode 100644 widelands-build19-src.tar.bz2 diff --git a/fix-return-values.diff b/fix-return-values.diff deleted file mode 100644 index 544e9e8..0000000 --- a/fix-return-values.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- src/logic/expedition_bootstrap.cc.orig 2014-02-25 18:23:49.184906307 +0100 -+++ src/logic/expedition_bootstrap.cc 2014-02-25 18:24:11.959906892 +0100 -@@ -180,6 +180,7 @@ - } - } - assert(false); // Never here, otherwise we do not have a queue for this ware. -+ return *(wares_[0]).get(); // just something to avoid compiler warning - } - - std::vector ExpeditionBootstrap::wares() const { ---- src/scripting/lua_map.cc.orig 2014-02-25 18:24:39.048907588 +0100 -+++ src/scripting/lua_map.cc 2014-02-25 18:24:51.019907895 +0100 -@@ -82,6 +82,7 @@ - return CAST_TO_LUA(Ship); - } - assert(false); // Never here, hopefully. -+ return 0; - } - int upcasted_immovable_to_lua(lua_State * L, BaseImmovable * mo) { - if (!mo) diff --git a/widelands-build18-src.tar.bz2 b/widelands-build18-src.tar.bz2 deleted file mode 100644 index 5db9e9f..0000000 --- a/widelands-build18-src.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6dffd9178f93ff7a9c3c0c9b31b7d3b8eb060c79fbd98901e6311837390b7de3 -size 183443325 diff --git a/widelands-build19-src.tar.bz2 b/widelands-build19-src.tar.bz2 new file mode 100644 index 0000000..d2a20d6 --- /dev/null +++ b/widelands-build19-src.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e511f9d26828a2b71b64cdfc6674e6e847543b2da73961ab882acca36c7c01a6 +size 181609391 diff --git a/widelands.changes b/widelands.changes index 3a9556b..4c65e05 100644 --- a/widelands.changes +++ b/widelands.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Thu Jun 22 07:43:39 UTC 2017 - okurz@suse.com + +- Update to build 19 + See https://wl.widelands.org/changelog/ for details +- Use ninja for faster build +- Split out debug package + +------------------------------------------------------------------- +Thu Jun 22 07:06:49 UTC 2017 - okurz@suse.com + +- Update package description with current description on webpage, more user centric + ------------------------------------------------------------------- Tue Feb 25 17:02:06 UTC 2014 - adrian@suse.de diff --git a/widelands.spec b/widelands.spec index 5b924ae..016a3f8 100644 --- a/widelands.spec +++ b/widelands.spec @@ -1,7 +1,7 @@ # # spec file for package widelands # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,23 +16,20 @@ # -%define build_launchpad 0 - Name: widelands -Version: build18 +Version: build19 Release: 0 Summary: Open source realtime-strategy game License: GPL-2.0+ Group: Amusements/Games/Strategy/Other Url: http://www.widelands.org -Source0: %{name}-%{version}-src.tar.bz2 +Source: https://launchpad.net/%{name}/%{version}/%{version}/+download/%{name}-%{version}-src.tar.bz2 Source1: %{name}.desktop -Patch1: fix-return-values.diff -BuildRequires: SDL_gfx-devel -BuildRequires: SDL_image-devel -BuildRequires: SDL_mixer-devel -BuildRequires: SDL_net-devel -BuildRequires: SDL_ttf-devel +BuildRequires: SDL2_gfx-devel +BuildRequires: SDL2_image-devel +BuildRequires: SDL2_mixer-devel +BuildRequires: SDL2_net-devel +BuildRequires: SDL2_ttf-devel BuildRequires: boost-devel BuildRequires: cmake BuildRequires: doxygen @@ -40,9 +37,11 @@ BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: gettext BuildRequires: glew-devel +BuildRequires: libicu-devel BuildRequires: libjpeg-devel BuildRequires: libpng-devel BuildRequires: libtiff-devel +BuildRequires: ninja BuildRequires: optipng BuildRequires: python-devel BuildRequires: update-desktop-files @@ -54,17 +53,12 @@ BuildRequires: lua51-devel BuildRequires: lua-devel %endif Requires: %{name}-data = %{version} -%if %build_launchpad -Source2: launchpad-export.tar.gz -# for launchpad translation update -Requires: perl -%endif %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. +Widelands is a free, open source real-time strategy game with singleplayer +campaigns and a multiplayer mode. The game was inspired by Settlers II +(Bluebyte) but has significantly more variety and depth to it. Still, it is +easy to get started through playable tutorials. %package data Summary: Data files for Widelands @@ -77,22 +71,24 @@ BuildArch: noarch %description data Data files for Widelands. Including localization, maps graphics and music. +%package debug +Summary: Debugging tools for Widelands +Group: Amusements/Games/Strategy/Other + +%description debug +Additional debugging data for Widelands. This package is not needed for normal +operation. + %prep %setup -q -n %{name}-%{version}-src -%patch1 -%if %build_launchpad -# for launchpad translation update -cd .. -tar -xzf %{SOURCE2} -find po -name "*.po" |perl -ne 'chomp;$a=$_;$a=~s{/[^/]*-}{/}; rename $_,"widelands/$a";' -%endif +# +sed -i '/wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Werror=uninitialized")/d' CMakeLists.txt +sed -i 's/\(install(TARGETS ${NAME} DESTINATION \)"."\( COMPONENT ExecutableFiles)\)/\1bin\2/' cmake/WlFunctions.cmake %build -# recreate compile.sh contents here -mkdir -p build/locale -cd build - -cmake \ +%{__mkdir_p} build/locale +%define __builder ninja +%cmake \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DWL_INSTALL_PREFIX=%{_prefix} \ -DWL_INSTALL_BINDIR=bin \ @@ -101,19 +97,21 @@ cmake \ -DCMAKE_BUILD_TYPE="Release" \ -DBoost_USE_STATIC_LIBS=OFF \ .. -make %{?_smp_mflags} + +%make_jobs %install -cd build -make DESTDIR=%{buildroot} install -cd .. +%cmake_install for i in 16 32 48 64 128; do - install -D -m 0644 pics/wl-ico-${i}.png %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/%{name}.png + install -D -m 0644 data/images/logos/wl-ico-${i}.png %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/%{name}.png done install -D -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/applications/%{name}.desktop %suse_update_desktop_file %{name} %fdupes %{buildroot}%{_datadir} %find_lang %{name} --all-name +rm -f %{buildroot}%{_prefix}/{COPYING,CREDITS,ChangeLog,VERSION} + +# No need to execute tests as they are already executed implicitly on install %files %defattr(-,root,root,-) @@ -141,4 +139,8 @@ install -D -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/applications/%{name}.deskt %dir %{_datadir}/%{name}/locale/*/LC_MESSAGES %{_datadir}/%{name}/[^l]* +%files debug +%defattr(-,root,root,-) +%{_bindir}/wl_* + %changelog