[scorched3d] Fix building with gcc-4.7
Hans de Goede
jwrdegoede at fedoraproject.org
Tue Jan 17 21:18:48 UTC 2012
commit e8b21adb5e92804dd5a8e79a74863a3bc2a01bce
Author: Hans de Goede <hdegoede at redhat.com>
Date: Tue Jan 17 22:20:41 2012 +0100
Fix building with gcc-4.7
scorched3d-gcc47.patch | 11 +++++++++++
scorched3d.spec | 28 +++++++++++++---------------
2 files changed, 24 insertions(+), 15 deletions(-)
---
diff --git a/scorched3d-gcc47.patch b/scorched3d-gcc47.patch
new file mode 100644
index 0000000..4115e70
--- /dev/null
+++ b/scorched3d-gcc47.patch
@@ -0,0 +1,11 @@
+diff -up scorched/src/client/client/SecureID.cpp~ scorched/src/client/client/SecureID.cpp
+--- scorched/src/client/client/SecureID.cpp~ 2010-07-20 02:28:59.000000000 +0200
++++ scorched/src/client/client/SecureID.cpp 2012-01-17 20:26:20.632511395 +0100
+@@ -75,6 +75,7 @@ std::string SecureID::GetPrivateKey(void
+
+ #include <sys/ioctl.h>
+ #include <net/if.h>
++#include <unistd.h>
+
+ std::string SecureID::GetPrivateKey(void)
+ {
diff --git a/scorched3d.spec b/scorched3d.spec
index 139ebaf..2964ca3 100644
--- a/scorched3d.spec
+++ b/scorched3d.spec
@@ -1,6 +1,6 @@
Name: scorched3d
Version: 43.2a
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: Game based loosely on the classic DOS game Scorched Earth
Group: Amusements/Games
License: GPLv2+
@@ -23,7 +23,7 @@ Source2: openal-config
Patch1: %{name}-syslibs.patch
Patch2: %{name}-help.patch
Patch3: %{name}-libpng15.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch4: %{name}-gcc47.patch
BuildRequires: wxGTK-devel SDL_net-devel libGLU-devel
BuildRequires: expat-devel libvorbis-devel glew-devel fftw-devel libjpeg-devel
BuildRequires: openal-soft-devel freealut-devel >= 1.1.0-10
@@ -54,6 +54,7 @@ rm `find . -name Makefile`
%patch1 -p0 -z .syslibs
%patch2 -p1 -z .help
%patch3 -z .libpng
+%patch4 -p1
install -m 755 %{SOURCE2} .
# stop autoxxx from running
touch aclocal.m4
@@ -72,7 +73,6 @@ make %{?_smp_mflags}
convert data/images/tank2.ico tank2.png
%install
-rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
ln -s opengl-game-wrapper.sh $RPM_BUILD_ROOT%{_bindir}/%{name}-wrapper
rm -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
@@ -94,25 +94,20 @@ install -p -m 644 tank2-0.png \
$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
-%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 CHANGELOG
%{_bindir}/%{name}*
%{_datadir}/%{name}
@@ -121,6 +116,9 @@ fi
%changelog
+* Mon Jan 17 2012 Hans de Goede <hdegoede at redhat.com> - 43.2a-7
+- Fix building with gcc-4.7
+
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 43.2a-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
More information about the scm-commits
mailing list