]>
Commit | Line | Data |
---|---|---|
c7dfe9a1 | 1 | |
ac26e2aa | 2 | # requires the OpenCL patches |
91f591af JP |
3 | %define llvm_version 16.0.0 |
4 | %define spirv_llvm_translator_version 16.0.0 | |
2b3682a3 | 5 | |
c7dfe9a1 | 6 | Summary: Intel Graphics Compute Runtime for OpenCL |
60ea41c6 | 7 | Summary(pl.UTF-8): Biblioteki uruchomieniowe Intel Graphics Compute dla OpenCL |
c7dfe9a1 | 8 | Name: opencl-clang |
91f591af JP |
9 | Version: 16.0.0 |
10 | Release: 1 | |
c7dfe9a1 JK |
11 | License: University of Illinois/NCSA Open Source License |
12 | Group: Libraries | |
649fde22 | 13 | Source0: https://github.com/intel/opencl-clang/archive/v%{version}/%{name}-%{version}.tar.gz |
91f591af JP |
14 | # Source0-md5: f2eb3b9f9201349860f0e7ef0eb31d46 |
15 | Patch0: cxx17.patch | |
16 | Patch1: llvm16.patch | |
17 | Patch2: soname.patch | |
18 | Patch3: standalone.patch | |
c7dfe9a1 | 19 | URL: https://01.org/compute-runtime |
eac18d9c | 20 | BuildRequires: SPIRV-LLVM-Translator-devel >= %{spirv_llvm_translator_version} |
15cf855e | 21 | BuildRequires: clang >= %{llvm_rpm_version} |
5b943348 | 22 | BuildRequires: clang-devel >= %{llvm_version} |
91f591af | 23 | BuildRequires: cmake >= 3.13.4 |
5b943348 | 24 | BuildRequires: llvm-devel >= %{llvm_version} |
c7dfe9a1 | 25 | BuildRequires: pkgconfig |
77ea7f96 | 26 | BuildRequires: rpmbuild(macros) >= 1.605 |
c7dfe9a1 JK |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
28 | ||
29 | %description | |
30 | Common clang is a thin wrapper library around clang. Common clang has | |
31 | OpenCL-oriented API and is capable to compile OpenCL C kernels to | |
32 | SPIR-V modules. | |
33 | ||
60ea41c6 JB |
34 | %description -l pl.UTF-8 |
35 | Common clang to niewielka biblioteka obudowująca clanga. Ma API | |
36 | zorientowane na OpenCL i potrafi kompilować jądra C OpenCL do modułów | |
37 | WPIR-V | |
38 | ||
c7dfe9a1 JK |
39 | %package devel |
40 | Summary: Header files for %{name} library | |
41 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name} | |
42 | Group: Development/Libraries | |
15cf855e | 43 | %requires_eq clang-devel |
c7dfe9a1 JK |
44 | Requires: %{name} = %{version}-%{release} |
45 | ||
46 | %description devel | |
47 | Header files for %{name} library. | |
48 | ||
49 | %description devel -l pl.UTF-8 | |
50 | Pliki nagłówkowe biblioteki %{name}. | |
51 | ||
52 | %prep | |
649fde22 | 53 | %setup -q |
91f591af JP |
54 | %patch0 -p1 |
55 | %patch1 -p1 | |
56 | %patch2 -p1 | |
57 | %patch3 -p1 | |
c7dfe9a1 JK |
58 | |
59 | %build | |
60 | install -d build | |
61 | cd build | |
62 | %cmake \ | |
63 | -DUSE_PREBUILT_LLVM=ON \ | |
64 | -DPREFERRED_LLVM_VERSION="%{llvm_version}" \ | |
65 | -DLLVMSPIRV_INCLUDED_IN_LLVM=OFF \ | |
66 | -DSPIRV_TRANSLATOR_DIR="%{_prefix}" \ | |
0a767a56 | 67 | -DGIT_EXECUTABLE=/bin/false \ |
c7dfe9a1 JK |
68 | ../ |
69 | %{__make} | |
70 | ||
71 | cd .. | |
72 | ||
73 | %install | |
74 | rm -rf $RPM_BUILD_ROOT | |
75 | ||
76 | %{__make} -C build install \ | |
77 | DESTDIR=$RPM_BUILD_ROOT | |
78 | ||
91f591af JP |
79 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.16 $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.%{llvm_version} |
80 | ln -s libopencl-clang.so.%{llvm_version} $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.16 | |
c7dfe9a1 JK |
81 | ln -sf libopencl-clang.so.%{llvm_version} $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so |
82 | ||
83 | %post -p /sbin/ldconfig | |
84 | %postun -p /sbin/ldconfig | |
85 | ||
86 | %clean | |
87 | rm -rf $RPM_BUILD_ROOT | |
88 | ||
89 | %files | |
90 | %defattr(644,root,root,755) | |
91 | %doc README.md | |
92 | %attr(755,root,root) %{_libdir}/libopencl-clang.so.%{llvm_version} | |
91f591af | 93 | %ghost %attr(755,root,root) %{_libdir}/libopencl-clang.so.16 |
c7dfe9a1 JK |
94 | |
95 | %files devel | |
96 | %defattr(644,root,root,755) | |
97 | %attr(755,root,root) %{_libdir}/libopencl-clang.so | |
98 | %{_includedir}/cclang |