Gentoo Archives: gentoo-commits

From: Matt Turner <mattst88@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/mesa/
Date: Thu, 31 Aug 2017 15:36:28
Message-Id: 1504193716.4ce6503cac446e3c304170d713596525d4526270.mattst88@gentoo
1 commit: 4ce6503cac446e3c304170d713596525d4526270
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Thu Aug 31 15:35:16 2017 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Thu Aug 31 15:35:16 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ce6503c
7
8 media-libs/mesa: Version bump to 17.2.0_rc6
9
10 media-libs/mesa/Manifest | 1 +
11 media-libs/mesa/mesa-17.2.0_rc6.ebuild | 504 +++++++++++++++++++++++++++++++++
12 2 files changed, 505 insertions(+)
13
14 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
15 index b82b86af6ea..2e013ea02e3 100644
16 --- a/media-libs/mesa/Manifest
17 +++ b/media-libs/mesa/Manifest
18 @@ -14,3 +14,4 @@ DIST mesa-17.1.8.tar.xz 9902800 SHA256 75ed2eaeae26ddd536150f294386468ae2e1a7717
19 DIST mesa-17.2.0-rc3.tar.xz 10405100 SHA256 bd417166bc55a74a20e7687738c2f081364637e40a0712989e04b3ba7e404ff2 SHA512 34cc307e82f227fc0398185ac8a349c96631c47e407e883e80523850eeeb0eb4cc445780f61494c2ba81856965d8ae06819330fa54c149808a18db9e872c12b6 WHIRLPOOL 8ea40f6b4a6366b502cd2f2f1ab4bf371dab695b0ed86825a0f0abb36198adfd2d335cf43b668acc4606216a736be41fc735daee1b1b6b6060f4f044bc6f948f
20 DIST mesa-17.2.0-rc4.tar.xz 10404796 SHA256 b1dffaf414c9ef3df23ddf1f3ae4d35e85e296bf2def2fc9c0b402ff9d9a48fb SHA512 a5e2727bd91185db440d94b273cc32e9907d3a64b3f5ea33d5888f7aa2bfec54d7db57eeee6109a8dc28e9efec97ea23e895117ba52f1963cb2bc2b22b718595 WHIRLPOOL fea274533b7cf1652f7823afabf65b36a3d42fab957e604ee907ef281ccec5db82e25cfa171910dae25f2cc59eaff18a3340ce2464f7b5c0415a206d259bb4b5
21 DIST mesa-17.2.0-rc5.tar.xz 10406640 SHA256 c4c270c1326ed8e7c1dc3e38243bfe67f11124da89f2d86f53cbd9a4da30d0ba SHA512 c6e6f2dea0d612800a9b6a4247ff7656dadb6e2f1fa87e6118502a52b53f9f64f5c88f7300a038231b502b1a7c9aa84532826b94a313182da3fba22e0d7f48ec WHIRLPOOL f2482796db9433ddc3468187b225d180fabb7038dea8c1239d7457e5ab8952f993238ffaaea82f114637739ca952c4d96951b13d3f48984913101987130a65b6
22 +DIST mesa-17.2.0-rc6.tar.xz 10408672 SHA256 579d928682675b69b433521e4c44a21bd65c2ad021f43e9d4b98dd93002da5b1 SHA512 5a7c0d987f13d6213b427af8a1da6da1c7a27388c24d7b764815faa4f11607d85e5bf9247180ccb22db835923e77e38a7446041564ac921f9223b4aefdb65697 WHIRLPOOL 3ac4224e033ce9c5c93270fc9d05c2bfaf3362ec5b67beb3825ca97cd6d120922b296c6e2bb997c1036b78b8c8b3f112c5d640fe306075274837eeafc7481d0d
23
24 diff --git a/media-libs/mesa/mesa-17.2.0_rc6.ebuild b/media-libs/mesa/mesa-17.2.0_rc6.ebuild
25 new file mode 100644
26 index 00000000000..f54779f9572
27 --- /dev/null
28 +++ b/media-libs/mesa/mesa-17.2.0_rc6.ebuild
29 @@ -0,0 +1,504 @@
30 +# Copyright 1999-2017 Gentoo Foundation
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=6
34 +
35 +EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git"
36 +
37 +if [[ ${PV} = 9999 ]]; then
38 + GIT_ECLASS="git-r3"
39 + EXPERIMENTAL="true"
40 +fi
41 +
42 +PYTHON_COMPAT=( python2_7 )
43 +
44 +inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
45 +
46 +OPENGL_DIR="xorg-x11"
47 +
48 +MY_P="${P/_/-}"
49 +
50 +DESCRIPTION="OpenGL-like graphic library for Linux"
51 +HOMEPAGE="https://www.mesa3d.org/"
52 +
53 +if [[ $PV == 9999 ]]; then
54 + SRC_URI=""
55 +else
56 + SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
57 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
58 +fi
59 +
60 +LICENSE="MIT"
61 +SLOT="0"
62 +RESTRICT="!bindist? ( bindist )"
63 +
64 +RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
65 +VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 vivante vmware"
66 +for card in ${VIDEO_CARDS}; do
67 + IUSE_VIDEO_CARDS+=" video_cards_${card}"
68 +done
69 +
70 +IUSE="${IUSE_VIDEO_CARDS}
71 + bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
72 + +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
73 + vdpau vulkan wayland xvmc xa"
74 +
75 +REQUIRED_USE="
76 + d3d9? ( dri3 gallium )
77 + llvm? ( gallium )
78 + opencl? ( gallium llvm )
79 + openmax? ( gallium )
80 + gles1? ( egl )
81 + gles2? ( egl )
82 + vaapi? ( gallium )
83 + vdpau? ( gallium )
84 + vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
85 + video_cards_radeonsi? ( llvm ) )
86 + wayland? ( egl gbm )
87 + xa? ( gallium )
88 + video_cards_freedreno? ( gallium )
89 + video_cards_intel? ( classic )
90 + video_cards_i915? ( || ( classic gallium ) )
91 + video_cards_i965? ( classic )
92 + video_cards_imx? ( gallium )
93 + video_cards_nouveau? ( || ( classic gallium ) )
94 + video_cards_radeon? ( || ( classic gallium )
95 + gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
96 + video_cards_r100? ( classic )
97 + video_cards_r200? ( classic )
98 + video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
99 + video_cards_r600? ( gallium )
100 + video_cards_radeonsi? ( gallium llvm )
101 + video_cards_vc4? ( gallium )
102 + video_cards_vivante? ( gallium gbm )
103 + video_cards_vmware? ( gallium )
104 +"
105 +
106 +LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.82"
107 +# keep correct libdrm and dri2proto dep
108 +# keep blocks in rdepend for binpkg
109 +RDEPEND="
110 + !<x11-base/xorg-server-1.7
111 + !<=x11-proto/xf86driproto-2.0.3
112 + abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
113 + classic? ( app-eselect/eselect-mesa )
114 + gallium? ( app-eselect/eselect-mesa )
115 + >=app-eselect/eselect-opengl-1.3.0
116 + >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
117 + >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
118 + >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
119 + >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
120 + >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
121 + >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
122 + >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
123 + >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
124 + x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
125 + unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
126 + llvm? (
127 + video_cards_radeonsi? (
128 + virtual/libelf:0=[${MULTILIB_USEDEP}]
129 + vulkan? ( >=sys-devel/llvm-3.9.0:=[${MULTILIB_USEDEP}] )
130 + )
131 + video_cards_r600? (
132 + virtual/libelf:0=[${MULTILIB_USEDEP}]
133 + )
134 + video_cards_radeon? (
135 + virtual/libelf:0=[${MULTILIB_USEDEP}]
136 + )
137 + >=sys-devel/llvm-3.6.0:=[${MULTILIB_USEDEP}]
138 + )
139 + opencl? (
140 + app-eselect/eselect-opencl
141 + dev-libs/libclc
142 + virtual/libelf:0=[${MULTILIB_USEDEP}]
143 + )
144 + openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
145 + vaapi? (
146 + >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
147 + video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
148 + )
149 + vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
150 + wayland? (
151 + >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}]
152 + >=dev-libs/wayland-protocols-1.8
153 + )
154 + xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
155 + ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
156 +
157 + video_cards_intel? (
158 + !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
159 + )
160 + video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
161 +"
162 +for card in ${RADEON_CARDS}; do
163 + RDEPEND="${RDEPEND}
164 + video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
165 + "
166 +done
167 +RDEPEND="${RDEPEND}
168 + video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
169 +"
170 +
171 +# FIXME: kill the sys-devel/llvm[video_cards_radeon] compat once
172 +# LLVM < 3.9 is out of the game
173 +DEPEND="${RDEPEND}
174 + ${PYTHON_DEPS}
175 + llvm? (
176 + video_cards_radeonsi? ( || (
177 + sys-devel/llvm[llvm_targets_AMDGPU]
178 + sys-devel/llvm[video_cards_radeon]
179 + ) )
180 + )
181 + opencl? (
182 + >=sys-devel/llvm-3.6.0:=[${MULTILIB_USEDEP}]
183 + >=sys-devel/clang-3.6.0:=[${MULTILIB_USEDEP}]
184 + >=sys-devel/gcc-4.6
185 + )
186 + sys-devel/gettext
187 + virtual/pkgconfig
188 + valgrind? ( dev-util/valgrind )
189 + >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
190 + dri3? (
191 + >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
192 + >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
193 + )
194 + >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
195 + >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
196 + >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
197 + >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
198 +"
199 +[[ ${PV} == 9999 ]] && DEPEND+="
200 + sys-devel/bison
201 + sys-devel/flex
202 + $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
203 +"
204 +
205 +S="${WORKDIR}/${MY_P}"
206 +EGIT_CHECKOUT_DIR=${S}
207 +
208 +QA_WX_LOAD="
209 +x86? (
210 + !pic? (
211 + usr/lib*/libglapi.so.0.0.0
212 + usr/lib*/libGLESv1_CM.so.1.1.0
213 + usr/lib*/libGLESv2.so.2.0.0
214 + usr/lib*/libGL.so.1.2.0
215 + usr/lib*/libOSMesa.so.8.0.0
216 + )
217 +)"
218 +
219 +pkg_setup() {
220 + # warning message for bug 459306
221 + if use llvm && has_version sys-devel/llvm[!debug=]; then
222 + ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
223 + ewarn "detected! This can cause problems. For details, see bug 459306."
224 + fi
225 +
226 + if use llvm || use opencl; then
227 + llvm_pkg_setup
228 + fi
229 + python-any-r1_pkg_setup
230 +}
231 +
232 +src_prepare() {
233 + [[ ${PV} == 9999 ]] && eautoreconf
234 + eapply_user
235 +}
236 +
237 +multilib_src_configure() {
238 + local myconf
239 +
240 + if use classic; then
241 + # Configurable DRI drivers
242 + driver_enable swrast
243 +
244 + # Intel code
245 + driver_enable video_cards_i915 i915
246 + driver_enable video_cards_i965 i965
247 + if ! use video_cards_i915 && \
248 + ! use video_cards_i965; then
249 + driver_enable video_cards_intel i915 i965
250 + fi
251 +
252 + # Nouveau code
253 + driver_enable video_cards_nouveau nouveau
254 +
255 + # ATI code
256 + driver_enable video_cards_r100 radeon
257 + driver_enable video_cards_r200 r200
258 + if ! use video_cards_r100 && \
259 + ! use video_cards_r200; then
260 + driver_enable video_cards_radeon radeon r200
261 + fi
262 + fi
263 +
264 + if use egl; then
265 + myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
266 + fi
267 +
268 + if use gallium; then
269 + myconf+="
270 + $(use_enable d3d9 nine)
271 + $(use_enable llvm)
272 + $(use_enable openmax omx)
273 + $(use_enable vaapi va)
274 + $(use_enable vdpau)
275 + $(use_enable xa)
276 + $(use_enable xvmc)
277 + "
278 + use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
279 +
280 + gallium_enable swrast
281 + gallium_enable video_cards_vc4 vc4
282 + gallium_enable video_cards_vivante etnaviv
283 + gallium_enable video_cards_vmware svga
284 + gallium_enable video_cards_nouveau nouveau
285 + gallium_enable video_cards_i915 i915
286 + gallium_enable video_cards_imx imx
287 + if ! use video_cards_i915 && \
288 + ! use video_cards_i965; then
289 + gallium_enable video_cards_intel i915
290 + fi
291 +
292 + gallium_enable video_cards_r300 r300
293 + gallium_enable video_cards_r600 r600
294 + gallium_enable video_cards_radeonsi radeonsi
295 + if ! use video_cards_r300 && \
296 + ! use video_cards_r600; then
297 + gallium_enable video_cards_radeon r300 r600
298 + fi
299 +
300 + gallium_enable video_cards_freedreno freedreno
301 + # opencl stuff
302 + if use opencl; then
303 + myconf+="
304 + $(use_enable opencl)
305 + --with-clang-libdir="${EPREFIX}/usr/lib"
306 + "
307 + fi
308 + fi
309 +
310 + if use vulkan; then
311 + vulkan_enable video_cards_i965 intel
312 + vulkan_enable video_cards_radeonsi radeon
313 + fi
314 +
315 + # x86 hardened pax_kernel needs glx-rts, bug 240956
316 + if [[ ${ABI} == x86 ]]; then
317 + myconf+=" $(use_enable pax_kernel glx-read-only-text)"
318 + fi
319 +
320 + # on abi_x86_32 hardened we need to have asm disable
321 + if [[ ${ABI} == x86* ]] && use pic; then
322 + myconf+=" --disable-asm"
323 + fi
324 +
325 + if use gallium; then
326 + myconf+=" $(use_enable osmesa gallium-osmesa)"
327 + else
328 + myconf+=" $(use_enable osmesa)"
329 + fi
330 +
331 + # build fails with BSD indent, bug #428112
332 + use userland_GNU || export INDENT=cat
333 +
334 + ECONF_SOURCE="${S}" \
335 + econf \
336 + --enable-dri \
337 + --enable-glx \
338 + --enable-shared-glapi \
339 + $(use_enable !bindist texture-float) \
340 + $(use_enable d3d9 nine) \
341 + $(use_enable debug) \
342 + $(use_enable dri3) \
343 + $(use_enable egl) \
344 + $(use_enable gbm) \
345 + $(use_enable gles1) \
346 + $(use_enable gles2) \
347 + $(use_enable nptl glx-tls) \
348 + $(use_enable unwind libunwind) \
349 + --enable-valgrind=$(usex valgrind auto no) \
350 + --enable-llvm-shared-libs \
351 + --with-dri-drivers=${DRI_DRIVERS} \
352 + --with-gallium-drivers=${GALLIUM_DRIVERS} \
353 + --with-vulkan-drivers=${VULKAN_DRIVERS} \
354 + PYTHON2="${PYTHON}" \
355 + ${myconf}
356 +}
357 +
358 +multilib_src_install() {
359 + emake install DESTDIR="${D}"
360 +
361 + if use classic || use gallium; then
362 + ebegin "Moving DRI/Gallium drivers for dynamic switching"
363 + local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
364 + keepdir /usr/$(get_libdir)/dri
365 + dodir /usr/$(get_libdir)/mesa
366 + for x in ${gallium_drivers[@]}; do
367 + if [ -f "$(get_libdir)/gallium/${x}" ]; then
368 + mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
369 + || die "Failed to move ${x}"
370 + fi
371 + done
372 + if use classic; then
373 + emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
374 + fi
375 + for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
376 + if [ -f ${x} -o -L ${x} ]; then
377 + mv -f "${x}" "${x/dri/mesa}" \
378 + || die "Failed to move ${x}"
379 + fi
380 + done
381 + pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
382 + ln -s ../mesa/*.so . || die "Creating symlink failed"
383 + # remove symlinks to drivers known to eselect
384 + for x in ${gallium_drivers[@]}; do
385 + if [ -f ${x} -o -L ${x} ]; then
386 + rm "${x}" || die "Failed to remove ${x}"
387 + fi
388 + done
389 + popd
390 + eend $?
391 + fi
392 + if use opencl; then
393 + ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
394 + local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
395 + dodir ${cl_dir}/{lib,include}
396 + if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
397 + mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
398 + "${ED}"${cl_dir}
399 + fi
400 + if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
401 + mv -f "${ED}"/usr/include/CL \
402 + "${ED}"${cl_dir}/include
403 + fi
404 + eend $?
405 + fi
406 +
407 + if use openmax; then
408 + echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
409 + doenvd "${T}"/99mesaxdgomx
410 + keepdir /usr/share/mesa/xdg
411 + fi
412 +}
413 +
414 +multilib_src_install_all() {
415 + find "${ED}" -name '*.la' -delete
416 + einstalldocs
417 +
418 + if use !bindist; then
419 + dodoc docs/patents.txt
420 + fi
421 +
422 + # Install config file for eselect mesa
423 + insinto /usr/share/mesa
424 + newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
425 +}
426 +
427 +multilib_src_test() {
428 + if use llvm; then
429 + local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
430 + pushd src/gallium/drivers/llvmpipe >/dev/null || die
431 + emake ${llvm_tests}
432 + pax-mark m ${llvm_tests}
433 + popd >/dev/null || die
434 + fi
435 + emake check
436 +}
437 +
438 +pkg_postinst() {
439 + # Switch to the xorg implementation.
440 + echo
441 + eselect opengl set --use-old ${OPENGL_DIR}
442 +
443 + # Select classic/gallium drivers
444 + if use classic || use gallium; then
445 + eselect mesa set --auto
446 + fi
447 +
448 + # Switch to mesa opencl
449 + if use opencl; then
450 + eselect opencl set --use-old ${PN}
451 + fi
452 +
453 + # run omxregister-bellagio to make the OpenMAX drivers known system-wide
454 + if use openmax; then
455 + ebegin "Registering OpenMAX drivers"
456 + BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
457 + OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
458 + omxregister-bellagio
459 + eend $?
460 + fi
461 +
462 + # warn about patent encumbered texture-float
463 + if use !bindist; then
464 + elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
465 + elog "enabled. Please see patents.txt for an explanation."
466 + fi
467 +
468 + if ! has_version media-libs/libtxc_dxtn; then
469 + elog "Note that in order to have full S3TC support, it is necessary to install"
470 + elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
471 + elog "textures in some apps, and some others even require this to run."
472 + fi
473 +}
474 +
475 +pkg_prerm() {
476 + if use openmax; then
477 + rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
478 + fi
479 +}
480 +
481 +# $1 - VIDEO_CARDS flag
482 +# other args - names of DRI drivers to enable
483 +# TODO: avoid code duplication for a more elegant implementation
484 +driver_enable() {
485 + case $# in
486 + # for enabling unconditionally
487 + 1)
488 + DRI_DRIVERS+=",$1"
489 + ;;
490 + *)
491 + if use $1; then
492 + shift
493 + for i in $@; do
494 + DRI_DRIVERS+=",${i}"
495 + done
496 + fi
497 + ;;
498 + esac
499 +}
500 +
501 +gallium_enable() {
502 + case $# in
503 + # for enabling unconditionally
504 + 1)
505 + GALLIUM_DRIVERS+=",$1"
506 + ;;
507 + *)
508 + if use $1; then
509 + shift
510 + for i in $@; do
511 + GALLIUM_DRIVERS+=",${i}"
512 + done
513 + fi
514 + ;;
515 + esac
516 +}
517 +
518 +vulkan_enable() {
519 + case $# in
520 + # for enabling unconditionally
521 + 1)
522 + VULKAN_DRIVERS+=",$1"
523 + ;;
524 + *)
525 + if use $1; then
526 + shift
527 + for i in $@; do
528 + VULKAN_DRIVERS+=",${i}"
529 + done
530 + fi
531 + ;;
532 + esac
533 +}