From c414f75c13eee66717e66b780d8e0cdfc047ea92 Mon Sep 17 00:00:00 2001 From: Andrey Bondrov Date: Wed, 9 Jul 2014 17:34:46 +1100 Subject: [PATCH] Don't force optimization flags --- cmake-3.0.0-optflags.patch | 29 +++++++++++++++++++++++++++++ cmake.spec | 23 +++++++++++------------ 2 files changed, 40 insertions(+), 12 deletions(-) create mode 100644 cmake-3.0.0-optflags.patch diff --git a/cmake-3.0.0-optflags.patch b/cmake-3.0.0-optflags.patch new file mode 100644 index 0000000..ccd3a93 --- /dev/null +++ b/cmake-3.0.0-optflags.patch @@ -0,0 +1,29 @@ +diff -urN cmake-3.0.0/Modules/Compiler/GNU.cmake cmake-3.0.0-patched/Modules/Compiler/GNU.cmake +--- cmake-3.0.0/Modules/Compiler/GNU.cmake 2014-06-10 02:46:52.000000000 +1100 ++++ cmake-3.0.0-patched/Modules/Compiler/GNU.cmake 2014-07-09 17:32:43.038610840 +1100 +@@ -46,10 +46,10 @@ + + # Initial configuration flags. + set(CMAKE_${lang}_FLAGS_INIT "") +- set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-g") ++ set(CMAKE_${lang}_FLAGS_DEBUG_INIT "") + set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG") +- set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-O3 -DNDEBUG") +- set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG") ++ set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-DNDEBUG") ++ set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-DNDEBUG") + set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE " -E > ") + set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE " -S -o ") + if(NOT APPLE) +diff -urN cmake-3.0.0/Modules/Compiler/GNU-Fortran.cmake cmake-3.0.0-patched/Modules/Compiler/GNU-Fortran.cmake +--- cmake-3.0.0/Modules/Compiler/GNU-Fortran.cmake 2014-06-10 02:46:52.000000000 +1100 ++++ cmake-3.0.0-patched/Modules/Compiler/GNU-Fortran.cmake 2014-07-09 17:31:50.772804497 +1100 +@@ -6,7 +6,7 @@ + + # No -DNDEBUG for Fortran. + set(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-Os") +-set(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3") ++set(CMAKE_Fortran_FLAGS_RELEASE_INIT "") + + # We require updates to CMake C++ code to support preprocessing rules + # for Fortran. diff --git a/cmake.spec b/cmake.spec index 7d78890..a3b7b28 100644 --- a/cmake.spec +++ b/cmake.spec @@ -5,31 +5,30 @@ Summary: Cross-platform, open-source make system Name: cmake Version: 3.0.0 -Release: 2 +Release: 3 Epoch: 1 License: BSD Group: Development/Other Url: http://www.cmake.org/HTML/index.html Source0: http://www.cmake.org/files/v%{shortVersion}/%{name}-%{version}.tar.gz Source1: cmake.macros +Patch0: cmake-3.0.0-optflags.patch # fix ftlk detection Patch1: 0001-Fix-FLTK-Find-path.patch Patch3: 0003-Disable-Test198.patch # Fix ImageMagick detection (not upstream yet; parts 1 and 2 are) Patch6: 0003-FindImageMagick-part3.patch -BuildRequires: perl -BuildRequires: pkgconfig(ncurses) +BuildRequires: gcc-gfortran +BuildRequires: bzip2-devel +BuildRequires: pkgconfig(expat) +BuildRequires: pkgconfig(libarchive) BuildRequires: pkgconfig(libcurl) BuildRequires: pkgconfig(libidn) -BuildRequires: pkgconfig(zlib) -BuildRequires: xz -BuildRequires: pkgconfig(expat) -BuildRequires: bzip2-devel -BuildRequires: pkgconfig(libarchive) +BuildRequires: pkgconfig(ncurses) %if !%{with bootstrap} BuildRequires: pkgconfig(QtCore) %endif -BuildRequires: gcc-gfortran +BuildRequires: pkgconfig(zlib) %description CMake is used to control the software compilation process using @@ -56,18 +55,18 @@ generation, and template instantiation. #----------------------------------------------------------------------------- %if !%{with bootstrap} -%package -n %{name}-qtgui +%package -n %{name}-qtgui Summary: Qt GUI Dialog for CMake - the Cross-platform, open-source make system Group: Development/Other Requires: %{name} -%description -n %{name}-qtgui +%description -n %{name}-qtgui CMake is used to control the software compilation process using simple platform and compiler independent configuration files. This is the Qt GUI. -%files -n %{name}-qtgui +%files -n %{name}-qtgui %{_bindir}/cmake-gui %{_datadir}/applications/CMake.desktop %{_datadir}/mime/packages/cmakecache.xml