4 License: MIT and Apache-2.0 and SGI Free Software License B v2.0 and BSD-3-Clause
5 Summary: System for rendering interactive 3-D graphics
6 Url: http://www.mesa3d.org
7 Group: Graphics & UI Framework/Hardware Adaptation
8 Source: %{name}-%{version}.tar.gz
9 Source1001: %{name}.manifest
10 Source1002: 99-GPU-Acceleration.rules
14 BuildRequires: pkgconfig
15 BuildRequires: pkgconfig(expat)
16 BuildRequires: pkgconfig(libdrm) >= 2.4.75
17 BuildRequires: pkgconfig(libudev) > 150
18 BuildRequires: pkgconfig(wayland-client)
19 BuildRequires: pkgconfig(wayland-server)
20 BuildRequires: pkgconfig(wayland-protocols)
21 BuildRequires: pkgconfig(tpl-egl)
22 BuildRequires: pkgconfig(libtbm)
23 BuildRequires: pkgconfig(libtdm)
24 BuildRequires: pkgconfig(zlib)
25 BuildRequires: pkgconfig(dlog)
26 BuildRequires: pkgconfig(libsystemd)
28 BuildRequires: python3
29 BuildRequires: python3-mako
30 BuildRequires: pkgconfig(ttrace)
32 BuildRequires: pkgconfig(libdrm_intel) >= 2.4.24
35 %if "%{_with_emulator}" == "1"
42 Mesa is a 3-D graphics library with an API which is very similar to
43 that of OpenGL.* To the extent that Mesa utilizes the OpenGL command
44 syntax or state machine, it is being used with authorization from
45 Silicon Graphics, Inc.(SGI). However, the author does not possess an
46 OpenGL license from SGI, and makes no claim that Mesa is in any way a
47 compatible replacement for OpenGL or associated with SGI. Those who
48 want a licensed implementation of OpenGL should contact a licensed
51 Please do not refer to the library as MesaGL (for legal reasons). It's
52 just Mesa or The Mesa 3-D graphics library.
54 * OpenGL is a trademark of Silicon Graphics Incorporated.
57 %setup -q -n %{name}-%{version}
62 %{?asan:/usr/bin/gcc-unforce-options}
64 meson --prefix %{_prefix} build/ \
65 -Dc_link_args="-lttrace" \
66 -Dcpp_link_args="-lttrace" \
69 -Dgallium-vdpau=false \
71 -Dgallium-xvmc=false \
75 -Dplatforms="tizen,wayland,drm" \
77 -Dgallium-drivers="i915,swrast" \
81 %if "%{USE_VULKAN}" == "1"
82 -Dvulkan-drivers="broadcom" \
84 -Dgallium-drivers="vc4,v3d,kmsro,swrast"
89 DESTDIR=%{buildroot} ninja -C build/ install
90 mkdir -p %{buildroot}%{_hal_libdir}/driver
91 mkdir -p %{buildroot}%{_hal_libdir}/dri
93 cp -a %{buildroot}%{_libdir}/libEGL* %{buildroot}%{_hal_libdir}/driver/
94 cp -a %{buildroot}%{_libdir}/libGLES* %{buildroot}%{_hal_libdir}/driver/
95 cp -a %{buildroot}%{_libdir}/dri/* %{buildroot}%{_hal_libdir}/dri/
96 cp -a %{buildroot}%{_libdir}/libglapi* %{buildroot}%{_hal_libdir}/
98 %if "%{USE_VULKAN}" == "1"
99 cp -a %{buildroot}%{_libdir}/libvulkan* %{buildroot}%{_hal_libdir}/
101 ln -sf %{_hal_libdir}/dri %{buildroot}%{_libdir}/dri
102 ln -sf %{_hal_libdri}/libglapi.so.0.0.0 %{buildroot}%{_libdir}/libglapi.0.0.0
104 mkdir -p %{buildroot}%{_udevrulesdir}
105 cp 99-GPU-Acceleration.rules %{buildroot}%{_udevrulesdir}
107 %post -p /sbin/ldconfig
108 %postun -p /sbin/ldconfig
111 %define _unpackaged_files_terminate_build 0
112 %manifest %{name}.manifest
113 %defattr(-,root,root)
116 %{_hal_libdir}/libglapi*
117 %{_hal_libdir}/driver/*
121 %if "%{USE_VULKAN}" == "1"
122 %{_hal_libdir}/libvulkan*
123 /usr/share/vulkan/icd.d/*
125 %{_udevrulesdir}/99-GPU-Acceleration.rules