diff --git a/cmake-3.26.3.tar.gz b/cmake-3.30.5.tar.gz similarity index 55% rename from cmake-3.26.3.tar.gz rename to cmake-3.30.5.tar.gz index ceac4038c14f26fd69b464b94983af15c56ea18f..c65c24e7e05293ddf4d00d01bb294bee7160b0a2 100644 Binary files a/cmake-3.26.3.tar.gz and b/cmake-3.30.5.tar.gz differ diff --git a/cmake-findruby.patch b/cmake-findruby.patch index 23966a22421f334e24373a1e43c920b3aaf40e92..72a8b258010a37de756bacc55502230ba7cc84d2 100644 --- a/cmake-findruby.patch +++ b/cmake-findruby.patch @@ -1,8 +1,8 @@ -Index: cmake-3.22.0-rc1/Modules/FindRuby.cmake +Index: cmake-3.23.0-rc2/Modules/FindRuby.cmake =================================================================== ---- cmake-3.22.0-rc1.orig/Modules/FindRuby.cmake -+++ cmake-3.22.0-rc1/Modules/FindRuby.cmake -@@ -304,14 +304,9 @@ if(Ruby_EXECUTABLE AND NOT Ruby_VERSION_ +--- cmake-3.23.0-rc2.orig/Modules/FindRuby.cmake ++++ cmake-3.23.0-rc2/Modules/FindRuby.cmake +@@ -315,14 +315,9 @@ if(Ruby_EXECUTABLE AND NOT Ruby_VERSION_ _RUBY_CONFIG_VAR("sitearchdir" Ruby_SITEARCH_DIR) _RUBY_CONFIG_VAR("sitelibdir" Ruby_SITELIB_DIR) diff --git a/cmake-mingw-dl.patch b/cmake-mingw-dl.patch deleted file mode 100644 index 8b0135ee7621277c250b8d8a27b698a7a060e115..0000000000000000000000000000000000000000 --- a/cmake-mingw-dl.patch +++ /dev/null @@ -1,18 +0,0 @@ -Index: cmake-3.22.0-rc1/Modules/Platform/Windows-GNU.cmake -=================================================================== ---- cmake-3.22.0-rc1.orig/Modules/Platform/Windows-GNU.cmake -+++ cmake-3.22.0-rc1/Modules/Platform/Windows-GNU.cmake -@@ -24,11 +24,11 @@ set(CMAKE_STATIC_LIBRARY_SUFFIX ".a") - set(CMAKE_EXTRA_LINK_EXTENSIONS ".lib") # MinGW can also link to a MS .lib - - 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 "") -+set(CMAKE_DL_LIBS "dl") - 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 diff --git a/cmake.spec b/cmake.spec index d634e4f68e8b3607a493a96389eab567aa85ba5f..cec14deaa0629ec1a54141f3eff1604f2c76967d 100644 --- a/cmake.spec +++ b/cmake.spec @@ -7,10 +7,14 @@ %bcond_without sphinx %bcond_without bundled_jsoncpp %bcond_without bundled_rhash +%bcond_without bundled_cppdap %bcond_without test %bcond_without X11_test -%global optflags %(echo '%{optflags}' | sed -e 's!-ffat-lto-objects!-fno-fat-lto-objects!g') +%global build_cflags %(echo '%{build_cflags}' | sed -e 's!-ffat-lto-objects!-fno-fat-lto-objects!g') +%global build_cxxflags %(echo '%{build_cxxflags}' | sed -e 's!-ffat-lto-objects!-fno-fat-lto-objects!g') +%global build_fflags %(echo '%{build_fflags}' | sed -e 's!-ffat-lto-objects!-fno-fat-lto-objects!g') +%global build_fcflags %(echo '%{build_fflags}' | sed -e 's!-ffat-lto-objects!-fno-fat-lto-objects!g') %global rpm_macros_dir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) @@ -19,24 +23,37 @@ %{!?_vpath_builddir:%global _vpath_builddir %{_target_platform}} %global major_version 3 -%global minor_version 26 +%global minor_version 30 +%global patch_version 5 + +%if 0%{?rcsuf:1} +%global pkg_version %{major_version}.%{minor_version}.%{patch_version}~%{rcsuf} +%global tar_version %{major_version}.%{minor_version}.%{patch_version}-%{rcsuf} +%else +%global pkg_version %{major_version}.%{minor_version}.%{patch_version} +%global tar_version %{major_version}.%{minor_version}.%{patch_version} +%endif Name: cmake -Version: 3.26.3 -Release: %{anolis_release}%{?dist} +Version: %{pkg_version} +Release: %{anolis_release}%{?dist} Summary: Cross-platform make system -License: BSD and MIT and zlib +# most sources are BSD +# Source/CursesDialog/form/ a bunch is MIT +# Source/kwsys/MD5.c is zlib +# some GPL-licensed bison-generated files, which all include an +# exception granting redistribution under terms of your choice +License: BSD-3-Clause AND MIT-open-group AND Zlib%{?with_bundled_cppdap: AND Apache-2.0} URL: http://www.cmake.org -Source0: http://www.cmake.org/files/v%{major_version}.%{minor_version}/%{name}-%{version}.tar.gz +Source0: http://www.cmake.org/files/v%{major_version}.%{minor_version}/%{name}-%{tar_version}.tar.gz Source1: %{name}-init.el -Source2: macros.%{name} +Source2: macros.%{name}.in Source3: %{name}.attr Source4: %{name}.prov Source5: %{name}.req Patch100: %{name}-findruby.patch -Patch102: %{name}-mingw-dl.patch BuildRequires: coreutils BuildRequires: findutils @@ -60,6 +77,11 @@ BuildRequires: %{_bindir}/sphinx-build %if %{without bootstrap} BuildRequires: bzip2-devel BuildRequires: curl-devel +%if %{with bundled_cppdap} +Provides: bundled(cppdap) +%else +BuildRequires: cppdap-devel +%endif BuildRequires: expat-devel %if %{with bundled_jsoncpp} Provides: bundled(jsoncpp) @@ -97,13 +119,16 @@ BuildRequires: %{name}-rpm-macros BuildRequires: make Requires: %{name}-data = %{version}-%{release} -Requires: %{name}-rpm-macros = %{version}-%{release} -Requires: %{name}-filesystem = %{version}-%{release} +Requires: (%{name}-rpm-macros = %{version}-%{release} if rpm-build) +Requires: %{name}-filesystem%{?_isa} = %{version}-%{release} + +# Explicitly require make. (rhbz#1862014) Requires: make -Provides: %{name}%{major_version} = %{version}-%{release} -Provides: bundled(md5-deutsch) -Provides: bundled(kwsys) +# Provide the major version name +Provides: %{name}%{major_version} = %{version}-%{release} +Provides: bundled(md5-deutsch) +Provides: bundled(kwsys) %description CMake is used to control the software compilation process using simple @@ -118,7 +143,7 @@ generation, code generation, and template instantiation. Summary: Common data-files for %{name} Requires: %{name} = %{version}-%{release} Requires: %{name}-filesystem = %{version}-%{release} -Requires: %{name}-rpm-macros = %{version}-%{release} +Requires: (%{name}-rpm-macros = %{version}-%{release} if rpm-build) %if %{with emacs} Requires: emacs-filesystem%{?_emacs_version: >= %{_emacs_version}} %endif @@ -149,9 +174,9 @@ This package owns all directories used by CMake modules. %package gui Summary: Qt GUI for %{name} -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} Requires: hicolor-icon-theme -Requires: shared-mime-info +Requires: shared-mime-info%{?_isa} %description gui The %{name}-gui package contains the Qt based GUI for %{name}. @@ -161,6 +186,8 @@ The %{name}-gui package contains the Qt based GUI for %{name}. %package rpm-macros Summary: Common RPM macros for %{name} Requires: rpm +# when subpkg introduced +Conflicts: cmake-data < 3.10.1-2 BuildArch: noarch @@ -169,23 +196,16 @@ This package contains common RPM macros for %{name}. %prep -%autosetup -n %{name}-%{version} -p 1 +%autosetup -n %{name}-%{tar_version} -p 1 echo '#!%{__python3}' > %{name}.prov echo '#!%{__python3}' > %{name}.req tail -n +2 %{SOURCE4} >> %{name}.prov tail -n +2 %{SOURCE5} >> %{name}.req + %build -%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} @@ -195,6 +215,9 @@ $SRCDIR/bootstrap --prefix=%{_prefix} \ --mandir=/share/man \ --%{?with_bootstrap:no-}system-libs \ --parallel="$(echo %{?_smp_mflags} | sed -e 's|-j||g')" \ +%if %{with bundled_cppdap} + --no-system-cppdap \ +%endif %if %{with bundled_rhash} --no-system-librhash \ %endif @@ -224,9 +247,11 @@ 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} %if %{with emacs} +# Install emacs cmake mode mkdir -p %{buildroot}%{_emacs_sitelispdir}/%{name} %{buildroot}%{_emacs_sitestartdir} mv %{buildroot}%{_emacs_sitelispdir}/%{name}-mode.el %{buildroot}%{_emacs_sitelispdir}/%{name} %{_emacs_bytecompile} %{buildroot}%{_emacs_sitelispdir}/%{name}/%{name}-mode.el @@ -234,7 +259,7 @@ install -p -m 0644 %{SOURCE1} %{buildroot}%{_emacs_sitestartdir} %else rm -f %{buildroot}%{_emacs_sitelispdir} %endif - +# RPM macros install -p -m0644 -D %{SOURCE2} %{buildroot}%{rpm_macros_dir}/macros.%{name} sed -i -e "s|@@CMAKE_VERSION@@|%{version}|" -e "s|@@CMAKE_MAJOR_VERSION@@|%{major_version}|" %{buildroot}%{rpm_macros_dir}/macros.%{name} touch -r %{SOURCE2} %{buildroot}%{rpm_macros_dir}/macros.%{name} @@ -249,6 +274,10 @@ do dname=$(basename $dir) cp -p $f ./${fname}_${dname} done +%if %{with bundled_cppdap} +cp -p Utilities/cmcppdap/LICENSE LICENSE.cppdap +cp -p Utilities/cmcppdap/NOTICE NOTICE.cppdap +%endif %if %{with sphinx} mv %{buildroot}%{_docdir}/%{name}/html . %endif @@ -281,20 +310,29 @@ find %{buildroot}%{_bindir} -type f -or -type l -or -xtype l | \ %check pushd %{_vpath_builddir} NO_TEST="CTestTestUpload" -NO_TEST="$NO_TEST|CustomCommand|CMakeLib.testCTestResourceAllocator" -NO_TEST="$NO_TEST|CMakeLib.testCTestResourceSpec|RunCMake.PositionIndependentCode" -NO_TEST="$NO_TEST|CPackComponentsForAll-RPM-IgnoreGroup" +NO_TEST="$NO_TEST|CustomCommand|RunCMake.PositionIndependentCode" +NO_TEST="$NO_TEST|CPackComponentsForAll-RPM-default" +NO_TEST="$NO_TEST|CPackComponentsForAll-RPM-OnePackPerGroup" +NO_TEST="$NO_TEST|CPackComponentsForAll-RPM-AllInOne" %if %{with bootstrap} NO_TEST="$NO_TEST|curl" %endif +%ifarch riscv64 +NO_TEST="$NO_TEST|Qt5Autogen.ManySources|Qt5Autogen.MocInclude|Qt5Autogen.MocIncludeSymlink" +%endif bin/ctest%{?name_suffix} %{?_smp_mflags} -V -E "$NO_TEST" --output-on-failure popd %endif + %files -f lib_files.mf %doc %dir %{_pkgdocdir} %license Copyright.txt* %license COPYING* +%if %{with bundled_cppdap} +%license LICENSE.cppdap +%license NOTICE.cppdap +%endif %if %{with sphinx} %{_mandir}/man1/c%{name}.1.* %{_mandir}/man1/%{name}.1.* @@ -314,8 +352,14 @@ popd %{vimfiles_root}/indent/%{name}.vim %{vimfiles_root}/syntax/%{name}.vim + %files doc -%license %{_datadir}/licenses/%{name} +%license Copyright.txt* +%license COPYING* +%if %{with bundled_cppdap} +%license LICENSE.cppdap +%license NOTICE.cppdap +%endif %doc %{_pkgdocdir} %files filesystem -f data_dirs.mf -f lib_dirs.mf @@ -324,7 +368,7 @@ popd %files gui %{_bindir}/%{name}-gui %{_datadir}/applications/%{name}-gui.desktop -%{_datadir}/mime/packages/*.xml +%{_datadir}/mime/packages %{_datadir}/icons/hicolor/*/apps/CMake%{?name_suffix}Setup.png %if %{with sphinx} %{_mandir}/man1/%{name}-gui.1.* @@ -338,6 +382,9 @@ popd %{_rpmconfigdir}/%{name}.req %changelog +* Thu Feb 27 2025 Zhao Hang - 3.30.5-1 +- Refer to CentOS Stream cmake-3.30.5-2 (tdawson@redhat.com) + * Wed Apr 5 2023 Funda Wang - 3.26.3-1 - New version 3.26.3 diff --git a/macros.cmake b/macros.cmake.in similarity index 62% rename from macros.cmake rename to macros.cmake.in index 81ef90a9125bb52c160d874edb610001112db1d5..675ca908330a77df82cb9b3d13e20f340b7d0cf4 100644 --- a/macros.cmake +++ b/macros.cmake.in @@ -9,23 +9,16 @@ %__ctest /usr/bin/ctest %__cmake_builddir %{!?__cmake_in_source_build:%{_vpath_builddir}}%{?__cmake_in_source_build:.} + # - 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 +# 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 # - Turn off stripping by default so RPM can do it separately # - 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 \ + %{set_build_flags} \ %__cmake \\\ %{!?__cmake_in_source_build:-S "%{_vpath_srcdir}"} \\\ %{!?__cmake_in_source_build:-B "%{__cmake_builddir}"} \\\ @@ -35,14 +28,6 @@ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \\\ -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF \\\ -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \\\ - -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \\\ - -DCMAKE_INSTALL_FULL_LIBDIR:PATH=%{_libdir} \\\ - -DCMAKE_INSTALL_LIBEXECDIR:PATH=libexec \\\ - -DCMAKE_INSTALL_FULL_LIBEXECDIR:PATH=%{_libexecdir} \\\ - -DCMAKE_INSTALL_RUNSTATEDIR:PATH=%{_rundir} \\\ - -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=%{_localstatedir} \\\ - -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=%{_sharedstatedir} \\\ - -DCMAKE_INSTALL_SYSCONFDIR:PATH=%{_sysconfdir} \\\ -DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \\\ -DLIB_INSTALL_DIR:PATH=%{_libdir} \\\ -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \\\ @@ -58,13 +43,18 @@ %cmake_install \ DESTDIR="%{buildroot}" %__cmake --install "%{__cmake_builddir}" -%ctest(:-:) \ - cd "%{__cmake_builddir}" \ - %__ctest --output-on-failure --force-new-ctest-process %{?_smp_mflags} %{**} \ - cd - +%ctest(:-:h:j:u:v:A:C:D:E:F:H:I:L:M:N:O:Q:R:S:T:U:V:) \ + %__ctest --test-dir "%{__cmake_builddir}" \\\ + --output-on-failure \\\ + --force-new-ctest-process \\\ +%ifarch riscv64 \ + --timeout 6000 \\\ +%endif \ + %{?_smp_mflags} %{**} %cmake@@CMAKE_MAJOR_VERSION@@ %cmake %cmake@@CMAKE_MAJOR_VERSION@@_build %cmake_build %cmake@@CMAKE_MAJOR_VERSION@@_install %cmake_install -%ctest@@CMAKE_MAJOR_VERSION@@(:-:) %ctest %{**} +%ctest@@CMAKE_MAJOR_VERSION@@(:-:h:j:u:v:A:C:D:E:F:H:I:L:M:N:O:Q:R:S:T:U:V:) \ + %ctest %{**}