Dominique Leuenberger 2009-05-01 22:55:10 +00:00 committed by Git OBS Bridge
parent 47461f245e
commit 30e8b38cca
2 changed files with 4 additions and 60 deletions

View File

@ -1,48 +0,0 @@
diff -up ./build/scons-tools/scons_configure.py.flagfix ./build/scons-tools/scons_configure.py
--- ./build/scons-tools/scons_configure.py.flagfix 2008-04-06 20:39:50.000000000 +0200
+++ ./build/scons-tools/scons_configure.py 2008-04-06 20:40:32.000000000 +0200
@@ -440,35 +440,7 @@ def do_configure_compiler_warnings(confi
#conf.CheckCompilerFlag('-Werror', env)
def do_configure_compiler_features(config_h_file, conf, env):
- conf.CheckCompilerFlag('-fstack-protector-all', env)
- conf.CheckCompilerFlag('-fbounds-check', env)
- conf.CheckCompilerFlag('-pipe', env)
-
- if env.optimize:
- # !!!! -fomit-frame-pointer breaks execeptions !!!!
- conf.CheckCompilerFlag('-fexpensive-optimizations', env)
- conf.CheckCompilerFlag('-finline-functions', env)
- conf.CheckCompilerFlag('-ffast-math', env)
- conf.CheckCompilerFlag('-funroll-loops', env)
- conf.CheckCompilerFlag('-O3', env)
- else:
- conf.CheckCompilerFlag('-O0', env)
-
- if env.profile:
- conf.CheckCompilerFlag('-pg', env)
- conf.CheckCompilerFlag('-fprofile-arcs', env)
-
- if env.debug:
- conf.CheckCompilerFlag('-g', env)
- conf.CheckCompilerFlag('-fmessage-length=0', env)
-
-def do_configure_linker_features(config_h_file, conf, env):
- if env.profile:
- conf.CheckLinkerFlag('-pg', env)
- conf.CheckLinkerFlag('-fprofile-arcs', env)
-
- if env.strip:
- conf.CheckLinkerFlag('-s', env)
+ conf.CheckCompilerFlag('flagi', env)
def do_configure(conf, env):
config_h_file=write_configh_header()
@@ -480,7 +452,6 @@ def do_configure(conf, env):
do_configure_compiler_warnings(config_h_file, conf, env)
do_configure_compiler_features(config_h_file, conf, env)
- do_configure_linker_features(config_h_file, conf, env)
write_configh(config_h_file, env)
write_configh_footer(config_h_file)

View File

@ -12,19 +12,12 @@ License: GPLv2+
URL: http://www.widelands.org
Source0: http://prdownloads.sourceforge.net/%{name}/%{name}-%{build_id}-source.tar.bz2
Source1: widelands.desktop
Patch0: widelands.flagfix.patch
Patch1: widelands-b13-return-non-void.diff
Patch0: widelands-b13-return-non-void.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-build
BuildRequires: SDL_mixer-devel SDL_image-devel SDL_net-devel SDL_ttf-devel SDL_gfx-devel
BuildRequires: update-desktop-files scons gettext libpng-devel zlib-devel ctags
BuildRequires: gcc-c++ boost-devel
#%ifnarch ppc64
#BuildRequires: optipng
#%endif
Requires: hicolor-icon-theme
AutoReqProv: On
BuildRequires: gcc-c++ boost-devel fdupes
%description
Widelands is an open source (GPLed), realtime-strategy game, using SDL and
@ -35,8 +28,7 @@ perhaps will have a thought, what Widelands is all about.
%prep
%setup -q -n %{name}-b13
# %patch0 -p0
%patch1 -p1
%patch0 -p1
sed -i 's#flagi#%{optflags}##' build/scons-tools/scons_configure.py
%build
@ -46,7 +38,6 @@ scons build=release datadir=%{_datadir}/%{name} bindir=%{_bindir} localedir=%{_d
# ./build-widelands.sh
%install
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
rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/game_server
@ -56,6 +47,7 @@ cp -a pics/wl-logo-64.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps/%{
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
%suse_update_desktop_file -i %{name} Game StrategyGame
%fdupes $RPM_BUILD_ROOT
cd $RPM_BUILD_ROOT
find usr/share/widelands/locale/ -maxdepth 1 -type d -name \*_\* | sed -n 's#\(usr/share/widelands/locale/\(.*\)_.*\)#%lang(\2) /\1#p' > %{_builddir}/%{name}-b13/%{name}.files