diff --git a/.cmake.metadata b/.cmake.metadata index a5db525..cb944b2 100644 --- a/.cmake.metadata +++ b/.cmake.metadata @@ -1 +1 @@ -6bcf931844964fefc4ccfd7d025ba4ec2c7c2abb SOURCES/cmake-3.11.4.tar.gz +667675c77842f092f2b9571c409ba8bfbea9e817 SOURCES/cmake-3.18.2.tar.gz diff --git a/.gitignore b/.gitignore index adc8194..5d71b39 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/cmake-3.11.4.tar.gz +SOURCES/cmake-3.18.2.tar.gz diff --git a/SOURCES/0001-FindMPI-Restore-MPI_-LANG-_COMPILE_FLAGS-and-MPI_-LA.patch b/SOURCES/0001-FindMPI-Restore-MPI_-LANG-_COMPILE_FLAGS-and-MPI_-LA.patch deleted file mode 100644 index a4294b4..0000000 --- a/SOURCES/0001-FindMPI-Restore-MPI_-LANG-_COMPILE_FLAGS-and-MPI_-LA.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 31b8b28fedbf102740eebd7ff9148188ed00a26e Mon Sep 17 00:00:00 2001 -From: Robert Maynard -Date: Tue, 20 Aug 2019 17:38:53 -0400 -Subject: [PATCH] FindMPI: Restore MPI__COMPILE_FLAGS and - MPI__COMPILE_OPTIONS - -In commit e374b9f1eb (FindMPI: Restore MPI__COMPILE_FLAGS as a -command-line string, 2018-09-10, v3.12.3~6^2) we tried to restore the -compile flags but accidentally inverted the arguments to `list(JOIN)` -causing both `MPI__COMPILE_FLAGS` and `MPI__COMPILE_OPTIONS` -to be empty. - -Issue: #18349 ---- - Modules/FindMPI.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake -index 9471be8..2b9b20c 100644 ---- a/Modules/FindMPI.cmake -+++ b/Modules/FindMPI.cmake -@@ -1698,7 +1698,7 @@ foreach(LANG IN ITEMS C CXX Fortran) - set(MPI_${LANG}_INCLUDE_PATH "${MPI_${LANG}_INCLUDE_DIRS}") - unset(MPI_${LANG}_COMPILE_FLAGS) - if(MPI_${LANG}_COMPILE_OPTIONS) -- list(JOIN MPI_${LANG}_COMPILE_FLAGS " " MPI_${LANG}_COMPILE_OPTIONS) -+ list(JOIN MPI_${LANG}_COMPILE_OPTIONS " " MPI_${LANG}_COMPILE_FLAGS) - endif() - if(MPI_${LANG}_COMPILE_DEFINITIONS) - foreach(_MPI_DEF IN LISTS MPI_${LANG}_COMPILE_DEFINITIONS) --- -1.8.3.1 - diff --git a/SOURCES/0001-FindMPI-Restore-MPI_-LANG-_COMPILE_FLAGS-as-a-comman.patch b/SOURCES/0001-FindMPI-Restore-MPI_-LANG-_COMPILE_FLAGS-as-a-comman.patch deleted file mode 100644 index bff9010..0000000 --- a/SOURCES/0001-FindMPI-Restore-MPI_-LANG-_COMPILE_FLAGS-as-a-comman.patch +++ /dev/null @@ -1,32 +0,0 @@ -From e374b9f1ebae70ca4381588362d6d3418f832ea7 Mon Sep 17 00:00:00 2001 -From: Brad King -Date: Mon, 10 Sep 2018 14:30:59 -0400 -Subject: [PATCH] FindMPI: Restore MPI__COMPILE_FLAGS as a command-line - string - -Refactoring in commit v3.10.0-rc1~103^2~2 (FindMPI: Modernization from -ground up, 2017-04-25) accidentally left this variable set as a copy of -the `;`-list in `MPI__COMPILE_OPTIONS`, but the flags variable is -documented as a command-line string. Restore it now. - -Fixes: #18349 ---- - Modules/FindMPI.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake -index 75c4441..bfcd876 100644 ---- a/Modules/FindMPI.cmake -+++ b/Modules/FindMPI.cmake -@@ -1680,7 +1680,7 @@ foreach(LANG IN ITEMS C CXX Fortran) - set(MPI_${LANG}_INCLUDE_PATH "${MPI_${LANG}_INCLUDE_DIRS}") - unset(MPI_${LANG}_COMPILE_FLAGS) - if(MPI_${LANG}_COMPILE_OPTIONS) -- set(MPI_${LANG}_COMPILE_FLAGS "${MPI_${LANG}_COMPILE_OPTIONS}") -+ list(JOIN MPI_${LANG}_COMPILE_FLAGS " " MPI_${LANG}_COMPILE_OPTIONS) - endif() - if(MPI_${LANG}_COMPILE_DEFINITIONS) - foreach(_MPI_DEF IN LISTS MPI_${LANG}_COMPILE_DEFINITIONS) --- -1.8.3.1 - diff --git a/SOURCES/0001-Remove-pax-zstd-test.patch b/SOURCES/0001-Remove-pax-zstd-test.patch new file mode 100644 index 0000000..a524c20 --- /dev/null +++ b/SOURCES/0001-Remove-pax-zstd-test.patch @@ -0,0 +1,42 @@ +From e1287c801aca417b740bc3a9f62df93a4c2c797e Mon Sep 17 00:00:00 2001 +From: Tom Stellard +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 + diff --git a/SOURCES/0001-Remove-usage-of-list-JOIN.patch b/SOURCES/0001-Remove-usage-of-list-JOIN.patch deleted file mode 100644 index a97e41b..0000000 --- a/SOURCES/0001-Remove-usage-of-list-JOIN.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 0480b1a5f6d18aee1430d7ebc7c1ae958f516d32 Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Thu, 23 Jan 2020 09:05:01 -0800 -Subject: [PATCH] Remove usage of list(JOIN) - ---- - Modules/FindMPI.cmake | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake -index 8632d7b..4816d6e 100644 ---- a/Modules/FindMPI.cmake -+++ b/Modules/FindMPI.cmake -@@ -1677,7 +1677,7 @@ foreach(LANG IN ITEMS C CXX Fortran) - set(MPI_${LANG}_INCLUDE_PATH "${MPI_${LANG}_INCLUDE_DIRS}") - unset(MPI_${LANG}_COMPILE_FLAGS) - if(MPI_${LANG}_COMPILE_OPTIONS) -- list(JOIN MPI_${LANG}_COMPILE_OPTIONS " " MPI_${LANG}_COMPILE_FLAGS) -+ string(REPLACE ";" " " MPI_${LANG}_COMPILE_FLAGS "${MPI_${LANG}_COMPILE_OPTIONS}") - endif() - if(MPI_${LANG}_COMPILE_DEFINITIONS) - foreach(_MPI_DEF IN LISTS MPI_${LANG}_COMPILE_DEFINITIONS) --- -1.8.3.1 - diff --git a/SOURCES/cmake-fedora-flag_release.patch b/SOURCES/cmake-fedora-flag_release.patch index c3f4c49..1e49dee 100644 --- a/SOURCES/cmake-fedora-flag_release.patch +++ b/SOURCES/cmake-fedora-flag_release.patch @@ -1,13 +1,6 @@ -commit b247220ae5a91d8057fd57b5f6e50c93b168dc17 -Author: Björn Esser -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 +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") @@ -17,10 +10,9 @@ Index: cmake-3.10.0/Modules/Compiler/Absoft-Fortran.cmake 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 +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") @@ -30,11 +22,10 @@ Index: cmake-3.10.0/Modules/Compiler/G95-Fortran.cmake 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 +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") @@ -43,11 +34,10 @@ Index: cmake-3.10.0/Modules/Compiler/GNU-Fortran.cmake # 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) +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") @@ -56,11 +46,10 @@ Index: cmake-3.10.0/Modules/Compiler/GNU.cmake string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG") set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE " -E > ") set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE " -S -o ") -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() +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") @@ -68,12 +57,11 @@ Index: cmake-3.10.0/Modules/Compiler/Intel.cmake + 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_${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") @@ -82,49 +70,10 @@ Index: cmake-3.10.0/Modules/Compiler/NVIDIA-CUDA.cmake 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) - " -ar -o ") - 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 - " -ar -o ") - 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) +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") @@ -133,55 +82,37 @@ Index: cmake-3.10.0/Modules/Compiler/PGI.cmake 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") +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 @@ + ) - # 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") +-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 @@ - # 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") + 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 ") diff --git a/SOURCES/cmake-findruby.patch b/SOURCES/cmake-findruby.patch deleted file mode 100644 index aa8566f..0000000 --- a/SOURCES/cmake-findruby.patch +++ /dev/null @@ -1,21 +0,0 @@ -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) diff --git a/SOURCES/cmake-gui.appdata.xml b/SOURCES/cmake-gui.appdata.xml new file mode 100644 index 0000000..b0ffd48 --- /dev/null +++ b/SOURCES/cmake-gui.appdata.xml @@ -0,0 +1,26 @@ + + + + + cmake-gui.desktop + CC0-1.0 + CMake GUI + Create new CMake projects + +

+ 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. +

+
+ http://www.cmake.org + + https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/CMake/a.png + + +
diff --git a/SOURCES/cmake-libuv-location.patch b/SOURCES/cmake-libuv-location.patch deleted file mode 100644 index fad3a2b..0000000 --- a/SOURCES/cmake-libuv-location.patch +++ /dev/null @@ -1,22 +0,0 @@ -commit 889033b5c6847cf1f7bd789384405d59dc333bf6 -Author: Raphael Kubo da Costa -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() diff --git a/SOURCES/cmake-mingw-dl.patch b/SOURCES/cmake-mingw-dl.patch index 1f16d26..dadbff4 100644 --- a/SOURCES/cmake-mingw-dl.patch +++ b/SOURCES/cmake-mingw-dl.patch @@ -1,8 +1,8 @@ -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") +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") diff --git a/SOURCES/cmake.prov b/SOURCES/cmake.prov new file mode 100644 index 0000000..58d3522 --- /dev/null +++ b/SOURCES/cmake.prov @@ -0,0 +1,82 @@ +#!/usr/bin/python3 +# -*- coding:utf-8 -*- +# +# Copyright (C) 2015 Daniel Vrátil +# Copyright (C) 2017 Daniel Vrátil +# +# +# 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 = re.match(r"^set[\ ]*\([\ ]*PACKAGE_VERSION[\ ]+[\"]*([0-9\.]+)[\"]*[\ ]*[.]*\)", line) + if version: + return version.groups(1)[0] + + return None + +if __name__ == "__main__": + parser = CMakeParser() diff --git a/SOURCES/cmake.prov.in b/SOURCES/cmake.prov.in deleted file mode 100644 index 6378db4..0000000 --- a/SOURCES/cmake.prov.in +++ /dev/null @@ -1,74 +0,0 @@ -# -*- coding:utf-8 -*- -# -# Copyright (C) 2015 Daniel Vrátil -# Copyright (C) 2017 Daniel Vrátil -# -# -# 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 = re.match(r"^set[\ ]*\([\ ]*PACKAGE_VERSION[\ ]+[\"]*([0-9\.]+)[\"]*[\ ]*[.]*\)", line) - if version: - return version.groups(1)[0] - - return None - -if __name__ == "__main__": - parser = CMakeParser() diff --git a/SOURCES/cmake.req b/SOURCES/cmake.req new file mode 100644 index 0000000..9af5c44 --- /dev/null +++ b/SOURCES/cmake.req @@ -0,0 +1,70 @@ +#!/usr/bin/python3 +# -*- coding:utf-8 -*- +# +# Copyright (C) 2017 Björn Esser +# +# based on cmake.prov, which is +# Copyright (C) 2015 Daniel Vrátil +# Copyright (C) 2017 Daniel Vrátil +# +# +# 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() diff --git a/SOURCES/cmake.req.in b/SOURCES/cmake.req.in deleted file mode 100644 index 5aac144..0000000 --- a/SOURCES/cmake.req.in +++ /dev/null @@ -1,69 +0,0 @@ -# -*- coding:utf-8 -*- -# -# Copyright (C) 2017 Björn Esser -# -# based on cmake.prov, which is -# Copyright (C) 2015 Daniel Vrátil -# Copyright (C) 2017 Daniel Vrátil -# -# -# 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() diff --git a/SOURCES/macros.cmake b/SOURCES/macros.cmake index 1768aab..ebfebee 100644 --- a/SOURCES/macros.cmake +++ b/SOURCES/macros.cmake @@ -2,6 +2,7 @@ # 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 @@ -13,11 +14,15 @@ # - 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" \\\ @@ -31,6 +36,6 @@ %if "%{?_lib}" == "lib64" \ %{?_cmake_lib_suffix64} \\\ %endif \ - -DBUILD_SHARED_LIBS:BOOL=ON + %{?_cmake_shared_libs} %cmake@@CMAKE_MAJOR_VERSION@@ %cmake diff --git a/SPECS/cmake.spec b/SPECS/cmake.spec index 632925a..c6da59d 100644 --- a/SPECS/cmake.spec +++ b/SPECS/cmake.spec @@ -1,4 +1,5 @@ # Do we add appdata-files? +# consider conditional on whether %%_metainfodir is defined or not instead -- rex %if 0%{?fedora} || 0%{?rhel} > 7 %bcond_without appdata %else @@ -38,6 +39,9 @@ %bcond_without sphinx %endif +%bcond_without bundled_libarchive +%bcond_without bundled_jsoncpp + # Run tests %bcond_without test @@ -50,8 +54,15 @@ # Setup _pkgdocdir if not defined already %{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}} +# Setup _vpath_builddir if not defined already +%{!?_vpath_builddir:%global _vpath_builddir %{_target_platform}} + %global major_version 3 -%global minor_version 11 +%global minor_version 18 +%global patch_version 2 + +%global baserelease 7 + # Set to RC version if building RC, else %%{nil} #global rcsuf rc3 %{?rcsuf:%global relsuf .%{rcsuf}} @@ -62,8 +73,8 @@ %global orig_name cmake Name: %{orig_name}%{?name_suffix} -Version: %{major_version}.%{minor_version}.4 -Release: 7%{?relsuf}%{?dist} +Version: %{major_version}.%{minor_version}.%{patch_version} +Release: %{baserelease}%{?relsuf}%{?dist} Summary: Cross-platform make system # most sources are BSD @@ -73,44 +84,28 @@ Summary: Cross-platform make system # exception granting redistribution under terms of your choice License: BSD and MIT and zlib URL: http://www.cmake.org -Source0: http://www.cmake.org/files/v%{major_version}.%{minor_version}/%{orig_name}-%{version}%{?versuf}.tar.gz +Source0: https://github.com/Kitware/CMake/archive/v%{version}/cmake-%{version}%{?rcver:%rcver}.tar.gz Source1: %{name}-init.el Source2: macros.%{name} # See https://bugzilla.redhat.com/show_bug.cgi?id=1202899 Source3: %{name}.attr -Source4: %{name}.prov.in -Source5: %{name}.req.in +Source4: %{name}.prov +Source5: %{name}.req +Source6: cmake%{?name_suffix}-gui.appdata.xml # Always start regular patches with numbers >= 100. # We need lower numbers for patches in compat package. # And this enables us to use %%autosetup -# -# Patch to fix RindRuby vendor settings -# http://public.kitware.com/Bug/view.php?id=12965 -# https://bugzilla.redhat.com/show_bug.cgi?id=822796 -Patch100: %{name}-findruby.patch + # replace release flag -O3 with -O2 for fedora Patch101: %{name}-fedora-flag_release.patch # Add dl to CMAKE_DL_LIBS on MINGW # https://gitlab.kitware.com/cmake/cmake/issues/17600 Patch102: %{name}-mingw-dl.patch -# FindLibUV: Also check uv/version.h for version detection -# https://gitlab.kitware.com/cmake/cmake/merge_requests/2169 -Patch103: cmake-libuv-location.patch - -# https://bugzilla.redhat.com/show_bug.cgi?id=1749463 -# https://gitlab.kitware.com/cmake/cmake/issues/18349 -Patch104: 0001-FindMPI-Restore-MPI_-LANG-_COMPILE_FLAGS-as-a-comman.patch -Patch105: 0001-FindMPI-Restore-MPI_-LANG-_COMPILE_FLAGS-and-MPI_-LA.patch -Patch106: 0001-Remove-usage-of-list-JOIN.patch - -# Patch for renaming on EPEL -%if 0%{?name_suffix:1} -Patch1: %{name}-rename.patch -%if 0%{?rhel} && 0%{?rhel} <= 6 -Patch2: %{name}-libarchive3.patch -%endif -%endif + +# --zstd option requires tar >= 1.31 +Patch103: 0001-Remove-pax-zstd-test.patch + BuildRequires: coreutils BuildRequires: findutils @@ -130,28 +125,29 @@ BuildRequires: libX11-devel BuildRequires: ncurses-devel %endif %if %{with sphinx} -%if %{with python3} -BuildRequires: %{_bindir}/sphinx-build-3 -%else BuildRequires: %{_bindir}/sphinx-build %endif -%endif %if %{without bootstrap} BuildRequires: bzip2-devel BuildRequires: curl-devel BuildRequires: expat-devel -%if 0%{?fedora} || 0%{?rhel} >= 7 +# Needed jsoncpp >= 1.4.1 +%if %{without bundled_jsoncpp} +BuildRequires: jsoncpp-devel +%endif +# Needed libarchive >= 3.3.3 +%if %{without bundled_libarchive} BuildRequires: libarchive-devel -%else -BuildRequires: libarchive3-devel %endif BuildRequires: libuv-devel BuildRequires: xz-devel BuildRequires: zlib-devel +BuildRequires: libzstd-devel %endif %if %{with emacs} BuildRequires: emacs %endif +BuildRequires: openssl-devel %if %{with rpm} %if %{with python3} %{!?python3_pkgversion: %global python3_pkgversion 3} @@ -164,6 +160,7 @@ BuildRequires: python2-devel %if %{with gui} %if 0%{?fedora} || 0%{?rhel} > 7 BuildRequires: pkgconfig(Qt5Widgets) +BuildRequires: libappstream-glib %else BuildRequires: pkgconfig(QtGui) %endif @@ -179,9 +176,6 @@ Requires: %{name}-data = %{version}-%{release} Requires: %{name}-rpm-macros = %{version}-%{release} Requires: %{name}-filesystem%{?_isa} = %{version}-%{release} -# Provide the major version name -Provides: %{orig_name}%{major_version} = %{version}-%{release} - # Source/kwsys/MD5.c # see https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries Provides: bundled(md5-deutsch) @@ -189,6 +183,15 @@ Provides: bundled(md5-deutsch) # https://fedorahosted.org/fpc/ticket/555 Provides: bundled(kwsys) +%if %{with bundled_libarchive} +Provides: bundled(libarchive) = 0:3.3.3 +%endif +%if %{with bundled_jsoncpp} +Provides: bundled(json-cpp) = 0:1.8.2 +%endif + +Conflicts: %{name}-doc < %{version} + %description CMake is used to control the software compilation process using simple platform and compiler independent configuration files. CMake generates @@ -208,6 +211,7 @@ Requires: %{name}-rpm-macros = %{version}-%{release} Requires: emacs-filesystem%{?_emacs_version: >= %{_emacs_version}} %endif %endif +Requires: vim-filesystem BuildArch: noarch @@ -218,6 +222,7 @@ This package contains common data-files for %{name}. %package doc Summary: Documentation for %{name} BuildArch: noarch +Conflicts: %{name} < %{version} %description doc This package contains documentation for %{name}. @@ -256,7 +261,8 @@ This package contains common RPM macros for %{name}. %prep -%autosetup -n %{orig_name}-%{version}%{?versuf} -p 1 +%autosetup -n CMake-%{version}%{?versuf} -p1 + %if %{with rpm} %if %{with python3} @@ -266,58 +272,61 @@ echo '#!%{__python3}' > %{name}.req echo '#!%{__python2}' > %{name}.prov echo '#!%{__python2}' > %{name}.req %endif -cat %{SOURCE4} >> %{name}.prov -cat %{SOURCE5} >> %{name}.req +tail -n +2 %{SOURCE4} >> %{name}.prov +tail -n +2 %{SOURCE5} >> %{name}.req %endif %build -export CFLAGS="%{optflags}" -export CXXFLAGS="%{optflags}" -export LDFLAGS="%{?__global_ldflags}" -mkdir build -pushd build -../bootstrap --prefix=%{_prefix} --datadir=/share/%{name} \ - --docdir=/share/doc/%{name} --mandir=/share/man \ - --%{?with_bootstrap:no-}system-libs \ - --no-system-jsoncpp \ - --no-system-librhash \ - --parallel=`/usr/bin/getconf _NPROCESSORS_ONLN` \ -%if %{with sphinx} -%if %{with python3} - --sphinx-build=%{_bindir}/sphinx-build-3 \ +%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 +SRCDIR="$(/usr/bin/pwd)" +mkdir %{_vpath_builddir} +pushd %{_vpath_builddir} +$SRCDIR/bootstrap --prefix=%{_prefix} --datadir=/share/%{name} \ + --docdir=/share/doc/%{name} --mandir=/share/man \ + --%{?with_bootstrap:no-}system-libs \ + --no-system-librhash \ +%if %{with bundled_jsoncpp} + --no-system-jsoncpp \ %endif - --sphinx-man --sphinx-html \ +%if %{with bundled_libarchive} + --no-system-libarchive \ +%endif + --parallel=`/usr/bin/getconf _NPROCESSORS_ONLN` \ +%if %{with sphinx} + --sphinx-man --sphinx-html \ %else - --sphinx-build=%{_bindir}/false \ + --sphinx-build=%{_bindir}/false \ %endif - --%{!?with_gui:no-}qt-gui \ + --%{!?with_gui:no-}qt-gui \ ; -%make_build VERBOSE=1 +popd +%make_build -C %{_vpath_builddir} VERBOSE=1 %install mkdir -p %{buildroot}%{_pkgdocdir} -%make_install -C build CMAKE_DOC_DIR=%{buildroot}%{_pkgdocdir} +%make_install -C %{_vpath_builddir} CMAKE_DOC_DIR=%{buildroot}%{_pkgdocdir} find %{buildroot}%{_datadir}/%{name}/Modules -type f | xargs chmod -x [ -n "$(find %{buildroot}%{_datadir}/%{name}/Modules -name \*.orig)" ] && echo "Found .orig files in %{_datadir}/%{name}/Modules, rebase patches" && exit 1 -# Install major_version name links -%{!?name_suffix:for f in ccmake cmake cpack ctest; do ln -s $f %{buildroot}%{_bindir}/${f}%{major_version}; done} -# Install bash completion symlinks -mkdir -p %{buildroot}%{_datadir}/bash-completion/completions -for f in %{buildroot}%{_datadir}/%{name}/completions/* -do - ln -s ../../%{name}/completions/$(basename $f) %{buildroot}%{_datadir}/bash-completion/completions -done + %if %{with emacs} # Install emacs cmake mode mkdir -p %{buildroot}%{_emacs_sitelispdir}/%{name} install -p -m 0644 Auxiliary/cmake-mode.el %{buildroot}%{_emacs_sitelispdir}/%{name}/%{name}-mode.el %{_emacs_bytecompile} %{buildroot}%{_emacs_sitelispdir}/%{name}/%{name}-mode.el mkdir -p %{buildroot}%{_emacs_sitestartdir} -install -p -m 0644 %SOURCE1 %{buildroot}%{_emacs_sitestartdir} +install -p -m 0644 %{SOURCE1} %{buildroot}%{_emacs_sitestartdir} %endif # RPM macros install -p -m0644 -D %{SOURCE2} %{buildroot}%{rpm_macros_dir}/macros.%{name} @@ -365,35 +374,9 @@ desktop-file-install --delete-original \ # # See http://www.freedesktop.org/software/appstream/docs/ for more details. # -mkdir -p %{buildroot}%{_datadir}/appdata -cat > %{buildroot}%{_datadir}/appdata/cmake-gui.appdata.xml < - - - - cmake-gui.desktop - CC0-1.0 - CMake GUI - Create new CMake projects - -

- 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. -

-
- http://www.cmake.org - - https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/CMake/a.png - - -
-EOF +mkdir -p %{buildroot}%{_metainfodir} +install -pm 644 %{SOURCE6} %{buildroot}%{_metainfodir}/ +appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.appdata.xml %endif %endif @@ -415,25 +398,29 @@ find %{buildroot}%{_bindir} -type f -or -type l -or -xtype l | \ %if 0%{?rhel} && 0%{?rhel} <= 6 mv -f Modules/FindLibArchive.cmake Modules/FindLibArchive.disabled %endif -pushd build -#CMake.FileDownload, CTestTestUpload, and curl require internet access -# RunCMake.CPack_RPM is broken if disttag contains "+", bug #1499151 -# CPackComponentsForAll-RPM-IgnoreGroup fails on RHEL8 -# https://gitlab.kitware.com/cmake/cmake/issues/19983 -NO_TEST="CMake.FileDownload|CTestTestUpload|curl|RunCMake.CPack_RPM|CPackComponentsForAll-RPM-IgnoreGroup" -# RunCMake.File_Generate fails on S390X +pushd %{_vpath_builddir} +# CTestTestUpload require internet access +# CPackComponentsForAll-RPM-IgnoreGroup failing wih rpm 4.15 - https://gitlab.kitware.com/cmake/cmake/issues/19983 +NO_TEST="CTestTestUpload|CPackComponentsForAll-RPM-IgnoreGroup" +# kwsys.testProcess-{4,5} are flaky on s390x. %ifarch s390x -NO_TEST="$NO_TEST|RunCMake.File_Generate" +NO_TEST="$NO_TEST|kwsys.testProcess-4|kwsys.testProcess-5" +%endif +# RunCMake.PrecompileHeaders test uses precompiled file presumably compiled with different compiler +# that one of RHEL8 (GCC-8.3.1). See https://bugzilla.redhat.com/show_bug.cgi?id=1721553#c4 +%if 0%{?rhel} && 0%{?rhel} > 7 +NO_TEST="$NO_TEST|RunCMake.PrecompileHeaders" %endif -export NO_TEST -bin/ctest%{?name_suffix} -V -E "$NO_TEST" %{?_smp_mflags} + +bin/ctest%{?name_suffix} %{?_smp_mflags} -V -E "$NO_TEST" --output-on-failure +# Keep an eye on failing tests +bin/ctest%{?name_suffix} %{?_smp_mflags} -V -R "$NO_TEST" --output-on-failure || : popd %if 0%{?rhel} && 0%{?rhel} <= 6 mv -f Modules/FindLibArchive.disabled Modules/FindLibArchive.cmake %endif %endif - %if %{with gui} %post gui update-desktop-database &> /dev/null || : @@ -454,7 +441,6 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %endif - %files -f lib_files.mf %doc %dir %{_pkgdocdir} %license Copyright.txt* @@ -474,18 +460,19 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : %if %{with emacs} %if 0%{?fedora} || 0%{?rhel} >= 7 %{_emacs_sitelispdir}/%{name} +%{_emacs_sitelispdir}/%{name}-mode.el %{_emacs_sitestartdir}/%{name}-init.el %else %{_emacs_sitelispdir} %{_emacs_sitestartdir} %endif %endif +%{_datadir}/vim/vimfiles/indent/cmake.vim +%{_datadir}/vim/vimfiles/syntax/cmake.vim %files doc -# Pickup license-files from main-pkg's license-dir -# If there's no license-dir they are picked up by %%doc previously -%{?_licensedir:%license %{_datadir}/licenses/%{name}*} +%license %{_datadir}/licenses/%{name}* %doc %{_pkgdocdir} @@ -496,7 +483,7 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : %files gui %{_bindir}/%{name}-gui %if %{with appdata} -%{_datadir}/appdata/*.appdata.xml +%{_metainfodir}/*.appdata.xml %endif %{_datadir}/applications/%{name}-gui.desktop %{_datadir}/mime/packages @@ -517,33 +504,163 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : %changelog -* Tue Jan 28 2020 Tom Stellard - 3.11.4-7 -- Fix test case name in dist-git +* Mon Sep 21 2020 sguelton@redhat.com - 3.18.2-7 +- Call update-desktop-database upon install + +* Sat Sep 12 2020 sguelton@redhat.com - 3.18.2-6 +- Declare conflict with cmake due to license files + +* Fri Sep 11 2020 sguelton@redhat.com - 3.18.2-5 +- Declare conflict with cmake-doc due to license files + +* Fri Sep 11 2020 sguelton@redhat.com - 3.18.2-4 +- Build on all arches +- Restore license file location +- Restore previous appdata name + +* Fri Sep 11 2020 sguelton@redhat.com - 3.18.2-3 +- Fix bash-completion installation +- keep license files in base location + +* Fri Sep 11 2020 sguelton@redhat.com - 3.18.2-2 +- Declare cmake vs old cmake-doc conflict + +* Thu Sep 10 2020 sguelton@redhat.com - 3.18.2-1 +- Update to cmake-3.18.2 + +* Tue Apr 28 2020 Björn Esser - 3.17.2-1 +- Update to cmake-3.17.2 + +* Thu Apr 09 2020 Björn Esser - 3.17.1-1 +- Update to cmake-3.17.1 + +* Tue Mar 24 2020 Rex Dieter - 3.17.0-1 +- Update to cmake-3.17.0 + +* Fri Mar 13 2020 Björn Esser - 3.17.0-0.4.rc3 +- Update to 3.17.0-rc3 + +* Tue Mar 03 2020 Björn Esser - 3.17.0-0.3.rc2 +- Update to 3.17.0-rc2 + +* Thu Feb 27 2020 Orion Poplawski - 3.17.0-0.2.rc1 +- Use python3 for rpm generators +- Use lowercase names for cmake provides in generator (in addition to old names) + +* Mon Feb 17 2020 Björn Esser - 3.17.0-0.1.rc1 +- Update to 3.17.0-rc1 + +* Wed Feb 05 2020 Björn Esser - 3.16.4-1 +- Update to 3.16.4 + +* Tue Jan 28 2020 Fedora Release Engineering - 3.16.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Jan 22 2020 Björn Esser - 3.16.3-1 +- Update to 3.16.3 + +* Wed Jan 15 2020 Björn Esser - 3.16.2-1 +- Update to 3.16.2 +- Use %%_vpath_builddir for out-of-tree build +- Use %%set_build_flags to export build flags if available +- Use %%set_build_flags inside macros.cmake if available + +* Tue Jan 14 2020 Miro Hrončok - 3.16.1-2 +- FindPython: Add support for version 3.9 + +* Sat Dec 14 2019 Björn Esser - 3.16.1-1 +- Update to 3.16.1 +- Re-enable test "kwsys.testProcess-5" on S390X + +* Tue Nov 26 2019 Björn Esser - 3.16.0-1 +- Update to 3.16.0 +- Exclude test "kwsys.testProcess-5" on S390X + +* Mon Nov 18 2019 Orion Poplawski - 3.16.0-0.1.rc4 +- Update to 3.16.0-rc4 +- Cleanup %%check + +* Thu Nov 14 2019 Björn Esser - 3.15.5-2 +- Rebuild (jsoncpp) +- Exclude more tests failing on s390x + +* Wed Oct 30 2019 Orion Poplawski - 3.15.5-1 +- Update to 3.15.5 + +* Wed Oct 16 2019 Orion Poplawski - 3.15.4-1 +- Update to 3.15.4 + +* Mon Sep 30 2019 Orion Poplawski - 3.15.3-1 +- Update to 3.15.3 + +* Wed Jul 24 2019 Fedora Release Engineering - 3.14.5-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Wed Jul 03 2019 Björn Esser - 3.14.5-3 +- Rebuild (jsoncpp), qt5 enabled + +* Wed Jul 03 2019 Björn Esser - 3.14.5-2 +- Rebuild (jsoncpp), bootstrap without qt5 +- Ignore a test failing with rpm-4.15 + +* Fri May 31 2019 Björn Esser - 3.14.5-1 +- 3.14.5 + +* Tue May 14 2019 Björn Esser - 3.14.4-1 +- 3.14.4 + +* Mon Apr 22 2019 Björn Esser - 3.14.3-1 +- 3.14.3 + +* Fri Apr 12 2019 Björn Esser - 3.14.2-1 +- 3.14.2 + +* Fri Mar 29 2019 Björn Esser - 3.14.1-1 +- 3.14.1 + +* Thu Mar 28 2019 Rex Dieter - 3.14.0-2 +- pull in upstream fix for conflict with ECM/FindFontConfig + +* Fri Mar 15 2019 Björn Esser - 3.14.0-1 +- 3.14.0 + +* Sat Feb 2 2019 Orion Poplawski - 3.13.4-1 +- 3.13.4 + +* Thu Jan 31 2019 Fedora Release Engineering - 3.13.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Wed Jan 16 2019 Rex Dieter - 3.13.3-1 +- 3.13.3 + +* Fri Dec 14 2018 Rex Dieter - 3.13.2-1 +- 3.13.2 -* Fri Jan 24 2020 Tom Stellard - 3.11.4-6 -- Correctly fix mpi detection +* Sat Dec 08 2018 Rex Dieter - 3.13.1-2 +- macros.cmake: introduce %%_cmake_shared_libs macro -* Thu Jan 23 2020 Tom Stellard - 3.11.4-5 -- Remove usage of list(JOIN) from previous fix +* Wed Nov 28 2018 Rex Dieter - 3.13.1-1 +- 3.13.1 -* Wed Nov 27 2019 Tom Stellard - 3.11.4-4 -- Fix bug with mpi detection +* Sat Sep 08 2018 Rex Dieter - 3.12.2-1 +- Update to 3.12.2 -* Sat Aug 4 2018 Florian Weimer - 3.11.4-3 -- Adjust to new libuv header location (#1611710) +* Fri Aug 17 2018 Rex Dieter - 3.12.1-1 +- Update to 3.12.1 (# 1614572) -* Mon Jul 09 2018 Tom Stellard - 3.11.4-2 -- Use bundled librhash +* Fri Jul 27 2018 Rex Dieter - 3.12.0-1 +- Update to 3.12.0 (#1584925) +- fixes libuv-related FTBFS (#1603661) +- use %%_metainfodir -* Fri Jul 06 2018 Tom Stellard 3.11.4-1 -- Update to 3.11.4 +* Thu Jul 12 2018 Fedora Release Engineering - 3.11.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild -* Mon Jul 02 2018 Tom Stellard - 3.11.0-3 -- Use bundled jsoncpp +* Tue Jun 19 2018 Miro Hrončok - 3.11.2-2 +- Rebuilt for Python 3.7 -* Tue Jun 05 2018 Patsy Franklin - 3.11.0-2 -- Choose correct version of python to use. Require the correct - sphinx build depending on which python we choose. (#1583117) +* Fri May 18 2018 Björn Esser - 3.11.2-1 +- Update to 3.11.2 (#1568630) * Thu Mar 29 2018 Björn Esser - 3.11.0-1 - Update to 3.11.0 (#1536233)