From dd41aea1b67a4884e4cb789a0f3023f7061e83f4363803c5462db24c56003189 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 30 Jan 2020 10:28:01 +0000 Subject: [PATCH 1/6] Accepting request 764792 from home:cjunghans:branches:devel:tools:building - use cmake generics in marcos.cmake OBS-URL: https://build.opensuse.org/request/show/764792 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/cmake?expand=0&rev=393 --- cmake.changes | 5 +++++ cmake.macros | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/cmake.changes b/cmake.changes index c71f4be..71425d9 100644 --- a/cmake.changes +++ b/cmake.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jan 14 23:14:08 UTC 2020 - Christoph Junghans + +- use cmake generics in marcos.cmake + ------------------------------------------------------------------- Fri Dec 20 10:09:57 UTC 2019 - Christoph G diff --git a/cmake.macros b/cmake.macros index 98aca97..562c110 100644 --- a/cmake.macros +++ b/cmake.macros @@ -7,6 +7,14 @@ %__builder %__make %__sourcedir . +%cmake_builder_deps() %{expand:\ +%if "%__builder" == "%__make" \ +BuildRequires: make \ +%else \ +BuildRequires: ninja \ +%endif \ +} + %cmake \ find %__sourcedir -name CMakeLists.txt \\\ -exec sed -i -re '/^[[:blank:]]*[sS][eE][tT][[:blank:]]*\\\([[:blank:]]*(CMAKE_BUILD_TYPE|CMAKE_COLOR_MAKEFILE|CMAKE_INSTALL_PREFIX|CMAKE_VERBOSE_MAKEFILE).*\\\)/{s/^/#IGNORE /}' {} + \ @@ -42,22 +50,14 @@ -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF \\\ -DCMAKE_MODULES_INSTALL_DIR=%{_datadir}/cmake/Modules -%__builder_verbose \ -%if "%__builder" == "%__make" \ - %{?_make_output_sync} VERBOSE=1 \\\ -%else \ - -v \\\ -%endif \ -%{nil} - -%cmake_build %__builder \\%__builder_verbose %{?_smp_mflags} +%cmake_build %__cmake --build . --verbose %{?_smp_mflags} %make_jobs \ echo "Deprecated %%make_jobs macro used, please use %%cmake_build" \ %cmake_build %cmake_install \ - DESTDIR=%{buildroot} %__builder install -C %__builddir + DESTDIR=%{buildroot} %__cmake --install %__builddir --verbose %ctest(:-:) \ cd %__builddir \ From 39b578c0fae56b307d90f1cdb622b17c224aa8016b99e5928dd2dfc5bc423490 Mon Sep 17 00:00:00 2001 From: Simon Lees Date: Wed, 5 Feb 2020 11:59:05 +0000 Subject: [PATCH 2/6] Accepting request 764183 from home:gladiac:branches:devel:tools:building - Fix setting CMAKE_INSTALL_LIBDIR in cmake macro * This is a relative path, see `cmake --help-module GNUInstallDirs` - Do NOT set -DCMAKE_SKIP_RPATH:BOOL=OFF * A lot of applications have private libraries in a subdirectory and require linking with RPATH which is totally valid. OBS-URL: https://build.opensuse.org/request/show/764183 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/cmake?expand=0&rev=394 --- cmake.changes | 9 +++++++++ cmake.macros | 3 +-- cmake.spec | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/cmake.changes b/cmake.changes index 71425d9..c5d371f 100644 --- a/cmake.changes +++ b/cmake.changes @@ -3,6 +3,15 @@ Tue Jan 14 23:14:08 UTC 2020 - Christoph Junghans - use cmake generics in marcos.cmake +------------------------------------------------------------------- +Tue Jan 14 07:36:33 UTC 2020 - Andreas Schneider + +- Fix setting CMAKE_INSTALL_LIBDIR in cmake macro + * This is a relative path, see `cmake --help-module GNUInstallDirs` +- Do NOT set -DCMAKE_SKIP_RPATH:BOOL=OFF + * A lot of applications have private libraries in a subdirectory + and require linking with RPATH which is totally valid. + ------------------------------------------------------------------- Fri Dec 20 10:09:57 UTC 2019 - Christoph G diff --git a/cmake.macros b/cmake.macros index 562c110..81772e4 100644 --- a/cmake.macros +++ b/cmake.macros @@ -31,7 +31,7 @@ BuildRequires: ninja \ -DLIB_INSTALL_DIR:PATH=%{_libdir} \\\ -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \\\ -DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \\\ - -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} \\\ + -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \\\ -DCMAKE_BUILD_TYPE=RelWithDebInfo \\\ -DCMAKE_C_FLAGS="${CFLAGS:-%optflags} -DNDEBUG" \\\ -DCMAKE_CXX_FLAGS="${CXXFLAGS:-%optflags} -DNDEBUG" \\\ @@ -42,7 +42,6 @@ BuildRequires: ninja \ %if "%{?_lib}" == "lib64" \ -DLIB_SUFFIX=64 \\\ %endif \ - -DCMAKE_SKIP_RPATH:BOOL=ON \\\ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \\\ -DBUILD_SHARED_LIBS:BOOL=ON \\\ -DBUILD_STATIC_LIBS:BOOL=OFF \\\ diff --git a/cmake.spec b/cmake.spec index a3430e8..41167bd 100644 --- a/cmake.spec +++ b/cmake.spec @@ -1,7 +1,7 @@ # # spec file for package cmake # -# Copyright (c) 2019 SUSE LLC +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed From d6ee93d6ec94727439a58aeccd861d69c12c2b45d5d3f07ce69e53f4d389a81a Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Wed, 5 Feb 2020 15:03:33 +0000 Subject: [PATCH 3/6] Accepting request 770285 from home:scarabeus_iv:branches:devel:tools:building - Add new -mini flavor in order to break up cycles * make sure the default cmake links now all system libraries and mini uses bundled stuff as needed - Switch to python3 variant of Sphinx on the manpage/docu creation OBS-URL: https://build.opensuse.org/request/show/770285 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/cmake?expand=0&rev=395 --- _multibuild | 1 + cmake.changes | 8 +++++ cmake.spec | 87 +++++++++++++++++++++++++++++---------------------- 3 files changed, 58 insertions(+), 38 deletions(-) diff --git a/_multibuild b/_multibuild index f2c6bd5..9b2cdbd 100644 --- a/_multibuild +++ b/_multibuild @@ -1,3 +1,4 @@ + mini gui diff --git a/cmake.changes b/cmake.changes index c5d371f..1a5ce8e 100644 --- a/cmake.changes +++ b/cmake.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Feb 5 12:50:16 UTC 2020 - Tomáš Chvátal + +- Add new -mini flavor in order to break up cycles + * make sure the default cmake links now all system libraries + and mini uses bundled stuff as needed +- Switch to python3 variant of Sphinx on the manpage/docu creation + ------------------------------------------------------------------- Tue Jan 14 23:14:08 UTC 2020 - Christoph Junghans diff --git a/cmake.spec b/cmake.spec index 41167bd..5c60737 100644 --- a/cmake.spec +++ b/cmake.spec @@ -18,16 +18,23 @@ %global flavor @BUILD_FLAVOR@%{nil} %if "%{flavor}" == "gui" -%define psuffix -gui +%define psuffix -ui %bcond_without gui %else -%define psuffix %{nil} %bcond_with gui %endif +%if "%{flavor}" == "mini" +%define psuffix -mini +%bcond_without mini +%else +%bcond_with mini +%endif %define shortversion 3.16 -Name: cmake%{psuffix} +Name: cmake%{?psuffix} Version: 3.16.2 Release: 0 +Summary: Cross-platform make system +License: BSD-3-Clause URL: https://www.cmake.org/ Source0: https://www.cmake.org/files/v%{shortversion}/cmake-%{version}.tar.gz Source1: cmake.macros @@ -42,53 +49,52 @@ Patch0: cmake-fix-ruby-test.patch Patch1: feature-suse-python-interp-search-order.patch BuildRequires: fdupes BuildRequires: gcc-c++ -BuildRequires: libcurl-mini-devel -# this is commented as it would create dependancy cycle between jsoncpp and cmake -#if 0 % { ? suse_version} > 1320 -#BuildRequires: pkgconfig(jsoncpp) -#endif BuildRequires: pkgconfig BuildRequires: rhash-devel BuildRequires: pkgconfig(bzip2) BuildRequires: pkgconfig(expat) -BuildRequires: pkgconfig(libarchive) >= 3.0.2 BuildRequires: pkgconfig(liblzma) +BuildRequires: pkgconfig(libssl) BuildRequires: pkgconfig(libuv) >= 1.10 BuildRequires: pkgconfig(ncurses) BuildRequires: pkgconfig(zlib) Requires: make -%if %{with gui} -Summary: CMake graphical user interface -License: BSD-3-Clause -%else -Summary: Cross-platform make system -License: BSD-3-Clause -%endif -%if %{with gui} -BuildRequires: python-sphinx -BuildRequires: update-desktop-files -BuildRequires: pkgconfig(Qt5Widgets) -Requires: cmake -Recommends: cmake-man -%else # bnc#953842 - A python file is shipped so require python base so it can be run. Requires: python3-base +%if %{with mini} +Requires: this-is-only-for-build-envs +Conflicts: cmake +Provides: cmake = %{version} +%else +BuildRequires: pkgconfig(jsoncpp) +BuildRequires: pkgconfig(libarchive) >= 3.0.2 +BuildRequires: pkgconfig(libcurl) +BuildRequires: pkgconfig(libzstd) +Conflicts: cmake-mini %endif +%if %{with gui} +BuildRequires: python3-Sphinx +BuildRequires: update-desktop-files +BuildRequires: pkgconfig(Qt5Widgets) +%endif + +%description +CMake is a cross-platform build system. %package -n cmake-man Summary: Manual pages for cmake, a cross-platform make system +Supplements: cmake %description -n cmake-man Manual pages for cmake, a cross-platform make system. -%if %{with gui} -%description +%package -n cmake-gui +Summary: CMake graphical user interface +Requires: cmake + +%description -n cmake-gui This is a Graphical User Interface for CMake, a cross-platform build system. -%else -%description -CMake is a cross-platform build system. -%endif %prep # The publisher doesn't sign the source tarball, but a signatures file containing multiple hashes. @@ -107,9 +113,12 @@ export CXXFLAGS="%{optflags}" --docdir=/share/doc/packages/cmake \ --mandir=/share/man \ --system-libs \ +%if %{with mini} + --no-system-curl \ --no-system-jsoncpp \ --no-system-libarchive \ --no-system-zstd \ +%endif --parallel=0%{jobs} \ --verbose \ %if %{with gui} @@ -119,7 +128,7 @@ export CXXFLAGS="%{optflags}" --no-qt-gui \ %endif %{nil} -make VERBOSE=1 %{?_smp_mflags} +%make_build %install %make_install @@ -144,20 +153,22 @@ install -p -m0755 -D %{SOURCE4} %{buildroot}%{_libexecdir}/rpm/cmake.prov # Install bash completion symlinks mkdir -p %{buildroot}%{_datadir}/bash-completion/completions -for f in %{buildroot}%{_datadir}/%{name}/completions/* +for f in %{buildroot}%{_datadir}/cmake/completions/* do - ln -s ../../%{name}/completions/$(basename $f) %{buildroot}%{_datadir}/bash-completion/completions + ln -s ../../cmake/completions/$(basename $f) %{buildroot}%{_datadir}/bash-completion/completions done # cmake-mode.el -%define cmake_mode_el %{_datadir}/emacs/site-lisp/%{name}-mode.el +%define cmake_mode_el %{_datadir}/emacs/site-lisp/cmake-mode.el install -D -p -m 0644 Auxiliary/cmake-mode.el %{buildroot}%cmake_mode_el -rm %{buildroot}%{_datadir}/%{name}/editors/emacs/cmake-mode.el -# fix: W: files-duplicate (%license covers already) -rm %{buildroot}%{_docdir}/%{name}/Copyright.txt +rm %{buildroot}%{_datadir}/cmake/editors/emacs/cmake-mode.el +# fix: W: files-duplicate (%%license covers already) +rm %{buildroot}%{_docdir}/cmake/Copyright.txt %fdupes %{buildroot}%{_datadir}/cmake +%endif +%if "%{flavor}" == "" %check # Excluded tests: # TestUpload: uses internet connection @@ -172,7 +183,7 @@ rm %{buildroot}%{_docdir}/%{name}/Copyright.txt %files -n cmake-gui %license Copyright.txt %{_bindir}/cmake-gui -%{_datadir}/applications/%{name}.desktop +%{_datadir}/applications/cmake-gui.desktop %{_datadir}/mime/packages/cmakecache.xml %dir %{_datadir}/icons/hicolor %dir %{_datadir}/icons/hicolor/* @@ -198,7 +209,7 @@ rm %{buildroot}%{_docdir}/%{name}/Copyright.txt %{_libdir}/cmake %dir %{_datadir}/aclocal %{_datadir}/aclocal/cmake.m4 -%doc %{_docdir}/%{name} +%doc %{_docdir}/cmake %{_datadir}/bash-completion %cmake_mode_el %dir %{dirname:%cmake_mode_el} From 862cd7303e6de211eeb38b4c14db549b55aa5d663d292a27cd3e832162fbf7fb Mon Sep 17 00:00:00 2001 From: Simon Lees Date: Fri, 7 Feb 2020 07:38:41 +0000 Subject: [PATCH 4/6] Accepting request 770783 from home:simotek:branches:devel:tools:building - Revert "use cmake generics in marcos.cmake" it breaks many cases in stagings. OBS-URL: https://build.opensuse.org/request/show/770783 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/cmake?expand=0&rev=396 --- cmake.changes | 6 ++++++ cmake.macros | 18 +++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/cmake.changes b/cmake.changes index 1a5ce8e..c1d0e32 100644 --- a/cmake.changes +++ b/cmake.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Feb 7 02:11:06 UTC 2020 - Simon Lees + +- Revert "use cmake generics in marcos.cmake" it breaks many + cases in stagings. + ------------------------------------------------------------------- Wed Feb 5 12:50:16 UTC 2020 - Tomáš Chvátal diff --git a/cmake.macros b/cmake.macros index 81772e4..cb7d206 100644 --- a/cmake.macros +++ b/cmake.macros @@ -7,14 +7,6 @@ %__builder %__make %__sourcedir . -%cmake_builder_deps() %{expand:\ -%if "%__builder" == "%__make" \ -BuildRequires: make \ -%else \ -BuildRequires: ninja \ -%endif \ -} - %cmake \ find %__sourcedir -name CMakeLists.txt \\\ -exec sed -i -re '/^[[:blank:]]*[sS][eE][tT][[:blank:]]*\\\([[:blank:]]*(CMAKE_BUILD_TYPE|CMAKE_COLOR_MAKEFILE|CMAKE_INSTALL_PREFIX|CMAKE_VERBOSE_MAKEFILE).*\\\)/{s/^/#IGNORE /}' {} + \ @@ -49,7 +41,15 @@ BuildRequires: ninja \ -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF \\\ -DCMAKE_MODULES_INSTALL_DIR=%{_datadir}/cmake/Modules -%cmake_build %__cmake --build . --verbose %{?_smp_mflags} +%__builder_verbose \ +%if "%__builder" == "%__make" \ + %{?_make_output_sync} VERBOSE=1 \\\ +%else \ + -v \\\ +%endif \ +%{nil} + +%cmake_build %__builder \\%__builder_verbose %{?_smp_mflags} %make_jobs \ echo "Deprecated %%make_jobs macro used, please use %%cmake_build" \ From 979dc5d980b4959b18f98e1aea0c2a4b713492d7a0219ccfdaa952834972db99 Mon Sep 17 00:00:00 2001 From: Simon Lees Date: Fri, 7 Feb 2020 07:58:09 +0000 Subject: [PATCH 5/6] Accepting request 770787 from home:simotek:branches:devel:tools:building Add missing bit of the previous revert OBS-URL: https://build.opensuse.org/request/show/770787 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/cmake?expand=0&rev=397 --- cmake.macros | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake.macros b/cmake.macros index cb7d206..fc63aa6 100644 --- a/cmake.macros +++ b/cmake.macros @@ -56,7 +56,7 @@ %cmake_build %cmake_install \ - DESTDIR=%{buildroot} %__cmake --install %__builddir --verbose + DESTDIR=%{buildroot} %__builder install -C %__builddir %ctest(:-:) \ cd %__builddir \ From ec7529e10715f6e94add27cbb5be9ec756867ed14a71b47b5cfa4582d6a52955 Mon Sep 17 00:00:00 2001 From: Simon Lees Date: Mon, 10 Feb 2020 21:08:19 +0000 Subject: [PATCH 6/6] Accepting request 773189 from home:StefanBruens:branches:devel:tools:building - Revert LIBDIR change in macros - it is inconsistent (all other INSTALL_s use absolute paths), unneeded (paths may be absolute or relative), and breaks a number of packages. - Update minimum libarchive version, >= 3.3.3. - Do not flag macros as config file. - Adjust constraints (7G disk space is required, independent of architecture). OBS-URL: https://build.opensuse.org/request/show/773189 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/cmake?expand=0&rev=398 --- _constraints | 17 +++++------------ cmake.changes | 11 +++++++++++ cmake.macros | 2 +- cmake.spec | 6 +++--- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/_constraints b/_constraints index f4e17a8..26a20ce 100644 --- a/_constraints +++ b/_constraints @@ -1,14 +1,7 @@ - - - aarch64 - ppc64 - ppc64le - - - - 6 - - - + + + 7 + + diff --git a/cmake.changes b/cmake.changes index c1d0e32..8245300 100644 --- a/cmake.changes +++ b/cmake.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Mon Feb 10 15:26:56 UTC 2020 - Stefan Brüns + +- Revert LIBDIR change in macros - it is inconsistent (all other + INSTALL_s use absolute paths), unneeded (paths may be + absolute or relative), and breaks a number of packages. +- Update minimum libarchive version, >= 3.3.3. +- Do not flag macros as config file. +- Adjust constraints (7G disk space is required, independent + of architecture). + ------------------------------------------------------------------- Fri Feb 7 02:11:06 UTC 2020 - Simon Lees diff --git a/cmake.macros b/cmake.macros index fc63aa6..62b0ae1 100644 --- a/cmake.macros +++ b/cmake.macros @@ -23,7 +23,7 @@ -DLIB_INSTALL_DIR:PATH=%{_libdir} \\\ -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \\\ -DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \\\ - -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \\\ + -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} \\\ -DCMAKE_BUILD_TYPE=RelWithDebInfo \\\ -DCMAKE_C_FLAGS="${CFLAGS:-%optflags} -DNDEBUG" \\\ -DCMAKE_CXX_FLAGS="${CXXFLAGS:-%optflags} -DNDEBUG" \\\ diff --git a/cmake.spec b/cmake.spec index 5c60737..950d3ac 100644 --- a/cmake.spec +++ b/cmake.spec @@ -66,8 +66,8 @@ Requires: this-is-only-for-build-envs Conflicts: cmake Provides: cmake = %{version} %else -BuildRequires: pkgconfig(jsoncpp) -BuildRequires: pkgconfig(libarchive) >= 3.0.2 +BuildRequires: pkgconfig(jsoncpp) >= 1.4.1 +BuildRequires: pkgconfig(libarchive) >= 3.3.3 BuildRequires: pkgconfig(libcurl) BuildRequires: pkgconfig(libzstd) Conflicts: cmake-mini @@ -199,7 +199,7 @@ rm %{buildroot}%{_docdir}/cmake/Copyright.txt %files %license Copyright.txt %doc README.rst -%config %{_rpmconfigdir}/macros.d/macros.cmake +%{_rpmconfigdir}/macros.d/macros.cmake %{_libexecdir}/rpm %{_bindir}/cpack %{_bindir}/cmake