# # spec file for package pocl # # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2014 Guillaume GARDET # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define sover 1.7.0 Name: pocl Version: 0.14 Release: 0 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 Group: Development/Tools/Other Url: http://portablecl.org/ Source0: http://portablecl.org/downloads/%{name}-%{version}.tar.gz Source99: pocl-rpmlintrc Patch0: pocl-disable-tests.diff BuildRequires: clang4-devel BuildRequires: clang4-devel-static BuildRequires: cmake >= 2.8.12 BuildRequires: libtool BuildRequires: libtool-ltdl-devel BuildRequires: llvm4-devel BuildRequires: ncurses-devel BuildRequires: ninja BuildRequires: opencl-headers BuildRequires: pkgconfig BuildRequires: uthash-devel BuildRequires: pkgconfig(OpenCL) BuildRequires: pkgconfig(glew) BuildRequires: pkgconfig(hwloc) Requires: clang4 Requires: libstdc++-devel Requires: libut2 # Only armv7l is supported # PPC support is currently broken, due to path problems # s390(x) and aarch64 also not supported, so use ExclusiveArch ExclusiveArch: %{ix86} x86_64 armv7l armv7hl BuildRequires: libboost_headers-devel Requires: gcc %description Portable Computing Language (pocl) is an implementation of the OpenCL standard which can be adapted for new targets and devices, both for homogeneous CPU and heterogenous GPUs/accelerators. pocl uses Clang as an OpenCL C frontend and LLVM for the kernel compiler implementation, and as a portability layer. If your desired target has an LLVM backend, it should be possible to get OpenCL support by using pocl. pocl yields improved performance portability by using a kernel compiler that can generate multi-work-item work-group functions that exploit various types of parallel hardware resources, such as VLIW, superscalar, SIMD, SIMT, multicore and multithread. %package devel Summary: Development files for the Portable Computing Language Group: Development/Languages/Other Requires: %{name}%{?_isa} = %{version}-%{release} Requires: opencl-headers %description devel Portable Computing Language (pocl) is an implementation of the OpenCL standard which can be adapted for new targets and devices, both for homogeneous CPU and heterogenous GPUs/accelerators. This subpackage provides the development files needed for pocl. %prep %setup -q %patch0 -p1 %build %define __builder ninja %cmake ..\ -DCMAKE_C_COMPILER=clang \ -DCMAKE_CXX_COMPILER=clang++ \ -DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,now" \ -DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,now" \ -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,now" \ -DWITH_LLVM_CONFIG=%{_bindir}/llvm-config %make_jobs # docs #cd doc/sphinx #make html %install %cmake_install # FIXME - should be handled upstream mv %{buildroot}%{_prefix}%{_libdir} %{buildroot}%{_libdir} mv %{buildroot}%{_prefix}%{_sysconfdir} %{buildroot}%{_sysconfdir} sed -i 's|%{_prefix}%{_prefix}/|%{_prefix}/|g' %{buildroot}%{_sysconfdir}/OpenCL/vendors/pocl.icd # Unbundle vecmath #rm -vf %{buildroot}/%{_libdir}/pocl/vecmath/ #ln -vs %{_includedir}/vecmath %{buildroot}/%{_libdir}/pocl/vecmath # but you need to run the .py to generate the files under the pocl dir %check #cd build #ctest %{?_smp_mflags} ||: %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %doc CHANGES README doc/sphinx/source/*.rst %dir %{_sysconfdir}/OpenCL/ %dir %{_sysconfdir}/OpenCL/vendors %{_sysconfdir}/OpenCL/vendors/pocl.icd %{_bindir}/poclcc %{_libdir}/libpocl.so.1 %{_libdir}/libpocl.so.%{sover} %{_libdir}/libpoclu.so.1 %{_libdir}/libpoclu.so.%{sover} %{_libdir}/pocl/ %{_datadir}/pocl/ %files devel %{_libdir}/libpoclu.so %{_libdir}/libpocl.so %{_libdir}/pkgconfig/pocl.pc %{_includedir}/poclu.h %changelog