import cmake-3.17.2-1.module+el8.3.0+6783+372a363d
This commit is contained in:
commit
7046c67e05
1
.cmake.metadata
Normal file
1
.cmake.metadata
Normal file
@ -0,0 +1 @@
|
||||
4b3ea5249e0d544c5d09a08b0e81f66a4963e5d7 SOURCES/cmake-3.17.2.tar.gz
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
SOURCES/cmake-3.17.2.tar.gz
|
42
SOURCES/0001-Remove-pax-zstd-test.patch
Normal file
42
SOURCES/0001-Remove-pax-zstd-test.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From e1287c801aca417b740bc3a9f62df93a4c2c797e Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <tstellar@redhat.com>
|
||||
Date: Tue, 26 May 2020 11:56:44 -0700
|
||||
Subject: [PATCH] Remove pax-zstd test
|
||||
|
||||
---
|
||||
Tests/RunCMake/CommandLineTar/RunCMakeTest.cmake | 1 -
|
||||
Tests/RunCMake/CommandLineTar/pax-zstd.cmake | 10 ----------
|
||||
2 files changed, 11 deletions(-)
|
||||
delete mode 100644 Tests/RunCMake/CommandLineTar/pax-zstd.cmake
|
||||
|
||||
diff --git a/Tests/RunCMake/CommandLineTar/RunCMakeTest.cmake b/Tests/RunCMake/CommandLineTar/RunCMakeTest.cmake
|
||||
index a64af95..4d1b396 100644
|
||||
--- a/Tests/RunCMake/CommandLineTar/RunCMakeTest.cmake
|
||||
+++ b/Tests/RunCMake/CommandLineTar/RunCMakeTest.cmake
|
||||
@@ -27,7 +27,6 @@ run_cmake(gnutar)
|
||||
run_cmake(gnutar-gz)
|
||||
run_cmake(pax)
|
||||
run_cmake(pax-xz)
|
||||
-run_cmake(pax-zstd)
|
||||
run_cmake(paxr)
|
||||
run_cmake(paxr-bz2)
|
||||
run_cmake(zip)
|
||||
diff --git a/Tests/RunCMake/CommandLineTar/pax-zstd.cmake b/Tests/RunCMake/CommandLineTar/pax-zstd.cmake
|
||||
deleted file mode 100644
|
||||
index c2a304d..0000000
|
||||
--- a/Tests/RunCMake/CommandLineTar/pax-zstd.cmake
|
||||
+++ /dev/null
|
||||
@@ -1,10 +0,0 @@
|
||||
-set(OUTPUT_NAME "test.tar.zstd")
|
||||
-
|
||||
-set(COMPRESSION_FLAGS cvf)
|
||||
-set(COMPRESSION_OPTIONS --format=pax --zstd)
|
||||
-
|
||||
-set(DECOMPRESSION_FLAGS xvf)
|
||||
-
|
||||
-include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake)
|
||||
-
|
||||
-check_magic("28b52ffd0058" LIMIT 6 HEX)
|
||||
--
|
||||
1.8.3.1
|
||||
|
168
SOURCES/cmake-fedora-flag_release.patch
Normal file
168
SOURCES/cmake-fedora-flag_release.patch
Normal file
@ -0,0 +1,168 @@
|
||||
Index: cmake-3.17.0-rc1/Modules/Compiler/Absoft-Fortran.cmake
|
||||
===================================================================
|
||||
--- cmake-3.17.0-rc1.orig/Modules/Compiler/Absoft-Fortran.cmake
|
||||
+++ cmake-3.17.0-rc1/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.17.0-rc1/Modules/Compiler/G95-Fortran.cmake
|
||||
===================================================================
|
||||
--- cmake-3.17.0-rc1.orig/Modules/Compiler/G95-Fortran.cmake
|
||||
+++ cmake-3.17.0-rc1/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.17.0-rc1/Modules/Compiler/GNU.cmake
|
||||
===================================================================
|
||||
--- cmake-3.17.0-rc1.orig/Modules/Compiler/GNU.cmake
|
||||
+++ cmake-3.17.0-rc1/Modules/Compiler/GNU.cmake
|
||||
@@ -55,7 +55,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.17.0-rc1/Modules/Compiler/GNU-Fortran.cmake
|
||||
===================================================================
|
||||
--- cmake-3.17.0-rc1.orig/Modules/Compiler/GNU-Fortran.cmake
|
||||
+++ cmake-3.17.0-rc1/Modules/Compiler/GNU-Fortran.cmake
|
||||
@@ -14,7 +14,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.17.0-rc1/Modules/Compiler/Intel.cmake
|
||||
===================================================================
|
||||
--- cmake-3.17.0-rc1.orig/Modules/Compiler/Intel.cmake
|
||||
+++ cmake-3.17.0-rc1/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}")
|
||||
Index: cmake-3.17.0-rc1/Modules/Compiler/NVIDIA-CUDA.cmake
|
||||
===================================================================
|
||||
--- cmake-3.17.0-rc1.orig/Modules/Compiler/NVIDIA-CUDA.cmake
|
||||
+++ cmake-3.17.0-rc1/Modules/Compiler/NVIDIA-CUDA.cmake
|
||||
@@ -36,7 +36,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.17.0-rc1/Modules/Compiler/PathScale.cmake
|
||||
===================================================================
|
||||
--- cmake-3.17.0-rc1.orig/Modules/Compiler/PathScale.cmake
|
||||
+++ cmake-3.17.0-rc1/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.17.0-rc1/Modules/Compiler/PGI.cmake
|
||||
===================================================================
|
||||
--- cmake-3.17.0-rc1.orig/Modules/Compiler/PGI.cmake
|
||||
+++ cmake-3.17.0-rc1/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.17.0-rc1/Modules/Compiler/SunPro-ASM.cmake
|
||||
===================================================================
|
||||
--- cmake-3.17.0-rc1.orig/Modules/Compiler/SunPro-ASM.cmake
|
||||
+++ cmake-3.17.0-rc1/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.17.0-rc1/Modules/Compiler/SunPro-C.cmake
|
||||
===================================================================
|
||||
--- cmake-3.17.0-rc1.orig/Modules/Compiler/SunPro-C.cmake
|
||||
+++ cmake-3.17.0-rc1/Modules/Compiler/SunPro-C.cmake
|
||||
@@ -19,7 +19,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")
|
||||
|
||||
set(CMAKE_DEPFILE_FLAGS_C "-xMD -xMF <DEPFILE>")
|
||||
Index: cmake-3.17.0-rc1/Modules/Compiler/SunPro-CXX.cmake
|
||||
===================================================================
|
||||
--- cmake-3.17.0-rc1.orig/Modules/Compiler/SunPro-CXX.cmake
|
||||
+++ cmake-3.17.0-rc1/Modules/Compiler/SunPro-CXX.cmake
|
||||
@@ -19,7 +19,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")
|
||||
|
||||
set(CMAKE_DEPFILE_FLAGS_CXX "-xMD -xMF <DEPFILE>")
|
||||
Index: cmake-3.17.0-rc1/Modules/Compiler/SunPro-Fortran.cmake
|
||||
===================================================================
|
||||
--- cmake-3.17.0-rc1.orig/Modules/Compiler/SunPro-Fortran.cmake
|
||||
+++ cmake-3.17.0-rc1/Modules/Compiler/SunPro-Fortran.cmake
|
||||
@@ -17,7 +17,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")
|
||||
Index: cmake-3.17.0-rc1/Modules/Platform/Windows-Clang.cmake
|
||||
===================================================================
|
||||
--- cmake-3.17.0-rc1.orig/Modules/Platform/Windows-Clang.cmake
|
||||
+++ cmake-3.17.0-rc1/Modules/Platform/Windows-Clang.cmake
|
||||
@@ -79,7 +79,7 @@ macro(__windows_compiler_clang_gnu lang)
|
||||
|
||||
string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g -Xclang -gcodeview -O0 ${__ADDED_FLAGS_DEBUG}")
|
||||
string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Os -DNDEBUG ${__ADDED_FLAGS}")
|
||||
- string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O3 -DNDEBUG ${__ADDED_FLAGS}")
|
||||
+ string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O2 -DNDEBUG ${__ADDED_FLAGS}")
|
||||
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG -Xclang -gcodeview ${__ADDED_FLAGS}")
|
||||
endif()
|
||||
set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ")
|
21
SOURCES/cmake-findruby.patch
Normal file
21
SOURCES/cmake-findruby.patch
Normal file
@ -0,0 +1,21 @@
|
||||
Index: cmake-3.17.0-rc1/Modules/FindRuby.cmake
|
||||
===================================================================
|
||||
--- cmake-3.17.0-rc1.orig/Modules/FindRuby.cmake
|
||||
+++ cmake-3.17.0-rc1/Modules/FindRuby.cmake
|
||||
@@ -110,14 +110,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))
|
21
SOURCES/cmake-mingw-dl.patch
Normal file
21
SOURCES/cmake-mingw-dl.patch
Normal file
@ -0,0 +1,21 @@
|
||||
Index: cmake-3.17.0-rc1/Modules/Platform/Windows-GNU.cmake
|
||||
===================================================================
|
||||
--- cmake-3.17.0-rc1.orig/Modules/Platform/Windows-GNU.cmake
|
||||
+++ cmake-3.17.0-rc1/Modules/Platform/Windows-GNU.cmake
|
||||
@@ -25,12 +25,14 @@ endif()
|
||||
|
||||
if(MINGW)
|
||||
set(CMAKE_FIND_LIBRARY_PREFIXES "lib" "")
|
||||
- set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" ".a" ".lib")
|
||||
+ 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)$
|
82
SOURCES/cmake.prov
Normal file
82
SOURCES/cmake.prov
Normal file
@ -0,0 +1,82 @@
|
||||
#!/usr/bin/python3
|
||||
# -*- 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:
|
||||
string = "cmake(" + cmakeModule + ") = " + version
|
||||
else:
|
||||
string = "cmake(" + cmakeModule + ")"
|
||||
if string == string.lower():
|
||||
print(string)
|
||||
else:
|
||||
# Temporarily print both variants to satisfy requires
|
||||
# by the old version of this generator which made mistakes
|
||||
print(string)
|
||||
print(string.lower())
|
||||
|
||||
|
||||
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()
|
70
SOURCES/cmake.req
Normal file
70
SOURCES/cmake.req
Normal file
@ -0,0 +1,70 @@
|
||||
#!/usr/bin/python3
|
||||
# -*- 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()
|
41
SOURCES/macros.cmake
Normal file
41
SOURCES/macros.cmake
Normal file
@ -0,0 +1,41 @@
|
||||
#
|
||||
# Macros for cmake
|
||||
#
|
||||
%_cmake_lib_suffix64 -DLIB_SUFFIX=64
|
||||
%_cmake_shared_libs -DBUILD_SHARED_LIBS:BOOL=ON
|
||||
%_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 \
|
||||
%if 0%{?set_build_flags:1} \
|
||||
%set_build_flags \
|
||||
%else \
|
||||
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 ;} \
|
||||
%endif \
|
||||
%__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 \
|
||||
%{?_cmake_shared_libs}
|
||||
|
||||
%cmake@@CMAKE_MAJOR_VERSION@@ %cmake
|
1591
SPECS/cmake.spec
Normal file
1591
SPECS/cmake.spec
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user