media-libs/mesa: Support unconditional enabling of drivers
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Wed, 13 Jun 2018 00:40:56 +0000 (02:40 +0200)
committerMatt Turner <mattst88@gentoo.org>
Wed, 13 Jun 2018 16:39:42 +0000 (09:39 -0700)
... in dri_driver_enable(), gallium_enable(), vulkan_enable().

media-libs/mesa/mesa-9999.ebuild

index afa370713b0f12a9031ba153d57425b3c7b1857d..91b260c979672253bd799f4cc94e3af74981fe47 100644 (file)
@@ -351,10 +351,10 @@ multilib_src_configure() {
        fi
 
        if use gallium; then
-               GALLIUM_DRIVERS+=(swrast)
+               gallium_enable -- swrast
                emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
        else
-               DRI_DRIVERS+=(swrast)
+               dri_driver_enable -- swrast
                emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
        fi
 
@@ -457,24 +457,24 @@ pkg_prerm() {
        fi
 }
 
-# $1 - VIDEO_CARDS flag
+# $1 - VIDEO_CARDS flag (check skipped for "--")
 # other args - names of DRI drivers to enable
 dri_driver_enable() {
-       if use $1; then
+       if [[ $1 == -- ]] || use $1; then
                shift
                DRI_DRIVERS+=("$@")
        fi
 }
 
 gallium_enable() {
-       if use $1; then
+       if [[ $1 == -- ]] || use $1; then
                shift
                GALLIUM_DRIVERS+=("$@")
        fi
 }
 
 vulkan_enable() {
-       if use $1; then
+       if [[ $1 == -- ]] || use $1; then
                shift
                VULKAN_DRIVERS+=("$@")
        fi