[spring] Fix CMake macro for CMake 3

rmattes rmattes at fedoraproject.org
Sat Feb 21 16:41:34 UTC 2015


commit e9098ffecf62d36ae51ca47a52d7281b169e169d
Author: Rich Mattes <richmattes at gmail.com>
Date:   Sat Feb 21 11:15:38 2015 -0500

    Fix CMake macro for CMake 3

 spring-98-cmake3.patch | 12 ++++++++++++
 spring.spec            |  6 ++++++
 2 files changed, 18 insertions(+)
---
diff --git a/spring-98-cmake3.patch b/spring-98-cmake3.patch
new file mode 100644
index 0000000..0c69184
--- /dev/null
+++ b/spring-98-cmake3.patch
@@ -0,0 +1,12 @@
+diff -up ./rts/build/cmake/Util.cmake.cmake3 ./rts/build/cmake/Util.cmake
+--- ./rts/build/cmake/Util.cmake.cmake3	2015-02-21 11:07:13.856812218 -0500
++++ ./rts/build/cmake/Util.cmake	2015-02-21 11:07:39.115759584 -0500
+@@ -169,7 +169,7 @@ Macro    (GetListOfSubModules list_var)
+ 
+ 	# Strip away the "/CMakeLists.txt" parts, so we end up with just a list of dirs,
+ 	# for example: AAI;RAI;KAIK
+-	String(REPLACE "//CMakeLists.txt" "" ${list_var} "${${list_var}}")
++	String(REGEX REPLACE "\\/*CMakeLists\\.txt" "" ${list_var} "${${list_var}}")
+ EndMacro (GetListOfSubModules list_var)
+ 
+ 
diff --git a/spring.spec b/spring.spec
index 92cbd6d..9f090ee 100644
--- a/spring.spec
+++ b/spring.spec
@@ -17,6 +17,8 @@ Source1:		spring-README.Fedora
 
 Patch0:			spring-98-dso.patch
 Patch1:			spring-98-assimp-remove.patch
+# Upstream bug report: https://springrts.com/mantis/view.php?id=4679
+Patch2:                 spring-98-cmake3.patch
 
 BuildRoot:		%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -49,6 +51,7 @@ great resource, read it here: http://spring.clan-sy.com/wiki/Main_Page
 %setup -q -n %{name}_%{version}
 %patch0 -p0 -b .spring-98-dso-fix
 %patch1 -p0 -b .spring-98-assimp-remove
+%patch2 -p0 -b .cmake3
 
 cp -p %{SOURCE1} README.Fedora
 touch ./rts/build/cmake/FindAllegro.cmake
@@ -159,6 +162,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Sat Feb 21 2015 Rich Mattes <richmattes at gmail.com> - 98.0-3
+- Fix CMake macro for CMake 3
+
 * Tue Jan 27 2015 Petr Machata <pmachata at redhat.com> - 98.0-3
 - Rebuild for boost 1.57.0
 


More information about the scm-commits mailing list