2015-06-10 20:42:22 +02:00
|
|
|
#
|
|
|
|
# spec file for package pocl
|
|
|
|
#
|
2017-01-20 10:04:04 +01:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
2015-06-10 20:42:22 +02:00
|
|
|
# Copyright (c) 2014 Guillaume GARDET <guillaume@opensuse.org>
|
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
2015-10-26 22:54:13 +01:00
|
|
|
|
2017-05-18 10:29:48 +02:00
|
|
|
%define sover 1.7.0
|
2015-06-10 20:42:22 +02:00
|
|
|
Name: pocl
|
2017-05-18 10:29:48 +02:00
|
|
|
Version: 0.14
|
2016-10-09 20:20:32 +02:00
|
|
|
Release: 0
|
2015-06-10 20:42:22 +02:00
|
|
|
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)
|
2017-05-18 10:29:48 +02:00
|
|
|
License: MIT
|
|
|
|
Group: Productivity/Other
|
2015-06-10 20:42:22 +02:00
|
|
|
Url: http://portablecl.org/
|
2015-10-26 22:54:13 +01:00
|
|
|
Source0: http://portablecl.org/downloads/%{name}-%{version}.tar.gz
|
|
|
|
Source99: pocl-rpmlintrc
|
2017-05-18 10:29:48 +02:00
|
|
|
Patch0: pocl-disable-tests.diff
|
2017-02-06 18:45:06 +01:00
|
|
|
%if 0%{?suse_version} > 1325
|
|
|
|
BuildRequires: libboost_headers-devel
|
|
|
|
%else
|
2015-10-26 22:54:13 +01:00
|
|
|
BuildRequires: boost-devel
|
2017-02-06 18:45:06 +01:00
|
|
|
%endif
|
2017-05-18 10:29:48 +02:00
|
|
|
BuildRequires: clang4-devel
|
2015-10-26 22:54:13 +01:00
|
|
|
BuildRequires: cmake >= 2.8.12
|
|
|
|
BuildRequires: libtool
|
|
|
|
BuildRequires: libtool-ltdl-devel
|
2017-05-18 10:29:48 +02:00
|
|
|
BuildRequires: llvm4-devel
|
2015-10-26 22:54:13 +01:00
|
|
|
BuildRequires: ncurses-devel
|
2016-10-09 20:20:32 +02:00
|
|
|
BuildRequires: ninja
|
2015-10-26 22:54:13 +01:00
|
|
|
BuildRequires: opencl-headers
|
|
|
|
BuildRequires: pkgconfig
|
|
|
|
BuildRequires: uthash-devel
|
|
|
|
BuildRequires: pkgconfig(OpenCL)
|
2016-10-09 20:20:32 +02:00
|
|
|
BuildRequires: pkgconfig(glew)
|
2015-10-26 22:54:13 +01:00
|
|
|
BuildRequires: pkgconfig(hwloc)
|
2017-05-18 10:29:48 +02:00
|
|
|
Requires: clang4
|
2015-06-10 20:42:22 +02:00
|
|
|
Requires: libstdc++-devel
|
2015-10-26 22:54:13 +01:00
|
|
|
Requires: uthash
|
2016-10-09 20:20:32 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
# 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
|
2015-06-10 20:42:22 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
Portable Computing Language (pocl) aims to become a MIT-licensed open source
|
|
|
|
implementation of the OpenCL standard which can be easily 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. Thus, if your desired target
|
|
|
|
has an LLVM backend, it should be able to get OpenCL support easily by using pocl.
|
|
|
|
|
|
|
|
The goal is to accomplish improved performance portability using a kernel
|
|
|
|
compiler that can generate multi-work-item work-group functions that exploit
|
|
|
|
various types of parallel hardware resources: VLIW, superscalar, SIMD, SIMT,
|
|
|
|
multicore, multithread ...
|
|
|
|
|
|
|
|
Additional purpose of the project is to serve as a research platform for
|
|
|
|
issues in parallel programming on heterogeneous platforms.
|
|
|
|
|
|
|
|
%package devel
|
2015-10-26 22:54:13 +01:00
|
|
|
Summary: Portable Computing Language - development files
|
2016-10-09 20:20:32 +02:00
|
|
|
Group: Development/Languages/Other
|
2015-10-26 22:54:13 +01:00
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
Requires: opencl-headers
|
2015-06-10 20:42:22 +02:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
Portable Computing Language (pocl) aims to become a MIT-licensed open source
|
|
|
|
implementation of the OpenCL standard which can be easily 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
|
2017-05-18 10:29:48 +02:00
|
|
|
%patch0 -p1
|
2015-06-10 20:42:22 +02:00
|
|
|
|
|
|
|
%build
|
2016-10-09 20:20:32 +02:00
|
|
|
%define __builder ninja
|
|
|
|
%cmake ..\
|
2016-04-05 16:03:01 +02:00
|
|
|
-DCMAKE_C_COMPILER=clang \
|
|
|
|
-DCMAKE_CXX_COMPILER=clang++ \
|
2016-10-09 20:20:32 +02:00
|
|
|
-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
|
2015-06-10 20:42:22 +02:00
|
|
|
|
|
|
|
# docs
|
|
|
|
#cd doc/sphinx
|
|
|
|
#make html
|
|
|
|
|
|
|
|
%install
|
|
|
|
%cmake_install
|
|
|
|
|
2015-10-26 22:54:13 +01:00
|
|
|
# FIXME - should be handled upstream
|
2016-10-09 20:20:32 +02:00
|
|
|
mv %{buildroot}%{_prefix}%{_libdir} %{buildroot}%{_libdir}
|
2017-05-18 10:29:48 +02:00
|
|
|
mv %{buildroot}%{_prefix}%{_sysconfdir} %{buildroot}%{_sysconfdir}
|
2015-10-26 22:54:13 +01:00
|
|
|
|
2015-06-10 20:42:22 +02:00
|
|
|
# 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
|
|
|
|
|
|
|
|
%check
|
2017-05-18 10:29:48 +02:00
|
|
|
#cd build
|
|
|
|
#ctest %{?_smp_mflags} ||:
|
2015-06-10 20:42:22 +02:00
|
|
|
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc CHANGES README doc/sphinx/source/*.rst
|
|
|
|
%dir %{_sysconfdir}/OpenCL/
|
|
|
|
%dir %{_sysconfdir}/OpenCL/vendors
|
|
|
|
%{_sysconfdir}/OpenCL/vendors/pocl.icd
|
2017-05-18 10:29:48 +02:00
|
|
|
%{_bindir}/poclcc
|
|
|
|
%{_libdir}/libpocl.so.1
|
|
|
|
%{_libdir}/libpocl.so.%{sover}
|
|
|
|
%{_libdir}/libpoclu.so.1
|
|
|
|
%{_libdir}/libpoclu.so.%{sover}
|
2015-06-10 20:42:22 +02:00
|
|
|
%{_libdir}/pocl/
|
|
|
|
%{_datadir}/pocl/
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/libpoclu.so
|
|
|
|
%{_libdir}/libpocl.so
|
|
|
|
%{_libdir}/pkgconfig/pocl.pc
|
|
|
|
%{_includedir}/poclu.h
|
|
|
|
|
|
|
|
%changelog
|