Update for cmake change, build for all arches

This commit is contained in:
Peter Robinson 2020-08-04 11:53:55 +01:00
parent 3bdcd5761a
commit 18d941c82e
1 changed files with 13 additions and 22 deletions

View File

@ -1,41 +1,33 @@
%global sover 2
%global with_tests 1
Summary: Portable Computing Language - an OpenCL implementation
Name: pocl
%global ver 1.5
Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(string.lower(ver))}
Release: 5%{?dist}
Release: 6%{?dist}
Summary: Portable Computing Language - an OpenCL implementation
# The whole code is under MIT
# except include/utlist.h which is under BSD (and unbundled) and
# except lib/kernel/vecmath which is under GPLv3+ or LGPLv3+ (and unbundled in future)
License: MIT and BSD and (GPLv3+ or LGPLv3+)
URL: http://pocl.sourceforge.net
URL: http://portablecl.org/
Source0: https://github.com/pocl/pocl/archive/v%{version}/%{name}-%{version}.tar.gz
Patch0: 0001-Fix-build-failure.patch
# ppc64le builds fine, but: 97% tests passed, 4 tests failed out of 120
# ppc64 builds fine, but: 87% tests passed, 16 tests failed out of 120
# s390x builds fine, but: 15% tests passed, 102 tests failed out of 120
ExclusiveArch: %{arm} aarch64 %{ix86} x86_64
BuildRequires: cmake
BuildRequires: clang clang-devel
BuildRequires: compiler-rt
BuildRequires: llvm llvm-devel
BuildRequires: glew-devel
BuildRequires: hwloc-devel
BuildRequires: libedit-devel
BuildRequires: libtool
BuildRequires: libtool-ltdl-devel
BuildRequires: llvm llvm-devel
BuildRequires: mesa-libGL-devel
BuildRequires: mesa-libEGL-devel
BuildRequires: ocl-icd-devel
BuildRequires: uthash-devel
BuildRequires: zlib-devel
BuildRequires: libedit-devel
BuildRequires: glew-devel
#BuildRequires: vecmath-devel
# https://bugzilla.redhat.com/show_bug.cgi?id=1082364
Requires: libstdc++-devel%{?_isa}
@ -60,8 +52,8 @@ superscalar,...).
%package devel
Summary: Portable Computing Language development files
Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: ocl-icd-devel%{?_isa}
Requires: clang%{?_isa}
Requires: ocl-icd-devel%{?_isa}
Requires: opencl-filesystem
Requires: uthash-devel
@ -76,8 +68,6 @@ find . -depth -name utlist* -print -delete
%build
mkdir %{_target_platform}
pushd %{_target_platform}
# CPU detection fails on ARM, so we need to manually specify the CPU as generic.
%cmake .. \
-DENABLE_ICD=1 \
@ -92,11 +82,10 @@ pushd %{_target_platform}
-DPOCL_ICD_ABSOLUTE_PATH=OFF \
%{nil}
# -DENABLE_TESTSUITES=all Requires clBLAS
popd
%make_build -C %{_target_platform}
%cmake_build
%install
%make_install -C %{_target_platform}
%cmake_install
# Unbundle vecmath
#rm -vf %%{buildroot}/%%{_libdir}/pocl/vecmath/
@ -105,7 +94,6 @@ popd
%if 0%{?with_tests}
%check
pushd %{_target_platform}
# https://github.com/pocl/pocl/issues/602
# https://github.com/pocl/pocl/issues/603
ctest -VV \
@ -114,12 +102,12 @@ pushd %{_target_platform}
%else
;
%endif
popd
%endif
%ldconfig_scriptlets
%files
%license LICENSE
%doc README doc/sphinx/source/*.rst
%{_sysconfdir}/OpenCL/vendors/%{name}.icd
%{_libdir}/lib%{name}.so.%{sover}*
@ -132,6 +120,9 @@ popd
%{_libdir}/pkgconfig/%{name}.pc
%changelog
* Tue Aug 04 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 1.5-6
- Update for cmake change, build for all arches
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-5
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild