]> git.pld-linux.org Git - packages/opencl-clang.git/blobdiff - opencl-clang.spec
updated to snap from LLVM 12 branch (until proper release is made)
[packages/opencl-clang.git] / opencl-clang.spec
index 4d40b63766e1ae103f927ca9c3252b77d22b1b4b..46ff2f789d82891ab5c23aca1e4a7dfb0e2ef0f0 100644 (file)
@@ -1,25 +1,27 @@
 
-%define llvm_version 7.0.1
-%define spirv_llvm_translator_version 7.0.1
+# requires the OpenCL patches
+%define llvm_version 12.0.0
+
+%define spirv_llvm_translator_version 12.0.0
+
+%define        gitref  1d1829d930d31309c43512fc17ece51dd314ebde
+%define        snap    20210525
 
 Summary:       Intel Graphics Compute Runtime for OpenCL
 Name:          opencl-clang
-Version:       8.0.1
-Release:       1
+Version:       12.0.0
+Release:       0.%{snap}.1
 License:       University of Illinois/NCSA Open Source License
 Group:         Libraries
-Source0:       https://github.com/intel/opencl-clang/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: cb6b746c837a6cac6c8906911b2ea9de
-Patch0:                llvm_clang_vfs.patch
+Source0:       https://github.com/intel/opencl-clang/archive/%{gitref}/%{name}-%{snap}.tar.gz
+# Source0-md5: aa6983d5d43d2d92727837a8c1669c9f
 URL:           https://01.org/compute-runtime
-BuildRequires: SPIRV-LLVM-Translator >= %{spirv_llvm_translator_version}
-BuildRequires: clang >= %{llvm_version}
+BuildRequires: SPIRV-LLVM-Translator-devel >= %{spirv_llvm_translator_version}
+BuildRequires: clang >= %{llvm_rpm_version}
 BuildRequires: clang-devel >= %{llvm_version}
 BuildRequires: cmake >= 3.4.3
 BuildRequires: llvm-devel >= %{llvm_version}
 BuildRequires: pkgconfig
-%requires_eq   clang
-%requires_eq   clang-devel
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -31,6 +33,7 @@ SPIR-V modules.
 Summary:       Header files for %{name} library
 Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki %{name}
 Group:         Development/Libraries
+%requires_eq   clang-devel
 Requires:      %{name} = %{version}-%{release}
 
 %description devel
@@ -40,9 +43,7 @@ Header files for %{name} library.
 Pliki nagłówkowe biblioteki %{name}.
 
 %prep
-%setup -q
-
-%patch0 -p1
+%setup -q -n %{name}-%{gitref}
 
 %build
 install -d build
@@ -52,6 +53,7 @@ cd build
        -DPREFERRED_LLVM_VERSION="%{llvm_version}" \
        -DLLVMSPIRV_INCLUDED_IN_LLVM=OFF \
        -DSPIRV_TRANSLATOR_DIR="%{_prefix}" \
+       -DGIT_EXECUTABLE=/bin/false \
        ../
 %{__make}
 
@@ -63,8 +65,8 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} -C build install \
        DESTDIR=$RPM_BUILD_ROOT
 
-mv $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.7 $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.%{llvm_version}
-ln -s libopencl-clang.so.%{llvm_version} $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.7
+mv $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.12 $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.%{llvm_version}
+ln -s libopencl-clang.so.%{llvm_version} $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so.12
 ln -sf libopencl-clang.so.%{llvm_version} $RPM_BUILD_ROOT%{_libdir}/libopencl-clang.so
 
 %post  -p /sbin/ldconfig
@@ -77,7 +79,7 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc README.md
 %attr(755,root,root) %{_libdir}/libopencl-clang.so.%{llvm_version}
-%ghost %attr(755,root,root) %{_libdir}/libopencl-clang.so.7
+%ghost %attr(755,root,root) %{_libdir}/libopencl-clang.so.12
 
 %files devel
 %defattr(644,root,root,755)
This page took 0.034887 seconds and 4 git commands to generate.