Blob Blame History Raw
Summary:        Portable Computing Language - an OpenCL implementation
Name:           pocl
Version:        0.13
Release:        2%{?dist}

# 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 and BSD and (GPLv3+ or LGPLv3+)
URL:            http://pocl.sourceforge.net
Source0:        http://downloads.sourceforge.net/project/pocl/%{name}-%{version}.tar.gz

# https://github.com/pocl/pocl/issues/318#issuecomment-205864382
Patch0:         i686-fix.patch

# 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

BuildRequires:  cmake
BuildRequires:  clang clang-devel
BuildRequires:  llvm llvm-devel
BuildRequires:  hwloc-devel
BuildRequires:  libtool
BuildRequires:  libtool-ltdl-devel
BuildRequires:  mesa-libGL-devel
BuildRequires:  mesa-libEGL-devel
BuildRequires:  ocl-icd-devel
BuildRequires:  opencl-filesystem
BuildRequires:  opencl-headers
BuildRequires:  uthash-devel
BuildRequires:  zlib-devel
BuildRequires:  libedit-devel
BuildRequires:  glew-devel
#BuildRequires:	vecmath-devel

Requires:       clang%{?_isa}
Requires:       opencl-filesystem
Requires:       uthash-devel
Requires:       libstdc++-devel%{?_isa}

# libstdc++ from gcc is used
# https://bugzilla.redhat.com/show_bug.cgi?id=1021645
Requires:       gcc-c++%{?_isa}

# Runtime dependency, because libm.so is required for kernels
Requires:       glibc-devel%{?_isa}


%description
Pocl's goal is to become an efficient open source (MIT-licensed) implementation
of the OpenCL 1.2 (and soon OpenCL 2.0) standard.

In addition to producing an easily portable open-source OpenCL implementation,
another major goal of this project is improving performance portability of
OpenCL programs with compiler optimizations, reducing the need for
target-dependent manual optimizations.

At the core of pocl is the kernel compiler that consists of a set of LLVM
passes used to statically transform kernels into work-group functions with
multiple work-items, even in the presence of work-group barriers. These
functions are suitable for parallelization in multiple ways (SIMD, VLIW,
superscalar,...).


%package devel
Summary:	Portable Computing Lanugage development files
Requires:	%{name}%{?_isa} = %{version}-%{release}
Requires:	opencl-headers


%description devel
Portable Computing Lanugage development files


%prep
%autosetup -p1

# Unbundle uthash
find . -depth -name utlist* | xargs rm -f

mkdir build/

%build
pushd build
  %cmake ../ \
    -DENABLE_ICD=1 \
    -DEXTRA_KERNEL_CXX_FLAGS="%{optflags} -std=c++11" \
    -DKERNELLIB_HOST_CPU_VARIANTS=distro
    # -DENABLE_TESTSUITES=all Requires clBLAS
  %make_build
popd

%install
pushd build
  %make_install
popd

# 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
pushd build
  # https://github.com/pocl/pocl/issues/318
  ctest -VV --output-on-failure \
  %ifarch %{ix86}
    || :
  %else
    ;
  %endif
popd

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%doc README doc/sphinx/source/*.rst
%{_sysconfdir}/OpenCL/vendors/pocl.icd
%{_bindir}/pocl-standalone
%{_libdir}/libpocl.so.1*
%{_libdir}/libpoclu.so.1*
%{_libdir}/pocl/
%{_datadir}/pocl/


%files devel
%{_libdir}/libpoclu.so
%{_libdir}/libpocl.so
%{_libdir}/pkgconfig/pocl.pc
%{_includedir}/poclu.h


%changelog
* Tue Apr 05 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.13-2
- use -DKERNELLIB_HOST_CPU_VARIANTS=distro
- add --output-on-failure for ctest invocation

* Tue Apr 05 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.13-1
- Update to 0.13 (RHBZ #1323866)

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.12-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Wed Jan 27 2016 Adam Jackson <ajax@redhat.com> 0.12-2
- Rebuild for llvm 3.7.1 library split

* Thu Nov 05 2015 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.12-1
- 0.12 release

* Tue Oct 06 2015 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.12-0.1.git20151006.eb665eb
- Todays snapshot (eb665eb)

* Thu Sep 17 2015 Dave Airlie <airlied@redhat.com> 0.11-3
- snapshot pocl master - for llvm 3.7 support

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Mon Apr 13 2015 Björn Esser <bjoern.esser@gmail.com> - 0.11-1
- temporarily ignore testsuite fails on fc >= 23

* Fri Apr 10 2015 Björn Esser <bjoern.esser@gmail.com> - 0.11-1
- pocl 0.11
- adds support for LLVM >= 3.5

* Fri Apr 10 2015 Björn Esser <bjoern.esser@gmail.com> - 0.10-3
- rebuild for libLLVM-3.6.so

* Tue Oct 28 2014 Adam Jackson <ajax@redhat.com> 0.10-2
- BuildRequires: libedit-devel
- Rebuild for llvm 3.5

* Tue Oct 14 2014 Adam Jackson <ajax@redhat.com> 0.10-1
- pocl 0.10

* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Thu May 22 2014 Björn Esser <bjoern.esser@gmail.com> - 0.9-5
- require uthash-devel instead of uthash
- small cleanups

* Mon Apr 07 2014 Fabian Deutsch <fabiand@fedoraproject.org> - 0.9.4
- Provide isas for correct requires rhbz#1082364

* Mon Mar 31 2014 Fabian Deutsch <fabiand@fedoraproject.org> - 0.9-3
- Add glibc-devel requirement

* Fri Jan 31 2014 Rex Dieter <rdieter@fedoraproject.org> 0.9-2
- rebuild (llvm 3.4 again)

* Wed Jan 29 2014 Fabian Deutsch <fabiand@fedoraproject.org> - 0.9-1
- Update to 0.9

* Fri Jan 17 2014 Fabian Deutsch <fabiand@fedoraproject.org> - 0.9-0.9.rc2
- Update to 0.9RC2

* Wed Jan 15 2014 Dave Airlie <airlied@redhat.com> 0.9-0.8.git20131209.9374f32
- bump for rebuild against llvm 3.4

* Mon Dec 09 2013 Fabian Deutsch <fabiand@fedoraproject.org> - 0.9-0.7.git20131209.9374f32
- Enable LLVM API mode

* Mon Dec 09 2013 Fabian Deutsch <fabiand@fedoraproject.org> - 0.9-0.6.git20131209.7fc5dd0
- Update to a working snapshot
- Drop utlist.h from Makefile
- Set LLC_HOST_CPU to workaround incorrect CPU detection/missing LLVM support

* Mon Nov 11 2013 Fabian Deutsch <fabiand@fedoraproject.org> - 0.9-0.5.git20131111.8a26561
- Fix Requirement

* Mon Nov 11 2013 Fabian Deutsch <fabiand@fedoraproject.org> - 0.9-0.4.git20131111.8a26561
- Add BR on gcc-c++ temporarily
- Update to a newer snapshot

* Mon Oct 07 2013 Fabian Deutsch <fabiand@fedoraproject.org> - 0.9-0.3.git20131007.94d0cce
- Update to 94d0cce4b368bdc963e97952ccf88e55e6a8b4ba
- Includes implementations for clSetEventCallback

* Wed Oct 02 2013 Fabian Deutsch <fabiand@fedoraproject.org> - 0.9-0.2.git20130925.b190740
- Update package summary to include OpenCL

* Tue Oct 01 2013 Björn Esser <bjoern.esser@gmail.com> - 0.9-0.1.git20130925.b190740
- update to recent git-snapshot
- minor cleanup
- include some more documentation

* Sun Sep 29 2013 Dan Horák <dan[at]danny.cz> - 0.8-8
- switch to ExclusiveArch as it needs explicit porting to new arches

* Wed Aug 28 2013 Fabian Deutsch <fabiand@fedoraproject.org> - 0.8-7
- Add requirements on opencl-filesystem and uthash
- Remove uthash sources during prep
- Fix license field

* Mon Aug 19 2013 Fabian Deutsch <fabiand@fedoraproject.org> - 0.8-6
- Move includedir to base package. This is required to build
  kernels at runtime.

* Thu Aug 15 2013 Fabian Deutsch <fabiand@fedoraproject.org> - 0.8-5
- Unbundle uthash
- Updated licenses

* Wed Aug 14 2013 Fabian Deutsch <fabiand@fedoraproject.org> - 0.8-4
- Drop -libs subpackage
- Fix -devel BR on base package

* Wed Aug 14 2013 Fabian Deutsch <fabiand@fedoraproject.org> - 0.8-3
- Add check
- Enforce ICD usage
- Fix duplicate file warnings

* Tue Aug 13 2013 Fabian Deutsch <fabiand@fedoraproject.org> - 0.8-2
- Own some dirs
- Fix -devel libraries
- Add hwloc, llvm, mesa-libGL BR
- Glob for bc and type files
- ExcludeArch armv7hl

* Mon Aug 12 2013 Fabian Deutsch <fabiand@fedoraproject.org> - 0.8-1
- Update to 0.8
- Better description
- Fix SourceUrl

* Sun Aug 11 2013 Fabian Deutsch <fabiand@fedoraproject.org> - 0.8pre-0.2
- Updated bzr snapshot

* Wed Feb 27 2013 Dave Airlie <airlied@redhat.com> - 0.8pre-0.1
- first import