diff --git a/cmake-findruby.patch b/cmake-findruby.patch index 14cb332..8a06752 100644 --- a/cmake-findruby.patch +++ b/cmake-findruby.patch @@ -1,8 +1,8 @@ -Index: cmake-3.31.0/Modules/FindRuby.cmake +Index: cmake-3.31.4/Modules/FindRuby.cmake =================================================================== ---- cmake-3.31.0.orig/Modules/FindRuby.cmake -+++ cmake-3.31.0/Modules/FindRuby.cmake -@@ -312,14 +312,9 @@ if(Ruby_EXECUTABLE AND NOT Ruby_VERSION_ +--- cmake-3.31.4.orig/Modules/FindRuby.cmake ++++ cmake-3.31.4/Modules/FindRuby.cmake +@@ -307,14 +307,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.spec b/cmake.spec index 20b219c..0bd47ae 100644 --- a/cmake.spec +++ b/cmake.spec @@ -58,9 +58,6 @@ %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') -# Place rpm-macros into proper location -%global rpm_macros_dir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) - # Setup _pkgdocdir if not defined already %{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}} @@ -69,10 +66,10 @@ %global major_version 3 %global minor_version 31 -%global patch_version 1 +%global patch_version 10 # For handling bump release by rpmdev-bumpspec and mass rebuild -%global baserelease 1 +%global baserelease 3 # Set to RC version if building RC, else comment out. #%%global rcsuf rc3 @@ -104,10 +101,11 @@ URL: http://www.cmake.org Source0: http://www.cmake.org/files/v%{major_version}.%{minor_version}/%{orig_name}-%{tar_version}.tar.gz Source1: %{name}-init.el Source2: macros.%{name}.in +Source3: macros.aaa-%{name}-srpm # See https://bugzilla.redhat.com/show_bug.cgi?id=1202899 -Source3: %{name}.attr -Source4: %{name}.prov -Source5: %{name}.req +Source4: %{name}.attr +Source5: %{name}.prov +Source6: %{name}.req # Always start regular patches with numbers >= 100. # We need lower numbers for patches in compat package. @@ -288,6 +286,16 @@ BuildArch: noarch This package contains common RPM macros for %{name}. +%package srpm-macros +Summary: Common SRPM macros for %{name} +Requires: rpm + +BuildArch: noarch + +%description srpm-macros +This package contains common SRPM macros for %{name}. + + %package -n python3-cmake Summary: Python metadata for packages depending on %{name} Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} @@ -310,8 +318,8 @@ echo '#!%{__python3}' > %{name}.req echo '#!%{__python2}' > %{name}.prov echo '#!%{__python2}' > %{name}.req %endif -tail -n +2 %{SOURCE4} >> %{name}.prov -tail -n +2 %{SOURCE5} >> %{name}.req +tail -n +2 %{SOURCE5} >> %{name}.prov +tail -n +2 %{SOURCE6} >> %{name}.req %endif @@ -387,12 +395,13 @@ install -p -m 0644 %{SOURCE1} %{buildroot}%{_emacs_sitestartdir} 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} +install -p -m0644 -D %{SOURCE2} %{buildroot}%{_rpmmacrodir}/macros.%{name} +install -p -m0644 -D %{SOURCE3} %{buildroot}%{_rpmmacrodir}/macros.aaa-%{name}-srpm +sed -i -e "s|@@CMAKE_VERSION@@|%{version}|" -e "s|@@CMAKE_MAJOR_VERSION@@|%{major_version}|" %{buildroot}%{_rpmmacrodir}/macros.%{name} +touch -r %{SOURCE2} %{buildroot}%{_rpmmacrodir}/macros.%{name} %if %{with rpm} && 0%{?_rpmconfigdir:1} # RPM auto provides -install -p -m0644 -D %{SOURCE3} %{buildroot}%{_prefix}/lib/rpm/fileattrs/%{name}.attr +install -p -m0644 -D %{SOURCE4} %{buildroot}%{_prefix}/lib/rpm/fileattrs/%{name}.attr install -p -m0755 -D %{name}.prov %{buildroot}%{_prefix}/lib/rpm/%{name}.prov install -p -m0755 -D %{name}.req %{buildroot}%{_prefix}/lib/rpm/%{name}.req %endif @@ -575,19 +584,69 @@ popd %files rpm-macros -%{rpm_macros_dir}/macros.%{name} +%{_rpmmacrodir}/macros.%{name} %if %{with rpm} && 0%{?_rpmconfigdir:1} %{_rpmconfigdir}/fileattrs/%{name}.attr %{_rpmconfigdir}/%{name}.prov %{_rpmconfigdir}/%{name}.req %endif +%files srpm-macros +%{_rpmmacrodir}/macros.aaa-%{name}-srpm + %files -n python3-cmake %{python3_sitelib}/%{cmake_distinfo} %changelog +* Fri Dec 12 2025 Miro Hrončok - 3.31.10-3 +- Declarative %%generate_buildrequires: Keep the BRs stable + +* Thu Dec 11 2025 Neal Gompa - 3.31.10-2 +- macros: Enable support for RPM 4.20+ declarative buildsystem feature + +* Tue Dec 02 2025 Yaakov Selkowitz - 3.31.10-1 +- Update to 3.31.10 + +* Wed Jul 23 2025 Fedora Release Engineering - 3.31.6-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Tue Jun 03 2025 Python Maint - 3.31.6-3 +- Rebuilt for Python 3.14 + +* Tue Mar 18 2025 Yaakov Selkowitz - 3.31.6-2 +- Revert to 3.31.6 +- Rebuild (jsoncpp) +- Fix build with latest curl + +* Mon Feb 24 2025 Björn Esser - 3.31.6-1 +- cmake-3.31.6 + Fixes rhbz#2347346 + +* Fri Jan 24 2025 Björn Esser - 3.31.5-1 +- cmake-3.31.5 + Fixes rhbz#2341786 + +* Thu Jan 23 2025 Orion Poplawski - 3.31.4-3 +- Define CMAKE_INSTALL_FULL_SBINDIR/CMAKE_INSTALL_SBINDIR to help with sbin + merge + +* Thu Jan 16 2025 Fedora Release Engineering - 3.31.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Sun Jan 12 2025 Björn Esser - 3.31.4-1 +- cmake-3.31.4 + Fixes rhbz#2336980 + +* Sun Dec 22 2024 Björn Esser - 3.31.3-1 +- cmake-3.31.3 + Fixes rhbz#2333376 + +* Thu Dec 05 2024 Björn Esser - 3.31.2-1 +- cmake-3.31.2 + Fixes rhbz#2330603 + * Sun Dec 01 2024 Björn Esser - 3.31.1-1 - cmake-3.31.1 Fixes rhbz#2324190 diff --git a/macros.aaa-cmake-srpm b/macros.aaa-cmake-srpm new file mode 100644 index 0000000..e62f0fb --- /dev/null +++ b/macros.aaa-cmake-srpm @@ -0,0 +1,12 @@ +# Declarative buildsystem macros (usable with rpm >= 4.20) +# https://rpm-software-management.github.io/rpm/manual/buildsystem.html + +# When this file is installed but macros.cmake is not, +# this macro will just cause the real macros to get installed. +%cmake_generate_buildrequires(-) echo "cmake-rpm-macros" + +%buildsystem_cmake_generate_buildrequires() %cmake_generate_buildrequires %{*} +%buildsystem_cmake_conf() %{nil} +%buildsystem_cmake_build() %{nil} +%buildsystem_cmake_install() %{nil} +%buildsystem_cmake_check() %{nil} diff --git a/macros.cmake.in b/macros.cmake.in index fa7e967..3eb0ef5 100644 --- a/macros.cmake.in +++ b/macros.cmake.in @@ -28,6 +28,8 @@ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \\\ -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF \\\ -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \\\ + -DCMAKE_INSTALL_FULL_SBINDIR:PATH=%{_sbindir} \\\ + -DCMAKE_INSTALL_SBINDIR:PATH=%(s=%{_sbindir}; echo ${s##*/}) \\\ -DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \\\ -DLIB_INSTALL_DIR:PATH=%{_libdir} \\\ -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \\\ @@ -54,6 +56,19 @@ %{lua:print((string.gsub(rpm.expand('%{**}'),"%-%-%s","")))} +# Declarative buildsystem macros (usable with rpm >= 4.20) +# https://rpm-software-management.github.io/rpm/manual/buildsystem.html +%cmake_generate_buildrequires(-) echo "cmake-rpm-macros"; echo "cmake" + +%buildsystem_cmake_generate_buildrequires() %cmake_generate_buildrequires %{*} +%buildsystem_cmake_conf() %cmake %{*} +%buildsystem_cmake_build() %cmake_build %{*} +%buildsystem_cmake_install() %cmake_install %{*} +%buildsystem_cmake_check() %{?with_ctest:%ctest %{*}} %{!?with_ctest:%{nil}} + + +# Legacy cmakeX macros for multiversioned CMake + %cmake@@CMAKE_MAJOR_VERSION@@ %cmake %cmake@@CMAKE_MAJOR_VERSION@@_build %cmake_build %cmake@@CMAKE_MAJOR_VERSION@@_install %cmake_install diff --git a/sources b/sources index 47a512d..5f1214c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cmake-3.31.1.tar.gz) = 9c4664792b32b1fa76aa66c5211e8a0a1fed380eb48ff605adb516d056ae3ab94859cf4103d86b83e220baba3ec5b763b454b6866d6bd606fc558fa3da75b146 +SHA512 (cmake-3.31.10.tar.gz) = ae1eed42c143b5afd70124853367dab130b3a668fd161a8fd794a44d2eb42f0a64367d152eb43edbf167ffa95612ffe10f8f18c6db9410ff473b97d4f04a978e diff --git a/tests/cmake-testsuite-sanity/runtest.sh b/tests/cmake-testsuite-sanity/runtest.sh index 5853dbf..5753827 100755 --- a/tests/cmake-testsuite-sanity/runtest.sh +++ b/tests/cmake-testsuite-sanity/runtest.sh @@ -57,8 +57,9 @@ rlJournalStart rlRun "dnf builddep -y $TmpDir/SPECS/*.spec" rlRun "su -c 'rpmbuild -D \"_topdir $TmpDir\" -bp $TmpDir/SPECS/*.spec &>$TmpDir/rpmbuild.log' $BUILD_USER" rlRun "rlFileSubmit $TmpDir/rpmbuild.log" - rlRun "CMakeDir=`ls $TmpDir/BUILD | grep -E '^cmake-[0-9]+(\.[0-9]+)+(-rc[0-9]+)?$' | tail -n 1`" - rlRun "cd $TmpDir/BUILD/$CMakeDir" + rlRun "BuildDir=`rpmbuild -D \"_topdir $TmpDir\" -bc --short-circuit --define '__spec_build_pre echo %{_builddir}; exit 0' $TmpDir/SPECS/*.spec | tail -1`" + rlRun "CMakeDir=`ls $BuildDir | grep -E '^cmake-[0-9]+(\.[0-9]+)+(-rc[0-9]+)?$' | tail -n 1`" + rlRun "cd $BuildDir/$CMakeDir" rlRun "su -c './bootstrap &>$TmpDir/bootstrap.log' $BUILD_USER" rlRun "rlFileSubmit $TmpDir/bootstrap.log" rlRun "ln -fs /usr/bin/cmake bin/cmake"