1 # TODO: is separate libGLX_mesa needed for classic DRI versions, or >=22.x is still compatible?
4 %bcond_with sse2 # SSE2 instructions
5 %bcond_with tests # tests
7 # glapi version (glapi tables in dri drivers and libglx must be in sync);
8 # set to current Mesa version on ABI break, when xserver tables get regenerated
9 # (until they start to be somehow versioned themselves)
10 %define glapi_ver 7.1.0
12 %define libdrm_ver 2.4.107
13 %define dri2proto_ver 2.8
14 %define glproto_ver 1.4.14
15 %define zlib_ver 1.2.8
16 %define libglvnd_ver 1.3.4-2
17 %define llvm_ver 11.0.0
18 %define gcc_ver 6:4.8.0
20 %ifarch %{x86_with_sse2}
24 Summary: Free OpenGL implementation
25 Summary(pl.UTF-8): Wolnodostępna implementacja standardu OpenGL
26 Name: Mesa-legacy-classic
29 License: MIT (core) and others - see license.html file
31 #Source0: ftp://ftp.freedesktop.org/pub/mesa/mesa-%{version}.tar.xz
32 ## Source0-md5: 7c61a801311fb8d2f7b3cceb7b5cf308
33 Source0: https://gitlab.freedesktop.org/mesa/mesa/-/archive/mesa-%{version}/mesa-mesa-%{version}.tar.bz2
34 # Source0-md5: 2a9dbccda11a6b07fe2b110c71fc8bd8
35 URL: https://www.mesa3d.org/
36 %{?with_gallium_zink:BuildRequires: Vulkan-Loader-devel}
37 BuildRequires: bison > 2.3
38 BuildRequires: elfutils-devel
39 BuildRequires: expat-devel >= 1.95
41 BuildRequires: gcc >= %{gcc_ver}
42 BuildRequires: libdrm-devel >= %{libdrm_ver}
43 BuildRequires: libglvnd-devel >= %{libglvnd_ver}
44 BuildRequires: libselinux-devel
45 BuildRequires: libstdc++-devel >= %{gcc_ver}
46 BuildRequires: libunwind-devel
47 BuildRequires: libxcb-devel >= 1.13
48 BuildRequires: meson >= 0.52
49 BuildRequires: ninja >= 1.5
50 BuildRequires: pkgconfig
51 BuildRequires: pkgconfig(talloc) >= 2.0.1
52 BuildRequires: pkgconfig(xcb-dri2) >= 1.8
53 BuildRequires: pkgconfig(xcb-dri3) >= 1.13
54 BuildRequires: pkgconfig(xcb-glx) >= 1.8.1
55 BuildRequires: pkgconfig(xcb-present) >= 1.13
56 BuildRequires: pkgconfig(xcb-randr) >= 1.12
57 BuildRequires: python3 >= 1:3.2
58 BuildRequires: python3-Mako >= 0.8.0
59 BuildRequires: rpmbuild(macros) >= 2.007
60 BuildRequires: sed >= 4.0
61 BuildRequires: xorg-lib-libX11-devel
62 BuildRequires: xorg-lib-libXext-devel >= 1.0.5
63 BuildRequires: xorg-lib-libXfixes-devel >= 2.0
64 BuildRequires: xorg-lib-libXrandr-devel >= 1.3
65 BuildRequires: xorg-lib-libXv-devel
66 BuildRequires: xorg-lib-libXxf86vm-devel
67 BuildRequires: xorg-lib-libxshmfence-devel >= 1.1
68 BuildRequires: xorg-proto-dri2proto-devel >= %{dri2proto_ver}
69 BuildRequires: xorg-proto-glproto-devel >= %{glproto_ver}
70 BuildRequires: zlib-devel >= %{zlib_ver}
71 BuildRequires: zstd-devel
72 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
74 # _glapi_tls_Dispatch is defined in libglapi, but it's some kind of symbol ldd -r doesn't notice(?)
75 %define skip_post_check_so libGL.so.1.* libGLX_mesa.so.0.*
78 Mesa is a 3-D graphics library with an API which is very similar to
79 that of OpenGL(R). To the extent that Mesa utilizes the OpenGL command
80 syntax or state machine, it is being used with authorization from
81 Silicon Graphics, Inc. However, the author does not possess an OpenGL
82 license from SGI, and makes no claim that Mesa is in any way a
83 compatible replacement for OpenGL or associated with SGI.
85 %description -l pl.UTF-8
86 Mesa jest biblioteką grafiki 3D z API bardzo podobnym do OpenGL(R). Do
87 tego stopnia, że Mesa używa składni i automatu OpenGL jest używana z
88 autoryzacją Silicon Graphics, Inc. Jednak autor nie posiada licencji
89 OpenGL od SGI i nie twierdzi, że Mesa jest kompatybilnym zamiennikiem
90 OpenGL ani powiązana z SGI.
93 Summary: Free Mesa3D implementation of libGL OpenGL library
94 Summary(pl.UTF-8): Wolnodostępna implementacja Mesa3D biblioteki libGL ze standardu OpenGL
97 Requires: %{name}-libglapi = %{version}-%{release}
98 Requires: libdrm >= %{libdrm_ver}
99 Requires: libxcb >= 1.13
100 Requires: libglvnd-libGL >= %{libglvnd_ver}
101 Provides: OpenGL = 4.6
102 Provides: OpenGL-GLX = 1.4
103 Obsoletes: Mesa < 6.4-2
104 Obsoletes: Mesa-dri < 6.4.1-3
105 Obsoletes: Mesa-dri-core < 10.0.0
106 Obsoletes: X11-OpenGL-libGL < 1:7.0.0
107 Obsoletes: XFree86-OpenGL-libGL < 1:7.0.0
110 Mesa is a 3-D graphics library with an API which is very similar to
111 that of OpenGL(R). To the extent that Mesa utilizes the OpenGL command
112 syntax or state machine, it is being used with authorization from
113 Silicon Graphics, Inc. However, the author does not possess an OpenGL
114 license from SGI, and makes no claim that Mesa is in any way a
115 compatible replacement for OpenGL or associated with SGI.
117 This package contains libGL which implements OpenGL 4.6 and GLX 1.4
118 specifications. It uses DRI for rendering.
120 %description libGL -l pl.UTF-8
121 Mesa jest biblioteką grafiki 3D z API bardzo podobnym do OpenGL(R). Do
122 tego stopnia, że Mesa używa składni i automatu OpenGL jest używana z
123 autoryzacją Silicon Graphics, Inc. Jednak autor nie posiada licencji
124 OpenGL od SGI i nie twierdzi, że Mesa jest kompatybilnym zamiennikiem
125 OpenGL ani powiązana z SGI.
127 Ten pakiet zawiera libGL implementującą specyfikacje OpenGL 4.6 oraz
128 GLX 1.4. Używa DRI do renderowania.
131 Summary: Header files for Mesa3D libGL library
132 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libGL z projektu Mesa3D
134 Group: X11/Development/Libraries
135 Requires: libglvnd-libGL-devel >= %{libglvnd_ver}
136 Suggests: OpenGL-doc-man
137 Obsoletes: Mesa-devel < 6.4-2
138 Obsoletes: Mesa-libGL-static < 18.3
139 Obsoletes: Mesa-static < 6.4-2
140 Obsoletes: X11-OpenGL-devel < 1:7.0.0
141 Obsoletes: X11-OpenGL-devel-base < 1:7.0.0
142 Obsoletes: X11-OpenGL-static < 1:7.0.0
143 Obsoletes: XFree86-OpenGL-devel < 1:7.0.0
144 Obsoletes: XFree86-OpenGL-devel-base < 1:7.0.0
145 Obsoletes: XFree86-OpenGL-static < 1:7.0.0
147 %description libGL-devel
148 Header files for Mesa3D libGL library.
150 %description libGL-devel -l pl.UTF-8
151 Pliki nagłówkowe biblioteki libGL z projektu Mesa3D.
154 Summary: Mesa GL API shared library
155 Summary(pl.UTF-8): Biblioteka współdzielona Mesa GL API
157 Conflicts: Mesa-libEGL < 8.0.1-2
159 %description libglapi
160 Mesa GL API shared library, common for various APIs (EGL, GL, GLES).
162 %description libglapi -l pl.UTF-8
163 Biblioteka współdzielona Mesa GL API, wspólna dla różnych API (EGL,
166 %package khrplatform-devel
167 Summary: Khronos platform header file
168 Summary(pl.UTF-8): Plik nagłówkowy platformy Khronos
169 Group: Development/Libraries
170 Provides: khrplatform-devel
171 Conflicts: Mesa-libEGL-devel < 8.0.1-2
173 %description khrplatform-devel
174 Khronos platform header file.
176 %description khrplatform-devel -l pl.UTF-8
177 Plik nagłówkowy platformy Khronos.
180 Summary: Direct Rendering Infrastructure interface header file
181 Summary(pl.UTF-8): Plik nagłówkowy interfejsu DRI (Direct Rendering Infrastructure)
182 Group: Development/Libraries
183 Requires: libdrm-devel >= %{libdrm_ver}
185 Requires: libglvnd-libGL-devel >= %{libglvnd_ver}
186 Conflicts: Mesa-libGL-devel < 21.1.0-2
188 %description dri-devel
189 Direct Rendering Infrastructure interface header file.
191 %description dri-devel -l pl.UTF-8
192 Plik nagłówkowy interfejsu DRI (Direct Rendering Infrastructure).
194 %package -n Mesa-dri-driver-ati-radeon-R100
195 Summary: X.org DRI driver for ATI R100 card family
196 Summary(pl.UTF-8): Sterownik X.org DRI dla rodziny kart ATI R100
199 Requires: zlib >= %{zlib_ver}
200 Suggests: xorg-driver-video-amdgpu
201 Suggests: xorg-driver-video-ati
202 Obsoletes: X11-driver-radeon-dri < 1:7.0.0
203 Conflicts: xorg-xserver-libglx(glapi) > %{glapi_ver}
204 Conflicts: xorg-xserver-libglx(glapi) < %{glapi_ver}
206 %description -n Mesa-dri-driver-ati-radeon-R100
207 X.org DRI driver for ATI R100 card family (Radeon 7000-7500). It
208 supports R100, RV100, RS100, RV200, RS200, RS250.
210 %description -n Mesa-dri-driver-ati-radeon-R100 -l pl.UTF-8
211 Sterownik X.org DRI dla rodziny kart ATI R100 (Radeon 7000-7500).
212 Obsługuje układy R100, RV100, RS100, RV200, RS200, RS250.
214 %package -n Mesa-dri-driver-ati-radeon-R200
215 Summary: X.org DRI driver for ATI R200 card family
216 Summary(pl.UTF-8): Sterownik X.org DRI dla rodziny kart ATI R200
219 Requires: zlib >= %{zlib_ver}
220 Suggests: xorg-driver-video-amdgpu
221 Suggests: xorg-driver-video-ati
222 Obsoletes: X11-driver-radeon-dri < 1:7.0.0
223 Conflicts: xorg-xserver-libglx(glapi) > %{glapi_ver}
224 Conflicts: xorg-xserver-libglx(glapi) < %{glapi_ver}
226 %description -n Mesa-dri-driver-ati-radeon-R200
227 X.org DRI driver for ATI R200 card family (Radeon 8500-92xx). It
228 supports R200, RV250, RV280, RS300, RS350 chips.
230 %description -n Mesa-dri-driver-ati-radeon-R200 -l pl.UTF-8
231 Sterownik X.org DRI dla rodziny kart ATI R200 (Radeon 8500-92xx).
232 Obsługuje układy R200, RV250, RV280, RS300, RS350.
234 %package -n Mesa-dri-driver-intel-i915
235 Summary: X.org DRI driver for Intel i915 card family
236 Summary(pl.UTF-8): Sterownik X.org DRI dla rodziny kart Intel i915
239 Requires: zlib >= %{zlib_ver}
240 Obsoletes: Mesa-dri-driver-intel-i830 < 6.5
241 Obsoletes: X11-driver-i810-dri < 1:7.0.0
242 Conflicts: xorg-xserver-libglx(glapi) > %{glapi_ver}
243 Conflicts: xorg-xserver-libglx(glapi) < %{glapi_ver}
245 %description -n Mesa-dri-driver-intel-i915
246 X.org DRI driver for Intel i915 card family (830, 845, 852/855, 865,
247 915, 945, G33, Q33, Q35, Pineview).
249 %description -n Mesa-dri-driver-intel-i915 -l pl.UTF-8
250 Sterownik X.org DRI dla rodziny kart Intel i915 (830, 845, 852/855,
251 865, 915, 945, G33, Q33, Q35, Pineview).
253 %package -n Mesa-dri-driver-intel-i965
254 Summary: X.org DRI driver for Intel i965 card family
255 Summary(pl.UTF-8): Sterownik X.org DRI dla rodziny kart Intel i965
258 Requires: zlib >= %{zlib_ver}
259 Obsoletes: Mesa-dri-driver-intel-i830 < 6.5
260 Obsoletes: X11-driver-i810-dri < 1:7.0.0
261 Conflicts: xorg-xserver-libglx(glapi) > %{glapi_ver}
262 Conflicts: xorg-xserver-libglx(glapi) < %{glapi_ver}
264 %description -n Mesa-dri-driver-intel-i965
265 X.org (non-Gallium) DRI driver for Intel i965 card family (946GZ,
266 965G, 965Q, 965GM, 965GME, GM45, G41, B43, Q45/Q43, G45/G43, Ironlake,
267 Sandybridge, Ivybridge, Haswell, Ray Trail, Broadwell, Cherrytrail,
268 Braswell, Cherryview, Skylake, Broxton, Kabylake, Coffeelake,
269 Geminilake, Whiskey Lake, Comet Lake, Cannonlake, Ice Lake, Elkhart
272 %description -n Mesa-dri-driver-intel-i965 -l pl.UTF-8
273 Sterownik X.org DRI (nie Gallium) dla rodziny kart Intel i965 (946GZ,
274 965G, 965Q, 965GM, 965GME, GM45, G41, B43, Q45/Q43, G45/G43, Ironlake,
275 Sandybridge, Ivybridge, Haswell, Ray Trail, Broadwell, Cherrytrail,
276 Braswell, Cherryview, Skylake, Broxton, Kabylake, Coffeelake,
277 Geminilake, Whiskey Lake, Comet Lake, Cannonlake, Ice Lake, Elkhart
280 %package -n Mesa-dri-driver-nouveau
281 Summary: X.org DRI driver for NVIDIA card family
282 Summary(pl.UTF-8): Sterownik X.org DRI dla rodziny kart NVIDIA
285 Requires: zlib >= %{zlib_ver}
286 Suggests: xorg-driver-video-nouveau
287 Conflicts: xorg-xserver-libglx(glapi) > %{glapi_ver}
288 Conflicts: xorg-xserver-libglx(glapi) < %{glapi_ver}
290 %description -n Mesa-dri-driver-nouveau
291 X.org DRI drivers for NVIDIA card family.
293 %description -n Mesa-dri-driver-nouveau -l pl.UTF-8
294 Sterowniki X.org DRI dla rodziny kart NVIDIA.
297 %setup -q -n mesa-mesa-%{version}
300 dri_drivers="nouveau r100 r200 \
301 %ifarch %{ix86} %{x8664} x32
306 dri_drivers=$(echo $dri_drivers | xargs | tr ' ' ',')
311 -Ddri-drivers=${dri_drivers} \
312 -Ddri-drivers-path=%{_libdir}/xorg/modules/dri \
319 -Dlibunwind=enabled \
322 -Dsse2=%{__true_false sse2} \
325 %ninja_build -C build
327 %{?with_tests:%ninja_test -C build}
330 rm -rf $RPM_BUILD_ROOT
332 %ninja_install -C build
334 # not used externally
335 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libglapi.so
338 rm -rf $RPM_BUILD_ROOT
340 %post libGL -p /sbin/ldconfig
341 %postun libGL -p /sbin/ldconfig
343 %post libglapi -p /sbin/ldconfig
344 %postun libglapi -p /sbin/ldconfig
351 %defattr(644,root,root,755)
352 %doc docs/{*.rst,README.UVD,features.txt,relnotes/*.rst}
353 %attr(755,root,root) %{_libdir}/libGLX_mesa.so.*.*
354 %attr(755,root,root) %ghost %{_libdir}/libGLX_mesa.so.0
355 %attr(755,root,root) %{_libdir}/libGLX_mesa.so
359 %defattr(644,root,root,755)
360 %doc docs/_extra/specs/*
363 %defattr(644,root,root,755)
364 %attr(755,root,root) %{_libdir}/libglapi.so.*.*
365 %attr(755,root,root) %ghost %{_libdir}/libglapi.so.0
366 # libglapi-devel? nothing seems to need it atm.
367 #%attr(755,root,root) %{_libdir}/libglapi.so
370 %defattr(644,root,root,755)
371 %dir %{_includedir}/GL/internal
372 %{_includedir}/GL/internal/dri_interface.h
373 %{_pkgconfigdir}/dri.pc
378 %files -n Mesa-dri-driver-ati-radeon-R100
379 %defattr(644,root,root,755)
380 %attr(755,root,root) %{_libdir}/xorg/modules/dri/radeon_dri.so
382 %files -n Mesa-dri-driver-ati-radeon-R200
383 %defattr(644,root,root,755)
384 %attr(755,root,root) %{_libdir}/xorg/modules/dri/r200_dri.so
386 %ifarch %{ix86} %{x8664} x32
387 %files -n Mesa-dri-driver-intel-i915
388 %defattr(644,root,root,755)
389 %attr(755,root,root) %{_libdir}/xorg/modules/dri/i830_dri.so
390 %attr(755,root,root) %{_libdir}/xorg/modules/dri/i915_dri.so
392 %files -n Mesa-dri-driver-intel-i965
393 %defattr(644,root,root,755)
394 %attr(755,root,root) %{_libdir}/xorg/modules/dri/i965_dri.so
397 %files -n Mesa-dri-driver-nouveau
398 %defattr(644,root,root,755)
399 %attr(755,root,root) %{_libdir}/xorg/modules/dri/nouveau_vieux_dri.so