[spring] - Lua compile fix.

Gilboa Davara gilboa at fedoraproject.org
Wed Mar 16 10:57:05 UTC 2011


commit b728a2938913913257350d32e8ac7c5a53212e2d
Author: Gilboa Davara <gilboa at gilboa-home-dev.localdomain>
Date:   Wed Mar 16 12:56:53 2011 +0200

    - Lua compile fix.

 spring-lua-compile-fix.patch |   12 ++++
 spring.spec                  |  121 ++++++++++++++++++++++--------------------
 2 files changed, 75 insertions(+), 58 deletions(-)
---
diff --git a/spring-lua-compile-fix.patch b/spring-lua-compile-fix.patch
new file mode 100644
index 0000000..8b628b1
--- /dev/null
+++ b/spring-lua-compile-fix.patch
@@ -0,0 +1,12 @@
+--- rts/Lua/LuaMaterial.cpp.old	2011-03-16 11:34:10.123708670 +0200
++++ rts/Lua/LuaMaterial.cpp	2011-03-16 11:36:09.792570595 +0200
+@@ -379,7 +379,8 @@
+ 	}
+ 
+ 	if (shadowParamsLoc >= 0) {
+-		glUniform4fv(shadowParamsLoc, 1, const_cast<float*>(&(shadowHandler->GetShadowParams().x)));
++		const float *pfShadowParams = &shadowHandler->GetShadowParams().x;
++		glUniform4fv(shadowParamsLoc, 1, pfShadowParams);
+ 	}
+ 
+ 	const int maxTex = std::max(texCount, prev.texCount);
diff --git a/spring.spec b/spring.spec
index 262eac7..e12b51c 100644
--- a/spring.spec
+++ b/spring.spec
@@ -1,42 +1,43 @@
-Name:           spring
-Version:        0.82.7.1
-Release:        3%{?dist}
-Summary:        Multiplayer, 3D realtime strategy combat game
+Name:			spring
+Version:		0.82.7.1
+Release:		3%{?dist}
+Summary:		Multiplayer, 3D realtime strategy combat game
 
-Group:          Amusements/Games
+Group:			Amusements/Games
 # Few notes about licensing:
 # The main game is GPLv2+
 # - AI/Global/RAI/README says that AI is licensed under GPLv3+
 # - License for some sounds is LGPLv2 as taken from bzflag.
 # - License for some graphics is GFDL and (GFDL or CC-BY). See
-#   installer/builddata/bitmaps/README.txt.
-License:        GPLv2+ and GPLv3+ and LGPLv2 and GFDL and (GFDL or CC-BY)
+#	installer/builddata/bitmaps/README.txt.
+License:		GPLv2+ and GPLv3+ and LGPLv2 and GFDL and (GFDL or CC-BY)
 
-URL:            http://springrts.com
-Source0:        http://downloads.sourceforge.net/project/springrts/springrts/spring-%{version}/spring_%{version}_src.tar.lzma
-Source1:        spring-README.Fedora
+URL:			http://springrts.com
+Source0:		http://downloads.sourceforge.net/project/springrts/springrts/spring-%{version}/spring_%{version}_src.tar.lzma
+Source1:		spring-README.Fedora
 Patch0:			spring-AI-compile-fix.patch
+Patch1:			spring-lua-compile-fix.patch
 
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRoot:		%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
-BuildRequires:  cmake SDL-devel openal-soft-devel boost-devel DevIL-devel
-BuildRequires:  glew-devel libvorbis-devel DevIL-ILUT-devel
-BuildRequires:  freetype-devel python-devel allegro-devel zip
-BuildRequires:  java-devel-openjdk p7zip-plugins
-BuildRequires:  desktop-file-utils
+BuildRequires:	cmake SDL-devel openal-soft-devel boost-devel DevIL-devel
+BuildRequires:	glew-devel libvorbis-devel DevIL-ILUT-devel
+BuildRequires:	freetype-devel python-devel allegro-devel zip
+BuildRequires:	java-devel-openjdk p7zip-plugins
+BuildRequires:	desktop-file-utils
 # Man page generation
-BuildRequires:  libxslt asciidoc docbook-style-xsl
+BuildRequires:	libxslt asciidoc docbook-style-xsl
 
-Requires:       spring-lobby spring-installer spring-maps-default
+Requires:		spring-lobby spring-installer spring-maps-default
 
 # TODO: split the package
-Provides:       spring-dedicated = %{version}-%{release}
+Provides:		spring-dedicated = %{version}-%{release}
 
 # Spring is not supposed to run on Linux/PPC. Noone in the dev team has the
 # hardware to test it. Currently, it does not even build. Here's a thread in
 # the forums about this issue:
 # http://spring.clan-sy.com/phpbb/viewtopic.php?f=20&t=6234
-ExcludeArch:    ppc ppc64
+ExcludeArch:	ppc ppc64
 
 
 %description
@@ -52,8 +53,12 @@ great resource, read it here: http://spring.clan-sy.com/wiki/Main_Page
 
 %prep
 %setup -q -n %{name}_%{version}
-cp -p %{SOURCE1} README.Fedora
+
+# Compile patches.
 %patch0 -p0 -b .spring-AI-compile-fix
+%patch1 -p0 -b .spring-lua-compile-fix
+
+cp -p %{SOURCE1} README.Fedora
 touch ./rts/build/cmake/FindAllegro.cmake
 find rts/lib/7z -type f | xargs chmod -x 
 
@@ -64,10 +69,10 @@ export CFLAGS="$CFLAGS -DBOOST_FILESYSTEM_VERSION=2"
 export CXXFLAGS="$CXXFLAGS -DBOOST_FILESYSTEM_VERSION=2"
 # BUILD_SHARED_LIBS = ON causes a build failure:
 # http://springrts.com/phpbb/viewtopic.php?f=12&t=21120&p=399610
-#       -DBUILD_SHARED_LIBS:BOOL=OFF \
+#		-DBUILD_SHARED_LIBS:BOOL=OFF \
 %cmake -DDATADIR:PATH=share/%{name} \
-       -DLIBDIR:PATH=%{_lib} \
-       .
+		-DLIBDIR:PATH=%{_lib} \
+		.
 make %{?_smp_mflags}
 
 
@@ -85,26 +90,26 @@ mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/{maps,mods}
 # Move icons into proper Freedesktop hicolor theme
 mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
 mv $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}.png \
-   $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/
+	$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/
 mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/mimetypes/
 mv $RPM_BUILD_ROOT%{_datadir}/pixmaps/application-x-spring-demo.png \
-         $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/mimetypes/
+		 $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/mimetypes/
 
 # Fix Icon entry
 sed -i -e 's/^Icon=\(.*\).png/Icon=\1/g' \
-        $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
-desktop-file-install  \
-        --dir $RPM_BUILD_ROOT%{_datadir}/applications \
-        --remove-category Application \
-        --delete-original \
-        $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
+		$RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
+desktop-file-install	\
+		--dir $RPM_BUILD_ROOT%{_datadir}/applications \
+		--remove-category Application \
+		--delete-original \
+		$RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
 
 
 %post
 # Icons
 touch --no-create %{_datadir}/icons/hicolor
 if [ -x %{_bindir}/gtk-update-icon-cache ] ; then
-    %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
+	%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
 fi
 # MimeType entry in the desktop file
 update-desktop-database &> /dev/null || :
@@ -115,7 +120,7 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
 # Icons
 touch --no-create %{_datadir}/icons/hicolor
 if [ -x %{_bindir}/gtk-update-icon-cache ] ; then
-    %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
+	%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
 fi
 # MimeType entry in the desktop file
 update-desktop-database &> /dev/null || :
@@ -149,58 +154,58 @@ rm -rf $RPM_BUILD_ROOT
 * Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.82.7.1-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 
-* Sun Jan 9 2011 Gilboa Davara <gilboad [at] gmail [dot] com> -  0.82.7.1-1
+* Sun Jan 9 2011 Gilboa Davara <gilboad [at] gmail [dot] com> -	0.82.7.1-1
 - New upstream version: 0.82.7.1. (Bug fixes: http://springrts.com/phpbb/viewtopic.php?f=2&t=25038)
 
-* Tue Jan 4 2011 Gilboa Davara <gilboad [at] gmail [dot] com> -  0.82.7-1
+* Tue Jan 4 2011 Gilboa Davara <gilboad [at] gmail [dot] com> -	0.82.7-1
 - New upstream version: 0.82.7. (Bug fixes: http://springrts.com/phpbb/viewtopic.php?t=24970)
 - Include patch applied upstream.
 
-* Tue Nov 18 2010 Gilboa Davara <gilboad [at] gmail [dot] com> -  0.82.6.1-1
+* Tue Nov 18 2010 Gilboa Davara <gilboad [at] gmail [dot] com> -	0.82.6.1-1
 - version 0.82.6.1 (bugfixes, http://springrts.com/phpbb/viewtopic.php?t=24318)
 
-* Tue Sep 07 2010 Aurelien Bompard <abompard at fedoraproject.org> -  0.82.5.1-1
+* Tue Sep 07 2010 Aurelien Bompard <abompard at fedoraproject.org> -	0.82.5.1-1
 - version 0.82.5.1 (bugfixes, http://springrts.com/phpbb/viewtopic.php?t=23955)
 
-* Sun Sep 05 2010 Aurelien Bompard <abompard at fedoraproject.org> -  0.82.5-1
+* Sun Sep 05 2010 Aurelien Bompard <abompard at fedoraproject.org> -	0.82.5-1
 - version 0.82.5 (bugfixes: http://springrts.com/phpbb/viewtopic.php?t=23921)
 
-* Mon Aug 16 2010 Aurelien Bompard <abompard at fedoraproject.org> -  0.82.3-1
+* Mon Aug 16 2010 Aurelien Bompard <abompard at fedoraproject.org> -	0.82.3-1
 - version 0.82.3 (details here: http://springrts.com/phpbb/viewforum.php?f=2)
 
 * Sun May 02 2010 Bruno Wolff III <bruno at wolff.to> - 0.81.2.1-2
 - Fix DSO linking issue with dlopen - bz565103
 - Package man pages
 
-* Sun Mar 21 2010 Aurelien Bompard <abompard at fedoraproject.org> -  0.81.2.1-1
+* Sun Mar 21 2010 Aurelien Bompard <abompard at fedoraproject.org> -	0.81.2.1-1
 - New release: 0.81.2.1 (bugfix)
 
-* Tue Feb 23 2010 Aurelien Bompard <abompard at fedoraproject.org> -  0.81.2-1
+* Tue Feb 23 2010 Aurelien Bompard <abompard at fedoraproject.org> -	0.81.2-1
 - New release: 0.81.2
 
-* Sat Feb 06 2010 Aurelien Bompard <abompard at fedoraproject.org> -  0.81.1.3-1
+* Sat Feb 06 2010 Aurelien Bompard <abompard at fedoraproject.org> -	0.81.1.3-1
 - New release: 0.81.1.3
 - drop patches 1 & 2 (merged upstream)
 
-* Sun Jan 24 2010 Aurelien Bompard <abompard at fedoraproject.org> -  0.80.5.2-3
+* Sun Jan 24 2010 Aurelien Bompard <abompard at fedoraproject.org> -	0.80.5.2-3
 - fix build on rawhide
 
 * Fri Jan 22 2010 Rahul Sundaram <sundaram at fedoraproject.org> - 0.80.5.2-2
 - Rebuild for Boost soname bump
 
-* Sat Nov 21 2009 Aurelien Bompard <abompard at fedoraproject.org> -  0.80.5.2-1
+* Sat Nov 21 2009 Aurelien Bompard <abompard at fedoraproject.org> -	0.80.5.2-1
 - New release: 0.80.5.2
 
-* Sun Sep 20 2009 Aurelien Bompard <abompard at fedoraproject.org> -  0.80.4.2-1
+* Sun Sep 20 2009 Aurelien Bompard <abompard at fedoraproject.org> -	0.80.4.2-1
 - New release: 0.80.4.2 (bugfix)
 
-* Sat Sep 05 2009 Aurelien Bompard <abompard at fedoraproject.org> -  0.80.4.1-1
+* Sat Sep 05 2009 Aurelien Bompard <abompard at fedoraproject.org> -	0.80.4.1-1
 - New release: 0.80.4.1 (bugfix)
 
-* Thu Sep 03 2009 Aurelien Bompard <abompard at fedoraproject.org> -  0.80.4-1
+* Thu Sep 03 2009 Aurelien Bompard <abompard at fedoraproject.org> -	0.80.4-1
 - New release: 0.80.4
 
-* Sat Aug 22 2009 Aurelien Bompard <abompard at fedoraproject.org> -  0.80.2-1
+* Sat Aug 22 2009 Aurelien Bompard <abompard at fedoraproject.org> -	0.80.2-1
 - New release: 0.80.2
 
 * Wed Aug 12 2009 Ville Skyttä <ville.skytta at iki.fi> - 0.79.1.2-4
@@ -223,7 +228,7 @@ rm -rf $RPM_BUILD_ROOT
 
 * Sun Mar 22 2009 Aurelien Bompard <abompard at fedoraproject.org> 0.78.2.1-9
 - exclude KAI, since it's deprecated
-  (http://spring.clan-sy.com/phpbb/viewtopic.php?f=20&t=18196)
+ (http://spring.clan-sy.com/phpbb/viewtopic.php?f=20&t=18196)
 
 * Tue Mar 17 2009 Aurelien Bompard <abompard at fedoraproject.org> 0.78.2.1-8
 - use relative symlinks for the fonts
@@ -236,7 +241,7 @@ rm -rf $RPM_BUILD_ROOT
 
 * Mon Feb 02 2009 Aurelien Bompard <abompard at fedoraproject.org> 0.78.2.1-6
 - use cmake, as requested by upstream:
-  http://spring.clan-sy.com/phpbb/viewtopic.php?p=330802#p330802
+	http://spring.clan-sy.com/phpbb/viewtopic.php?p=330802#p330802
 
 * Mon Feb 02 2009 Aurelien Bompard <abompard at fedoraproject.org> 0.78.2.1-5
 - use Fedora's compilation flags
@@ -254,16 +259,16 @@ rm -rf $RPM_BUILD_ROOT
 
 * Sun Jan 18 2009 Aurelien Bompard <abompard at fedoraproject.org> 0.78.1.1-2
 - Other changes from the review:
-  - remove Cmake-specific patch
-  - drop meta-package
+- remove Cmake-specific patch
+- drop meta-package
 
 * Sat Jan 17 2009 Aurelien Bompard <abompard at fedoraproject.org> 0.78.1.1-1
 - Implement changes from the review (#478767):
-  - improve description
-  - add a README.Fedora file
-  - remove commas from (build)requires
-  - remove vendor from the desktop file
-  - update to version 0.78.1.1
+- improve description
+- add a README.Fedora file
+- remove commas from (build)requires
+- remove vendor from the desktop file
+- update to version 0.78.1.1
 
 * Sun Jul 09 2006 Aurelien Bompard <abompard at fedoraproject.org> 0.77-1.b5
 - initial package


More information about the scm-commits mailing list