Browse Source

cmake3 update to 3.17.5

Signed-off-by: basebuilder_pel7ppc64lebuilder0 <basebuilder@powerel.org>
master
basebuilder_pel7ppc64lebuilder0 2 years ago
parent
commit
0ad87ad8ce
  1. 19
      SOURCES/CMake3.appdata.xml
  2. 2
      SOURCES/cmake3-findruby.patch
  3. 2298
      SOURCES/cmake3-rename.patch
  4. 13
      SOURCES/cmake3.prov
  5. 245
      SPECS/cmake3.spec

19
SOURCES/CMake3.appdata.xml

@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>CMake3.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<name>CMake GUI</name>
<summary>Create new CMake projects</summary>
<description>
<p>
CMake is an open source, cross platform build system that can build, test,
and package software. CMake GUI is a graphical user interface that can
create and edit CMake projects.
</p>
</description>
<url type="homepage">http://www.cmake.org</url>
<screenshots>
<screenshot type="default">https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/CMake/a.png</screenshot>
</screenshots>
<updatecontact>cmake3-owner_at_fedoraproject.org</updatecontact>
</component>

2
SOURCES/cmake3-findruby.patch

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
--- a/Modules/FindRuby.cmake.orig 2014-10-27 08:40:56.000000000 -0600
+++ b/Modules/FindRuby.cmake 2014-10-29 20:37:15.832502515 -0600
@@ -109,14 +109,8 @@
@@ -110,14 +110,8 @@
_RUBY_CONFIG_VAR("sitearchdir" RUBY_SITEARCH_DIR)
_RUBY_CONFIG_VAR("sitelibdir" RUBY_SITELIB_DIR)

2298
SOURCES/cmake3-rename.patch

File diff suppressed because it is too large Load Diff

13
SOURCES/cmake3.prov

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# -*- coding:utf-8 -*-
#
# Copyright (C) 2015 Daniel Vrátil <dvratil@redhat.com>
@ -36,9 +36,16 @@ class CMakeParser: @@ -36,9 +36,16 @@ class CMakeParser:
version = self.resolveCMakeModuleVersion(modulePath, cmakeModule, lowercase)

if version:
print("cmake(%s) = %s" % (cmakeModule, version))
string = "cmake(" + cmakeModule + ") = " + version
else:
print("cmake(%s)" % cmakeModule)
string = "cmake(" + cmakeModule + ")"
if string == string.lower():
print(string)
else:
# Temporarily print both variants to satisfy requires
# by the old version of this generator which made mistakes
print(string)
print(string.lower())


def parseCmakeModuleConfig(self, configFile):

245
SPECS/cmake3.spec

@ -5,47 +5,41 @@ @@ -5,47 +5,41 @@
# Set to bcond_with or use --without gui to disable qt4 gui build
%bcond_without gui

# Setting the Python-version used by default
# %if 0%{?rhel} && 0%{?rhel} < 8
%bcond_with python3
# %else
# %bcond_without python3
# %endif

# Do we add appdata-files?
%if 0%{?fedora} || 0%{?rhel} > 7
%bcond_without appdata
%else
%bcond_with appdata
%endif

# Sphinx-build cannot import CMakeLexer on EPEL <= 6
## %if 0%{?fedora} || 0%{?rhel} >= 7
%bcond_without sphinx
## %else
## %bcond_with sphinx
## %endif

%bcond_without bundled_libarchive
%bcond_without bundled_jsoncpp

# Run tests
%bcond_without test

# Verbose test?
%bcond_with debug

# Place rpm-macros into proper location
%global rpm_macros_dir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)

# Setup _pkgdocdir if not defined already
%{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}}

%if 0%{?rhel} && 0%{?rhel} > 7
%global python3_version 3
%endif

%global major_version 3
%global minor_version 12
%global minor_version 17
# Set to RC version if building RC, else %%{nil}
#global rcver rc1
%global rcver %{nil}

# 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
Version: %{major_version}.%{minor_version}.5
Release: 1%{?dist}
Summary: Cross-platform make system

@ -56,12 +50,13 @@ Summary: Cross-platform make system @@ -56,12 +50,13 @@ 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: https://github.com/Kitware/CMake/archive/v%{version}/CMake-%{version}%{?rcver:%rcver}.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
Source5: CMake3.appdata.xml

# Patch to fix RindRuby vendor settings
# http://public.kitware.com/Bug/view.php?id=12965
@ -73,7 +68,6 @@ Patch3: %{name}-fedora-flag_release.patch @@ -73,7 +68,6 @@ Patch3: %{name}-fedora-flag_release.patch
# Patch for renaming on EPEL
%if 0%{?name_suffix:1}
Patch1000: %{name}-rename.patch
Patch1001: %{name}-libarchive3.patch
%endif

BuildRequires: gcc-gfortran, gcc-c++
@ -81,23 +75,26 @@ BuildRequires: ncurses-devel, libX11-devel @@ -81,23 +75,26 @@ BuildRequires: ncurses-devel, libX11-devel
BuildRequires: bzip2-devel
BuildRequires: curl-devel
BuildRequires: expat-devel
# Needed jsoncpp >= 1.4.1
%if %{without bundled_jsoncpp}
BuildRequires: jsoncpp-devel
%if 0%{?fedora} || 0%{?rhel} >= 7
%endif
# Needed libarchive >= 3.3.3
%if %{without bundled_libarchive}
BuildRequires: libarchive-devel
#BuildRequires: /usr/bin/sphinx-build
%endif
BuildRequires: python%{python3_pkgversion}-sphinx
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: rhash-devel
%ifnarch s390x
BuildRequires: libuv-devel
%else
BuildRequires: libarchive3-devel
%endif
BuildRequires: libzstd-devel
BuildRequires: xz-devel
BuildRequires: zlib-devel
BuildRequires: emacs
%if %{with python3}
%{!?python3_pkgversion: %global python3_pkgversion 3}
BuildRequires: python%{python3_pkgversion}-devel
%else
BuildRequires: python2-devel
%if %{with appdata}
BuildRequires: libappstream-glib
%endif
%if %{without bootstrap}
#BuildRequires: xmlrpc-c-devel
@ -112,6 +109,7 @@ BuildRequires: pkgconfig(QtGui) @@ -112,6 +109,7 @@ BuildRequires: pkgconfig(QtGui)
BuildRequires: desktop-file-utils
%global qt_gui --qt-gui
%endif
BuildRequires: openssl-devel

Requires: %{name}-data = %{version}-%{release}
Requires: rpm
@ -123,10 +121,17 @@ Provides: bundled(md5-deutsch) @@ -123,10 +121,17 @@ Provides: bundled(md5-deutsch)
# https://fedorahosted.org/fpc/ticket/555
Provides: bundled(kwsys)

%if %{with bundled_libarchive}
Provides: bundled(libarchive) = 0:3.3.3
%endif
%if %{with bundled_jsoncpp}
Provides: bundled(json-cpp) = 0:1.8.2
%endif

# cannot do this in epel, ends up replacing os-provided cmake -- Rex
%if 0%{?fedora}
%{?name_suffix:Provides: %{orig_name} = %{version}}
%endif # 0#{?fedora}
%endif

%description
CMake is used to control the software compilation process using simple
@ -140,9 +145,7 @@ generation, code generation, and template instantiation. @@ -140,9 +145,7 @@ generation, code generation, and template instantiation.
%package data
Summary: Common data-files for %{name}
Requires: %{name} = %{version}-%{release}
%if 0%{?fedora} || 0%{?rhel} >= 7
Requires: emacs-filesystem >= %{_emacs_version}
%endif

BuildArch: noarch

@ -170,50 +173,66 @@ The %{name}-gui package contains the Qt based GUI for %{name}. @@ -170,50 +173,66 @@ The %{name}-gui package contains the Qt based GUI for %{name}.


%prep
%setup -qn %{orig_name}-%{version}%{?rcver:-%rcver}
%autosetup -N -n CMake-%{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
%patch1000 -p1 -b .rename
%endif

# We cannot use backups with patches to Modules as they end up being installed
%patch2 -p1
%patch3 -p1
%patch2 -p1 -b .findruby
%patch3 -p1 -b .fedora-flag

%if %{with python3}
echo '#!%{__python3}' > %{name}.prov
%else
echo '#!%{__python2}' > %{name}.prov
%endif
tail -n +2 %{SOURCE4} >> %{name}.prov
echo 'Start cleaning...'
for i in `find . -type f \( -name "*.orig" \)`; do
rm -f $i
done
echo 'Cleaning finished.'

tail -n +2 %{SOURCE4} >> %{name}.prov
sed -i -e '1i#!%{__python3}' %{name}.prov

%build
export CC=gcc
export CXX=g++
export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}"
export LDFLAGS="%{?__global_ldflags}"
mkdir build
pushd build
export CXXFLAGS="%{optflags} -std=gnu++11"
export LDFLAGS="%{__global_ldflags}"
mkdir build && pushd build
../bootstrap --prefix=%{_prefix} --datadir=/share/%{name} \
--docdir=/share/doc/%{name} --mandir=/share/man \
--%{?with_bootstrap:no-}system-libs \
--parallel=`/usr/bin/getconf _NPROCESSORS_ONLN` \
%{?with_sphinx:--sphinx-man --sphinx-html} \
%if %{with sphinx}
--sphinx-build=%{_bindir}/sphinx-build-%{python3_version} \
--sphinx-man --sphinx-html \
%endif
--system-zstd \
%ifarch s390x
--no-system-libuv \
%endif
%if %{with bundled_jsoncpp}
--no-system-jsoncpp \
%endif
%if %{with bundled_libarchive}
--no-system-libarchive \
%endif
%{?qt_gui};
%make_build VERBOSE=1


%install
%make_install -C build

find %{buildroot}%{_datadir}/%{name}/Modules -type f | xargs chmod -x
[ -n "$(find %{buildroot}%{_datadir}/%{name}/Modules -name \*.orig)" ] &&
echo "Found .orig files in %{_datadir}/%{name}/Modules, rebase patches" &&
exit 1

# Rename cpack-generators manual
mv %{buildroot}%{_mandir}/man7/cpack-generators.7 %{buildroot}%{_mandir}/man7/cpack%{?name_suffix}-generators.7

# Install major_version name links
%{!?name_suffix:for f in ccmake cmake cpack ctest; do ln -s $f %{buildroot}%{_bindir}/${f}%{major_version}; done}
# Install bash completion symlinks
@ -266,63 +285,34 @@ desktop-file-install --delete-original \ @@ -266,63 +285,34 @@ desktop-file-install --delete-original \
%{buildroot}/%{_datadir}/applications/CMake%{?name_suffix}.desktop

%if %{with appdata}
# Register as an application to be visible in the software center
#
mkdir -p %{buildroot}%{_metainfodir}
cat > %{buildroot}%{_metainfodir}/CMake3.appdata.xml <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2014 Ryan Lerch <rlerch@redhat.com> -->
<!--
EmailAddress: kitware@kitware.com
SentUpstream: 2014-09-17
-->
<application>
<id type="desktop">CMake3.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<name>CMake GUI</name>
<summary>Create new CMake projects</summary>
<description>
<p>
CMake is an open source, cross platform build system that can build, test,
and package software. CMake GUI is a graphical user interface that can
create and edit CMake projects.
</p>
</description>
<url type="homepage">http://www.cmake.org</url>
<screenshots>
<screenshot type="default">https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/CMake/a.png</screenshot>
</screenshots>
<!-- FIXME: change this to an upstream email address for spec updates
<updatecontact>cmake3-owner_at_fedoraproject.org</updatecontact>
-->
</application>
EOF

install -pm 644 %{SOURCE5} %{buildroot}%{_metainfodir}/
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.appdata.xml
%endif
%endif

%if %{with test}
%check
%if 0%{?rhel} && 0%{?rhel} <= 6
mv -f Modules/FindLibArchive.cmake Modules/FindLibArchive.disabled
%endif
pushd build
#CMake.FileDownload, CTestTestUpload, and curl require internet access
# RunCMake.CPack_RPM is broken if disttag contains "+", bug #1499151
#
# CMakeWizardTest failure: Failed Required regular expression not found.Regex=[The "cmake -i" wizard mode is no longer supported.
NO_TEST="CMake.FileDownload|CTestTestUpload|curl|RunCMake.CPack_RPM|Server|CMakeWizardTest"
# RunCMake.File_Generate fails on S390X
# CTestTestUpload require internet access.
# Disable RunCMake.CTestCommandLine bacause of the option "show-only_json-v1" failure, probably caused by not recent 'json-cpp'.
# CPackComponentsForAll-RPM-IgnoreGroup failing wih rpm 4.15 - https://gitlab.kitware.com/cmake/cmake/issues/19983
NO_TEST="CTestTestUpload|RunCMake.CTestCommandLine|Server|RunCMake.CPack_RPM|CPackComponentsForAll-RPM-IgnoreGroup"
# kwsys.testProcess-{4,5} are flaky on s390x.
%ifarch s390x
NO_TEST="$NO_TEST|RunCMake.File_Generate"
NO_TEST="$NO_TEST|kwsys.testProcess-4|kwsys.testProcess-5"
%endif
export NO_TEST
bin/ctest%{?name_suffix} -V -E "$NO_TEST" %{?_smp_mflags}
popd
%if 0%{?rhel} && 0%{?rhel} <= 6
mv -f Modules/FindLibArchive.disabled Modules/FindLibArchive.cmake
# RunCMake.PrecompileHeaders test uses precompiled file presumably compiled with different compiler
# that one of RHEL8 (GCC-8.3.1). See https://bugzilla.redhat.com/show_bug.cgi?id=1721553#c4
%if 0%{?rhel} && 0%{?rhel} > 7
NO_TEST="$NO_TEST|RunCMake.PrecompileHeaders"
%endif
%if %{with debug}
bin/ctest%{?name_suffix} -VV --debug %{?_smp_mflags} -E "$NO_TEST"
%else
bin/ctest%{?name_suffix} %{?_smp_mflags} --output-on-failure -E "$NO_TEST"
%endif
popd
%endif

%if %{with gui}
@ -369,13 +359,8 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : @@ -369,13 +359,8 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
%{_datadir}/aclocal/%{name}.m4
%{_datadir}/bash-completion/
%{_datadir}/%{name}/
%if 0%{?fedora} || 0%{?rhel} >= 7
%{_emacs_sitelispdir}/%{name}
%{_emacs_sitestartdir}/%{name}-init.el
%else
%{_emacs_sitelispdir}
%{_emacs_sitestartdir}
%endif
%{rpm_macros_dir}/macros.%{name}
%if 0%{?_rpmconfigdir:1}
%{_rpmconfigdir}/fileattrs/%{name}.attr
@ -404,6 +389,62 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : @@ -404,6 +389,62 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :


%changelog
* Wed Dec 09 2020 Antonio Trande <sagitter@fedoraproject.org> - 3.17.5-1
- Release 3.17.5

* Sun Jul 19 2020 Neal Gompa <ngompa13@gmail.com> - 3.17.3-3
- Backport support for out-of-source builds controlled by __cmake3_in_source_build macro
- Backport cmake3_build and cmake3_install macros
- Backport ctest3 macro

* Thu Jun 11 2020 Antonio Trande <sagitter@fedoraproject.org> - 3.17.3-2
- Change command to add Python shebang of the cmake3.prov file (epel bz#1845614)

* Mon Jun 01 2020 Antonio Trande <sagitter@fedoraproject.org> - 3.17.3-1
- Release 3.17.3

* Wed Apr 29 2020 Antonio Trande <sagitter@fedoraproject.org> - 3.17.2-1
- Release 3.17.2

* Mon Apr 27 2020 Antonio Trande <sagitter@fedoraproject.org> - 3.17.1-2
- Fix macros for bundled libraries
- Add Provides for bundled libraries

* Sun Apr 26 2020 Antonio Trande <sagitter@fedoraproject.org> - 3.17.1-1
- Release 3.17.1
- Drop EPEL6 support
- Add openssl BR
- Fix rhbz#1811358
- Use system zstd

* Sun Mar 08 2020 Antonio Trande <sagitter@fedoraproject.org> - 3.14.7-1
- Bugfix release 3.14.7

* Sun Sep 01 2019 Antonio Trande <sagitter@fedoraproject.org> - 3.14.6-2
- Fix rename patches

* Tue Aug 27 2019 Antonio Trande <sagitter@fedoraproject.org> - 3.14.6-1
- Update to cmake-3.14.6 (rhbz#1746146, rhbz#1746104)
- Do not use system jsoncpp
- Split off appdata file as external source file

* Sat May 25 2019 Antonio Trande <sagitter@fedoraproject.org> - 3.13.5-1
- Update to cmake-3.13.5

* Thu Mar 07 2019 Troy Dawson <tdawson@redhat.com> - 3.13.4-2
- Rebuilt to change main python from 3.4 to 3.6

* Sun Feb 03 2019 Antonio Trande <sagitter@fedoraproject.org> - 3.13.4-1
- Update to cmake-3.13.4

* Sat Jan 19 2019 Antonio Trande <sagitter@fedoraproject.org> - 3.13.3-1
- Update to cmake-3.13.3

* Sat Dec 29 2018 Antonio Trande <sagitter@fedoraproject.org> - 3.13.1-1
- Update to cmake-3.13.1
- Use Python3 on epel7
- Perform all tests

* Thu Oct 04 2018 Antonio Trande <sagitter@fedoraproject.org> - 3.12.2-1
- Update to cmake-3.12.2


Loading…
Cancel
Save