forked from pool/cmake
Accepting request 745353 from home:simotek:branches:devel:tools:building
- Update cmake conditionals to make sure the multibuild is nicely leveraged OBS-URL: https://build.opensuse.org/request/show/745353 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/cmake?expand=0&rev=380
This commit is contained in:
parent
c524f94d30
commit
aeaf863046
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 1 08:02:01 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Update cmake conditionals to make sure the multibuild is
|
||||
nicely leveraged
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Oct 27 23:24:39 UTC 2019 - Simon Lees <sflees@suse.de>
|
||||
|
||||
|
64
cmake.spec
64
cmake.spec
@ -16,21 +16,24 @@
|
||||
#
|
||||
|
||||
|
||||
%define flavor @BUILD_FLAVOR@%{nil}
|
||||
%define shortversion 3.15
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "gui"
|
||||
Name: cmake-%{flavor}
|
||||
Summary: CMake graphical user interface
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Tools/Building
|
||||
%define psuffix -gui
|
||||
%bcond_without gui
|
||||
%else
|
||||
Name: cmake
|
||||
Summary: Cross-platform make system
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Tools/Building
|
||||
%define psuffix %{nil}
|
||||
%bcond_with gui
|
||||
%endif
|
||||
%define shortversion 3.15
|
||||
Name: cmake%{psuffix}
|
||||
Version: 3.15.4
|
||||
Release: 0
|
||||
%if %{with gui}
|
||||
Summary: CMake graphical user interface
|
||||
%else
|
||||
Summary: Cross-platform make system
|
||||
%endif
|
||||
License: BSD-3-Clause
|
||||
URL: https://www.cmake.org/
|
||||
Source0: https://www.cmake.org/files/v%{shortversion}/cmake-%{version}.tar.gz
|
||||
Source1: cmake.macros
|
||||
@ -45,24 +48,25 @@ Patch2: cmake-fix-ruby-test.patch
|
||||
Patch4: form.patch
|
||||
# Search for python interpreters from newest to oldest rather then picking up /usr/bin/python as first choice
|
||||
Patch7: feature-suse-python-interp-search-order.patch
|
||||
Patch8: feature-suse-cmake-gui-drop-qt4.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: pkgconfig(bzip2)
|
||||
BuildRequires: pkgconfig(expat)
|
||||
BuildRequires: pkgconfig(libarchive) >= 3.0.2
|
||||
BuildRequires: pkgconfig(libcurl)
|
||||
BuildRequires: pkgconfig(libuv) >= 1.10
|
||||
BuildRequires: pkgconfig(ncurses)
|
||||
# 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(libcurl)
|
||||
BuildRequires: pkgconfig(liblzma)
|
||||
BuildRequires: pkgconfig(libuv) >= 1.10
|
||||
BuildRequires: pkgconfig(ncurses)
|
||||
BuildRequires: pkgconfig(zlib)
|
||||
Requires: make
|
||||
%if "{%flavor}" == "gui"
|
||||
%if %{with gui}
|
||||
BuildRequires: python-sphinx
|
||||
BuildRequires: update-desktop-files
|
||||
BuildRequires: pkgconfig(Qt5Widgets)
|
||||
@ -72,17 +76,17 @@ Recommends: cmake-man
|
||||
# bnc#953842 - A python file is shipped so require python base so it can be run.
|
||||
Requires: python3-base
|
||||
%endif
|
||||
%if "%{flavor}" == "gui"
|
||||
%description
|
||||
This is a Graphical User Interface for CMake, a cross-platform
|
||||
build system.
|
||||
|
||||
%package -n cmake-man
|
||||
Summary: Manual pages for cmake, a cross-platform make system
|
||||
Group: Development/Tools/Building
|
||||
|
||||
%description -n cmake-man
|
||||
Manual pages for cmake, a cross-platform make system.
|
||||
|
||||
%if %{with gui}
|
||||
%description
|
||||
This is a Graphical User Interface for CMake, a cross-platform
|
||||
build system.
|
||||
%else
|
||||
%description
|
||||
CMake is a cross-platform build system.
|
||||
@ -110,20 +114,20 @@ export CXXFLAGS="%{optflags}"
|
||||
--no-system-zstd \
|
||||
--parallel=0%{jobs} \
|
||||
--verbose \
|
||||
%if "%{flavor}" == "gui"
|
||||
%if %{with gui}
|
||||
--qt-gui \
|
||||
--sphinx-man \
|
||||
%else
|
||||
%else
|
||||
--no-qt-gui \
|
||||
%endif
|
||||
--
|
||||
%endif
|
||||
%{nil}
|
||||
make VERBOSE=1 %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
%make_install
|
||||
mkdir -p %{buildroot}%{_libdir}/cmake
|
||||
%if "%{flavor}" == "gui"
|
||||
%suse_update_desktop_file -r %{name} CMake Development IDE Tools Qt
|
||||
%if %{with gui}
|
||||
%suse_update_desktop_file -r cmake-gui CMake Development IDE Tools Qt
|
||||
|
||||
# delete files that belong to the 'cmake' package
|
||||
rm -rf %{buildroot}%{_bindir}/{cpack,cmake,ctest,ccmake}
|
||||
@ -166,8 +170,8 @@ rm %{buildroot}%{_docdir}/%{name}/Copyright.txt
|
||||
-E "(TestUpload|SimpleInstall|SimpleInstall-Stage2|CPackComponentsForAll-RPM-(default|OnePackPerGroup|IgnoreGroup|AllInOne)|CPack_RPM)"
|
||||
%endif
|
||||
|
||||
%if "%{flavor}" == "gui"
|
||||
%files
|
||||
%if %{with gui}
|
||||
%files -n cmake-gui
|
||||
%license Copyright.txt
|
||||
%{_bindir}/cmake-gui
|
||||
%{_datadir}/applications/%{name}.desktop
|
||||
|
13
feature-suse-cmake-gui-drop-qt4.patch
Normal file
13
feature-suse-cmake-gui-drop-qt4.patch
Normal file
@ -0,0 +1,13 @@
|
||||
Index: cmake-3.15.4/Source/QtDialog/CMakeLists.txt
|
||||
===================================================================
|
||||
--- cmake-3.15.4.orig/Source/QtDialog/CMakeLists.txt
|
||||
+++ cmake-3.15.4/Source/QtDialog/CMakeLists.txt
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
project(QtDialog)
|
||||
CMake_OPTIONAL_COMPONENT(cmake-gui)
|
||||
-find_package(Qt5Widgets QUIET)
|
||||
+find_package(Qt5Widgets)
|
||||
if (Qt5Widgets_FOUND)
|
||||
include_directories(${Qt5Widgets_INCLUDE_DIRS})
|
||||
add_definitions(${Qt5Widgets_DEFINITONS})
|
Loading…
Reference in New Issue
Block a user