[openlierox] New upstream release 0.59-beta9 Fix building with gcc-4.7

Hans de Goede jwrdegoede at fedoraproject.org
Sun Jan 15 16:59:47 UTC 2012


commit 1bcbfd01844891321f4d44ed207569dc0d99c995
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Sun Jan 15 18:00:58 2012 +0100

    New upstream release 0.59-beta9
    Fix building with gcc-4.7

 .gitignore                  |    1 +
 OpenLieroX-0.59-gcc47.patch |   33 ++++++++++++++++++++++
 openlierox.spec             |   63 +++++++++++++++++++++++++-----------------
 sources                     |    2 +-
 4 files changed, 72 insertions(+), 27 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 4921e65..6d88852 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 OpenLieroX_0.57_beta8.src.tar.bz2
+/OpenLieroX_0.59_beta9.src.tar.bz2
diff --git a/OpenLieroX-0.59-gcc47.patch b/OpenLieroX-0.59-gcc47.patch
new file mode 100644
index 0000000..2f54306
--- /dev/null
+++ b/OpenLieroX-0.59-gcc47.patch
@@ -0,0 +1,33 @@
+diff -up OpenLieroX/include/HTTP.h~ OpenLieroX/include/HTTP.h
+--- OpenLieroX/include/HTTP.h~	2010-01-25 21:56:08.000000000 +0100
++++ OpenLieroX/include/HTTP.h	2012-01-15 15:59:08.168191530 +0100
+@@ -21,7 +21,6 @@
+ 
+ #include <string>
+ #include <curl/curl.h>
+-#include <curl/types.h>
+ #include <curl/easy.h>
+ 
+ #include "Networking.h"
+diff -up OpenLieroX/src/common/HTTP.cpp~ OpenLieroX/src/common/HTTP.cpp
+--- OpenLieroX/src/common/HTTP.cpp~	2010-03-10 22:16:15.000000000 +0100
++++ OpenLieroX/src/common/HTTP.cpp	2012-01-15 15:59:36.728192462 +0100
+@@ -25,7 +25,6 @@
+ 	#include <stdlib.h>
+ #endif
+ #include <curl/curl.h>
+-#include <curl/types.h>
+ #include <curl/easy.h>
+ 
+ #include "LieroX.h"
+diff -up OpenLieroX/src/gusanos/objects_list.h~ OpenLieroX/src/gusanos/objects_list.h
+--- OpenLieroX/src/gusanos/objects_list.h~	2010-02-17 17:59:27.000000000 +0100
++++ OpenLieroX/src/gusanos/objects_list.h	2012-01-15 16:14:29.394221010 +0100
+@@ -4,6 +4,7 @@
+ //#include "CGameObject.h"
+ #include <list>
+ #include <vector>
++#include <unistd.h>
+ 
+ static const int RENDER_LAYERS_AMMOUNT = 10;
+ static const int COLLISION_LAYERS_AMMOUNT = 10;
diff --git a/openlierox.spec b/openlierox.spec
index 5bf0aec..901c1b5 100644
--- a/openlierox.spec
+++ b/openlierox.spec
@@ -1,8 +1,8 @@
-%define prever beta8
+%define prever beta9
 
 Name:           openlierox
-Version:        0.57
-Release:        0.17.%{prever}%{?dist}
+Version:        0.59
+Release:        0.1.%{prever}%{?dist}
 Summary:        Addictive realtime multiplayer 2D shoot-em-up
 Group:          Amusements/Games
 License:        LGPLv2+
@@ -10,10 +10,11 @@ URL:            http://openlierox.sourceforge.net/
 Source0:        http://downloads.sourceforge.net/%{name}/OpenLieroX_%{version}_%{prever}.src.tar.bz2
 Source1:        %{name}.desktop
 Source2:        README.fedora
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch0:         OpenLieroX-0.59-gcc47.patch
 BuildRequires:  SDL_mixer-devel SDL_image-devel SDL_gfx-devel gd-devel
 BuildRequires:  libxml2-devel hawknl-devel zlib-devel desktop-file-utils
-BuildRequires:  libzip-devel
+BuildRequires:  libzip-devel curl-devel freealut-devel libvorbis-devel
+BuildRequires:  boost-devel cmake
 Requires:       hicolor-icon-theme
 # for people who try to install this using upstream capitalization
 Provides:       OpenLieroX = %{version}-%{release}
@@ -26,23 +27,33 @@ to provide endless gaming pleasure.
 
 %prep
 %setup -q -n OpenLieroX
-sed -i 's|test_include_file nl.h|test_include_file hawknl/nl.h|g' compile.sh
+%patch0 -p1
 sed -i 's/\r//g' doc/original_lx_docs/*.*
 cp -a %{SOURCE2} .
+# Remove bundled libs to ensure they are not used
+for i in libs/*; do
+    if [ "$i" = "libs/pstreams" ]; then
+        # Except for the pstreams copylib
+        continue
+    fi
+    rm -r "$i"
+done
+# Remove execute permissions from various data files
+find -type f -print0 | xargs -0 chmod -x
 
 
 %build
-export CXXFLAGS="$RPM_OPT_FLAGS -I%{_includedir}/hawknl"
-./compile.sh
+%cmake -DHAWKNL_BUILTIN=No -DLIBLUA_BUILTIN=No -DBREAKPAD=No -DSYSTEM_DATA_DIR=%{_datadir}
+make %{?_smp_mflags}
 
 
 %install
-rm -rf $RPM_BUILD_ROOT
-export SYSTEM_DATA_DIR=$RPM_BUILD_ROOT%{_datadir}
-export BIN_DIR=$RPM_BUILD_ROOT%{_bindir}
-export DOC_DIR=installed-docs
-mkdir -p $BIN_DIR
-./install.sh
+mkdir -p $RPM_BUILD_ROOT%{_bindir}
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/OpenLieroX
+mkdir -p $RPM_BUILD_ROOT%{_mandir}/man6
+install -m 755 bin/%{name} $RPM_BUILD_ROOT%{_bindir}
+cp -pr share/gamedir/* $RPM_BUILD_ROOT%{_datadir}/OpenLieroX
+install -p -m 644 doc/%{name}.6 $RPM_BUILD_ROOT%{_mandir}/man6
 
 # below is the desktop file and icon stuff.
 mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
@@ -54,33 +65,33 @@ install -p -m 644 share/OpenLieroX.svg \
   $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
 
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-
 %post
-touch --no-create %{_datadir}/icons/hicolor || :
-if [ -x %{_bindir}/gtk-update-icon-cache ]; then
-   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
-fi
+touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
 
 %postun
-touch --no-create %{_datadir}/icons/hicolor || :
-if [ -x %{_bindir}/gtk-update-icon-cache ]; then
-   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
+if [ $1 -eq 0 ] ; then
+    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 fi
 
+%posttrans
+gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+
 
 %files
-%defattr(-,root,root,-)
 %doc COPYING.LIB README.fedora doc/README doc/original_lx_docs/*
 %{_bindir}/%{name}
 %{_datadir}/OpenLieroX
 %{_datadir}/applications/fedora-%{name}.desktop
 %{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
+%{_mandir}/man6/%{name}.6*
 
 
 %changelog
+* Sun Jan 15 2012 Hans de Goede <hdegoede at redhat.com> - 0.59-0.1.beta9
+- New upstream release 0.59-beta9
+- Fix building with gcc-4.7
+
 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.57-0.17.beta8
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 
diff --git a/sources b/sources
index ac96b47..da2642e 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-f83b5e8eec8dae77f04280420c848807  OpenLieroX_0.57_beta8.src.tar.bz2
+2b6f9f15ec4f029dced99a404dff0ab9  OpenLieroX_0.59_beta9.src.tar.bz2


More information about the scm-commits mailing list