Ravenports generated: 20 Jun 2024 17:00
[ravenports.git] / bucket_F0 / mesa
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               mesa
4 VERSION=                24.0.8
5 KEYWORDS=               graphics
6 VARIANTS=               standard
7 SDESC[standard]=        Mesa 3D Graphics Library
8 HOMEPAGE=               https://www.mesa3d.org/
9 CONTACT=                nobody
10
11 DOWNLOAD_GROUPS=        main
12 SITES[main]=            https://mesa.freedesktop.org/archive/
13                         ftp://ftp.freedesktop.org/pub/mesa/
14 DISTFILE[1]=            mesa-24.0.8.tar.xz:main
15 DF_INDEX=               1
16 SPKGS[standard]=        complete
17                         primary
18                         drivers
19                         dev
20
21 OPTIONS_AVAILABLE=      X86_DRIVERS ARM_DRIVERS LLVMPIPE WAYLAND
22 OPTIONS_STANDARD=       X86_DRIVERS ARM_DRIVERS LLVMPIPE
23 OPT_ON[freebsd]=        LLVMPIPE//i386|x86_64
24 OPT_ON[aarch64]=        ARM_DRIVERS
25 OPT_ON[linux]=          LLVMPIPE//i386|x86_64
26 OPT_ON[x86_64]=         X86_DRIVERS
27 OPT_ON[netbsd]=         LLVMPIPE//i386|x86_64
28 OPT_ON[dragonfly]=      LLVMPIPE//i386|x86_64
29 OPT_ON[i386]=           X86_DRIVERS
30 OPT_ON[midnightbsd]=    LLVMPIPE//i386|x86_64
31
32 BUILD_DEPENDS=          libdrm:dev:standard
33                         libelf:dev:standard
34                         libelf:primary:standard
35                         libva:dev:standard
36                         libvdpau:dev:standard
37                         python-Mako:single:python_used
38 BUILDRUN_DEPENDS=       libdrm:primary:standard
39 EXRUN[drivers]=         mesa:primary:standard
40                         libelf:primary:standard
41
42 USES=                   cpe bison gettext:build gmake meson pkgconfig zstd
43                         zlib expat shebangfix solaris-funcs python:build
44                         c++:primary,drivers
45 XORG_COMPONENTS=        x11 xdamage xext xfixes xshmfence xxf86vm xv xrandr
46                         xcb
47
48 LICENSE=                MIT:primary CUSTOM1:primary CUSTOM2:primary
49 LICENSE_NAME=           CUSTOM1:"Kronos License (MIT with modifications)"
50                         CUSTOM2:"SGI Free Software License B"
51 LICENSE_FILE=           MIT:{{WRKDIR}}/LICENSE_MIT
52                         CUSTOM1:{{WRKDIR}}/LICENSE_KHRONOS
53                         CUSTOM2:{{WRKDIR}}/LICENSE_SGI
54 LICENSE_AWK=            MIT:"^$$"
55                         CUSTOM2:"^$$"
56 LICENSE_SOURCE=         MIT:{{WRKSRC}}/include/GL/gl.h
57                         CUSTOM2:{{WRKSRC}}/src/glx/eval.c
58 LICENSE_SCHEME=         multi
59
60 CPE_VENDOR=             mesa3d
61 FPC_EQUIVALENT=         graphics/mesa-libs
62 MESON_ARGS=             -Dplatforms=x11{{WAYPLAT}}
63                         -Dzstd=enabled
64                         -Ddri3=enabled
65                         -Dgallium-drivers={{GALLIUM_DRIVERS:tW:tl:C/[[:space:]]/,/g}}
66                         -Dosmesa=true
67                         -Dlibunwind=disabled
68                         -Dgles1=disabled
69                         -Dgles2=disabled
70                         -Dglx=auto
71                         -Dopengl=true
72                         -Degl=disabled
73                         -Dvulkan-drivers={{VULKAN_DRIVERS:tW:tl:C/[[:space:]]/,/g}}
74 SHEBANG_FILES=          src/gallium/*/*/*.py
75                         src/gallium/tools/trace/*.py
76                         src/gallium/drivers/svga/svgadump/svga_dump.py
77                         src/mapi/glapi/gen/*.py
78                         src/mapi/mapi_abi.py
79                         src/mesa/main/get_*.py
80                         src/util/format_srgb.py
81                         src/amd/*/*.py
82                         src/intel/genxml/gen_pack_header.py
83 SHEBANG_OLD_PYTHON=     /usr/bin/env[[:space:]]python2
84                         /usr/bin/python2
85                         /bin/env[[:space:]]python
86 SOL_FUNCTIONS=          dirfd:src/util/disk_cache.c
87                         asprintf:src/util/anon_file.c
88                         asprintf:src/mesa/drivers/dri/common/megadriver_stub.c
89                         asprintf:src/loader/loader.c
90                         asprintf:src/egl/main/eglcurrent.c
91                         asprintf:src/util/u_string.h
92                         asprintf:src/amd/common/ac_rtld.c
93                         strnlen:src/util/ralloc.c
94                         strnlen:src/mesa/main/errors.c
95                         strndup:src/loader/loader.c
96                         strndup:src/egl/drivers/dri2/platform_x11.c
97                         strndup:src/gallium/drivers/r600/evergreen_compute.c
98                         strndup:src/gallium/drivers/radeonsi/si_debug.c
99
100 CONFIGURE_ENV=          ax_cv_check_cflags___Wno_initializer_overrides=no
101
102 INSTALL_TARGET=         install-strip
103 INSTALL_REQ_TOOLCHAIN=  yes
104
105 CFLAGS=                 -Wno-pointer-sign
106 VAR_OPSYS[sunos]=       CPPFLAGS=-D__EXTENSIONS__=1
107                         CPPFLAGS=-Wno-unused-function
108                         CXXFLAGS=-Drestrict=__restrict__
109                         CFLAGS=-D_POSIX_PTHREAD_SEMANTICS
110                         CFLAGS=-DF_DUPFD_CLOEXEC=F_DUPFD
111                         CFLAGS=-Wno-incompatible-pointer-types
112                         LDFLAGS=-lsocket
113                         LDFLAGS=-lnsl
114                         MAKEFILE_LINE=MESON_ARGS+=-Dshader-cache=false
115
116 [ARM_DRIVERS].DESCRIPTION=              Build drivers for aarch64 architecture
117 [ARM_DRIVERS].MAKEFILE_ON=              GALLIUM_DRIVERS+=FREEDRENO
118                                         GALLIUM_DRIVERS+=VC4
119
120 [X86_DRIVERS].DESCRIPTION=              Build drivers for i386 and x86_64 architectures
121 [X86_DRIVERS].MAKEFILE_ON=              GALLIUM_DRIVERS+=R300
122                                         GALLIUM_DRIVERS+=SVGA
123                                         VULKAN_DRIVERS+={{VULKAN_DRIVERS_X86}}
124
125 [WAYLAND].DESCRIPTION=                  Build Vulkan drivers for Wayland platform
126 [WAYLAND].BUILDRUN_DEPENDS_ON=          wayland:primary:standard
127 [WAYLAND].BUILD_DEPENDS_ON=             wayland-protocols:single:standard
128                                         python-Mako:single:python_default
129                                         wayland:dev:standard
130 [WAYLAND].MAKEFILE_ON=                  WAYPLAT=,wayland
131                                         VULKAN_DRIVERS+=INTEL
132                                         VULKAN_DRIVERS_X86+=RADEON
133
134 [LLVMPIPE].DESCRIPTION=                 Build LLVM-based drivers and libraries
135 [LLVMPIPE].BUILDRUN_DEPENDS_ON=         llvm17:primary:standard
136                                         ocl-icd:primary:standard
137 [LLVMPIPE].BUILD_DEPENDS_ON=            libclc:single:standard
138                                         opencl-headers:single:standard
139                                         ocl-icd:dev:standard
140                                         llvm17:tools:standard
141                                         llvm17:dev:standard
142                                         clang17:complete:standard
143 [LLVMPIPE].MAKEFILE_OFF=                MESON_ARGS+=-Dgallium-opencl=disabled
144 [LLVMPIPE].MAKEFILE_ON=                 GALLIUM_LLVM_DRIVERS+=R600
145                                         GALLIUM_LLVM_DRIVERS+=RADEONSI
146                                         GALLIUM_DRIVERS+={{GALLIUM_LLVM_DRIVERS}}
147                                         MESON_ARGS+=-Dllvm=true
148                                         MESON_ARGS+=-Dgallium-va=enabled
149                                         MESON_ARGS+=-Dgallium-opencl=icd
150                                         MESON_ARGS+=-Dgallium-vdpau=enabled
151 [LLVMPIPE].RUN_DEPENDS_ON=              clang17:dynlibs:standard
152
153 pre-patch-linux:
154         # qsort fixes for BSD break linux
155         ${RM} ${PATCHDIR}/patch-meson.build
156
157 post-install:
158         ${RM} ${STAGEDIR}${PREFIX}/lib/libGL.so*
159         ${RM} ${STAGEDIR}${PREFIX}/include/GL/g*.h
160         ${RM} ${STAGEDIR}${PREFIX}/lib/pkgconfig/gl.pc
161         ${RM} -r ${STAGEDIR}${PREFIX}/include/KHR
162         ${INSTALL_DATA} ${FILESDIR}/01-freebsd.conf \
163                 ${STAGEDIR}${PREFIX}/share/drirc.d
164
165 pre-configure:
166         ${REINPLACE_CMD} \
167                 -e '/SYSCONFDIR/ s|/etc|${PREFIX}/etc|g' \
168                 -e '/DATADIR/ s|/usr/share|${PREFIX}/share|g' \
169                 ${WRKSRC}/src/util/xmlconfig.c
170
171 post-extract:
172         ${AWK} '/Copyright/,/DEALINGS/' ${WRKSRC}/include/GL/glext.h \
173                 > ${WRKDIR}/LICENSE_KHRONOS
174
175 [FILE:1198:descriptions/desc.primary]
176 The Mesa project began as an open-source implementation of the OpenGL
177 specification - a system for rendering interactive 3D graphics.
178
179 Over the years the project has grown to implement more graphics APIs,
180 including OpenGL ES (versions 1, 2, 3), OpenCL, OpenMAX, VDPAU, VA API,
181 XvMC and Vulkan.
182
183 A variety of device drivers allows the Mesa libraries to be used in many
184 different environments ranging from software emulation to complete
185 hardware acceleration for modern GPUs.
186
187 Mesa ties into several other open-source projects: the Direct Rendering
188 Infrastructure and X.org to provide OpenGL support on Linux, FreeBSD
189 and other operating systems.
190
191 This package contains the Mesa OpenGL libraries for GLX and EGL clients.
192 These include libOSMesa, libEGL, libGL, and libglesv2 as well as utility
193 libraries libglapi and gbm.  The OSMesa library is an Off-Screen version
194 of Mesa in order to do off-screen rendering in other packages like VTK.
195 Offscreen rendering is useful for a number of things, such as batch
196 processing, parallel processing, and remote processing.
197
198 This package also contains Mesa's libOpenCL implementation "Clover".  It is
199 built upon GALLIUM and currently only supports Radeon GPUs.
200
201
202 [FILE:162:descriptions/desc.drivers]
203 This package contains the Mesa OpenGL libraries for GLX and EGL clients.
204 These include libEGL, libGL, and libglesv2 as well as utlity libraries
205 libglapi and gbm.
206
207
208 [FILE:97:distinfo]
209 d1ed86a266d5b7b8c136ae587ef5618ed1a9837a43440f3713622bf0123bf5c1     20170168 mesa-24.0.8.tar.xz
210
211
212 [FILE:365:manifests/plist.primary]
213 %%LLVMPIPE-ON%%etc/OpenCL/vendors/mesa.icd
214 %%LLVMPIPE-ON%%lib/
215  libMesaOpenCL.so.1
216  libMesaOpenCL.so.1.0.0
217 %%LLVMPIPE-ON%%lib/gallium-pipe/
218  pipe_r300.so
219  pipe_r600.so
220  pipe_radeonsi.so
221  pipe_swrast.so
222  pipe_vmwgfx.so
223 lib/
224  libOSMesa.so.8
225  libOSMesa.so.8.0.0
226  libgbm.so.1
227  libgbm.so.1.0.0
228  libglapi.so.0
229  libglapi.so.0.0.0
230  libxatracker.so.2
231  libxatracker.so.2.5.0
232
233
234 [FILE:483:manifests/plist.drivers]
235 %%ARM_DRIVERS-ON%%lib/dri/
236  kgsl_dri.so
237  msm_dri.so
238  vc4_dri.so
239 %%LLVMPIPE-ON%%lib/dri/
240  r600_dri.so
241  r600_drv_video.so
242  radeonsi_dri.so
243  radeonsi_drv_video.so
244 %%LLVMPIPE-ON%%lib/vdpau/
245  libvdpau_r600.so.1
246  libvdpau_r600.so.1.0
247  libvdpau_r600.so.1.0.0
248  libvdpau_radeonsi.so.1
249  libvdpau_radeonsi.so.1.0
250  libvdpau_radeonsi.so.1.0.0
251 %%X86_DRIVERS-ON%%lib/dri/
252  r300_dri.so
253  vmwgfx_dri.so
254 lib/dri/
255  kms_swrast_dri.so
256  swrast_dri.so
257 share/drirc.d/
258  00-mesa-defaults.conf
259  01-freebsd.conf
260
261
262 [FILE:334:manifests/plist.dev]
263 %%LLVMPIPE-ON%%lib/libMesaOpenCL.so
264 %%LLVMPIPE-ON%%lib/vdpau/
265  libvdpau_r600.so
266  libvdpau_radeonsi.so
267 include/
268  gbm.h
269  xa_composite.h
270  xa_context.h
271  xa_tracker.h
272 include/GL/osmesa.h
273 include/GL/internal/dri_interface.h
274 lib/
275  libOSMesa.so
276  libgbm.so
277  libglapi.so
278  libxatracker.so
279 lib/pkgconfig/
280  dri.pc
281  gbm.pc
282  osmesa.pc
283  xatracker.pc
284
285
286 [FILE:2287:patches/patch-meson.build]
287 --- meson.build.orig    2024-05-08 13:28:59 UTC
288 +++ meson.build
289 @@ -128,7 +128,7 @@ with_any_opengl = with_opengl or with_gl
290  # Only build shared_glapi if at least one OpenGL API is enabled
291  with_shared_glapi = with_shared_glapi and with_any_opengl
292  
293 -system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos', 'android', 'managarm'].contains(host_machine.system())
294 +system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos', 'android', 'managarm', 'midnightbsd'].contains(host_machine.system())
295  
296  gallium_drivers = get_option('gallium-drivers')
297  if gallium_drivers.contains('auto')
298 @@ -1115,7 +1115,7 @@ else
299    endif
300  
301    # FreeBSD annotated <pthread.h> but Mesa isn't ready
302 -  if not (cc.get_id() == 'clang' and host_machine.system() == 'freebsd')
303 +  if not (cc.get_id() == 'clang' and ['freebsd', 'midnightbsd'].contains(host_machine.system()))
304      _trial_c += ['-Werror=thread-safety']
305    endif
306  
307 @@ -1387,34 +1387,34 @@ foreach f, prefix: functions_to_detect
308  endforeach
309  
310  if cpp.links('''
311 -    #define _GNU_SOURCE
312      #include <stdlib.h>
313  
314 -    static int dcomp(const void *l, const void *r, void *t) { return 0; }
315 +    static int dcomp(void *t, const void *l, const void *r) { return 0; }
316  
317      int main(int ac, char **av) {
318        int arr[] = { 1 };
319        void *t = NULL;
320 -      qsort_r((void*)&arr[0], 1, 1, dcomp, t);
321 +      qsort_r((void*)&arr[0], 1, 1, t, dcomp);
322        return (0);
323      }''',
324      args : pre_args,
325 -    name : 'GNU qsort_r')
326 -  pre_args += '-DHAVE_GNU_QSORT_R'
327 +    name : 'BSD qsort_r')
328 +  pre_args += '-DHAVE_BSD_QSORT_R'
329  elif cpp.links('''
330 +    #define _GNU_SOURCE
331      #include <stdlib.h>
332  
333 -    static int dcomp(void *t, const void *l, const void *r) { return 0; }
334 +    static int dcomp(const void *l, const void *r, void *t) { return 0; }
335  
336      int main(int ac, char **av) {
337        int arr[] = { 1 };
338        void *t = NULL;
339 -      qsort_r((void*)&arr[0], 1, 1, t, dcomp);
340 +      qsort_r((void*)&arr[0], 1, 1, dcomp, t);
341        return (0);
342      }''',
343      args : pre_args,
344 -    name : 'BSD qsort_r')
345 -  pre_args += '-DHAVE_BSD_QSORT_R'
346 +    name : 'GNU qsort_r')
347 +  pre_args += '-DHAVE_GNU_QSORT_R'
348  endif
349  
350  if cc.has_header_symbol('time.h', 'struct timespec')
351
352
353 [FILE:227:patches/patch-src_amd_llvm_ac__llvm__build.h]
354 --- src/amd/llvm/ac_llvm_build.h.orig   2024-05-08 13:28:59 UTC
355 +++ src/amd/llvm/ac_llvm_build.h
356 @@ -16,6 +16,10 @@
357  
358  #include <stdbool.h>
359  
360 +#ifdef __sun
361 +#include <alloca.h>
362 +#endif
363 +
364  #ifdef __cplusplus
365  extern "C" {
366  #endif
367
368
369 [FILE:512:patches/patch-src_amd_vulkan_radv__device.c]
370 - Define CLOCK_MONOTONIC_RAW if missing
371
372 --- src/amd/vulkan/radv_device.c.orig   2024-05-08 13:28:59 UTC
373 +++ src/amd/vulkan/radv_device.c
374 @@ -462,6 +462,14 @@ radv_parse_force_vrs_config_file(const c
375  
376  #define BUF_LEN ((10 * (sizeof(struct inotify_event) + NAME_MAX + 1)))
377  
378 +#ifndef CLOCK_MONOTONIC_RAW
379 +# ifdef CLOCK_MONOTONIC_FAST
380 +#  define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC_FAST
381 +# else
382 +#  define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC
383 +# endif
384 +#endif
385 +
386  static int
387  radv_notifier_thread_run(void *data)
388  {
389
390
391 [FILE:354:patches/patch-src_amd_vulkan_winsys_amdgpu_radv__amdgpu__cs.c]
392 - Define ETIME if missing
393
394 --- src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c.orig  2024-05-08 13:28:59 UTC
395 +++ src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c
396 @@ -48,6 +48,10 @@
397  
398  enum { VIRTUAL_BUFFER_HASH_TABLE_SIZE = 1024 };
399  
400 +#ifndef ETIME
401 +#define ETIME ETIMEDOUT
402 +#endif
403 +
404  struct radv_amdgpu_ib {
405     struct radeon_winsys_bo *bo;
406     unsigned cdw;
407
408
409 [FILE:544:patches/patch-src_egl_drivers_dri2_egl__dri2.c]
410 --- src/egl/drivers/dri2/egl_dri2.c.orig        2024-05-08 13:28:59 UTC
411 +++ src/egl/drivers/dri2/egl_dri2.c
412 @@ -941,11 +941,13 @@ dri2_setup_screen(_EGLDisplay *disp)
413           disp->Extensions.KHR_gl_texture_3D_image = EGL_TRUE;
414  
415  #ifdef HAVE_LIBDRM
416 +# ifndef __DragonFly__
417        if (dri2_dpy->image->base.version >= 8 &&
418            dri2_dpy->image->createImageFromDmaBufs) {
419           disp->Extensions.EXT_image_dma_buf_import = EGL_TRUE;
420           disp->Extensions.EXT_image_dma_buf_import_modifiers = EGL_TRUE;
421        }
422 +# endif
423  #endif
424     }
425  
426
427
428 [FILE:798:patches/patch-src_egl_drivers_dri2_platform__wayland.c]
429 --- src/egl/drivers/dri2/platform_wayland.c.orig        2024-05-08 13:28:59 UTC
430 +++ src/egl/drivers/dri2/platform_wayland.c
431 @@ -1980,6 +1980,7 @@ registry_handle_global_drm(void *data, s
432     if (strcmp(interface, wl_drm_interface.name) == 0) {
433        dri2_dpy->wl_drm_version = MIN2(version, 2);
434        dri2_dpy->wl_drm_name = name;
435 +#ifndef __DragonFly__
436     } else if (strcmp(interface, zwp_linux_dmabuf_v1_interface.name) == 0 &&
437                version >= 3) {
438        dri2_dpy->wl_dmabuf = wl_registry_bind(
439 @@ -1987,6 +1988,7 @@ registry_handle_global_drm(void *data, s
440           MIN2(version, ZWP_LINUX_DMABUF_V1_GET_DEFAULT_FEEDBACK_SINCE_VERSION));
441        zwp_linux_dmabuf_v1_add_listener(dri2_dpy->wl_dmabuf, &dmabuf_listener,
442                                         dri2_dpy);
443 +#endif
444     }
445  }
446  
447
448
449 [FILE:281:patches/patch-src_egl_main_eglglobals.c]
450 --- src/egl/main/eglglobals.c.orig      2024-05-08 13:28:59 UTC
451 +++ src/egl/main/eglglobals.c
452 @@ -40,6 +40,10 @@
453  #include "util/macros.h"
454  #include "util/os_misc.h"
455  
456 +#ifdef __DragonFly__
457 +#undef HAVE_MINCORE
458 +#endif
459 +
460  #ifdef HAVE_MINCORE
461  #include <unistd.h>
462  #include <sys/mman.h>
463
464
465 [FILE:314:patches/patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.c]
466 --- src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c.orig    2024-05-08 13:28:59 UTC
467 +++ src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
468 @@ -36,6 +36,7 @@
469  #include <xf86drm.h>
470  #include <unistd.h>
471  #include <fcntl.h>
472 +#include <stdbool.h>
473  
474  #include "loader.h"
475  #include "target-helpers/drm_helper_public.h"
476
477
478 [FILE:357:patches/patch-src_gallium_auxiliary_renderonly_renderonly.c]
479 --- src/gallium/auxiliary/renderonly/renderonly.c.orig  2024-05-08 13:28:59 UTC
480 +++ src/gallium/auxiliary/renderonly/renderonly.c
481 @@ -37,6 +37,10 @@
482  #include "util/u_inlines.h"
483  #include "util/u_memory.h"
484  
485 +#ifndef O_CLOEXEC
486 +#define O_CLOEXEC 0
487 +#endif
488 +
489  void
490  renderonly_scanout_destroy(struct renderonly_scanout *scanout,
491                            struct renderonly *ro)
492
493
494 [FILE:403:patches/patch-src_gallium_drivers_llvmpipe_lp__scene.c]
495 --- src/gallium/drivers/llvmpipe/lp_scene.c.orig        2024-05-08 13:28:59 UTC
496 +++ src/gallium/drivers/llvmpipe/lp_scene.c
497 @@ -25,6 +25,10 @@
498   *
499   **************************************************************************/
500  
501 +#ifdef __NetBSD__
502 +#define _OPENBSD_SOURCE
503 +#include <stdlib.h> /* for reallocarray */
504 +#endif
505  #include "util/u_framebuffer.h"
506  #include "util/u_math.h"
507  #include "util/u_memory.h"
508
509
510 [FILE:360:patches/patch-src_gallium_drivers_vc4_vc4__bufmgr.c]
511 # define ETIME as ETIMEOUT same as in intel driver
512 #
513 --- src/gallium/drivers/vc4/vc4_bufmgr.c.orig   2024-05-08 13:28:59 UTC
514 +++ src/gallium/drivers/vc4/vc4_bufmgr.c
515 @@ -27,6 +27,9 @@
516  #include <fcntl.h>
517  #include <xf86drm.h>
518  #include <xf86drmMode.h>
519 +#ifndef ETIME
520 +#define ETIME ETIMEDOUT
521 +#endif
522  
523  #include "util/u_hash_table.h"
524  #include "util/u_memory.h"
525
526
527 [FILE:271:patches/patch-src_gallium_winsys_amdgpu_drm_amdgpu__cs.c]
528 --- src/gallium/winsys/amdgpu/drm/amdgpu_cs.c.orig      2024-05-08 13:28:59 UTC
529 +++ src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
530 @@ -13,6 +13,10 @@
531  
532  #include "amd/common/sid.h"
533  
534 +#ifdef __sun__
535 +#include <alloca.h>
536 +#endif
537 +
538  /* FENCES */
539  
540  static struct pipe_fence_handle *
541
542
543 [FILE:1012:patches/patch-src_intel_common_intel__measure.c]
544 --- src/intel/common/intel_measure.c.orig       2024-05-08 13:28:59 UTC
545 +++ src/intel/common/intel_measure.c
546 @@ -42,6 +42,46 @@
547  #include "util/u_debug.h"
548  #include "util/macros.h"
549  
550 +#ifdef __sun
551 +static int
552 +mkfifoat(int fd, const char *path, mode_t mode)
553 +{
554 +       int     er, curfd = -1, newfd = -1;
555 +
556 +       /* Get our current directory then switch to the given one. */
557 +
558 +       if (fd != AT_FDCWD) {
559 +               if ((curfd = open(".", O_RDONLY, 0)) == -1)
560 +                       return -1;
561 +               if (fchdir(fd) == -1)
562 +                       goto out;
563 +       }
564 +
565 +       if ((newfd = mkfifo(path, mode)) == -1)
566 +               goto out;
567 +
568 +       /* This leaves the fifo if it fails. */
569 +
570 +       if (curfd != -1 && fchdir(curfd) == -1)
571 +               goto out;
572 +       if (curfd != -1)
573 +               close(curfd);
574 +
575 +       return newfd;
576 +out:
577 +       /* Ignore errors in close(2). */
578 +
579 +       er = errno;
580 +       if (curfd != -1)
581 +               fchdir(curfd);
582 +       if (curfd != -1)
583 +               close(curfd);
584 +       if (newfd != -1)
585 +               close(newfd);
586 +       errno = er;
587 +       return -1;
588 +}
589 +#endif
590  
591  static const struct debug_control debug_control[] = {
592     { "draw",            INTEL_MEASURE_DRAW       },
593
594
595 [FILE:1014:patches/patch-src_intel_compiler_brw__eu__validate.c]
596 --- src/intel/compiler/brw_eu_validate.c.orig   2024-05-08 13:28:59 UTC
597 +++ src/intel/compiler/brw_eu_validate.c
598 @@ -41,6 +41,39 @@
599  #include <stdlib.h>
600  #include "brw_eu.h"
601  
602 +#ifdef __sun__
603 +#include <string.h>
604 +
605 +static void *
606 +memmem(const void *l, size_t l_len, const void *s, size_t s_len)
607 +{
608 +       char *cur, *last;
609 +       const char *cl = (const char *)l;
610 +       const char *cs = (const char *)s;
611 +
612 +       /* we need something to compare */
613 +       if (l_len == 0 || s_len == 0)
614 +               return NULL;
615 +
616 +       /* "s" must be smaller or equal to "l" */
617 +       if (l_len < s_len)
618 +               return NULL;
619 +
620 +       /* special case where s_len == 1 */
621 +       if (s_len == 1)
622 +               return memchr(l, (int)*cs, l_len);
623 +
624 +       /* the last position where its possible to find "s" in "l" */
625 +       last = (char *)cl + l_len - s_len;
626 +
627 +       for (cur = (char *)cl; cur <= last; cur++)
628 +               if (cur[0] == cs[0] && memcmp(cur, cs, s_len) == 0)
629 +                       return cur;
630 +
631 +       return NULL;
632 +}
633 +#endif
634 +
635  /* We're going to do lots of string concatenation, so this should help. */
636  struct string {
637     char *str;
638
639
640 [FILE:954:patches/patch-src_intel_compiler_brw__fs__bank__conflicts.cpp]
641 --- src/intel/compiler/brw_fs_bank_conflicts.cpp.orig   2024-05-08 13:28:59 UTC
642 +++ src/intel/compiler/brw_fs_bank_conflicts.cpp
643 @@ -309,8 +309,13 @@ namespace {
644           const unsigned align = MAX2(sizeof(void *), __alignof__(vector_type));
645           const unsigned size = DIV_ROUND_UP(n, vector_width) * sizeof(vector_type);
646           void *p;
647 +#ifdef __sun
648 +       p = memalign(align, size);
649 +       if (p == NULL) return NULL;
650 +#else
651           if (posix_memalign(&p, align, size))
652              return NULL;
653 +#endif
654           memset(p, 0, size);
655           return reinterpret_cast<vector_type *>(p);
656        }
657 @@ -737,7 +742,7 @@ namespace {
658                     const weight_vector_type &conflicts)
659     {
660        const unsigned m = DIV_ROUND_UP(conflicts.size, vector_width);
661 -      vector_type s_p = {}, s_n = {};
662 +      vector_type s_p = {0}, s_n = {0};
663  
664        for (unsigned r = 0; r < m; r++) {
665           s_p = adds(s_p, mask(bank_mask_p.v[r], conflicts.v[r]));
666
667
668 [FILE:234:patches/patch-src_intel_isl_isl.h]
669 --- src/intel/isl/isl.h.orig    2024-05-08 13:28:59 UTC
670 +++ src/intel/isl/isl.h
671 @@ -48,6 +48,9 @@
672  #include "util/format/u_format.h"
673  
674  #ifdef __cplusplus
675 +# ifdef __sun__
676 +# define restrict      __restrict__
677 +# endif
678  extern "C" {
679  #endif
680  
681
682
683 [FILE:302:patches/patch-src_intel_tools_aubinator__error__decode.c]
684 # expose getline in FreeBSD's stdio.h
685 #
686 --- src/intel/tools/aubinator_error_decode.c.orig       2024-05-08 13:28:59 UTC
687 +++ src/intel/tools/aubinator_error_decode.c
688 @@ -22,6 +22,9 @@
689   *
690   */
691  
692 +#ifdef __FreeBSD__
693 +#define _WITH_GETLINE
694 +#endif
695  #include <stdbool.h>
696  #include <stdio.h>
697  #include <stdlib.h>
698
699
700 [FILE:238:patches/patch-src_intel_tools_error2aub.c]
701 --- src/intel/tools/error2aub.c.orig    2024-05-08 13:28:59 UTC
702 +++ src/intel/tools/error2aub.c
703 @@ -22,6 +22,9 @@
704   *
705   */
706  
707 +#ifdef __FreeBSD__
708 +#define _WITH_GETLINE
709 +#endif
710  #include <assert.h>
711  #include <getopt.h>
712  #include <inttypes.h>
713
714
715 [FILE:328:patches/patch-src_util_build__id.c]
716 # Elf_ doesn't exist, use Elf32_ or Elf64_
717 #
718 --- src/util/build_id.c.orig    2024-05-08 13:28:59 UTC
719 +++ src/util/build_id.c
720 @@ -35,7 +35,11 @@
721  #endif
722  
723  #ifndef ElfW
724 -#define ElfW(type) Elf_##type
725 +#ifdef __LP64__
726 +#define ElfW(type) Elf64_##type
727 +#else
728 +#define ElfW(type) Elf32_##type
729 +#endif
730  #endif
731  
732  struct build_id_note {
733
734
735 [FILE:235:patches/patch-src_util_libsync.h]
736 --- src/util/libsync.h.orig     2024-05-08 13:28:59 UTC
737 +++ src/util/libsync.h
738 @@ -38,6 +38,10 @@
739  #include <unistd.h>
740  #include <time.h>
741  
742 +#ifdef __sun__
743 +#include <sys/ioccom.h>
744 +#endif
745 +
746  #if defined(__cplusplus)
747  extern "C" {
748  #endif
749
750
751 [FILE:230:patches/patch-src_util_os__file.c]
752 --- src/util/os_file.c.orig     2024-05-08 13:28:59 UTC
753 +++ src/util/os_file.c
754 @@ -28,6 +28,9 @@
755  #endif
756  #endif
757  
758 +#ifndef ENODATA
759 +#define ENODATA ENOATTR
760 +#endif
761  
762  FILE *
763  os_file_create_unique(const char *filename, int filemode)
764
765
766 [FILE:592:patches/patch-src_util_os__memory__aligned.h]
767 --- src/util/os_memory_aligned.h.orig   2024-05-08 13:28:59 UTC
768 +++ src/util/os_memory_aligned.h
769 @@ -53,11 +53,16 @@ add_overflow_size_t(size_t a, size_t b,
770  static inline void *
771  os_malloc_aligned(size_t size, size_t alignment)
772  {
773 +#ifdef __sun__
774 +   alignment = (alignment + sizeof(void*) - 1) & ~(sizeof(void*) - 1);
775 +   return memalign(alignment, size);
776 +#else
777     void *ptr;
778     alignment = (alignment + sizeof(void*) - 1) & ~(sizeof(void*) - 1);
779     if(posix_memalign(&ptr, alignment, size) != 0)
780        return NULL;
781     return ptr;
782 +#endif
783  }
784  
785  #define os_free_aligned(_ptr) free(_ptr)
786
787
788 [FILE:853:patches/patch-src_util_strndup.h]
789 --- src/util/strndup.h.orig     2024-05-08 13:28:59 UTC
790 +++ src/util/strndup.h
791 @@ -24,7 +24,7 @@
792  #ifndef STRNDUP_H
793  #define STRNDUP_H
794  
795 -#if defined(_WIN32)
796 +#if defined(_WIN32) || defined(__sun)
797  
798  #include <stdlib.h> // size_t
799  #include <string.h>
800 @@ -34,6 +34,7 @@ extern "C" {
801  #endif
802  
803  static inline char *
804 +#if defined(_WIN32)
805  strndup(const char *str, size_t max)
806  {
807     size_t n;
808 @@ -50,6 +51,22 @@ strndup(const char *str, size_t max)
809     memcpy(ptr, str, n);
810     return ptr;
811  }
812 +#else  // version without strnlen
813 +strndup(const char *str, size_t n)
814 +{
815 +    size_t len;
816 +    char *copy;
817 +
818 +    len = strlen(str);
819 +    if (len <= n)
820 +        return (strdup(str));
821 +    if ((copy = (char *)malloc(len + 1)) == NULL)
822 +        return (NULL);
823 +    memcpy(copy, str, len);
824 +    copy[len] = '\0';
825 +    return (copy);
826 +}
827 +#endif
828  
829  #ifdef __cplusplus
830  }
831
832
833 [FILE:430:patches/patch-src_util_u__atomic.h]
834 --- src/util/u_atomic.h.orig    2024-05-08 13:28:59 UTC
835 +++ src/util/u_atomic.h
836 @@ -20,11 +20,7 @@
837   * locally coded assembly, compiler intrinsic or ultimately a
838   * mutex-based implementation.
839   */
840 -#if defined(__sun)
841 -#define PIPE_ATOMIC_OS_SOLARIS
842 -#elif defined(_MSC_VER)
843 -#define PIPE_ATOMIC_MSVC_INTRINSIC
844 -#elif defined(__GNUC__)
845 +#if defined(__GNUC__)
846  #define PIPE_ATOMIC_GCC_INTRINSIC
847  #else
848  #error "Unsupported platform"
849
850
851 [FILE:188:patches/patch-src_util_u__math.h]
852 --- src/util/u_math.h.orig      2024-05-08 13:28:59 UTC
853 +++ src/util/u_math.h
854 @@ -60,6 +60,7 @@
855  extern "C" {
856  #endif
857  
858 +#undef ALIGN
859  
860  #ifndef M_SQRT2
861  #define M_SQRT2 1.41421356237309504880
862
863
864 [FILE:442:patches/patch-src_util_u__thread.h]
865 --- src/util/u_thread.h.orig    2024-05-08 13:28:59 UTC
866 +++ src/util/u_thread.h
867 @@ -50,7 +50,7 @@
868   * but not with __thread
869   */
870  #define __THREAD_INITIAL_EXEC __thread
871 -#elif defined(__GLIBC__)
872 +#elif defined(__GLIBC__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__MidnightBSD__)
873  #define __THREAD_INITIAL_EXEC thread_local __attribute__((tls_model("initial-exec")))
874  #define REALLY_INITIAL_EXEC
875  #else
876
877
878 [FILE:458:files/01-freebsd.conf]
879 <driconf>
880     <device driver="iris">
881         <application name="kwin_x11" executable="kwin_x11">
882             <!-- https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=251836 -->
883             <option name="glx_extension_override" value="-GLX_EXT_buffer_age" />
884             <!-- https://gitlab.freedesktop.org/mesa/mesa/-/commit/580fbbb59a60 -->
885             <option name="glx_disable_ext_buffer_age" value="true" />
886         </application>
887     </device>
888 </driconf>
889
890
891 [FILE:25:files/special.mk]
892 GALLIUM_DRIVERS+=       SWRAST
893
894
895 [FILE:911:sunos/patch-src_gallium_targets_dri_meson.build]
896 --- src/gallium/targets/dri/meson.build.orig    2020-12-31 03:59:58 UTC
897 +++ src/gallium/targets/dri/meson.build
898 @@ -45,11 +45,12 @@ libgallium_dri = shared_library(
899      inc_gallium_winsys, include_directories('../../frontends/dri'),
900    ],
901    gnu_symbol_visibility : 'hidden',
902 -  link_args : [ld_args_build_id, ld_args_gc_sections, gallium_dri_ld_args],
903 +  link_args : [ld_args_gc_sections, gallium_dri_ld_args],
904    link_depends : gallium_dri_link_depends,
905 +  link_whole : [libdri, libdricommon, libgallium, libr300, _libnir, libglsl, libglcpp], # libr600, libamd_common
906    link_with : [
907 -    libdri, libmesa_gallium, libdricommon, libmegadriver_stub, libgalliumvl,
908 -    libgallium, libglapi, libpipe_loader_static, libws_null, libwsw, libswdri,
909 +    libmesa_gallium, libmegadriver_stub, libgalliumvl,
910 +    libglapi, libpipe_loader_static, libws_null, libwsw, libswdri,
911      libswkmsdri,
912    ],
913    dependencies : [
914
915
916 [FILE:424:sunos/patch-src_gallium_targets_opencl_meson.build]
917 --- src/gallium/targets/opencl/meson.build.orig 2021-01-29 18:33:19 UTC
918 +++ src/gallium/targets/opencl/meson.build
919 @@ -90,7 +90,7 @@ libopencl = shared_library(
920    [],
921    link_args : [ld_args_gc_sections, opencl_link_args],
922    link_depends : opencl_link_deps,
923 -  link_whole : libclover,
924 +  link_whole : [libclover,libmesa_format],
925    link_with : [libpipe_loader_dynamic, libgallium],
926    dependencies : [
927      idep_mesautil,
928
929
930 [FILE:604:sunos/patch-src_gallium_targets_osmesa_meson.build]
931 --- src/gallium/targets/osmesa/meson.build.orig 2020-12-31 03:59:58 UTC
932 +++ src/gallium/targets/osmesa/meson.build
933 @@ -49,9 +49,9 @@ libosmesa = shared_library(
934      inc_gallium_drivers,
935    ],
936    link_depends : osmesa_link_deps,
937 -  link_whole : [libosmesa_st, libglapi_static],
938 +  link_whole : [libosmesa_st, libglapi_static, libsoftpipe, libgallium, _libnir, libglsl, libglcpp],
939    link_with : [
940 -    libmesa_gallium, libgallium, libws_null, osmesa_link_with,
941 +    libmesa_gallium, libws_null, osmesa_link_with,
942    ],
943    dependencies : [
944      dep_ws2_32, dep_selinux, dep_thread, dep_clock, dep_unwind,
945
946
947 [FILE:2062:sunos/patch-src_gallium_targets_pipe-loader_meson.build]
948 --- src/gallium/targets/pipe-loader/meson.build.orig    2021-01-29 18:33:19 UTC
949 +++ src/gallium/targets/pipe-loader/meson.build
950 @@ -57,16 +57,16 @@ if with_gallium_v3d
951  endif
952  
953  pipe_loaders = [
954 -  [with_gallium_i915, 'i915', driver_i915, []],
955 -  [with_gallium_iris, 'iris', [driver_iris, idep_xmlconfig], []],
956 -  [with_gallium_nouveau, 'nouveau', driver_nouveau, []],
957 -  [with_gallium_r300, 'r300', driver_r300, []],
958 -  [with_gallium_r600, 'r600', driver_r600, []],
959 -  [with_gallium_radeonsi, 'radeonsi', [driver_radeonsi, idep_xmlconfig], []],
960 -  [with_gallium_freedreno, 'msm', driver_freedreno, []],
961 -  [with_gallium_kmsro, 'kmsro', _kmsro_targets, []],
962 -  [with_gallium_svga, 'vmwgfx', driver_svga, []],
963 -  [with_gallium_softpipe, 'swrast', [driver_swrast, driver_swr], [libwsw, libws_null]],
964 +  [with_gallium_i915, 'i915', driver_i915, [], []],
965 +  [with_gallium_iris, 'iris', [driver_iris, idep_xmlconfig], [], []],
966 +  [with_gallium_nouveau, 'nouveau', driver_nouveau, [], []],
967 +  [with_gallium_r300, 'r300', driver_r300, [], [libr300,libradeonwinsys,libmesa_format]],
968 +  [with_gallium_r600, 'r600', driver_r600, [], [libr600,libradeonwinsys,libmesa_format,libgalliumvl]],
969 +  [with_gallium_radeonsi, 'radeonsi', [driver_radeonsi], [], [libradeonsi,libradeonwinsys,libamd_common,libamd_common_llvm,libmesa_format,_libxmlconfig,libgalliumvl]],
970 +  [with_gallium_freedreno, 'msm', driver_freedreno, [], []],
971 +  [with_gallium_kmsro, 'kmsro', _kmsro_targets, [], []],
972 +  [with_gallium_svga, 'vmwgfx', driver_svga, [], [libsvga,libsvgadrm,libmesa_format]],
973 +  [with_gallium_softpipe, 'swrast', [driver_swrast, driver_swr], [libwsw, libws_null], [libllvmpipe,libmesa_format,libsoftpipe]],
974  ]
975  
976  foreach x : pipe_loaders
977 @@ -80,6 +80,7 @@ foreach x : pipe_loaders
978        link_args : pipe_loader_link_args,
979        link_depends : pipe_loader_link_deps,
980        include_directories : pipe_loader_incs,
981 +      link_whole : [x[4]],
982        link_with : [pipe_loader_link_with, x[3]],
983        dependencies : [idep_mesautil, idep_nir, dep_thread, x[2]],
984        name_prefix : '',
985
986
987 [FILE:838:sunos/patch-src_gallium_targets_va_meson.build]
988 --- src/gallium/targets/va/meson.build.orig     2021-01-29 18:33:19 UTC
989 +++ src/gallium/targets/va/meson.build
990 @@ -39,13 +39,14 @@ libva_gallium = shared_library(
991    include_directories : [
992      inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_util, inc_gallium_winsys, inc_gallium_drivers,
993    ],
994 -  link_whole : [libva_st],
995 +  link_whole : [libva_st, _libxmlconfig, libmesa_format, libloader, libpipe_loader_static],
996    link_with : [
997      libgalliumvlwinsys, libgalliumvl, libgallium,
998 -    libpipe_loader_static, libws_null, libwsw, libswdri, libswkmsdri,
999 +    libws_null, libwsw, libswdri, libswkmsdri,
1000 +    libr600, libradeonsi,
1001    ],
1002    dependencies : [
1003 -    dep_libdrm, driver_r600, driver_radeonsi, driver_nouveau,
1004 +    dep_libdrm, driver_nouveau,
1005      idep_mesautil,
1006    ],
1007    link_depends : va_link_depends,
1008
1009
1010 [FILE:784:sunos/patch-src_gallium_targets_vdpau_meson.build]
1011 --- src/gallium/targets/vdpau/meson.build.orig  2020-12-31 03:59:58 UTC
1012 +++ src/gallium/targets/vdpau/meson.build
1013 @@ -44,10 +44,10 @@ libvdpau_gallium = shared_library(
1014    include_directories : [
1015      inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_util, inc_gallium_winsys, inc_gallium_drivers,
1016    ],
1017 -  link_whole : [libvdpau_st],
1018 +  link_whole : [libvdpau_st, libr300, libradeonwinsys, libmesa_format, _libxmlconfig, libpipe_loader_static, libgallium, _libnir], # libr600, libradeonsi, libamd_common, libamd_common_llvm,
1019    link_with : [
1020      libgalliumvlwinsys, libgalliumvl, libgallium,
1021 -    libpipe_loader_static, libws_null, libwsw, libswdri, libswkmsdri,
1022 +    libws_null, libwsw, libswdri, libswkmsdri,
1023    ],
1024    dependencies : [
1025      idep_mesautil,
1026
1027
1028 [FILE:670:sunos/patch-src_gallium_targets_xa_meson.build]
1029 --- src/gallium/targets/xa/meson.build.orig     2020-12-31 03:59:58 UTC
1030 +++ src/gallium/targets/xa/meson.build
1031 @@ -40,9 +40,9 @@ libxatracker = shared_library(
1032    include_directories : [
1033      inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_util, inc_gallium_winsys, inc_gallium_drivers,
1034    ],
1035 -  link_whole : [libxa_st],
1036 +  link_whole : [libxa_st, libsvga, libsvgadrm, libpipe_loader_static, libmesa_format, _libxmlconfig, libgallium, _libnir],
1037    link_with : [
1038 -    libgalliumvl_stub, libgallium, libpipe_loader_static,
1039 +    libgalliumvl_stub, libgallium,
1040      libws_null, libwsw, libswdri, libswkmsdri,
1041    ],
1042    link_depends : xa_link_depends,
1043
1044
1045 [FILE:846:sunos/patch-src_gallium_targets_xvmc_meson.build]
1046 --- src/gallium/targets/xvmc/meson.build.orig   2021-01-29 18:33:19 UTC
1047 +++ src/gallium/targets/xvmc/meson.build
1048 @@ -39,12 +39,12 @@ libxvmc_gallium = shared_library(
1049    include_directories : [
1050      inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_util, inc_gallium_winsys, inc_gallium_drivers,
1051    ],
1052 -  link_whole : [libxvmc_st],
1053 +  link_whole : [libxvmc_st,libradeonwinsys,libr600,_libxmlconfig,libmesa_format,libpipe_loader_static],
1054    link_with : [
1055      libgalliumvlwinsys, libgalliumvl, libgallium,
1056      libpipe_loader_static, libws_null, libwsw, libswdri, libswkmsdri,
1057    ],
1058 -  dependencies : [idep_mesautil, driver_r600, driver_nouveau],
1059 +  dependencies : [idep_mesautil, driver_nouveau],
1060    link_depends : xvmc_link_depends,
1061    # Will be deleted during installation, see install_megadrivers.py
1062    install : true,
1063
1064
1065 [FILE:510:sunos/patch-src_gbm_meson.build]
1066 --- src/gbm/meson.build.orig    2021-01-29 18:33:19 UTC
1067 +++ src/gbm/meson.build
1068 @@ -49,8 +49,8 @@ libgbm = shared_library(
1069    include_directories : incs_gbm,
1070    c_args : [args_gbm],
1071    link_args : [ld_args_gc_sections],
1072 -  link_with : libloader,
1073 -  dependencies : [deps_gbm, dep_dl, dep_thread, idep_mesautil, idep_xmlconfig],
1074 +  link_with : [libloader, _libxmlconfig],
1075 +  dependencies : [deps_gbm, dep_dl, dep_thread, idep_mesautil],
1076    gnu_symbol_visibility : 'hidden',
1077    version : '1.0.0',
1078    install : true,
1079
1080
1081 [FILE:997:sunos/patch-src_mesa_drivers_dri_meson.build]
1082 --- src/mesa/drivers/dri/meson.build.orig       2020-12-31 03:59:58 UTC
1083 +++ src/mesa/drivers/dri/meson.build
1084 @@ -20,7 +20,7 @@
1085  
1086  subdir('common')
1087  
1088 -_dri_drivers = []
1089 +_dri_drivers = [ _libnir, libmesa_classic, libmesa_common, libintel_compiler, libglcpp, libdricommon ]
1090  _dri_link = []
1091  if with_dri_swrast
1092    subdir('swrast')
1093 @@ -59,14 +59,13 @@ if _dri_drivers != []
1094      [],
1095      link_whole : _dri_drivers,
1096      link_with : [
1097 -      libmegadriver_stub, libdricommon, libglapi,
1098 -      libmesa_classic,
1099 +      libmegadriver_stub, libglapi, libintel_dev,
1100      ],
1101      dependencies : [
1102        dep_selinux, dep_libdrm, dep_m, dep_thread, dep_dl,
1103 -      idep_nir, idep_xmlconfig, idep_mesautil,
1104 +      idep_xmlconfig, idep_mesautil,
1105      ],
1106 -    link_args : [ld_args_build_id, ld_args_bsymbolic, ld_args_gc_sections],
1107 +    link_args : [ld_args_build_id, ld_args_gc_sections],
1108      # Will be deleted during installation, see install_megadrivers.py
1109      install : true,
1110      install_dir : dri_drivers_path,
1111