From 004f075905c8375298365c95f3316f101ddaf6bd Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Jul 20 2020 14:27:33 +0000 Subject: Modernize cmake macro usage --- diff --git a/polly.spec b/polly.spec index 4ae5a21..4a5e3c3 100644 --- a/polly.spec +++ b/polly.spec @@ -1,5 +1,5 @@ #%%global rc_ver 6 -%global baserelease 1 +%global baserelease 2 %global polly_srcdir polly-%{version}%{?rc_ver:rc%{rc_ver}}.src Name: polly @@ -14,7 +14,7 @@ Source0: https://prereleases.llvm.org/%{version}/rc%{rc_ver}/%{polly_srcdir}.tar Source1: https://prereleases.llvm.org/%{version}/rc%{rc_ver}/%{polly_srcdir}.tar.xz.sig %else Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{polly_srcdir}.tar.xz -Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{polly_srcdir}.tar.xz.sig +Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{polly_srcdir}.tar.xz.sig %endif Source2: https://prereleases.llvm.org/%{version}/hans-gpg-key.asc @@ -24,9 +24,13 @@ BuildRequires: cmake BuildRequires: llvm-devel = %{version} BuildRequires: llvm-test = %{version} BuildRequires: clang-devel = %{version} +BuildRequires: ninja-build BuildRequires: python3-lit BuildRequires: python3-sphinx +# For origin certification +BuildRequires: gnupg2 + %description Polly is a high-level loop and data-locality optimizer and optimization infrastructure for LLVM. It uses an abstract mathematical representation based @@ -49,13 +53,12 @@ Requires: %{name} = %{version}-%{release} Documentation for the Polly optimizer. %prep +%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' %autosetup -n %{polly_srcdir} -p1 %build -mkdir -p _build -cd _build -%cmake .. \ +%cmake -GNinja \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \ -DLLVM_EXTERNAL_LIT=%{_bindir}/lit \ @@ -71,20 +74,18 @@ cd _build -DLLVM_LIBDIR_SUFFIX= %endif - - -%make_build -%{__make} docs-polly-html +%cmake_build +%cmake_build --target docs-polly-html %install -%make_install -C _build +%cmake_install + install -d %{buildroot}%{_pkgdocdir}/html -cp -r _build/docs/html/* %{buildroot}%{_pkgdocdir}/html/ +cp -r %{_vpath_builddir}/docs/html/* %{buildroot}%{_pkgdocdir}/html/ %check -%{__make} check-polly -C _build - +%cmake_build --target check-polly %files %{_libdir}/LLVMPolly.so @@ -101,6 +102,9 @@ cp -r _build/docs/html/* %{buildroot}%{_pkgdocdir}/html/ %doc %{_pkgdocdir}/html %changelog +* Mon Jul 20 2020 sguelton@redhat.com - 10.0.0-2 +- Modernize cmake macro usage + * Mon Mar 30 2020 sguelton@redhat.com - 10.0.0-1 - llvm-10.0.0 final