From beb3df72d48b53f2af96533f42a4d74806cbaf778dea2392e3f408f40f7fd363 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Wed, 2 Dec 2015 15:16:15 +0000 Subject: [PATCH] Accepting request 347132 from home:boombatower:branches:X11:XOrg Add Mesa-libOpenCL. OBS-URL: https://build.opensuse.org/request/show/347132 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=486 --- Mesa.changes | 5 +++++ Mesa.spec | 46 ++++++++++++++++++++++++++++++++++++++++++---- baselibs.conf | 1 + 3 files changed, 48 insertions(+), 4 deletions(-) diff --git a/Mesa.changes b/Mesa.changes index 30058f0..c31b1c7 100644 --- a/Mesa.changes +++ b/Mesa.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Dec 1 07:57:16 UTC 2015 - jimmy@boombatower.com + +- Add Mesa-libOpenCL. + ------------------------------------------------------------------- Sun Nov 22 11:05:34 UTC 2015 - zaitor@opensuse.org diff --git a/Mesa.spec b/Mesa.spec index 10f3467..e8019c3 100644 --- a/Mesa.spec +++ b/Mesa.spec @@ -19,6 +19,7 @@ %define glamor 1 %define _name_archive mesa %define _version 11.0.6 +%define with_opencl 0 %ifarch %ix86 x86_64 %arm ppc ppc64 ppc64le s390x %define gallium_loader 1 %else @@ -35,6 +36,10 @@ %endif %ifarch %ix86 x86_64 %define with_nine 1 +%if 0%{gallium_loader} && 0%{?suse_version} > 1310 +# llvm >= 3.7 not provided for <= 13.1 +%define with_opencl 1 +%endif %endif Name: Mesa Version: 11.0.6 @@ -124,6 +129,11 @@ BuildRequires: ncurses-devel %endif #!BuildIgnore: python +%if 0%{with_opencl} +BuildRequires: libclc +BuildRequires: llvm-clang-devel +%endif + %description Mesa is a 3-D graphics library with an API which is very similar to that of OpenGL.* To the extent that Mesa utilizes the OpenGL command @@ -510,6 +520,15 @@ Supplements: xf86-video-ati %description -n libvdpau_radeonsi This package contains the VDPAU state tracker for radeonsi. +%if 0%{with_opencl} +%package libOpenCL +Summary: Mesa OpenCL implementation +Group: System/Libraries + +%description libOpenCL +This package contains the Mesa OpenCL implementation or GalliumCompute. +%endif + %prep %setup -q -n %{_name_archive}-%{_version} -b4 # remove some docs @@ -558,7 +577,10 @@ autoreconf -fvi --enable-xa \ --enable-gallium-llvm \ --with-dri-drivers=i915,i965,nouveau,r200,radeon \ +%if 0%{with_opencl} + --enable-opencl \ --enable-opencl-icd \ +%endif --enable-llvm-shared-libs \ --enable-r600-llvm-compiler \ --with-gallium-drivers=r300,r600,radeonsi,nouveau,swrast,svga \ @@ -694,15 +716,22 @@ install -m 644 $RPM_SOURCE_DIR/README.updates \ %postun libd3d -p /sbin/ldconfig %endif +%if 0%{with_opencl} +%post libOpenCL -p /sbin/ldconfig + +%postun libOpenCL -p /sbin/ldconfig +%endif + %files %defattr(-,root,root) %doc docs/README* docs/COPYING %config %{_sysconfdir}/drirc %{_libdir}/dri/ -#%if %gallium_loader -#%dir %_libdir/gallium-pipe/ -#%_libdir/gallium-pipe/pipe_*.so -#%endif +%if 0%{with_opencl} +# only built with opencl +%dir %{_libdir}/gallium-pipe/ +%{_libdir}/gallium-pipe/pipe_*.so +%endif %files -n Mesa-libEGL1 %defattr(-,root,root) @@ -879,4 +908,13 @@ install -m 644 $RPM_SOURCE_DIR/README.updates \ %{_libdir}/d3d/*.so %endif +%if 0%{with_opencl} +%files libOpenCL +%defattr(-,root,root) +%dir %{_sysconfdir}/OpenCL +%dir %{_sysconfdir}/OpenCL/vendors +%{_sysconfdir}/OpenCL/vendors/mesa.icd +%{_libdir}/libMesaOpenCL.so* +%endif + %changelog diff --git a/baselibs.conf b/baselibs.conf index e1c1b85..e9cc3e7 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -60,3 +60,4 @@ libvdpau_nouveau libvdpau_r300 libvdpau_r600 libvdpau_radeonsi +Mesa-libOpenCL