From 6d9b1150cb4e5e19c920bf989b72830dbf62ede7b164192bf1496753865c0a2e Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Fri, 26 Aug 2016 10:34:52 +0000 Subject: [PATCH] Accepting request 423027 from home:scarabeus_iv:branches:devel:tools:building - Remove wrong FIXME from spec - Require qt5 gui everywhere as it on all supported platforms - Respect CFLAGS while bootstraping - Remove wrong FIXME from the spec - Add relwithdebinfo as default target to ease living of sci packages - Add possibility to switch between ninja and cmake by defining %__builder ninja prior %cmake call bnc#995752 OBS-URL: https://build.opensuse.org/request/show/423027 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/cmake?expand=0&rev=262 --- cmake-gui.changes | 6 ++++++ cmake-gui.spec | 22 +++++----------------- cmake.changes | 9 +++++++++ cmake.macros | 16 +++++++++++++--- cmake.spec | 6 ++++-- 5 files changed, 37 insertions(+), 22 deletions(-) diff --git a/cmake-gui.changes b/cmake-gui.changes index 7074399..4eb1cd2 100644 --- a/cmake-gui.changes +++ b/cmake-gui.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Aug 26 08:14:10 UTC 2016 - tchvatal@suse.com + +- Remove wrong FIXME from spec +- Require qt5 gui everywhere as it on all supported platforms + ------------------------------------------------------------------- Sun Jul 24 12:53:31 UTC 2016 - foss@grueninger.de diff --git a/cmake-gui.spec b/cmake-gui.spec index 954aa24..897ca9e 100644 --- a/cmake-gui.spec +++ b/cmake-gui.spec @@ -43,21 +43,16 @@ BuildRequires: openssl-devel #if 0%{?suse_version} > 1320 #BuildRequires: pkgconfig(jsoncpp) #endif -BuildRequires: pkg-config +BuildRequires: pkgconfig BuildRequires: python-sphinx BuildRequires: update-desktop-files BuildRequires: zlib-devel +BuildRequires: pkgconfig(Qt5Widgets) BuildRequires: pkgconfig(bzip2) BuildRequires: pkgconfig(liblzma) Requires: cmake Recommends: cmake-man BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if 0%{?suse_version} >= 1320 -BuildRequires: pkg-config -BuildRequires: pkgconfig(Qt5Widgets) -%else -BuildRequires: libqt4-devel -%endif %description This is a Graphical User Interface for CMake, a cross-platform, @@ -80,23 +75,16 @@ echo "`grep cmake-%{version}.tar.gz %{SOURCE5} | grep -Eo '^[0-9a-f]+'` %{SOURC %patch6 -p1 %build -EXTRA_FLAGS="--qt-gui" -# FIXME: you should use the %%configure macro +export CFLAGS="%{optflags}" +export CXXFLAGS="%{optflags}" +# This is not autotools configure ./configure \ --prefix=%{_prefix} \ --datadir=/share/cmake \ --docdir=/share/doc/packages/cmake \ --mandir=/share/man \ --sphinx-man \ -%if 0%{?suse_version} && !0%{?sles_version} --system-libs \ -%else - --system-curl \ - --system-expat \ - --system-zlib \ - --system-bzip2 \ - --no-system-libarchive \ -%endif --no-system-jsoncpp \ --parallel=0%{jobs} \ --qt-gui diff --git a/cmake.changes b/cmake.changes index 65ca8a2..a14ab03 100644 --- a/cmake.changes +++ b/cmake.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Aug 26 08:27:17 UTC 2016 - tchvatal@suse.com + +- Respect CFLAGS while bootstraping +- Remove wrong FIXME from the spec +- Add relwithdebinfo as default target to ease living of sci packages +- Add possibility to switch between ninja and cmake by defining + %__builder ninja prior %cmake call bnc#995752 + ------------------------------------------------------------------- Mon Aug 8 00:18:51 UTC 2016 - badshah400@gmail.com diff --git a/cmake.macros b/cmake.macros index 97f7cbc..79b0ecd 100644 --- a/cmake.macros +++ b/cmake.macros @@ -4,6 +4,7 @@ %__cmake %{_bindir}/cmake %__ctest %{_bindir}/ctest %__builddir build +%__builder %__make %cmake \ find . -name CMakeLists.txt \\\ @@ -11,13 +12,18 @@ mkdir -p %__builddir \ cd %__builddir \ %__cmake .. \\\ +%if "%__builder" == "%__make" \ + -G"Unix Makefiles" \\\ +%else \ + -GNinja \\\ +%endif \ -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \\\ -DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \\\ -DLIB_INSTALL_DIR:PATH=%{_libdir} \\\ -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \\\ -DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \\\ -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} \\\ - -DCMAKE_BUILD_TYPE=None \\\ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \\\ -DCMAKE_C_FLAGS="${CFLAGS:-%optflags} -DNDEBUG" \\\ -DCMAKE_CXX_FLAGS="${CXXFLAGS:-%optflags} -DNDEBUG" \\\ -DCMAKE_Fortran_FLAGS="${FFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}} -DNDEBUG" \\\ @@ -36,10 +42,14 @@ -DCMAKE_MODULES_INSTALL_DIR=%{_datadir}/cmake/Modules %make_jobs \ - %__make %{?_smp_mflags} VERBOSE=1 +%if "%__builder" == "%__make" \ + %__make %{?_smp_mflags} VERBOSE=1 \ +%else \ + ninja -v %{?_smp_mflags} \ +%endif %cmake_install \ - %__make VERBOSE=1 DESTDIR=%{buildroot} install/fast -C %__builddir + DESTDIR=%{buildroot} %__builder install -C %__builddir %ctest \ cd %__builddir \ diff --git a/cmake.spec b/cmake.spec index e95bef1..57f6631 100644 --- a/cmake.spec +++ b/cmake.spec @@ -51,7 +51,7 @@ BuildRequires: ncurses-devel #if 0%{?suse_version} > 1320 #BuildRequires: pkgconfig(jsoncpp) #endif -BuildRequires: pkg-config +BuildRequires: pkgconfig BuildRequires: zlib-devel BuildRequires: pkgconfig(liblzma) Requires: make @@ -75,7 +75,9 @@ echo "`grep %{name}-%{version}.tar.gz %{SOURCE5} | grep -Eo '^[0-9a-f]+'` %{SOU %patch7 -p1 %build -# FIXME: you should use the %%configure macro +export CFLAGS="%{optflags}" +export CXXFLAGS="%{optflags}" +# This is not autotools configure ./configure \ --prefix=%{_prefix} \ --datadir=/share/%{name} \