From 10f83bc2fc9d638fdda8ff1fb41d714b6fc52436 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Wed, 19 Jul 2017 10:11:18 +0200 Subject: [PATCH] Update to 3.9.0 final (rhbz#1472503) Add filesystem package (rhbz#1471153) --- .gitignore | 1 + 765.patch | 33 -------------- cmake-fedora-flag_release.patch | 2 +- cmake.spec | 80 ++++++++++++++++++++------------- sources | 2 +- 5 files changed, 52 insertions(+), 66 deletions(-) delete mode 100644 765.patch diff --git a/.gitignore b/.gitignore index 6872663..e435241 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ /cmake-3.8.0.tar.gz /cmake-3.8.1.tar.gz /cmake-3.8.2.tar.gz +/cmake-3.9.0.tar.gz diff --git a/765.patch b/765.patch deleted file mode 100644 index 173420b..0000000 --- a/765.patch +++ /dev/null @@ -1,33 +0,0 @@ -From e1b67d0373b3cdc8e53836601b9b0f6372f84e70 Mon Sep 17 00:00:00 2001 -From: Brad King -Date: Wed, 26 Apr 2017 08:14:08 -0400 -Subject: [PATCH] FindGLUT: Add library dependencies only if they exist - -Fixes: #14060 ---- - Modules/FindGLUT.cmake | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/Modules/FindGLUT.cmake b/Modules/FindGLUT.cmake -index 02e6df037..88d4b2918 100644 ---- a/Modules/FindGLUT.cmake -+++ b/Modules/FindGLUT.cmake -@@ -120,10 +120,12 @@ if (GLUT_FOUND) - # If not, we need some way to figure out what platform we are on. - set( GLUT_LIBRARIES - ${GLUT_glut_LIBRARY} -- ${GLUT_Xmu_LIBRARY} -- ${GLUT_Xi_LIBRARY} -- ${GLUT_cocoa_LIBRARY} - ) -+ foreach(v GLUT_Xmu_LIBRARY GLUT_Xi_LIBRARY GLUT_cocoa_LIBRARY) -+ if(${v}) -+ list(APPEND GLUT_LIBRARIES ${${v}}) -+ endif() -+ endforeach() - - if(NOT TARGET GLUT::GLUT) - add_library(GLUT::GLUT UNKNOWN IMPORTED) --- -2.11.1 - diff --git a/cmake-fedora-flag_release.patch b/cmake-fedora-flag_release.patch index f33910e..e3d601e 100644 --- a/cmake-fedora-flag_release.patch +++ b/cmake-fedora-flag_release.patch @@ -1,7 +1,7 @@ diff -up cmake-3.7.0-rc1/Modules/Compiler/GNU.cmake.orig cmake-3.7.0-rc1/Modules/Compiler/GNU.cmake --- cmake-3.7.0-rc1/Modules/Compiler/GNU.cmake.orig 2016-10-06 15:23:57.198332664 -0600 +++ cmake-3.7.0-rc1/Modules/Compiler/GNU.cmake 2016-10-06 15:24:28.062177278 -0600 -@@ -38,7 +38,7 @@ macro(__compiler_gnu lang) +@@ -40,7 +40,7 @@ macro(__compiler_gnu lang) string(APPEND CMAKE_${lang}_FLAGS_INIT " ") string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g") string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Os -DNDEBUG") diff --git a/cmake.spec b/cmake.spec index 779a6d0..990a7d7 100644 --- a/cmake.spec +++ b/cmake.spec @@ -29,17 +29,19 @@ %{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}} %global major_version 3 -%global minor_version 8 +%global minor_version 9 # Set to RC version if building RC, else %{nil} -#global rcver rc3 +#global rcsuf rc3 +%{?rcsuf:%global relsuf .%{rcsuf}} +%{?rcsuf:%global versuf -%{rcsuf}} # Uncomment if building for EPEL #global name_suffix %{major_version} %global orig_name cmake Name: %{orig_name}%{?name_suffix} -Version: %{major_version}.%{minor_version}.2 -Release: 1%{?rcver:.%{rcver}}%{?dist} +Version: %{major_version}.%{minor_version}.0 +Release: 1%{?relsuf}%{?dist} Summary: Cross-platform make system # most sources are BSD @@ -49,28 +51,29 @@ Summary: Cross-platform make system # exception granting redistribution under terms of your choice License: BSD and MIT and zlib URL: http://www.cmake.org -Source0: http://www.cmake.org/files/v%{major_version}.%{minor_version}/%{orig_name}-%{version}%{?rcver:-%rcver}.tar.gz +Source0: http://www.cmake.org/files/v%{major_version}.%{minor_version}/%{orig_name}-%{version}%{?versuf}.tar.gz Source1: %{name}-init.el Source2: macros.%{name} # See https://bugzilla.redhat.com/show_bug.cgi?id=1202899 Source3: %{name}.attr Source4: %{name}.prov -# Fix FindGLUT lib deps -# https://bugzilla.redhat.com/show_bug.cgi?id=1444563 -Patch0: https://gitlab.kitware.com/cmake/cmake/merge_requests/765.patch +# Always start regular patches with numbers >= 100. +# We need lower numbers for patches in compat package. +# And this enables us to use %%autosetup +# # Patch to fix RindRuby vendor settings # http://public.kitware.com/Bug/view.php?id=12965 # https://bugzilla.redhat.com/show_bug.cgi?id=822796 -Patch2: %{name}-findruby.patch +Patch100: %{name}-findruby.patch # replace release flag -O3 with -O2 for fedora -Patch3: %{name}-fedora-flag_release.patch +Patch101: %{name}-fedora-flag_release.patch # Patch for renaming on EPEL %if 0%{?name_suffix:1} -Patch1000: %{name}-rename.patch +Patch1: %{name}-rename.patch %if 0%{?rhel} && 0%{?rhel} <= 6 -Patch1001: %{name}-libarchive3.patch +Patch2: %{name}-libarchive3.patch %endif %endif @@ -113,6 +116,7 @@ BuildRequires: desktop-file-utils %endif Requires: %{name}-data = %{version}-%{release} +Requires: %{name}-filesystem = %{version}-%{release} Requires: rpm # Provide the major version name @@ -137,9 +141,10 @@ generation, code generation, and template instantiation. %package data Summary: Common data-files for %{name} Requires: %{name} = %{version}-%{release} +Requires: %{name}-filesystem = %{version}-%{release} %if ! 0%{?_module_build} %if 0%{?fedora} || 0%{?rhel} >= 7 -Requires: emacs-filesystem >= %{_emacs_version} +Requires: emacs-filesystem >= %{_emacs_version} %endif %endif @@ -157,6 +162,13 @@ BuildArch: noarch This package contains documentation for %{name}. +%package filesystem +Summary: Directories used by CMake modules + +%description filesystem +This package owns all directories used by CMake modules. + + %package gui Summary: Qt GUI for %{name} @@ -169,20 +181,7 @@ The %{name}-gui package contains the Qt based GUI for %{name}. %prep -%setup -qn %{orig_name}-%{version}%{?rcver:-%rcver} - -# Apply renaming on EPEL before all other patches -%if 0%{?name_suffix:1} -%patch1000 -p1 -%if 0%{?rhel} && 0%{?rhel} <= 6 -%patch1001 -p1 -%endif -%endif - -# We cannot use backups with patches to Modules as they end up being installed -%patch0 -p1 -%patch2 -p1 -%patch3 -p1 +%autosetup -n %{orig_name}-%{version}%{?versuf} -p 1 %if %{with python3} echo '#!%{__python3}' > %{name}.prov @@ -210,12 +209,12 @@ pushd build --docdir=/share/doc/%{name} --mandir=/share/man \ --parallel=`/usr/bin/getconf _NPROCESSORS_ONLN` %endif -make VERBOSE=1 %{?_smp_mflags} +%make_build VERBOSE=1 %install pushd build -make install DESTDIR=%{buildroot} CMAKE_DOC_DIR=%{buildroot}%{_pkgdocdir} +%make_install CMAKE_DOC_DIR=%{buildroot}%{_pkgdocdir} mkdir -p CMAKE_DOC_DIR=%{buildroot}%{_pkgdocdir} find %{buildroot}/%{_datadir}/%{name}/Modules -type f | xargs chmod -x [ -n "$(find %{buildroot}/%{_datadir}/%{name}/Modules -name \*.orig)" ] && @@ -278,7 +277,7 @@ mv html %{buildroot}%{_pkgdocdir} # Desktop file desktop-file-install --delete-original \ --dir=%{buildroot}%{_datadir}/applications \ - %{buildroot}/%{_datadir}/applications/CMake%{?name_suffix}.desktop + %{buildroot}/%{_datadir}/applications/%{name}-gui.desktop %if %{with appdata} # Register as an application to be visible in the software center @@ -321,6 +320,11 @@ EOF %endif %endif +# Create dir for filsystem-pkg, if not existing. +%if "%{_libdir}" != "%{_prefix}/lib" +mkdir -p %{buildroot}/%{_prefix}/lib/%{name} +%endif + %if ! 0%{?_module_build} %check @@ -410,6 +414,16 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : %{?_licensedir:%license %{_datadir}/licenses/%{name}*} %doc %{_pkgdocdir}/ + +%files filesystem +%if "%{_libdir}" != "%{_prefix}/lib" +%dir %{_prefix}/lib/%{name}/ +%endif +%dir %{_libdir}/%{name}/ +%dir %{_datadir}/%{name}/ +%dir %{_datadir}/%{name}/Modules/ + + %if ! 0%{?_module_build} %if %{with gui} %files gui @@ -417,7 +431,7 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : %if %{with appdata} %{_datadir}/appdata/*.appdata.xml %endif -%{_datadir}/applications/CMake%{?name_suffix}.desktop +%{_datadir}/applications/%{name}-gui.desktop %{_datadir}/mime/packages/ %{_datadir}/icons/hicolor/*/apps/CMake%{?name_suffix}Setup.png %if 0%{?with_sphinx:1} @@ -428,6 +442,10 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : %changelog +* Wed Jul 19 2017 Björn Esser - 3.9.0-1 +- Update to 3.9.0 final (rhbz#1472503) +- Add filesystem package (rhbz#1471153) + * Thu Jun 01 2017 Björn Esser - 3.8.2-1 - Update to 3.8.2 final (rhbz#1447473) diff --git a/sources b/sources index 922f5f6..c4467da 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cmake-3.8.2.tar.gz) = 49ea6f74a81dfa8ed8336c94ed50e0a483b796132c260f4bef159f9c389d99cc7b26ecfcccdd8b0a8f5b52fddd277c17c547d2a2e8848da9912c464ada1cbe3f +SHA512 (cmake-3.9.0.tar.gz) = 151c5531dec2c9d3170d95c06b9cc92d22285555cb9c074837ff2d0d0bee2ea285726323fa11c59d2290b1a9586492571d34e49709e35481478c403bf1ca9c48