import cmake-3.11.4-3.el8
This commit is contained in:
commit
dac3a4c11a
1
.cmake.metadata
Normal file
1
.cmake.metadata
Normal file
@ -0,0 +1 @@
|
||||
6bcf931844964fefc4ccfd7d025ba4ec2c7c2abb SOURCES/cmake-3.11.4.tar.gz
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
SOURCES/cmake-3.11.4.tar.gz
|
187
SOURCES/cmake-fedora-flag_release.patch
Normal file
187
SOURCES/cmake-fedora-flag_release.patch
Normal file
@ -0,0 +1,187 @@
|
||||
commit b247220ae5a91d8057fd57b5f6e50c93b168dc17
|
||||
Author: Björn Esser <besser82@fedoraproject.org>
|
||||
Date: Mon Jul 24 01:52:06 2017 +0200
|
||||
|
||||
Set optimization for RELEASE to Fedora default
|
||||
|
||||
Index: cmake-3.10.0/Modules/Compiler/Absoft-Fortran.cmake
|
||||
===================================================================
|
||||
--- cmake-3.10.0.orig/Modules/Compiler/Absoft-Fortran.cmake
|
||||
+++ cmake-3.10.0/Modules/Compiler/Absoft-Fortran.cmake
|
||||
@@ -1,7 +1,7 @@
|
||||
string(APPEND CMAKE_Fortran_FLAGS_INIT " ")
|
||||
string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT " -g")
|
||||
string(APPEND CMAKE_Fortran_FLAGS_MINSIZEREL_INIT " ")
|
||||
-string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -O3")
|
||||
+string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -O2")
|
||||
string(APPEND CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT " -O2 -g")
|
||||
set(CMAKE_Fortran_MODDIR_FLAG "-YMOD_OUT_DIR=")
|
||||
set(CMAKE_Fortran_MODPATH_FLAG "-p")
|
||||
Index: cmake-3.10.0/Modules/Compiler/G95-Fortran.cmake
|
||||
===================================================================
|
||||
--- cmake-3.10.0.orig/Modules/Compiler/G95-Fortran.cmake
|
||||
+++ cmake-3.10.0/Modules/Compiler/G95-Fortran.cmake
|
||||
@@ -1,7 +1,7 @@
|
||||
string(APPEND CMAKE_Fortran_FLAGS_INIT " ")
|
||||
string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT " -g")
|
||||
string(APPEND CMAKE_Fortran_FLAGS_MINSIZEREL_INIT " -Os")
|
||||
-string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -O3")
|
||||
+string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -O2")
|
||||
string(APPEND CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT " -O2 -g")
|
||||
set(CMAKE_Fortran_MODDIR_FLAG "-fmod=")
|
||||
set(CMAKE_Fortran_VERBOSE_FLAG "-v")
|
||||
Index: cmake-3.10.0/Modules/Compiler/GNU-Fortran.cmake
|
||||
===================================================================
|
||||
--- cmake-3.10.0.orig/Modules/Compiler/GNU-Fortran.cmake
|
||||
+++ cmake-3.10.0/Modules/Compiler/GNU-Fortran.cmake
|
||||
@@ -11,7 +11,7 @@ set(CMAKE_Fortran_POSTPROCESS_FLAG "-fpr
|
||||
|
||||
# No -DNDEBUG for Fortran.
|
||||
string(APPEND CMAKE_Fortran_FLAGS_MINSIZEREL_INIT " -Os")
|
||||
-string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -O3")
|
||||
+string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -O2")
|
||||
|
||||
# No -isystem for Fortran because it will not find .mod files.
|
||||
unset(CMAKE_INCLUDE_SYSTEM_FLAG_Fortran)
|
||||
Index: cmake-3.10.0/Modules/Compiler/GNU.cmake
|
||||
===================================================================
|
||||
--- cmake-3.10.0.orig/Modules/Compiler/GNU.cmake
|
||||
+++ cmake-3.10.0/Modules/Compiler/GNU.cmake
|
||||
@@ -40,7 +40,7 @@ macro(__compiler_gnu lang)
|
||||
string(APPEND CMAKE_${lang}_FLAGS_INIT " ")
|
||||
string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g")
|
||||
string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Os -DNDEBUG")
|
||||
- string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O3 -DNDEBUG")
|
||||
+ string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O2 -DNDEBUG")
|
||||
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG")
|
||||
set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
|
||||
set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
|
||||
Index: cmake-3.10.0/Modules/Compiler/Intel.cmake
|
||||
===================================================================
|
||||
--- cmake-3.10.0.orig/Modules/Compiler/Intel.cmake
|
||||
+++ cmake-3.10.0/Modules/Compiler/Intel.cmake
|
||||
@@ -22,7 +22,7 @@ else()
|
||||
string(APPEND CMAKE_${lang}_FLAGS_INIT " ")
|
||||
string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g")
|
||||
string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Os")
|
||||
- string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O3")
|
||||
+ string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O2")
|
||||
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g")
|
||||
|
||||
set(CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "${CMAKE_${lang}_COMPILER}" "-QdM" "-P" "-Za" "${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp")
|
||||
Index: cmake-3.10.0/Modules/Compiler/NVIDIA-CUDA.cmake
|
||||
===================================================================
|
||||
--- cmake-3.10.0.orig/Modules/Compiler/NVIDIA-CUDA.cmake
|
||||
+++ cmake-3.10.0/Modules/Compiler/NVIDIA-CUDA.cmake
|
||||
@@ -9,7 +9,7 @@ if(NOT "x${CMAKE_CUDA_SIMULATE_ID}" STRE
|
||||
set(CMAKE_SHARED_LIBRARY_CUDA_FLAGS -fPIC)
|
||||
string(APPEND CMAKE_CUDA_FLAGS_INIT " ")
|
||||
string(APPEND CMAKE_CUDA_FLAGS_DEBUG_INIT " -g")
|
||||
- string(APPEND CMAKE_CUDA_FLAGS_RELEASE_INIT " -O3 -DNDEBUG")
|
||||
+ string(APPEND CMAKE_CUDA_FLAGS_RELEASE_INIT " -O2 -DNDEBUG")
|
||||
string(APPEND CMAKE_CUDA_FLAGS_MINSIZEREL_INIT " -O1 -DNDEBUG")
|
||||
string(APPEND CMAKE_CUDA_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG")
|
||||
endif()
|
||||
Index: cmake-3.10.0/Modules/Compiler/PathScale.cmake
|
||||
===================================================================
|
||||
--- cmake-3.10.0.orig/Modules/Compiler/PathScale.cmake
|
||||
+++ cmake-3.10.0/Modules/Compiler/PathScale.cmake
|
||||
@@ -16,6 +16,6 @@ macro(__compiler_pathscale lang)
|
||||
string(APPEND CMAKE_${lang}_FLAGS_INIT " ")
|
||||
string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g -O0")
|
||||
string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Os")
|
||||
- string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O3")
|
||||
+ string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O2")
|
||||
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -g -O2")
|
||||
endmacro()
|
||||
Index: cmake-3.10.0/Modules/Platform/IRIX.cmake
|
||||
===================================================================
|
||||
--- cmake-3.10.0.orig/Modules/Platform/IRIX.cmake
|
||||
+++ cmake-3.10.0/Modules/Platform/IRIX.cmake
|
||||
@@ -7,7 +7,7 @@ if(NOT CMAKE_COMPILER_IS_GNUCXX)
|
||||
"<CMAKE_CXX_COMPILER> -ar -o <TARGET> <OBJECTS>")
|
||||
set (CMAKE_CXX_FLAGS_INIT "")
|
||||
set (CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
|
||||
- set (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-O3 -DNDEBUG")
|
||||
+ set (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-O2 -DNDEBUG")
|
||||
set (CMAKE_CXX_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
|
||||
set (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2")
|
||||
set (CMAKE_C_FLAGS_INIT "")
|
||||
Index: cmake-3.10.0/Modules/Platform/IRIX64.cmake
|
||||
===================================================================
|
||||
--- cmake-3.10.0.orig/Modules/Platform/IRIX64.cmake
|
||||
+++ cmake-3.10.0/Modules/Platform/IRIX64.cmake
|
||||
@@ -37,7 +37,7 @@ if(NOT CMAKE_COMPILER_IS_GNUCC)
|
||||
set(CMAKE_CXX_CREATE_STATIC_LIBRARY
|
||||
"<CMAKE_CXX_COMPILER> -ar -o <TARGET> <OBJECTS>")
|
||||
set (CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
|
||||
- set (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-O3 -DNDEBUG")
|
||||
+ set (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-O2 -DNDEBUG")
|
||||
set (CMAKE_CXX_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
|
||||
set (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2")
|
||||
endif()
|
||||
Index: cmake-3.10.0/Modules/Compiler/PGI.cmake
|
||||
===================================================================
|
||||
--- cmake-3.10.0.orig/Modules/Compiler/PGI.cmake
|
||||
+++ cmake-3.10.0/Modules/Compiler/PGI.cmake
|
||||
@@ -18,7 +18,7 @@ macro(__compiler_pgi lang)
|
||||
string(APPEND CMAKE_${lang}_FLAGS_INIT " ")
|
||||
string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g -O0")
|
||||
string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -O2 -s")
|
||||
- string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -fast -O3")
|
||||
+ string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -fast -O2")
|
||||
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -gopt")
|
||||
|
||||
if(CMAKE_HOST_WIN32)
|
||||
Index: cmake-3.10.0/Modules/Compiler/SunPro-ASM.cmake
|
||||
===================================================================
|
||||
--- cmake-3.10.0.orig/Modules/Compiler/SunPro-ASM.cmake
|
||||
+++ cmake-3.10.0/Modules/Compiler/SunPro-ASM.cmake
|
||||
@@ -11,7 +11,7 @@ set(CMAKE_SHARED_LIBRARY_SONAME_ASM_FLAG
|
||||
string(APPEND CMAKE_ASM_FLAGS_INIT " ")
|
||||
string(APPEND CMAKE_ASM_FLAGS_DEBUG_INIT " -g")
|
||||
string(APPEND CMAKE_ASM_FLAGS_MINSIZEREL_INIT " -xO2 -xspace -DNDEBUG")
|
||||
-string(APPEND CMAKE_ASM_FLAGS_RELEASE_INIT " -xO3 -DNDEBUG")
|
||||
+string(APPEND CMAKE_ASM_FLAGS_RELEASE_INIT " -xO2 -DNDEBUG")
|
||||
string(APPEND CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT " -g -xO2 -DNDEBUG")
|
||||
|
||||
# Initialize ASM link type selection flags. These flags are used when
|
||||
Index: cmake-3.10.0/Modules/Compiler/SunPro-C.cmake
|
||||
===================================================================
|
||||
--- cmake-3.10.0.orig/Modules/Compiler/SunPro-C.cmake
|
||||
+++ cmake-3.10.0/Modules/Compiler/SunPro-C.cmake
|
||||
@@ -15,7 +15,7 @@ set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "
|
||||
string(APPEND CMAKE_C_FLAGS_INIT " ")
|
||||
string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " -g")
|
||||
string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -xO2 -xspace -DNDEBUG")
|
||||
-string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -xO3 -DNDEBUG")
|
||||
+string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -xO2 -DNDEBUG")
|
||||
string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO_INIT " -g -xO2 -DNDEBUG")
|
||||
|
||||
# Initialize C link type selection flags. These flags are used when
|
||||
Index: cmake-3.10.0/Modules/Compiler/SunPro-CXX.cmake
|
||||
===================================================================
|
||||
--- cmake-3.10.0.orig/Modules/Compiler/SunPro-CXX.cmake
|
||||
+++ cmake-3.10.0/Modules/Compiler/SunPro-CXX.cmake
|
||||
@@ -15,7 +15,7 @@ set(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG
|
||||
string(APPEND CMAKE_CXX_FLAGS_INIT " ")
|
||||
string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " -g")
|
||||
string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -xO2 -xspace -DNDEBUG")
|
||||
-string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -xO3 -DNDEBUG")
|
||||
+string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -xO2 -DNDEBUG")
|
||||
string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT " -g -xO2 -DNDEBUG")
|
||||
|
||||
# Initialize C link type selection flags. These flags are used when
|
||||
Index: cmake-3.10.0/Modules/Compiler/SunPro-Fortran.cmake
|
||||
===================================================================
|
||||
--- cmake-3.10.0.orig/Modules/Compiler/SunPro-Fortran.cmake
|
||||
+++ cmake-3.10.0/Modules/Compiler/SunPro-Fortran.cmake
|
||||
@@ -13,7 +13,7 @@ set(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLA
|
||||
string(APPEND CMAKE_Fortran_FLAGS_INIT " ")
|
||||
string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT " -g")
|
||||
string(APPEND CMAKE_Fortran_FLAGS_MINSIZEREL_INIT " -xO2 -xspace -DNDEBUG")
|
||||
-string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -xO3 -DNDEBUG")
|
||||
+string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -xO2 -DNDEBUG")
|
||||
string(APPEND CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT " -g -xO2 -DNDEBUG")
|
||||
set(CMAKE_Fortran_MODDIR_FLAG "-moddir=")
|
||||
set(CMAKE_Fortran_MODPATH_FLAG "-M")
|
21
SOURCES/cmake-findruby.patch
Normal file
21
SOURCES/cmake-findruby.patch
Normal file
@ -0,0 +1,21 @@
|
||||
Index: cmake-3.10.0/Modules/FindRuby.cmake
|
||||
===================================================================
|
||||
--- cmake-3.10.0.orig/Modules/FindRuby.cmake
|
||||
+++ cmake-3.10.0/Modules/FindRuby.cmake
|
||||
@@ -106,14 +106,8 @@ if(RUBY_EXECUTABLE AND NOT RUBY_VERSIO
|
||||
_RUBY_CONFIG_VAR("sitearchdir" RUBY_SITEARCH_DIR)
|
||||
_RUBY_CONFIG_VAR("sitelibdir" RUBY_SITELIB_DIR)
|
||||
|
||||
- # vendor_ruby available ?
|
||||
- execute_process(COMMAND ${RUBY_EXECUTABLE} -r vendor-specific -e "print 'true'"
|
||||
- OUTPUT_VARIABLE RUBY_HAS_VENDOR_RUBY ERROR_QUIET)
|
||||
-
|
||||
- if(RUBY_HAS_VENDOR_RUBY)
|
||||
- _RUBY_CONFIG_VAR("vendorlibdir" RUBY_VENDORLIB_DIR)
|
||||
- _RUBY_CONFIG_VAR("vendorarchdir" RUBY_VENDORARCH_DIR)
|
||||
- endif()
|
||||
+ _RUBY_CONFIG_VAR("vendorlibdir" RUBY_VENDORLIB_DIR)
|
||||
+ _RUBY_CONFIG_VAR("vendorarchdir" RUBY_VENDORARCH_DIR)
|
||||
|
||||
# save the results in the cache so we don't have to run ruby the next time again
|
||||
set(RUBY_VERSION_MAJOR ${RUBY_VERSION_MAJOR} CACHE PATH "The Ruby major version" FORCE)
|
9
SOURCES/cmake-init.el
Normal file
9
SOURCES/cmake-init.el
Normal file
@ -0,0 +1,9 @@
|
||||
;;
|
||||
;; Setup cmake-mode for autoloading
|
||||
;;
|
||||
(autoload 'cmake-mode "cmake-mode" "Major mode for editing CMake listfiles." t)
|
||||
(setq auto-mode-alist
|
||||
(append
|
||||
'(("CMakeLists\\.txt\\'" . cmake-mode))
|
||||
'(("\\.cmake\\'" . cmake-mode))
|
||||
auto-mode-alist))
|
22
SOURCES/cmake-libuv-location.patch
Normal file
22
SOURCES/cmake-libuv-location.patch
Normal file
@ -0,0 +1,22 @@
|
||||
commit 889033b5c6847cf1f7bd789384405d59dc333bf6
|
||||
Author: Raphael Kubo da Costa <rakuco@FreeBSD.org>
|
||||
Date: Sat Jun 23 20:30:07 2018 +0200
|
||||
|
||||
FindLibUV: Also check uv/version.h for version detection
|
||||
|
||||
Starting with libuv 1.21.0, libuv's headers were moved into a uv/ directory.
|
||||
Make FindLibUV aware of the file's new location for configuration to work.
|
||||
|
||||
diff --git a/Source/Modules/FindLibUV.cmake b/Source/Modules/FindLibUV.cmake
|
||||
index ba13d75f8befe247..0554d62c23b0cf6f 100644
|
||||
--- a/Source/Modules/FindLibUV.cmake
|
||||
+++ b/Source/Modules/FindLibUV.cmake
|
||||
@@ -63,6 +63,8 @@ mark_as_advanced(LibUV_INCLUDE_DIR)
|
||||
set(_LibUV_H_REGEX "#[ \t]*define[ \t]+UV_VERSION_(MAJOR|MINOR|PATCH)[ \t]+[0-9]+")
|
||||
if(LibUV_INCLUDE_DIR AND EXISTS "${LibUV_INCLUDE_DIR}/uv-version.h")
|
||||
file(STRINGS "${LibUV_INCLUDE_DIR}/uv-version.h" _LibUV_H REGEX "${_LibUV_H_REGEX}")
|
||||
+elseif(LibUV_INCLUDE_DIR AND EXISTS "${LibUV_INCLUDE_DIR}/uv/version.h")
|
||||
+ file(STRINGS "${LibUV_INCLUDE_DIR}/uv/version.h" _LibUV_H REGEX "${_LibUV_H_REGEX}")
|
||||
elseif(LibUV_INCLUDE_DIR AND EXISTS "${LibUV_INCLUDE_DIR}/uv.h")
|
||||
file(STRINGS "${LibUV_INCLUDE_DIR}/uv.h" _LibUV_H REGEX "${_LibUV_H_REGEX}")
|
||||
else()
|
16
SOURCES/cmake-mingw-dl.patch
Normal file
16
SOURCES/cmake-mingw-dl.patch
Normal file
@ -0,0 +1,16 @@
|
||||
diff -rupN cmake-3.10.1/Modules/Platform/Windows-GNU.cmake cmake-3.10.1-new/Modules/Platform/Windows-GNU.cmake
|
||||
--- cmake-3.10.1/Modules/Platform/Windows-GNU.cmake 2017-12-13 14:25:23.000000000 +0100
|
||||
+++ cmake-3.10.1-new/Modules/Platform/Windows-GNU.cmake 2017-12-30 15:32:03.253515499 +0100
|
||||
@@ -28,9 +28,11 @@ if(MINGW)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll" ".dll.a" ".a" ".lib")
|
||||
set(CMAKE_C_STANDARD_LIBRARIES_INIT "-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32")
|
||||
set(CMAKE_CXX_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}")
|
||||
+ set(CMAKE_DL_LIBS "dl")
|
||||
+else()
|
||||
+ set(CMAKE_DL_LIBS "")
|
||||
endif()
|
||||
|
||||
-set(CMAKE_DL_LIBS "")
|
||||
set(CMAKE_LIBRARY_PATH_FLAG "-L")
|
||||
set(CMAKE_LINK_LIBRARY_FLAG "-l")
|
||||
set(CMAKE_LINK_DEF_FILE_FLAG "") # Empty string: passing the file is enough
|
3
SOURCES/cmake.attr
Normal file
3
SOURCES/cmake.attr
Normal file
@ -0,0 +1,3 @@
|
||||
%__cmake_provides %{_rpmconfigdir}/cmake.prov
|
||||
%__cmake_requires %{_rpmconfigdir}/cmake.req
|
||||
%__cmake_path ^(%{_libdir}|%{_datadir})/cmake/.*/.*(Config\.cmake|-config\.cmake)$
|
74
SOURCES/cmake.prov.in
Normal file
74
SOURCES/cmake.prov.in
Normal file
@ -0,0 +1,74 @@
|
||||
# -*- coding:utf-8 -*-
|
||||
#
|
||||
# Copyright (C) 2015 Daniel Vrátil <dvratil@redhat.com>
|
||||
# Copyright (C) 2017 Daniel Vrátil <dvratil@fedoraproject.org>
|
||||
#
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Library General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
|
||||
import sys
|
||||
import re
|
||||
import glob
|
||||
|
||||
class CMakeParser:
|
||||
def __init__(self, filelist = None):
|
||||
if filelist == None:
|
||||
filelist = sys.stdin
|
||||
|
||||
paths = map(lambda x: x.rstrip(), filelist.readlines())
|
||||
for path in paths:
|
||||
modulePath, cmakeModule, lowercase = self.parseCmakeModuleConfig(path)
|
||||
if modulePath and cmakeModule:
|
||||
version = self.resolveCMakeModuleVersion(modulePath, cmakeModule, lowercase)
|
||||
|
||||
if version:
|
||||
print("cmake(%s) = %s" % (cmakeModule, version))
|
||||
else:
|
||||
print("cmake(%s)" % cmakeModule)
|
||||
|
||||
|
||||
def parseCmakeModuleConfig(self, configFile):
|
||||
paths = configFile.rsplit("/", 3)
|
||||
|
||||
modulePath = "%s/cmake/%s" % (paths[0], paths[2])
|
||||
cfgFile = paths[3]
|
||||
if cfgFile.endswith("Config.cmake"):
|
||||
return (modulePath, cfgFile[0:-len("Config.cmake")], False)
|
||||
elif cfgFile.endswith("-config.cmake"):
|
||||
return (modulePath, cfgFile[0:-len("-config.cmake")], True)
|
||||
else:
|
||||
return (None, None, False)
|
||||
|
||||
def resolveCMakeModuleVersion(self, modulePath, cmakeModule, lowercase):
|
||||
versionFile = ("%s/%s-config-version.cmake" if lowercase else "%s/%sConfigVersion.cmake") % (modulePath, cmakeModule)
|
||||
try:
|
||||
f = open(versionFile, 'r')
|
||||
except:
|
||||
return None
|
||||
|
||||
for line in f:
|
||||
line = line.strip()
|
||||
|
||||
# set(PACKAGE_VERSION <version>)
|
||||
version = re.match(r"^set[\ ]*\([\ ]*PACKAGE_VERSION[\ ]+[\"]*([0-9\.]+)[\"]*[\ ]*[.]*\)", line)
|
||||
if version:
|
||||
return version.groups(1)[0]
|
||||
|
||||
return None
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = CMakeParser()
|
69
SOURCES/cmake.req.in
Normal file
69
SOURCES/cmake.req.in
Normal file
@ -0,0 +1,69 @@
|
||||
# -*- coding:utf-8 -*-
|
||||
#
|
||||
# Copyright (C) 2017 Björn Esser <besser82@fedoraproject.org>
|
||||
#
|
||||
# based on cmake.prov, which is
|
||||
# Copyright (C) 2015 Daniel Vrátil <dvratil@redhat.com>
|
||||
# Copyright (C) 2017 Daniel Vrátil <dvratil@fedoraproject.org>
|
||||
#
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Library General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
|
||||
import sys
|
||||
import re
|
||||
import subprocess
|
||||
|
||||
class CMakeParser:
|
||||
def __init__(self, filelist = None):
|
||||
if filelist == None:
|
||||
filelist = sys.stdin
|
||||
|
||||
has_module = False
|
||||
is_arched = False
|
||||
|
||||
isa_suf = subprocess.check_output(["/usr/bin/rpm", "-E %{?_isa}"]).decode().strip()
|
||||
|
||||
paths = map(lambda x: x.rstrip(), filelist.readlines())
|
||||
for path in paths:
|
||||
modulePath, cmakeModule, lowercase = self.parseCmakeModuleConfig(path)
|
||||
if modulePath and cmakeModule:
|
||||
has_module = True
|
||||
if re.match(".*/usr/lib(64)?/cmake/.*", modulePath):
|
||||
is_arched = True
|
||||
|
||||
if has_module:
|
||||
if is_arched:
|
||||
print("cmake-filesystem%s" % isa_suf)
|
||||
else:
|
||||
print("cmake-filesystem")
|
||||
|
||||
|
||||
def parseCmakeModuleConfig(self, configFile):
|
||||
paths = configFile.rsplit("/", 3)
|
||||
|
||||
modulePath = "%s/cmake/%s" % (paths[0], paths[2])
|
||||
cfgFile = paths[3]
|
||||
if cfgFile.endswith("Config.cmake"):
|
||||
return (modulePath, cfgFile[0:-len("Config.cmake")], False)
|
||||
elif cfgFile.endswith("-config.cmake"):
|
||||
return (modulePath, cfgFile[0:-len("-config.cmake")], True)
|
||||
else:
|
||||
return (None, None, False)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = CMakeParser()
|
36
SOURCES/macros.cmake
Normal file
36
SOURCES/macros.cmake
Normal file
@ -0,0 +1,36 @@
|
||||
#
|
||||
# Macros for cmake
|
||||
#
|
||||
%_cmake_lib_suffix64 -DLIB_SUFFIX=64
|
||||
%_cmake_skip_rpath -DCMAKE_SKIP_RPATH:BOOL=ON
|
||||
%_cmake_version @@CMAKE_VERSION@@
|
||||
%__cmake /usr/bin/cmake
|
||||
|
||||
# - Set default compile flags
|
||||
# - CMAKE_*_FLAGS_RELEASE are added *after* the *FLAGS environment variables
|
||||
# and default to -O3 -DNDEBUG. Strip the -O3 so we can override with *FLAGS
|
||||
# - Turn on verbose makefiles so we can see and verify compile flags
|
||||
# - Set default install prefixes and library install directories
|
||||
# - Turn on shared libraries by default
|
||||
%cmake \
|
||||
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
|
||||
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
|
||||
FFLAGS="${FFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}}" ; export FFLAGS ; \
|
||||
FCFLAGS="${FCFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}}" ; export FCFLAGS ; \
|
||||
%{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;} \
|
||||
%__cmake \\\
|
||||
-DCMAKE_C_FLAGS_RELEASE:STRING="-DNDEBUG" \\\
|
||||
-DCMAKE_CXX_FLAGS_RELEASE:STRING="-DNDEBUG" \\\
|
||||
-DCMAKE_Fortran_FLAGS_RELEASE:STRING="-DNDEBUG" \\\
|
||||
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \\\
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \\\
|
||||
-DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \\\
|
||||
-DLIB_INSTALL_DIR:PATH=%{_libdir} \\\
|
||||
-DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \\\
|
||||
-DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \\\
|
||||
%if "%{?_lib}" == "lib64" \
|
||||
%{?_cmake_lib_suffix64} \\\
|
||||
%endif \
|
||||
-DBUILD_SHARED_LIBS:BOOL=ON
|
||||
|
||||
%cmake@@CMAKE_MAJOR_VERSION@@ %cmake
|
1471
SPECS/cmake.spec
Normal file
1471
SPECS/cmake.spec
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user