diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2017-01-03 02:29:45 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2017-01-03 02:29:45 +0300 |
commit | 8bd17f1f024b4cae3781558e900e7164f6b2f795 (patch) | |
tree | 29f41266a517a4a1bfa0ad63c91efe782890d8ed /media-libs | |
parent | dac5152d48649fc79bc224b66d5bd4dd78ef7764 (diff) |
mesa: merged with gentoo (vulkan use flag)
Diffstat (limited to 'media-libs')
-rw-r--r-- | media-libs/mesa/mesa-scm.ebuild | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/media-libs/mesa/mesa-scm.ebuild b/media-libs/mesa/mesa-scm.ebuild index 906f0af..c3c2d2e 100644 --- a/media-libs/mesa/mesa-scm.ebuild +++ b/media-libs/mesa/mesa-scm.ebuild @@ -40,7 +40,7 @@ done IUSE="${IUSE_VIDEO_CARDS} bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gcrypt gles1 gles2 libressl +llvm nettle +nptl opencl osmesa pax_kernel openmax +openssl pic - selinux vaapi valgrind vdpau wayland xvmc xa kernel_FreeBSD" + selinux vaapi valgrind vdpau +vulkan wayland xvmc xa kernel_FreeBSD" REQUIRED_USE=" || ( gcrypt libressl nettle openssl ) @@ -52,6 +52,7 @@ REQUIRED_USE=" gles2? ( egl ) vaapi? ( gallium ) vdpau? ( gallium ) + vulkan? ( || ( video_cards_i965 video_cards_radeonsi ) ) wayland? ( egl gbm ) xa? ( gallium ) video_cards_freedreno? ( gallium ) @@ -71,7 +72,7 @@ REQUIRED_USE=" ${PYTHON_REQUIRED_USE} " -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.67" +LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.72" # keep correct libdrm and dri2proto dep # keep blocks in rdepend for binpkg RDEPEND=" @@ -270,6 +271,11 @@ multilib_src_configure() { fi fi + if use vulkan; then + vulkan_enable video_cards_i965 intel + vulkan_enable video_cards_radeonsi radeon + fi + # x86 hardened pax_kernel needs glx-rts, bug 240956 if [[ ${ABI} == x86 ]]; then myconf+=" $(use_enable pax_kernel glx-read-only-text)" @@ -308,6 +314,7 @@ multilib_src_configure() { --enable-llvm-shared-libs \ --with-dri-drivers=${DRI_DRIVERS} \ --with-gallium-drivers=${GALLIUM_DRIVERS} \ + --with-vulkan-drivers=${VULKAN_DRIVERS} \ --with-sha1=$(usex nettle libnettle $(usex gcrypt libgcrypt libcrypto)) \ PYTHON2="${PYTHON}" \ ${myconf} @@ -380,6 +387,11 @@ multilib_src_install_all() { # Install config file for eselect mesa insinto /usr/share/mesa newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf + + # Mesa should not install these + if use vulkan; then + rm "${ED}"/usr/include/vulkan/{vulkan.h,vk_platform.h} || die + fi } multilib_src_test() { @@ -472,3 +484,20 @@ gallium_enable() { ;; esac } + +vulkan_enable() { + case $# in + # for enabling unconditionally + 1) + VULKAN_DRIVERS+=",$1" + ;; + *) + if use $1; then + shift + for i in $@; do + VULKAN_DRIVERS+=",${i}" + done + fi + ;; + esac +} |