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>
|
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}
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
%define shortversion 3.15
|
|
||||||
%if "%{flavor}" == "gui"
|
%if "%{flavor}" == "gui"
|
||||||
Name: cmake-%{flavor}
|
%define psuffix -gui
|
||||||
Summary: CMake graphical user interface
|
%bcond_without gui
|
||||||
License: BSD-3-Clause
|
|
||||||
Group: Development/Tools/Building
|
|
||||||
%else
|
%else
|
||||||
Name: cmake
|
%define psuffix %{nil}
|
||||||
Summary: Cross-platform make system
|
%bcond_with gui
|
||||||
License: BSD-3-Clause
|
|
||||||
Group: Development/Tools/Building
|
|
||||||
%endif
|
%endif
|
||||||
|
%define shortversion 3.15
|
||||||
|
Name: cmake%{psuffix}
|
||||||
Version: 3.15.4
|
Version: 3.15.4
|
||||||
Release: 0
|
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/
|
URL: https://www.cmake.org/
|
||||||
Source0: https://www.cmake.org/files/v%{shortversion}/cmake-%{version}.tar.gz
|
Source0: https://www.cmake.org/files/v%{shortversion}/cmake-%{version}.tar.gz
|
||||||
Source1: cmake.macros
|
Source1: cmake.macros
|
||||||
@ -45,24 +48,25 @@ Patch2: cmake-fix-ruby-test.patch
|
|||||||
Patch4: form.patch
|
Patch4: form.patch
|
||||||
# Search for python interpreters from newest to oldest rather then picking up /usr/bin/python as first choice
|
# 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
|
Patch7: feature-suse-python-interp-search-order.patch
|
||||||
|
Patch8: feature-suse-cmake-gui-drop-qt4.patch
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: gcc-c++
|
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
|
# this is commented as it would create dependancy cycle between jsoncpp and cmake
|
||||||
#if 0 % { ? suse_version} > 1320
|
#if 0 % { ? suse_version} > 1320
|
||||||
#BuildRequires: pkgconfig(jsoncpp)
|
#BuildRequires: pkgconfig(jsoncpp)
|
||||||
#endif
|
#endif
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: rhash-devel
|
BuildRequires: rhash-devel
|
||||||
|
BuildRequires: pkgconfig(bzip2)
|
||||||
|
BuildRequires: pkgconfig(expat)
|
||||||
|
BuildRequires: pkgconfig(libarchive) >= 3.0.2
|
||||||
|
BuildRequires: pkgconfig(libcurl)
|
||||||
BuildRequires: pkgconfig(liblzma)
|
BuildRequires: pkgconfig(liblzma)
|
||||||
|
BuildRequires: pkgconfig(libuv) >= 1.10
|
||||||
|
BuildRequires: pkgconfig(ncurses)
|
||||||
BuildRequires: pkgconfig(zlib)
|
BuildRequires: pkgconfig(zlib)
|
||||||
Requires: make
|
Requires: make
|
||||||
%if "{%flavor}" == "gui"
|
%if %{with gui}
|
||||||
BuildRequires: python-sphinx
|
BuildRequires: python-sphinx
|
||||||
BuildRequires: update-desktop-files
|
BuildRequires: update-desktop-files
|
||||||
BuildRequires: pkgconfig(Qt5Widgets)
|
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.
|
# bnc#953842 - A python file is shipped so require python base so it can be run.
|
||||||
Requires: python3-base
|
Requires: python3-base
|
||||||
%endif
|
%endif
|
||||||
%if "%{flavor}" == "gui"
|
|
||||||
%description
|
|
||||||
This is a Graphical User Interface for CMake, a cross-platform
|
|
||||||
build system.
|
|
||||||
|
|
||||||
%package -n cmake-man
|
%package -n cmake-man
|
||||||
Summary: Manual pages for cmake, a cross-platform make system
|
Summary: Manual pages for cmake, a cross-platform make system
|
||||||
Group: Development/Tools/Building
|
|
||||||
|
|
||||||
%description -n cmake-man
|
%description -n cmake-man
|
||||||
Manual pages for cmake, a cross-platform make system.
|
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
|
%else
|
||||||
%description
|
%description
|
||||||
CMake is a cross-platform build system.
|
CMake is a cross-platform build system.
|
||||||
@ -110,20 +114,20 @@ export CXXFLAGS="%{optflags}"
|
|||||||
--no-system-zstd \
|
--no-system-zstd \
|
||||||
--parallel=0%{jobs} \
|
--parallel=0%{jobs} \
|
||||||
--verbose \
|
--verbose \
|
||||||
%if "%{flavor}" == "gui"
|
%if %{with gui}
|
||||||
--qt-gui \
|
--qt-gui \
|
||||||
--sphinx-man \
|
--sphinx-man \
|
||||||
%else
|
%else
|
||||||
--no-qt-gui \
|
--no-qt-gui \
|
||||||
%endif
|
%endif
|
||||||
--
|
%{nil}
|
||||||
make VERBOSE=1 %{?_smp_mflags}
|
make VERBOSE=1 %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install
|
%make_install
|
||||||
mkdir -p %{buildroot}%{_libdir}/cmake
|
mkdir -p %{buildroot}%{_libdir}/cmake
|
||||||
%if "%{flavor}" == "gui"
|
%if %{with gui}
|
||||||
%suse_update_desktop_file -r %{name} CMake Development IDE Tools Qt
|
%suse_update_desktop_file -r cmake-gui CMake Development IDE Tools Qt
|
||||||
|
|
||||||
# delete files that belong to the 'cmake' package
|
# delete files that belong to the 'cmake' package
|
||||||
rm -rf %{buildroot}%{_bindir}/{cpack,cmake,ctest,ccmake}
|
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)"
|
-E "(TestUpload|SimpleInstall|SimpleInstall-Stage2|CPackComponentsForAll-RPM-(default|OnePackPerGroup|IgnoreGroup|AllInOne)|CPack_RPM)"
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if "%{flavor}" == "gui"
|
%if %{with gui}
|
||||||
%files
|
%files -n cmake-gui
|
||||||
%license Copyright.txt
|
%license Copyright.txt
|
||||||
%{_bindir}/cmake-gui
|
%{_bindir}/cmake-gui
|
||||||
%{_datadir}/applications/%{name}.desktop
|
%{_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