1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/mesa/mesa.conf
3 # Copyright (C) 2008 - 2021 The T2 SDE Project
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License version 2.
10 # --- T2-COPYRIGHT-NOTE-END ---
12 if atstage cross; then
13 # translate native llvm-config libraries to sysroot
14 var_append GCC_WRAPPER_FILTER '|' "sed 's,$root/TOOLCHAIN.*libLLVM\(.*\)\.[as].*,-lLLVM\1,'"
15 # remove native llvm-config include
16 var_append GCC_WRAPPER_REMOVE ' ' "-I$root/TOOLCHAIN/tools.cross/include"
17 var_append GCC_WRAPPER_REMOVE ' ' "-isystem$root/TOOLCHAIN/tools.cross/include"
18 var_append GCC_WRAPPER_REMOVE ' ' "-L$root/TOOLCHAIN/tools.cross/lib"
21 [[ $arch = sparc* ]] && var_append GCC_WRAPPER_INSERT ' ' '-c?:-latomic -Wl,--as-needed'
22 [ $arch = microblaze ] && var_append GCC_WRAPPER_INSERT ' ' '-c?:-latomic -Wl,--as-needed'
23 var_append GCC_WRAPPER_REMOVE ' ' '-Werror=int-conversion' # at least x32 :-/
30 var_append mesonopt ' ' '-Dosmesa=true'
31 pkginstalled libx11 && var_append platforms ',' 'x11'
32 pkginstalled wayland && var_append platforms ',' 'wayland'
34 if pkginstalled libdrm; then
35 var_append mesonopt ' ' '-Degl=enabled'
36 var_append mesonopt ' ' '-Dplatforms=$platforms -Dgles1=enabled -Dgles2=enabled'
38 var_append dridrv ',' "r100,r200"
39 var_append galdrv ',' "r600,nouveau,virgl,zink"
42 var_remove galdrv ',' "r600,nouveau"
45 var_append dridrv ',' "i965"
46 var_append galdrv ',' "i915,svga,crocus"
50 var_append mesonopt ' ' '-Ddri=disabled'
53 if pkginstalled llvm; then
54 var_append mesonopt ' ' '-Dllvm=enabled -Dshared-llvm=enabled'
56 if pkginstalled libdrm; then
57 var_append mesonopt ' ' '-Dgallium-xa=enabled'
59 var_append galdrv ',' "r300,radeonsi"
60 var_append vuldrv ',' "amd"
63 var_remove mesonopt ' ' '-Dgallium-xa=enabled'
66 var_append galdrv ',' "iris"
67 var_append vuldrv ',' "intel"
70 var_append galdrv ',' "kmsro,etnaviv,freedreno,lima,panfrost,v3d,vc4,tegra,asahi"
71 var_append vuldrv ',' "freedreno"
72 [ $arch = arm ] && var_remove galdrv ',' 'v3d,vc4'
77 var_append mesonopt ' ' '-Dllvm=false'
80 pkginstalled vulkan-headers || var_remove galdrv ',' 'zink'
82 var_append mesonopt ' ' "-Dvulkan-drivers=$vuldrv"
83 var_append mesonopt ' ' "-Ddri-drivers=$dridrv -Dgallium-drivers=$galdrv"
84 var_append mesonopt ' ' '-Dgbm=enabled -Dshared-glapi=enabled -Dglx=auto'