From f71762392dde00b4a7ce8eda7d8f6e90d21496a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Thu, 8 Jun 2023 20:51:55 +0200 Subject: [PATCH] Use CMake-provided cppdap It is currently shipped as a static lib from the upstream developers, and for that reason we do not have it in the repos. --- ...o-system-cppdap-configuration-switch.patch | 42 +++++++++++++++++++ cmake.spec | 15 +++++++ 2 files changed, 57 insertions(+) create mode 100644 0001-bootstrap-Add-no-system-cppdap-configuration-switch.patch diff --git a/0001-bootstrap-Add-no-system-cppdap-configuration-switch.patch b/0001-bootstrap-Add-no-system-cppdap-configuration-switch.patch new file mode 100644 index 0000000..f5d8fcb --- /dev/null +++ b/0001-bootstrap-Add-no-system-cppdap-configuration-switch.patch @@ -0,0 +1,42 @@ +From 3e4cc3841006819dfefe6f0735b4f120f8d4f8f8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= +Date: Thu, 8 Jun 2023 20:44:46 +0200 +Subject: [PATCH] bootstrap: Add --(no-)system-cppdap configuration switch. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Björn Esser +--- + bootstrap | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/bootstrap b/bootstrap +index 109e450548..cc604256d8 100755 +--- a/bootstrap ++++ b/bootstrap +@@ -667,6 +667,8 @@ Configuration: + (for use only by package maintainers) + --no-system-libs use all cmake-provided third-party libraries + (default) ++ --system-cppdap use system-installed cppdap library ++ --no-system-cppdap use cmake-provided cppdap library (default) + --system-curl use system-installed curl library + --no-system-curl use cmake-provided curl library (default) + --system-expat use system-installed expat library +@@ -954,10 +956,10 @@ while test $# != 0; do + --init=*) cmake_init_file=`cmake_arg "$1"` ;; + --system-libs) cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARIES=1" ;; + --no-system-libs) cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARIES=0" ;; +- --system-bzip2|--system-curl|--system-expat|--system-jsoncpp|--system-libarchive|--system-librhash|--system-zlib|--system-liblzma|--system-nghttp2|--system-zstd|--system-libuv) ++ --system-bzip2|--system-cppdap|--system-curl|--system-expat|--system-jsoncpp|--system-libarchive|--system-librhash|--system-zlib|--system-liblzma|--system-nghttp2|--system-zstd|--system-libuv) + lib=`cmake_arg "$1" "--system-"` + cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARY_`cmake_toupper $lib`=1" ;; +- --no-system-bzip2|--no-system-curl|--no-system-expat|--no-system-jsoncpp|--no-system-libarchive|--no-system-librhash|--no-system-zlib|--no-system-liblzma|--no-system-nghttp2|--no-system-zstd|--no-system-libuv) ++ --no-system-bzip2|--no-system-cppdap|--no-system-curl|--no-system-expat|--no-system-jsoncpp|--no-system-libarchive|--no-system-librhash|--no-system-zlib|--no-system-liblzma|--no-system-nghttp2|--no-system-zstd|--no-system-libuv) + lib=`cmake_arg "$1" "--no-system-"` + cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARY_`cmake_toupper $lib`=0" ;; + --bootstrap-system-libuv) bootstrap_system_libuv="1" ;; +-- +2.40.1 + diff --git a/cmake.spec b/cmake.spec index c1d4503..4c5264f 100644 --- a/cmake.spec +++ b/cmake.spec @@ -42,6 +42,10 @@ %bcond_without bundled_rhash %endif +# cppdap is currently shipped as a static lib from upstream, +# so we do not have it in the repos. +%bcond_without bundled_cppdap + # Run tests %bcond_without test @@ -110,6 +114,8 @@ Source5: %{name}.req # http://public.kitware.com/Bug/view.php?id=12965 # https://bugzilla.redhat.com/show_bug.cgi?id=822796 Patch100: %{name}-findruby.patch +# https://gitlab.kitware.com/cmake/cmake/-/merge_requests/8550 +Patch101: 0001-bootstrap-Add-no-system-cppdap-configuration-switch.patch # Patch for renaming on EPEL %if 0%{?name_suffix:1} @@ -139,6 +145,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) @@ -303,6 +314,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 @@ -528,6 +542,7 @@ popd %changelog * Thu Jun 08 2023 Björn Esser - 3.27.0~rc1-1 - cmake-3.27.0-rc1 +- Use CMake-provided cppdap * Thu Jun 01 2023 Björn Esser - 3.26.4-4 - Backport several bugfixes and support for Boost v1.82 from upstream