[boswars] Build with compat-lua-devel on f20+

Hans de Goede jwrdegoede at fedoraproject.org
Sun Aug 4 10:26:06 UTC 2013


commit c8d8b5e8b2f9990938d91e3300c2555774dccb1f
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Sat Aug 3 13:58:25 2013 +0200

    Build with compat-lua-devel on f20+
    
    On <= f19 we need lua-devel and on >= f20 we need compat-lua-devel,
    tolua++-devel will automatically drag in the right one for us, so we
    can simply drop the lua-devel BuildRequires.
    
    Signed-off-by: Hans de Goede <hdegoede at redhat.com>

 boswars-2.7-compat-lua-5.1.patch |   17 +++++++++++++++++
 boswars.spec                     |   17 ++++++++++++++---
 2 files changed, 31 insertions(+), 3 deletions(-)
---
diff --git a/boswars-2.7-compat-lua-5.1.patch b/boswars-2.7-compat-lua-5.1.patch
new file mode 100644
index 0000000..7328870
--- /dev/null
+++ b/boswars-2.7-compat-lua-5.1.patch
@@ -0,0 +1,17 @@
+diff -up boswars-2.7-src/SConstruct~ boswars-2.7-src/SConstruct
+--- boswars-2.7-src/SConstruct~	2013-08-03 13:56:39.000000000 +0200
++++ boswars-2.7-src/SConstruct	2013-08-03 14:10:15.589042624 +0200
+@@ -170,11 +170,11 @@ def CheckOpenGL(env, conf):
+ def CheckLuaLib(env, conf):
+   if not 'USE_WIN32' in env['CPPDEFINES']:
+      if env.WhereIs('pkg-config'):
+-        for packagename in ['lua5.1', 'lua51', 'lua']:
++        for packagename in ['lua-5.1', 'lua51', 'lua']:
+            exitcode,_ = ParseConfig(env, 'pkg-config --cflags --libs ' + packagename)
+            if exitcode == 0:
+               break
+-  if conf.CheckLibWithHeader('lua51', 'lua.h', 'c'):
++  if conf.CheckLibWithHeader('lua-5.1', 'lua.h', 'c'):
+     return 1
+   if conf.CheckLibWithHeader('lua5.1', 'lua.h', 'c'):
+     return 1
diff --git a/boswars.spec b/boswars.spec
index 27a932d..d17fad0 100644
--- a/boswars.spec
+++ b/boswars.spec
@@ -1,6 +1,6 @@
 Name:           boswars
 Version:        2.7
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Bos Wars is a futuristic real-time strategy game
 Group:          Amusements/Games
 License:        GPLv2
@@ -12,9 +12,11 @@ Patch0:         boswars-2.4.1-SConstruct.patch
 # using the included guichan-0.4. Incomplete, NOT finished and NOT working!
 #Patch1:         boswars-2.4.1-guichan26.patch
 # Lua 5.2 patch needs to be ported to boswars-2.7, more importantly we first
-# need a tolua++ which works with 5.2, we should use compat-lua51 for now
+# need a tolua++ which works with 5.2
 #Patch2:         boswars-2.6.1-lua-5.2.patch
-BuildRequires:  libtheora-devel libvorbis-devel lua-devel SDL-devel libGL-devel
+# Use compat-lua51 for now
+Patch3:         boswars-2.7-compat-lua-5.1.patch
+BuildRequires:  libtheora-devel libvorbis-devel SDL-devel libGL-devel
 BuildRequires:  tolua++-devel libpng-devel scons desktop-file-utils
 Requires:       hicolor-icon-theme xorg-x11-utils
 
@@ -27,14 +29,17 @@ Bos Wars aims to create a completly original and fun open source RTS game.
 %prep
 %setup -q -n %{name}-%{version}-src
 %patch0 -p1
+%patch3 -p1
 chmod -x engine/guichan/include/guichan/sdl/sdlgraphics.h \
   engine/include/animation.h engine/guichan/sdl/gsdl.cpp
 # we want to use the system version of these
 rm engine/tolua/*.h engine/tolua/tolua_*.cpp
 
+
 %build
 scons %{?_smp_mflags} opengl=1 CC="gcc $RPM_OPT_FLAGS" CXX="g++ $RPM_OPT_FLAGS"
 
+
 %install
 mkdir -p $RPM_BUILD_ROOT%{_bindir}
 mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/languages
@@ -55,6 +60,7 @@ mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
 install -p -m 644 graphics/ui/elites_claw.png \
   $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
 
+
 %post
 touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
 
@@ -67,6 +73,7 @@ fi
 %posttrans
 gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
+
 %files
 %doc *.txt CHANGELOG doc/*.html doc/guichan-copyright.txt
 %{_bindir}/%{name}
@@ -74,7 +81,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 %{_datadir}/applications/*%{name}.desktop
 %{_datadir}/icons/hicolor/32x32/apps/%{name}.png
 
+
 %changelog
+* Sat Aug  3 2013 Hans de Goede <hdegoede at redhat.com> - 2.7-2
+- Build with compat-lua-devel on f20+
+
 * Fri Aug  2 2013 Hans de Goede <hdegoede at redhat.com> - 2.7-1
 - New upstream release 2.7 (rhbz#970057)
 


More information about the scm-commits mailing list