Accepting request 307346 from home:scarabeus_iv:branches:games

Won't build on openSUSE 13.1 unless new glew is linked to the games prj.

- Require qlew >= 1.10 as per upstream readme

- Unbundle wiiuse too:
  * supertuxkart-no-undefined.patch
  * supertuxkart-unbundle-wiiuse.patch

- Update to use %cmake macro and obey no-undefined/etc rules we have
  in SUSE
- Apply patches to unbundle various broken things:
  * supertuxkart-irrlicht.patch
  * supertuxkart-no-undefined.patch
  * supertuxkart-system-enet-glew.patch

OBS-URL: https://build.opensuse.org/request/show/307346
OBS-URL: https://build.opensuse.org/package/show/games/supertuxkart?expand=0&rev=62
This commit is contained in:
Matthias Mailänder
2015-05-15 20:51:08 +00:00
committed by Git OBS Bridge
parent a1103fe4bd
commit 256e096683
6 changed files with 370 additions and 10 deletions

View File

@@ -26,25 +26,34 @@ Url: http://supertuxkart.sourceforge.net/
Source: http://sourceforge.net/projects/supertuxkart/files/SuperTuxKart/%{version}/%{name}-%{version}-src.tar.xz
# Geeko kart add-on (CC-BY 3.0)
Source1: http://stkaddons.net/dl/14e6ba25b17f0d.zip
# PATCH-FIX-UPSTREAM: irrlicht use system libs and do not build local stuff
Patch0: supertuxkart-irrlicht.patch
# PATCH-FIX-UPSTREAM: do not die out on undefined symbols during build
Patch1: supertuxkart-no-undefined.patch
# PATCH-FIX-UPSTREAM: do not bundle enet and glew - from Debian
Patch2: supertuxkart-system-enet-glew.patch
# PATCH-FIX-UPSTREAM: do not bundle wiiuse - from Fedora
Patch3: supertuxkart-unbundle-wiiuse.patch
BuildRequires: bluez-devel
BuildRequires: cmake
BuildRequires: curl-devel
BuildRequires: fdupes
BuildRequires: fribidi-devel
BuildRequires: gcc-c++
BuildRequires: glew-devel >= 1.10
BuildRequires: glu-devel
BuildRequires: hicolor-icon-theme
BuildRequires: libXrandr-devel
BuildRequires: libbz2-devel
BuildRequires: libenet-devel
BuildRequires: libjpeg-devel
BuildRequires: libogg-devel
BuildRequires: libpng-devel
%if 0%{?suse_version} <= 1220
BuildRequires: libopenal1
%endif
BuildRequires: libvorbis-devel
BuildRequires: openal-soft-devel
BuildRequires: unzip
BuildRequires: update-desktop-files
BuildRequires: wiiuse-devel
BuildRequires: pkgconfig(gl)
Requires: %{name}-data = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -75,17 +84,25 @@ Data files for SuperTuxKart a Free 3d kart racing game.
%setup -q
find -name '*~' -delete -print
# remove bundled stuff:
rm -rf lib/jpeglib/
rm -rf lib/zlib/
rm -rf lib/libpng/
rm -rf lib/enet/
rm -rf lib/glew/
rm -rf lib/wiiuse/
%patch0
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
export CXXFLAGS="$CFLAGS"
mkdir cmake_build
cd cmake_build
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} ..
%cmake
make %{?_smp_mflags}
%install
cd cmake_build
make DESTDIR=%{buildroot} install
%cmake_install
mkdir -p %{buildroot}%{_datadir}/supertuxkart/data/karts/geeko/
cd %{buildroot}%{_datadir}/supertuxkart/data/karts/geeko/
unzip %{SOURCE1}