import cmake-3.18.2-7.el8
This commit is contained in:
commit
fd50a32208
1
.cmake.metadata
Normal file
1
.cmake.metadata
Normal file
@ -0,0 +1 @@
|
||||
667675c77842f092f2b9571c409ba8bfbea9e817 SOURCES/cmake-3.18.2.tar.gz
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
SOURCES/cmake-3.18.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
|
||||
|
118
SOURCES/cmake-fedora-flag_release.patch
Normal file
118
SOURCES/cmake-fedora-flag_release.patch
Normal file
@ -0,0 +1,118 @@
|
||||
diff -Naur cmake-3.18.2.orig/Modules/Compiler/Absoft-Fortran.cmake cmake-3.18.2/Modules/Compiler/Absoft-Fortran.cmake
|
||||
--- cmake-3.18.2.orig/Modules/Compiler/Absoft-Fortran.cmake 2020-09-08 13:30:51.134086928 +0000
|
||||
+++ cmake-3.18.2/Modules/Compiler/Absoft-Fortran.cmake 2020-09-10 08:44:13.788373968 +0000
|
||||
@@ -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")
|
||||
diff -Naur cmake-3.18.2.orig/Modules/Compiler/G95-Fortran.cmake cmake-3.18.2/Modules/Compiler/G95-Fortran.cmake
|
||||
--- cmake-3.18.2.orig/Modules/Compiler/G95-Fortran.cmake 2020-09-08 13:30:51.136086957 +0000
|
||||
+++ cmake-3.18.2/Modules/Compiler/G95-Fortran.cmake 2020-09-10 08:44:22.991490916 +0000
|
||||
@@ -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")
|
||||
diff -Naur cmake-3.18.2.orig/Modules/Compiler/GNU-Fortran.cmake cmake-3.18.2/Modules/Compiler/GNU-Fortran.cmake
|
||||
--- cmake-3.18.2.orig/Modules/Compiler/GNU-Fortran.cmake 2020-09-08 13:30:51.137086972 +0000
|
||||
+++ cmake-3.18.2/Modules/Compiler/GNU-Fortran.cmake 2020-09-10 08:44:10.635333901 +0000
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
# 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)
|
||||
diff -Naur cmake-3.18.2.orig/Modules/Compiler/GNU.cmake cmake-3.18.2/Modules/Compiler/GNU.cmake
|
||||
--- cmake-3.18.2.orig/Modules/Compiler/GNU.cmake 2020-09-08 13:30:51.137086972 +0000
|
||||
+++ cmake-3.18.2/Modules/Compiler/GNU.cmake 2020-09-10 08:44:38.939693578 +0000
|
||||
@@ -56,7 +56,7 @@
|
||||
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>")
|
||||
diff -Naur cmake-3.18.2.orig/Modules/Compiler/Intel.cmake cmake-3.18.2/Modules/Compiler/Intel.cmake
|
||||
--- cmake-3.18.2.orig/Modules/Compiler/Intel.cmake 2020-09-08 13:30:51.138086986 +0000
|
||||
+++ cmake-3.18.2/Modules/Compiler/Intel.cmake 2020-09-10 08:44:25.749525964 +0000
|
||||
@@ -22,7 +22,7 @@
|
||||
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}")
|
||||
diff -Naur cmake-3.18.2.orig/Modules/Compiler/NVIDIA-CUDA.cmake cmake-3.18.2/Modules/Compiler/NVIDIA-CUDA.cmake
|
||||
--- cmake-3.18.2.orig/Modules/Compiler/NVIDIA-CUDA.cmake 2020-09-08 13:30:51.138086986 +0000
|
||||
+++ cmake-3.18.2/Modules/Compiler/NVIDIA-CUDA.cmake 2020-09-10 08:44:19.672448740 +0000
|
||||
@@ -39,7 +39,7 @@
|
||||
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()
|
||||
diff -Naur cmake-3.18.2.orig/Modules/Compiler/PGI.cmake cmake-3.18.2/Modules/Compiler/PGI.cmake
|
||||
--- cmake-3.18.2.orig/Modules/Compiler/PGI.cmake 2020-09-08 13:30:51.138086986 +0000
|
||||
+++ cmake-3.18.2/Modules/Compiler/PGI.cmake 2020-09-10 08:44:32.995618043 +0000
|
||||
@@ -18,7 +18,7 @@
|
||||
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)
|
||||
diff -Naur cmake-3.18.2.orig/Modules/Compiler/PathScale.cmake cmake-3.18.2/Modules/Compiler/PathScale.cmake
|
||||
--- cmake-3.18.2.orig/Modules/Compiler/PathScale.cmake 2020-09-08 13:30:51.138086986 +0000
|
||||
+++ cmake-3.18.2/Modules/Compiler/PathScale.cmake 2020-09-10 08:44:16.715411163 +0000
|
||||
@@ -16,6 +16,6 @@
|
||||
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()
|
||||
diff -Naur cmake-3.18.2.orig/Modules/Platform/HP-UX-HP-CXX.cmake cmake-3.18.2/Modules/Platform/HP-UX-HP-CXX.cmake
|
||||
--- cmake-3.18.2.orig/Modules/Platform/HP-UX-HP-CXX.cmake 2020-09-08 13:30:51.182087632 +0000
|
||||
+++ cmake-3.18.2/Modules/Platform/HP-UX-HP-CXX.cmake 2020-09-10 08:44:00.226201627 +0000
|
||||
@@ -9,6 +9,6 @@
|
||||
)
|
||||
|
||||
string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " -g")
|
||||
-string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " +O3 -DNDEBUG")
|
||||
+string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " +O2 -DNDEBUG")
|
||||
string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " +O2 -DNDEBUG")
|
||||
string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT " -g")
|
||||
diff -Naur cmake-3.18.2.orig/Modules/Platform/Windows-Clang.cmake cmake-3.18.2/Modules/Platform/Windows-Clang.cmake
|
||||
--- cmake-3.18.2.orig/Modules/Platform/Windows-Clang.cmake 2020-09-08 13:30:51.185087676 +0000
|
||||
+++ cmake-3.18.2/Modules/Platform/Windows-Clang.cmake 2020-09-10 08:44:07.269291127 +0000
|
||||
@@ -79,7 +79,7 @@
|
||||
|
||||
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 ")
|
26
SOURCES/cmake-gui.appdata.xml
Normal file
26
SOURCES/cmake-gui.appdata.xml
Normal file
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Copyright 2014 Ryan Lerch <rlerch@redhat.com> -->
|
||||
<!--
|
||||
EmailAddress: kitware@kitware.com
|
||||
SentUpstream: 2014-09-17
|
||||
-->
|
||||
<application>
|
||||
<id type="desktop">cmake-gui.desktop</id>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<name>CMake GUI</name>
|
||||
<summary>Create new CMake projects</summary>
|
||||
<description>
|
||||
<p>
|
||||
CMake is an open source, cross platform build system that can build, test,
|
||||
and package software. CMake GUI is a graphical user interface that can
|
||||
create and edit CMake projects.
|
||||
</p>
|
||||
</description>
|
||||
<url type="homepage">http://www.cmake.org</url>
|
||||
<screenshots>
|
||||
<screenshot type="default">https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/CMake/a.png</screenshot>
|
||||
</screenshots>
|
||||
<!-- FIXME: change this to an upstream email address for spec updates
|
||||
<updatecontact>someone_who_cares@upstream_project.org</updatecontact>
|
||||
-->
|
||||
</application>
|
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))
|
16
SOURCES/cmake-mingw-dl.patch
Normal file
16
SOURCES/cmake-mingw-dl.patch
Normal file
@ -0,0 +1,16 @@
|
||||
diff -Naur cmake-3.18.2.orig/Modules/Platform/Windows-GNU.cmake cmake-3.18.2/Modules/Platform/Windows-GNU.cmake
|
||||
--- cmake-3.18.2.orig/Modules/Platform/Windows-GNU.cmake 2020-09-08 13:30:51.186087690 +0000
|
||||
+++ cmake-3.18.2/Modules/Platform/Windows-GNU.cmake 2020-09-10 07:42:22.458698539 +0000
|
||||
@@ -28,9 +28,11 @@
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".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
|
1608
SPECS/cmake.spec
Normal file
1608
SPECS/cmake.spec
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user