media-libs/mesa: add USE flags to control sha1 dep #539266
authorMike Frysinger <vapier@gentoo.org>
Thu, 10 Nov 2016 22:29:14 +0000 (17:29 -0500)
committerMike Frysinger <vapier@gentoo.org>
Thu, 10 Nov 2016 22:35:52 +0000 (17:35 -0500)
The sha1 usage in mesa is a bit convoluted and can leverage a number of
sublibs to satisfy things.  Add USE flags to control them directly.  This
covers the common cases but can probably be further refined.  We'll look
more into it via the bug.

media-libs/mesa/mesa-13.0.0.ebuild
media-libs/mesa/mesa-9999.ebuild
media-libs/mesa/metadata.xml

index bfedccc58cb491ec4c7fc9b3f6313a7824557f57..f7e39297e11b02f4ac502aacb31bcc616b1142ce 100644 (file)
@@ -43,11 +43,12 @@ for card in ${VIDEO_CARDS}; do
 done
 
 IUSE="${IUSE_VIDEO_CARDS}
-       bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm
-       +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
-       vdpau wayland xvmc xa kernel_FreeBSD"
+       bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gcrypt gles1 gles2
+       +llvm nettle +nptl opencl osmesa pax_kernel openmax +openssl pic selinux
+       vaapi valgrind vdpau wayland xvmc xa kernel_FreeBSD"
 
 REQUIRED_USE="
+       || ( gcrypt nettle openssl )
        d3d9?   ( dri3 gallium )
        llvm?   ( gallium )
        opencl? ( gallium llvm )
@@ -100,6 +101,11 @@ RDEPEND="
                ) )
                >=sys-devel/llvm-3.6.0:=[${MULTILIB_USEDEP}]
        )
+       nettle? ( dev-libs/nettle:=[${MULTILIB_USEDEP}] )
+       !nettle? (
+               gcrypt? ( dev-libs/libgcrypt:=[${MULTILIB_USEDEP}] )
+               !gcrypt? ( dev-libs/openssl:=[${MULTILIB_USEDEP}] )
+       )
        opencl? (
                                app-eselect/eselect-opencl
                                dev-libs/libclc
@@ -302,6 +308,7 @@ multilib_src_configure() {
                --enable-llvm-shared-libs \
                --with-dri-drivers=${DRI_DRIVERS} \
                --with-gallium-drivers=${GALLIUM_DRIVERS} \
+               --with-sha1=$(usex nettle libnettle $(usex gcrypt libgcrypt libcrypto)) \
                PYTHON2="${PYTHON}" \
                ${myconf}
 }
index bfedccc58cb491ec4c7fc9b3f6313a7824557f57..f7e39297e11b02f4ac502aacb31bcc616b1142ce 100644 (file)
@@ -43,11 +43,12 @@ for card in ${VIDEO_CARDS}; do
 done
 
 IUSE="${IUSE_VIDEO_CARDS}
-       bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm
-       +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
-       vdpau wayland xvmc xa kernel_FreeBSD"
+       bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gcrypt gles1 gles2
+       +llvm nettle +nptl opencl osmesa pax_kernel openmax +openssl pic selinux
+       vaapi valgrind vdpau wayland xvmc xa kernel_FreeBSD"
 
 REQUIRED_USE="
+       || ( gcrypt nettle openssl )
        d3d9?   ( dri3 gallium )
        llvm?   ( gallium )
        opencl? ( gallium llvm )
@@ -100,6 +101,11 @@ RDEPEND="
                ) )
                >=sys-devel/llvm-3.6.0:=[${MULTILIB_USEDEP}]
        )
+       nettle? ( dev-libs/nettle:=[${MULTILIB_USEDEP}] )
+       !nettle? (
+               gcrypt? ( dev-libs/libgcrypt:=[${MULTILIB_USEDEP}] )
+               !gcrypt? ( dev-libs/openssl:=[${MULTILIB_USEDEP}] )
+       )
        opencl? (
                                app-eselect/eselect-opencl
                                dev-libs/libclc
@@ -302,6 +308,7 @@ multilib_src_configure() {
                --enable-llvm-shared-libs \
                --with-dri-drivers=${DRI_DRIVERS} \
                --with-gallium-drivers=${GALLIUM_DRIVERS} \
+               --with-sha1=$(usex nettle libnettle $(usex gcrypt libgcrypt libcrypto)) \
                PYTHON2="${PYTHON}" \
                ${myconf}
 }
index e0706e70131404148b9ca12a22ccffb1f2ecc4aa..f53e36d6e90a9de1e940fa5769f29c0b027bcf3d 100644 (file)
                <flag name="dri3">Enable DRI3 support.</flag>
                <flag name="egl">Enable EGL support.</flag>
                <flag name="gallium">Build drivers based on Gallium3D, the new architecture for 3D graphics drivers.</flag>
+               <flag name="gcrypt">Use <pkg>dev-libs/libgcrypt</pkg> for low level sha1 utility functions.</flag>
                <flag name="gbm">Enable the Graphics Buffer Manager for EGL on KMS.</flag>
                <flag name="gles1">Enable GLESv1 support.</flag>
                <flag name="gles2">Enable GLESv2 support.</flag>
                <flag name="llvm">Enable LLVM backend for Gallium3D.</flag>
+               <flag name="nettle">Use <pkg>dev-libs/nettle</pkg> for low level sha1 utility functions.</flag>
                <flag name="opencl">Enable the Clover Gallium OpenCL state tracker.</flag>
                <flag name="openmax">Enable OpenMAX video decode/encode acceleration for Gallium3D.</flag>
+               <flag name="openssl">Use <pkg>dev-libs/openssl</pkg> for low level sha1 utility functions.</flag>
                <flag name="openvg">Enable the OpenVG 2D acceleration API for Gallium3D.</flag>
                <flag name="osmesa">Build the Mesa library for off-screen rendering.</flag>
                <flag name="pax_kernel">Enable if the user plans to run the package under a pax enabled hardened kernel</flag>