%endif
%define USE_VULKAN 0
+%define VULKAN_DRIVER broadcom
+
+%define USE_GBM 0
%description
Mesa is a 3-D graphics library with an API which is very similar to
-Dgallium-xvmc=false \
-Dglx=disabled \
-Ddri3=false \
+%if "%{USE_GBM}" == "1"
-Dgbm=true \
- -Dplatforms="tizen,wayland,drm" \
+%else
+ -Dgbm=false \
+%endif
+ -Dplatforms="tizen" \
%ifarch %ix86 x86_64
-Dgallium-drivers="i915,swrast" \
-Ddri-drivers="" \
-Dvulkan-drivers=""
%else
%if "%{USE_VULKAN}" == "1"
- -Dvulkan-drivers="broadcom" \
+ -Dvulkan-drivers="%{VULKAN_DRIVER}" \
%endif
-Dgallium-drivers="vc4,v3d,kmsro,swrast"
%endif
+
ninja -C build/
%install
DESTDIR=%{buildroot} ninja -C build/ install
mkdir -p %{buildroot}%{_hal_libdir}/driver
-mkdir -p %{buildroot}%{_hal_libdir}/dri
cp -a %{buildroot}%{_libdir}/libEGL* %{buildroot}%{_hal_libdir}/driver/
cp -a %{buildroot}%{_libdir}/libGLES* %{buildroot}%{_hal_libdir}/driver/
-cp -a %{buildroot}%{_libdir}/dri/* %{buildroot}%{_hal_libdir}/dri/
cp -a %{buildroot}%{_libdir}/libglapi* %{buildroot}%{_hal_libdir}/
+mv %{buildroot}%{_libdir}/dri %{buildroot}%{_hal_libdir}/dri
%if "%{USE_VULKAN}" == "1"
-cp -a %{buildroot}%{_libdir}/libvulkan* %{buildroot}%{_hal_libdir}/
+mv %{buildroot}%{_libdir}/libvulkan_%{VULKAN_DRIVER}.so %{buildroot}%{_hal_libdir}/
+ln -sf %{_hal_libdir}/libvulkan_%{VULKAN_DRIVER}.so %{buildroot}%{_libdir}/libvulkan_%{VULKAN_DRIVER}.so
%endif
ln -sf %{_hal_libdir}/dri %{buildroot}%{_libdir}/dri
-ln -sf %{_hal_libdri}/libglapi.so.0.0.0 %{buildroot}%{_libdir}/libglapi.0.0.0
+ln -sf %{_hal_libdir}/libglapi.so.0.0.0 %{buildroot}%{_libdir}/libglapi.0.0.0
mkdir -p %{buildroot}%{_udevrulesdir}
cp 99-GPU-Acceleration.rules %{buildroot}%{_udevrulesdir}
%{_hal_libdir}/driver/*
%{_hal_libdir}/dri/*
%{_libdir}/dri
+%if "%{USE_GBM}" == "1"
%{_libdir}/libgbm*
+%endif
%if "%{USE_VULKAN}" == "1"
-%{_hal_libdir}/libvulkan*
+%{_hal_libdir}/libvulkan_%{VULKAN_DRIVER}.so
+%{_libdir}/libvulkan_%{VULKAN_DRIVER}.so
/usr/share/vulkan/icd.d/*
%endif
%{_udevrulesdir}/99-GPU-Acceleration.rules