Accepting request 980782 from home:aaronpuchert:branches:science
- Use LLVM 13 on Tumbleweed, since LLVM 14 does not yet work according to upstream. (gh#pocl/pocl#1047, gh#pocl/pocl#1048) - Require at least version 6 of clang-devel, older versions are not supported. (Otherwise configuration will fail.) - Strip prefix from CMAKE_INSTALL_LIBDIR on older distributions to fix paths there. OBS-URL: https://build.opensuse.org/request/show/980782 OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=61
This commit is contained in:
parent
b878a78ea9
commit
e6a3b2e2e1
10
pocl.changes
10
pocl.changes
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Jun 4 14:33:49 UTC 2022 - Aaron Puchert <aaronpuchert@alice-dsl.net>
|
||||
|
||||
- Use LLVM 13 on Tumbleweed, since LLVM 14 does not yet work
|
||||
according to upstream. (gh#pocl/pocl#1047, gh#pocl/pocl#1048)
|
||||
- Require at least version 6 of clang-devel, older versions are
|
||||
not supported. (Otherwise configuration will fail.)
|
||||
- Strip prefix from CMAKE_INSTALL_LIBDIR on older distributions
|
||||
to fix paths there.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Oct 30 11:37:16 UTC 2021 - Martin Hauke <mardnh@gmx.de>
|
||||
|
||||
|
18
pocl.spec
18
pocl.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package pocl
|
||||
#
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
# Copyright (c) 2014 Guillaume GARDET <guillaume@opensuse.org>
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
@ -31,7 +31,11 @@ URL: http://portablecl.org/
|
||||
Source0: https://github.com/pocl/pocl/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
Source99: pocl-rpmlintrc
|
||||
Patch0: link_against_libclang-cpp_so.patch
|
||||
BuildRequires: clang-devel
|
||||
%if 0%{?suse_version} > 1500
|
||||
BuildRequires: clang13-devel
|
||||
%else
|
||||
BuildRequires: clang-devel >= 6.0.0
|
||||
%endif
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: ninja
|
||||
@ -88,6 +92,11 @@ This subpackage provides the development files needed for pocl.
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
# Make sure we use the right LLVM version.
|
||||
sed -i 's/find_program_or_die( *\([^ ]*\) *"\([^"]*\)" *"\([^"]*\)" *)/find_program_or_die(\1 "\2-%{pkg_version clang13-devel}" "\3")/g' cmake/LLVM.cmake
|
||||
%endif
|
||||
|
||||
%build
|
||||
%define __builder ninja
|
||||
%cmake \
|
||||
@ -102,6 +111,9 @@ This subpackage provides the development files needed for pocl.
|
||||
%endif
|
||||
%ifarch aarch64
|
||||
-DLLC_HOST_CPU=cortex-a53 \
|
||||
%endif
|
||||
%if 0%{?suse_version} <= 1500 && 0%{?sle_version} <= 150300
|
||||
-DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \
|
||||
%endif
|
||||
-DWITH_LLVM_CONFIG=%{_bindir}/llvm-config
|
||||
|
||||
@ -112,8 +124,6 @@ sed -i 's/-Wl,--no-undefined//g' build.ninja
|
||||
|
||||
%install
|
||||
%cmake_install
|
||||
# TODO: check packaging instructions
|
||||
sed -i 's|%{_prefix}%{_prefix}/|%{_prefix}/|g' %{buildroot}%{_datadir}/OpenCL/vendors/pocl.icd
|
||||
# Unbundle vecmath
|
||||
#rm -vf %%{buildroot}/%%{_libdir}/pocl/vecmath/
|
||||
#ln -vs %%{_includedir}/vecmath %%{buildroot}/%%{_libdir}/pocl/vecmath
|
||||
|
Loading…
Reference in New Issue
Block a user