summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/CPackRPM.cmake67
-rw-r--r--Modules/FindBoost.cmake4
-rw-r--r--Modules/FindCurses.cmake3
-rw-r--r--Modules/Platform/Darwin-GNU-Fortran.cmake2
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Tests/StringFileTest/CMakeLists.txt2
6 files changed, 72 insertions, 8 deletions
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index e86cc98..56d9b66 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -138,6 +138,56 @@
#
# rpm -qp --requires file.rpm
#
+# .. variable:: CPACK_RPM_PACKAGE_REQUIRES_PRE
+#
+# RPM spec requires(pre) field.
+#
+# * Mandatory : NO
+# * Default : -
+#
+# May be used to set RPM preinstall dependencies (requires(pre)). Note that you must enclose
+# the complete requires string between quotes, for example::
+#
+# set(CPACK_RPM_PACKAGE_REQUIRES_PRE "shadow-utils, initscripts")
+#
+# .. variable:: CPACK_RPM_PACKAGE_REQUIRES_POST
+#
+# RPM spec requires(post) field.
+#
+# * Mandatory : NO
+# * Default : -
+#
+# May be used to set RPM postinstall dependencies (requires(post)). Note that you must enclose
+# the complete requires string between quotes, for example::
+#
+# set(CPACK_RPM_PACKAGE_REQUIRES_POST "shadow-utils, initscripts")
+#
+#
+# .. variable:: CPACK_RPM_PACKAGE_REQUIRES_POSTUN
+#
+# RPM spec requires(postun) field.
+#
+# * Mandatory : NO
+# * Default : -
+#
+# May be used to set RPM postuninstall dependencies (requires(postun)). Note that you must enclose
+# the complete requires string between quotes, for example::
+#
+# set(CPACK_RPM_PACKAGE_REQUIRES_POSTUN "shadow-utils, initscripts")
+#
+#
+# .. variable:: CPACK_RPM_PACKAGE_REQUIRES_PREUN
+#
+# RPM spec requires(preun) field.
+#
+# * Mandatory : NO
+# * Default : -
+#
+# May be used to set RPM preuninstall dependencies (requires(preun)). Note that you must enclose
+# the complete requires string between quotes, for example::
+#
+# set(CPACK_RPM_PACKAGE_REQUIRES_PREUN "shadow-utils, initscripts")
+#
# .. variable:: CPACK_RPM_PACKAGE_SUGGESTS
#
# RPM spec suggest field.
@@ -387,7 +437,7 @@ if(CPACK_RPM_PACKAGE_DEBUG)
OUTPUT_VARIABLE _TMP_LSB_RELEASE_OUTPUT
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
- string(REPLACE "\n" ", "
+ string(REGEX REPLACE "\n" ", "
LSB_RELEASE_OUTPUT
${_TMP_LSB_RELEASE_OUTPUT})
else ()
@@ -400,7 +450,7 @@ endif()
# to shut down warning about space in buildtree
# some recent RPM version should support space in different places.
# not checked [yet].
-if(CPACK_TOPLEVEL_DIRECTORY MATCHES " ")
+if(CPACK_TOPLEVEL_DIRECTORY MATCHES ".* .*")
message(FATAL_ERROR "${RPMBUILD_EXECUTABLE} can't handle paths with spaces, use a build directory without spaces for building RPMs.")
endif()
@@ -600,7 +650,7 @@ endif()
# There may be some COMPONENT specific variables as well
# If component specific var is not provided we use the global one
# for each component
-foreach(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLICTS AUTOPROV AUTOREQ AUTOREQPROV)
+foreach(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLICTS AUTOPROV AUTOREQ AUTOREQPROV REQUIRES_PRE REQUIRES_POST REQUIRES_PREUN REQUIRES_POSTUN)
if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: processing ${_RPM_SPEC_HEADER}")
endif()
@@ -639,6 +689,13 @@ foreach(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLIC
string(TOLOWER "${_PACKAGE_HEADER_TAIL}" _PACKAGE_HEADER_TAIL)
string(SUBSTRING ${_RPM_SPEC_HEADER} 0 1 _PACKAGE_HEADER_NAME)
set(_PACKAGE_HEADER_NAME "${_PACKAGE_HEADER_NAME}${_PACKAGE_HEADER_TAIL}")
+ # The following keywords require parentheses around the "pre" or "post" suffix in the final RPM spec file.
+ set(SCRIPTS_REQUIREMENTS_LIST REQUIRES_PRE REQUIRES_POST REQUIRES_PREUN REQUIRES_POSTUN)
+ list(FIND SCRIPTS_REQUIREMENTS_LIST ${_RPM_SPEC_HEADER} IS_SCRIPTS_REQUIREMENT_FOUND)
+ if(NOT ${IS_SCRIPTS_REQUIREMENT_FOUND} EQUAL -1)
+ string(REPLACE "_" "(" _PACKAGE_HEADER_NAME "${_PACKAGE_HEADER_NAME}")
+ set(_PACKAGE_HEADER_NAME "${_PACKAGE_HEADER_NAME})")
+ endif()
if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: User defined ${_PACKAGE_HEADER_NAME}:\n ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP}")
endif()
@@ -1035,6 +1092,10 @@ Group: \@CPACK_RPM_PACKAGE_GROUP\@
Vendor: \@CPACK_RPM_PACKAGE_VENDOR\@
\@TMP_RPM_URL\@
\@TMP_RPM_REQUIRES\@
+\@TMP_RPM_REQUIRES_PRE\@
+\@TMP_RPM_REQUIRES_POST\@
+\@TMP_RPM_REQUIRES_PREUN\@
+\@TMP_RPM_REQUIRES_POSTUN\@
\@TMP_RPM_PROVIDES\@
\@TMP_RPM_OBSOLETES\@
\@TMP_RPM_CONFLICTS\@
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 3642b3e..aad6575 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -321,7 +321,7 @@ macro(_Boost_FIND_LIBRARY var)
# If Boost_LIBRARY_DIR is known then search only there.
if(Boost_LIBRARY_DIR)
- set(_boost_LIBRARY_SEARCH_DIRS ${Boost_LIBRARY_DIR} NO_DEFAULT_PATH)
+ set(_boost_LIBRARY_SEARCH_DIRS ${Boost_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
endif()
endmacro()
@@ -855,7 +855,7 @@ if(_Boost_CHANGE_LIBDIR AND NOT _Boost_LIBRARY_DIR_CHANGED)
endif()
if(Boost_LIBRARY_DIR)
- set(_boost_LIBRARY_SEARCH_DIRS ${Boost_LIBRARY_DIR} NO_DEFAULT_PATH)
+ set(_boost_LIBRARY_SEARCH_DIRS ${Boost_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
else()
set(_boost_LIBRARY_SEARCH_DIRS "")
if(BOOST_LIBRARYDIR)
diff --git a/Modules/FindCurses.cmake b/Modules/FindCurses.cmake
index 0184c39..a21ca89 100644
--- a/Modules/FindCurses.cmake
+++ b/Modules/FindCurses.cmake
@@ -50,6 +50,8 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
+include(${CMAKE_CURRENT_LIST_DIR}/CheckLibraryExists.cmake)
+
find_library(CURSES_CURSES_LIBRARY NAMES curses )
find_library(CURSES_NCURSES_LIBRARY NAMES ncurses )
@@ -81,7 +83,6 @@ endif()
# prefix as the library was found, if still not found, try curses.h with the
# default search paths.
if(CURSES_CURSES_LIBRARY AND CURSES_NEED_NCURSES)
- include(${CMAKE_CURRENT_LIST_DIR}/CheckLibraryExists.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/CMakePushCheckState.cmake)
cmake_push_check_state()
set(CMAKE_REQUIRED_QUIET ${Curses_FIND_QUIETLY})
diff --git a/Modules/Platform/Darwin-GNU-Fortran.cmake b/Modules/Platform/Darwin-GNU-Fortran.cmake
index f4b509a..6724f9b 100644
--- a/Modules/Platform/Darwin-GNU-Fortran.cmake
+++ b/Modules/Platform/Darwin-GNU-Fortran.cmake
@@ -14,6 +14,8 @@
include(Platform/Darwin-GNU)
__darwin_compiler_gnu(Fortran)
+cmake_gnu_set_sysroot_flag(Fortran)
+cmake_gnu_set_osx_deployment_target_flag(Fortran)
set(CMAKE_Fortran_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ")
set(CMAKE_Fortran_OSX_CURRENT_VERSION_FLAG "-current_version ")
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index d6d90a8..e82fd0d 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 1)
-set(CMake_VERSION_PATCH 20141027)
+set(CMake_VERSION_PATCH 20141029)
#set(CMake_VERSION_RC 1)
diff --git a/Tests/StringFileTest/CMakeLists.txt b/Tests/StringFileTest/CMakeLists.txt
index e6c6152..faf3bc9 100644
--- a/Tests/StringFileTest/CMakeLists.txt
+++ b/Tests/StringFileTest/CMakeLists.txt
@@ -189,7 +189,7 @@ string(CONFIGURE "${infile}" infile+-/out @ONLY)
set(infile "${infile+-/out}")
# Write include file to a file
-string(REGEX REPLACE "includefile" "${file}" outfile "${infile}")
+string(REGEX REPLACE "includefile" "Includes/Values.h" outfile "${infile}")
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/OutputFile.h-tmp" "${outfile}")
file(RENAME "${CMAKE_CURRENT_BINARY_DIR}/OutputFile.h-tmp"
"${CMAKE_CURRENT_BINARY_DIR}/OutputFile.h")