Updated to version 3.1.

Fixed FTBFS on Fedora 37+.
Performed major SPEC cleanup.
Switched to SPDX license tag.
This commit is contained in:
Vitaly Zaitsev 2023-04-11 10:23:12 +02:00
parent 33c44e4d92
commit f6889aff2f
No known key found for this signature in database
GPG Key ID: BF99FC6DD45AB90A
3 changed files with 64 additions and 84 deletions

5
.gitignore vendored
View File

@ -1,4 +1 @@
*.rpm /pocl-*.tar.gz
*.tar*
results_*/
/pocl-a0b083a1b47a7389f896036087b4e712b4b14193.xz

141
pocl.spec
View File

@ -1,45 +1,38 @@
%global sover 2 %global toolchain clang
%global with_tests 1
#global commit a2d016c84d2034f43062d7f22b4874cfffe5c127
#global shortcommit %(c=%{commit}; echo ${c:0:7})
#global candidate RC1
Name: pocl Name: pocl
%global ver 1.8 Version: 3.1
Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(string.lower(ver))} Release: 1%{?dist}
Release: 3%{?candidate:.%{candidate}}%{?shortcommit:.%{shortcommit}}%{?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://portablecl.org/
%if 0%{?shortcommit} # The entire code is under MIT
Source0: https://github.com/pocl/pocl/archive/%{commit}/%{name}-%{shortcommit}.tar.gz # include/utlist.h which is under BSD-1-Clause (unbundled)
%else # lib/kernel/vecmath which is under GPL-3.0-or-later OR LGPL-3.0-or-later
Source0: https://github.com/pocl/pocl/archive/refs/tags/v%{version}%{?candidate:-%{candidate}}.tar.gz#/%{name}-%{version}.tar.gz License: MIT AND BSD-1-Clause AND (GPL-3.0-or-later OR LGPL-3.0-or-later)
%endif Summary: Portable Computing Language - an OpenCL implementation
URL: https://github.com/%{name}/%{name}
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: clang
BuildRequires: clang-devel
BuildRequires: compiler-rt
BuildRequires: glew-devel
BuildRequires: hwloc-devel
BuildRequires: libedit-devel
BuildRequires: libtool
BuildRequires: libtool-ltdl-devel
BuildRequires: llvm-devel
BuildRequires: mesa-libGL-devel
BuildRequires: mesa-libEGL-devel
BuildRequires: ocl-icd-devel
BuildRequires: uthash-devel
BuildRequires: zlib-devel
BuildRequires: ninja-build
BuildRequires: cmake
BuildRequires: clang clang-devel
BuildRequires: compiler-rt
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: vecmath-devel
# https://bugzilla.redhat.com/show_bug.cgi?id=1082364 # https://bugzilla.redhat.com/show_bug.cgi?id=1082364
Requires: libstdc++-devel%{?_isa} Requires: libstdc++-devel%{?_isa}
# Runtime dependency, because libm.so is required for kernels # Runtime dependency, because libm.so is required for kernels
Requires: glibc-devel%{?_isa} Requires: glibc-devel%{?_isa}
%description %description
Pocl's goal is to become an efficient open source (MIT-licensed) implementation Pocl's goal is to become an efficient open source (MIT-licensed) implementation
@ -57,84 +50,74 @@ functions are suitable for parallelization in multiple ways (SIMD, VLIW,
superscalar,...). superscalar,...).
%package devel %package devel
Summary: Portable Computing Language development files Summary: Portable Computing Language development files
Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: clang%{?_isa} Requires: clang%{?_isa}
Requires: ocl-icd-devel%{?_isa} Requires: ocl-icd-devel%{?_isa}
Requires: opencl-filesystem Requires: opencl-filesystem
Requires: uthash-devel Requires: uthash-devel
%description devel %description devel
Portable Computing Language development files. Portable Computing Language development files.
%prep %prep
%if 0%{?shortcommit} %autosetup -p1
%autosetup -p1 -n pocl-%{commit}
%else
%autosetup -p1 -n %{name}-%{version}%{?candidate:-%{candidate}}
%endif
# Unbundle uthash # Unbundle uthash
find . -depth -name utlist* -print -delete find . -depth -name utlist* -print -delete
%build %build
# CPU detection fails on ARM, so we need to manually specify the CPU as generic. %cmake -G Ninja \
%cmake .. \ -DCMAKE_BUILD_TYPE=Release \
-DENABLE_ICD=1 \ -DENABLE_ICD:BOOL=ON \
-DENABLE_CUDA:BOOL=OFF \
-DENABLE_TESTS:BOOL=ON \
-DENABLE_EXAMPLES:BOOL=OFF \
-DPOCL_INSTALL_ICD_VENDORDIR=%{_sysconfdir}/OpenCL/vendors \ -DPOCL_INSTALL_ICD_VENDORDIR=%{_sysconfdir}/OpenCL/vendors \
-DEXTRA_KERNEL_CXX_FLAGS="%{optflags}" \ -DEXTRA_KERNEL_CXX_FLAGS="%{optflags}" \
%ifarch %{ix86} x86_64 %ifarch %{ix86} x86_64
-DKERNELLIB_HOST_CPU_VARIANTS=distro \ -DKERNELLIB_HOST_CPU_VARIANTS=distro \
%endif %endif
%ifarch aarch64 %{arm} %ifarch aarch64
-DLLC_HOST_CPU="generic" \ -DLLC_HOST_CPU="cortex-a53" \
%endif %endif
-DPOCL_ICD_ABSOLUTE_PATH=OFF \ %ifarch riscv64
%{nil} -DLLC_HOST_CPU="generic-rv64" \
# -DENABLE_TESTSUITES=all Requires clBLAS %endif
-DPOCL_ICD_ABSOLUTE_PATH:BOOL=OFF \
-DENABLE_POCL_BUILDING:BOOL=ON \
-DWITH_LLVM_CONFIG:PATH='llvm-config'
%cmake_build %cmake_build
%install %install
%cmake_install %cmake_install
# Unbundle vecmath
#rm -vf %%{buildroot}/%%{_libdir}/pocl/vecmath/
#ln -vs %%{_includedir}/vecmath %%{buildroot}/%%{_libdir}/pocl/vecmath
# <visit0r> but you need to run the .py to generate the files under the pocl dir
%if 0%{?with_tests}
%check %check
# https://github.com/pocl/pocl/issues/602 # Upstream support running tests only on x86_64
# https://github.com/pocl/pocl/issues/603 %ifarch x86_64
ctest -VV \ %ctest
%ifarch %{ix86} %{arm}
|| :
%else
;
%endif
%endif %endif
%ldconfig_scriptlets
%files %files
%doc README.md doc/sphinx/source/*.rst
%license LICENSE %license LICENSE
%doc README doc/sphinx/source/*.rst
%{_sysconfdir}/OpenCL/vendors/%{name}.icd %{_sysconfdir}/OpenCL/vendors/%{name}.icd
%{_libdir}/lib%{name}.so.%{sover}* %{_libdir}/lib%{name}.so.2*
%{_datadir}/%{name}/ %{_datadir}/%{name}/
%{_libdir}/%{name}/ %{_libdir}/%{name}/
%{_libdir}/%{name}/libpocl-devices-basic.so
%{_libdir}/%{name}/libpocl-devices-pthread.so
%files devel %files devel
%{_bindir}/poclcc %{_bindir}/poclcc
%{_libdir}/lib%{name}.so %{_libdir}/lib%{name}.so
%{_libdir}/%{name}/libllvmopencl.so
%{_libdir}/pkgconfig/%{name}.pc %{_libdir}/pkgconfig/%{name}.pc
%changelog %changelog
* Tue Apr 11 2023 Vitaly Zaitsev <vitaly@easycoding.org> - 3.1-1
- Updated to version 3.1.
- Fixed FTBFS on Fedora 37+.
- Performed major SPEC cleanup.
- Switched to SPDX license tag.
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.8-3 * Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.8-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (pocl-1.8.tar.gz) = bcbb3fa3d2234d4c5b0c17863eba0bc4c8f13f863cc58cfd1de49e21fa7bf0aec82b81aec143c81885e3a39274c8ae783b2f03b9a12846e024204d6ed0e59a9d SHA512 (pocl-3.1.tar.gz) = 40d17e81d715f6897aa1d97fd02834d45227d9d0bd4c70e76d727f9ad4df675c25b7158a862e20e63810182fdad82a3cb1e454668c3a6422a977e59c8325fa0c