@@ -9,25 +9,32 @@ Config:
99 MESA3D_GALLIUM_DRIVERS :
1010 help : " List of gallium drivers to build"
1111 type : str
12+ MESA3D_GLX :
13+ help : " Build support for GLX platform. Default: auto"
14+ type : str
15+ MESA3D_GLX_READ_ONLY_TEXT :
16+ help : " Disable writable .text section on x86"
17+ type : str
18+ MESA3D_PLATFORM :
19+ help : " Window system to support. Default: wayland"
20+ type : choice
21+ choice :
22+ wayland :
23+ x11 :
1224
1325depends :
14- - libs::zlib-dev
15- - virtual::libs::libdrm-dev
16- - graphics::wayland::wayland-protocols
17- - graphics::wayland::wayland-dev
18-
1926 - tools :
2027 target-toolchain : host-compat-toolchain
2128 depends :
2229 - python::mako
2330 - python::pyyaml
24- - python::pycparser
31+ - name : python::pycparser
32+ if : " $(eq,${MESA3D_PLATFORM:-wayland},wayland)"
2533
34+ - libs::expat-dev
2635 - use : []
2736 depends :
28- - libs::zlib-tgt
29- - virtual::libs::libdrm-tgt
30- - graphics::wayland::wayland-tgt
37+ - libs::expat-tgt
3138
3239checkoutSCM :
3340 scm : url
@@ -36,39 +43,158 @@ checkoutSCM:
3643 stripComponents : 1
3744
3845buildTools : [bison, flex, m4]
39- buildVars : [MESA3D_GALLIUM_DRIVERS]
40- buildScript : |
41- # crocus,etnaviv,freedreno,i915,iris,lima,nouveau,panfrost,r300,r600,radeonsi,svga,softpipe,llvmpipe,tegra,v3d,vc4,virgl
42- # this is the maximum we support right now:
43- MESA3D_GALLIUM_DRIVERS=${MESA3D_GALLIUM_DRIVERS:-crocus,lima,panfrost,svga,nouveau,tegra,v3d,vc4,virgl}
44-
45- mesonBuild $1 \
46- -Dglx=disabled \
47- -Dgallium-xa=disabled \
48- -Dglvnd=disabled \
49- -Dgallium-opencl=disabled \
50- -Dgallium-drivers="$MESA3D_GALLIUM_DRIVERS" \
51- -Dvulkan-drivers="" \
52- -Dplatforms=wayland \
53- -Dgbm=enabled \
54- -Degl=enabled \
55- -Dopengl=false \
56- -Dshared-glapi=enabled \
57- -Dgles1=enabled \
58- -Dgles2=enabled
5946
6047multiPackage :
48+ clc :
49+ inherit : [clang]
50+ depends :
51+ - devel::llvm-libclc-dev
52+ - libs::spirv-tools-dev
53+ - libs::spirv-llvm-translator-dev
54+ - use : []
55+ depends :
56+ - devel::llvm-libclc-tgt
57+ - libs::spirv-tools-tgt
58+ - libs::spirv-llvm-translator-tgt
59+ buildSetup : |
60+ export LLVM_LDFLAGS="${MESON_LDFLAGS[@]}"
61+ export LLVM_CXXFLAGS="${MESON_CXXFLAGS[@]}"
62+ export LLVM_CFLAGS="${MESON_CFLAGS[@]}"
63+
64+ if [ -e cross_file.txt ]; then
65+ sed -i \
66+ "/\[binaries\]/a llvm-config = '${BOB_DEP_PATHS['devel::llvm-libs-dev']}\/usr\/bin\/llvm-config'" \
67+ cross_file.txt
68+ fi
69+ buildScript : |
70+ mesonBuild $1 \
71+ -Dintel-clc=enabled \
72+ -Dinstall-intel-clc=True \
73+ -Dmesa-clc=enabled \
74+ -Dinstall-mesa-clc=True \
75+ -Dgallium-xa=disabled \
76+ -Dglvnd=disabled \
77+ -Dgallium-opencl=disabled \
78+ -Dgallium-drivers="" \
79+ -Dvulkan-drivers="" \
80+ -Dplatforms="" \
81+ -Dvalgrind=disabled \
82+ -Dosmesa=false \
83+ -Dshared-llvm=disabled \
84+
85+ multiPackage :
86+ dev :
87+ packageScript : mesonPackageDev
88+ provideDeps : ['*-dev']
89+ tgt :
90+ packageScript : mesonPackageLibs
91+ provideDeps : ['*-tgt']
92+ " " :
93+ depends :
94+ - use : []
95+ name : libs::mesa3d-clc-tgt
96+ provideDeps : ['*-tgt']
97+ packageScript : |
98+ mesonPackageBin
99+ provideTools :
100+ mesa_intel_clc : " usr/bin"
101+
61102 " " :
62103 depends :
63- - name : libs::mesa3d-tgt
64- use : []
65- packageScript : mesonPackageBin
66- provideDeps : [ "*-tgt" ]
67-
68- dev :
69- packageScript : mesonPackageDev
70- provideDeps : [ "*-dev" ]
71-
72- tgt :
73- packageScript : mesonPackageLib
74- provideDeps : [ "*-tgt" ]
104+
105+ - if : " $(eq,${MESA3D_PLATFORM:-wayland},wayland)"
106+ depends :
107+ - graphics::wayland::wayland-protocols
108+ - graphics::wayland::wayland-dev
109+
110+ - if : " $(eq,${MESA3D_PLATFORM:-x11},x11)"
111+ depends :
112+ - graphics::xorg::proto::xorgproto
113+ - libs::xcb::libxcb-dev
114+ - libs::xorg::libX11-dev
115+ - libs::xorg::libXdamage-dev
116+ - libs::xorg::libXext-dev
117+ - libs::xorg::libXfixes-dev
118+ - libs::xorg::libXrandr-dev
119+ - libs::xorg::libXshmfence-dev
120+ - libs::xorg::libXt-dev
121+ - libs::xorg::libXxf86vm-dev
122+ - virtual::core::udev-dev
123+
124+ - if : " ${MESA3D_INTEL:-false}"
125+ tools :
126+ target-toolchain : host-compat-toolchain
127+ depends :
128+ - name : libs::mesa3d-clc
129+ use : [tools]
130+
131+ - libs::libunwind-dev
132+ - libs::zlib-dev
133+ - virtual::libs::libdrm-dev
134+ - use : []
135+ depends :
136+ - libs::libunwind-tgt
137+ - libs::zlib-tgt
138+ - virtual::libs::libdrm-tgt
139+
140+ - if : " $(eq,${MESA3D_PLATFORM:-wayland},wayland)"
141+ name : graphics::wayland::wayland-tgt
142+
143+ - if : " $(eq,${MESA3D_PLATFORM:-x11},x11)"
144+ depends :
145+ - libs::xcb::libxcb-tgt
146+ - libs::xorg::libX11-tgt
147+ - libs::xorg::libXdamage-tgt
148+ - libs::xorg::libXext-tgt
149+ - libs::xorg::libXfixes-tgt
150+ - libs::xorg::libXrandr-tgt
151+ - libs::xorg::libXshmfence-tgt
152+ - libs::xorg::libXt-tgt
153+ - libs::xorg::libXxf86vm-tgt
154+ - virtual::core::udev-tgt
155+
156+ buildTools :
157+ - if : ${MESA3D_INTEL:-false}
158+ name : mesa_intel_clc
159+ buildVars : [MESA3D_GALLIUM_DRIVERS, MESA3D_GLX, MESA3D_PLATFORM,
160+ MESA3D_GLX_READ_ONLY_TEXT]
161+ buildScript : |
162+ # crocus,etnaviv,freedreno,i915,iris,lima,nouveau,panfrost,r300,r600,radeonsi,svga,softpipe,llvmpipe,tegra,v3d,vc4,virgl
163+ # this is the maximum we support right now:
164+ MESA3D_GALLIUM_DRIVERS=${MESA3D_GALLIUM_DRIVERS:-crocus,lima,panfrost,svga,nouveau,tegra,v3d,vc4,virgl}
165+
166+ mesonBuild $1 \
167+ -Dglx=${MESA3D_GLX:-auto} \
168+ -Dgallium-xa=disabled \
169+ -Dglvnd=disabled \
170+ -Dgallium-opencl=disabled \
171+ -Dgallium-drivers="$MESA3D_GALLIUM_DRIVERS" \
172+ -Dvulkan-drivers="" \
173+ -Dplatforms=${MESA3D_PLATFORM:-wayland} \
174+ -Dgbm=enabled \
175+ -Degl=enabled \
176+ -Dshared-glapi=enabled \
177+ -Dgles1=enabled \
178+ -Dgles2=enabled \
179+ -Dglx-read-only-text=${MESA3D_GLX_READ_ONLY_TEXT:-false} \
180+ -Dvalgrind=disabled \
181+ -Dllvm=disabled \
182+ -Dintel-clc=system \
183+ -Dmesa-clc=system \
184+ -Dosmesa=false
185+
186+ multiPackage :
187+ " " :
188+ depends :
189+ - name : libs::mesa3d-tgt
190+ use : []
191+ packageScript : mesonPackageBin
192+ provideDeps : [ "*-tgt" ]
193+
194+ dev :
195+ packageScript : mesonPackageDev
196+ provideDeps : [ "*-dev" ]
197+
198+ tgt :
199+ packageScript : mesonPackageLib
200+ provideDeps : [ "*-tgt" ]
0 commit comments