From e2d84e38284aeb9d522a7e935554340ddf0e4a6f Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 15 Nov 2017 17:13:45 +0000 Subject: gentoo resync : 15.11.2017 --- media-libs/mesa/Manifest | 2 + media-libs/mesa/mesa-17.3.0_rc4.ebuild | 585 +++++++++++++++++++++++++++++++++ 2 files changed, 587 insertions(+) create mode 100644 media-libs/mesa/mesa-17.3.0_rc4.ebuild (limited to 'media-libs/mesa') diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest index 214f954d77c8..8ce0f62a94ac 100644 --- a/media-libs/mesa/Manifest +++ b/media-libs/mesa/Manifest @@ -14,6 +14,7 @@ DIST mesa-17.2.4.tar.xz 10381984 SHA256 5ba408fecd6e1132e5490eec1a2f04466214e4c6 DIST mesa-17.2.5.tar.xz 10386312 SHA256 7f7f914b7b9ea0b15f2d9d01a4375e311b0e90e55683b8e8a67ce8691eb1070f SHA512 c4b0f7f48b0b57fdf610de3d61e127774f8223e755acfde6cf2649818eec985e8f925abf8a15d530ecdb882cb8d7268fd01e5d94c8ac6934551b8a74272353c7 WHIRLPOOL 51d066640824964acebc69e78ec368753c18833b0c0cdb940e6afb8326edc2a75c657d81c043d728ca66968608e59a128295e3f4863980c2dcaf6716f55d14d3 DIST mesa-17.3.0-rc2.tar.xz 10658696 SHA256 13b2c085a54836465a3b6814ad4bc2dae0a502f43405e75ced67789d5afc18cd SHA512 749cca3e0875dbff7b6fab4d646974ecbcc7659ec82ad025bc386372d6e0e050d84d5e05fb68c5099e685557d85daf55c6a5db7bd89a7323778ae7e87e01215e WHIRLPOOL 4007e6641de55145b9bf8bf7aa567c284d3a4b29ea6b83fb5ba3324abf757cf72cf1f1bc0cd3011e58b3d0c6cc6fa7f7c03b1affb7f0ba7c4a5e7ade398bf2f3 DIST mesa-17.3.0-rc3.tar.xz 10664384 SHA256 1f3677429018f6ef4167b31db9eef558827a649239aa685f54c1a400ff5462d9 SHA512 403da79ac87325f2f0962e9be406edf4d009b6f5d479c2943be5bc1a26ad201d96072461a0d041b5a59abe327829eeba0dfb44abce217074079c47811729b058 WHIRLPOOL 91a5f65bc1dc9dc27bcd8492d82c80d2827d2408030890fdcaa653993d9a1deec983b00cb48c0675f3234d36512396c03cc7659bd30cadd6e536f5bef90d65d9 +DIST mesa-17.3.0-rc4.tar.xz 10662396 SHA256 90c9283caa21c047aef013395776ca44037662450bbed188b4eea679084239be SHA512 410a43852944899fbc9d7ab887510dffda3cb98330d7acd5d529cb01abafe1886b353d050c918cd63ecb1b7afb9350e5ceddf8eabf6e8fd6bd4e6f87343f68cb WHIRLPOOL 43fa0b83683526abec04744a418f932d08ee2a566950ae0473c4795ec7905ff5edf6e7f75a64e1fb52ba7865a7b0b46de0c00eefd84715424b68a01eecb8e577 EBUILD mesa-13.0.5.ebuild 13605 SHA256 94df75dbe63d76d35074eda2826bce65641f4919b94e4c59164474b95e045ede SHA512 95793611d72d699e14747c52b73d98510518d05055ff893c171f79413a00c9ae9a055dd9e240b134771c01070d48691e2e7e9942e19b77474af56ae93bd89d9a WHIRLPOOL 8739463b0dfde12c8b9f069b2373f7c53ee3160b5fb9b28453ebf0eda037365f16b0d91dd22bd4647afdecf979e002721ec6bf6165ce66afc9f1a06f276717df EBUILD mesa-13.0.6.ebuild 13553 SHA256 dd0b9f71b641c3405038f640fc8a2a1f04d60447682598e744f52b2c1d51c1eb SHA512 715a50c81cd752dd46b24b41da5e964cfffe13d6870ef9a9f6f18c22adfedd516ffb42845735fb52fe40d4e6ffc7507ee96c569ff3dae89503f3dece72b2647c WHIRLPOOL e2d2086ea547c2bcf34ea4ad19925e6b30bac63809cd311edc6b2a6df3b310d3aa20c706367418b5e142425461b0877d3e2602839beda2f44c8fa7db92c927ec EBUILD mesa-17.0.6.ebuild 13560 SHA256 796db0fd56888084e6d8daec8179c65df2eed1dcfe6b0bab80e0c13f81658d22 SHA512 7caefbaed248f2dffd5cc9bb8fe769d3e412c71659f462b9fabed173766b7dac449707d7e80caaed1f3e81ef01c169c6b366376bbf33b8bd4dfc8771f5e6d334 WHIRLPOOL 4f2ba8010bf86e048849a9e7e61c1984bbde4ec23afd9da7d60807b03c58e63dc723b50c0f7118e995a0ad778eb30e00cf3c0b9a596f0d41fff5e2ef24f3efc8 @@ -28,6 +29,7 @@ EBUILD mesa-17.2.4.ebuild 15003 SHA256 776ed79613f55242943c6aa2554e7845401524d7b EBUILD mesa-17.2.5.ebuild 15003 SHA256 776ed79613f55242943c6aa2554e7845401524d7b8f3132372f476355e966af8 SHA512 32f832d8898932935cb1985a5bab4dc4c70f0baf29657be7b409f53578f205591ab8bfec3a6d77c827ebc20114de3c8292ad1defca26ceff615764d5dfdacffe WHIRLPOOL ba82e86a2fd48c3c2a9a71b348b8af390f2e0f2f70803ce9dca9ec4b4ef3a758b7a4a31d971d594e32648cc7f6e2a9fe7cc550f7031db3766c32cf8daa6b3670 EBUILD mesa-17.3.0_rc2.ebuild 15160 SHA256 0ecca5fc364dd0945f46f89212ece8e22af4c93d87ecf4b22b3fa830c448765c SHA512 6f21d271e8e2e7938cc4c61406e93f032ca63c1ba4fe71ee9dec9998b020dddbdd776bc6de0f01d55020671c2708f33c3116c66b8401009961cfabffa0e43a40 WHIRLPOOL 73f18e8c6fb5a15cfcd2ea6c8af5915e2a6047025c9af4f591ab07fc2490925d7d290a8669db71ed4a11c170bc2a4fcb7a2259fa62dfdb8d256108f595880d9e EBUILD mesa-17.3.0_rc3.ebuild 15160 SHA256 0ecca5fc364dd0945f46f89212ece8e22af4c93d87ecf4b22b3fa830c448765c SHA512 6f21d271e8e2e7938cc4c61406e93f032ca63c1ba4fe71ee9dec9998b020dddbdd776bc6de0f01d55020671c2708f33c3116c66b8401009961cfabffa0e43a40 WHIRLPOOL 73f18e8c6fb5a15cfcd2ea6c8af5915e2a6047025c9af4f591ab07fc2490925d7d290a8669db71ed4a11c170bc2a4fcb7a2259fa62dfdb8d256108f595880d9e +EBUILD mesa-17.3.0_rc4.ebuild 15160 SHA256 0ecca5fc364dd0945f46f89212ece8e22af4c93d87ecf4b22b3fa830c448765c SHA512 6f21d271e8e2e7938cc4c61406e93f032ca63c1ba4fe71ee9dec9998b020dddbdd776bc6de0f01d55020671c2708f33c3116c66b8401009961cfabffa0e43a40 WHIRLPOOL 73f18e8c6fb5a15cfcd2ea6c8af5915e2a6047025c9af4f591ab07fc2490925d7d290a8669db71ed4a11c170bc2a4fcb7a2259fa62dfdb8d256108f595880d9e EBUILD mesa-9999.ebuild 15160 SHA256 75fe901f83804d0eead4452891e74f312a0d6231df217f36a6a6161dafd9ac69 SHA512 00c5035ccf1132f48cb50b9d13c8a07ea004888a7fb610dbcac142d0a711ad9b3b547d5b090d3d88b8fffa8aecc56cfc7f68d4208abde574d1aaf503d55cbf7c WHIRLPOOL b1436b93f1fb73c222dd211e75229007f38f196a6658ea71e9950faa08762599242abd186f78e9ce3eac6187773f5e71b84ca04ab5e20568a5a203f4203a5ac8 MISC ChangeLog 21209 SHA256 d14f068aa33c388215fda4fe7471524fc8a0cbe19ca2bf4bd7797f3a605bdd96 SHA512 b84d9940b71165e4245b2cd4a6b531ff5837a2656ebf95a71e5b27a9fefcd13e9558687aad79ece814c4af0f0847b69eef7bad4745574f8b8acff040ec9fd9ec WHIRLPOOL e3b472204d51b863b38008d1297ec6e2614b4cfe70c8d2ed0d8609f1856298068a6ac18c226c3403e61173d0494009e809692e882794749403e4bdb4247e7589 MISC ChangeLog-2015 103777 SHA256 4b0a5d5630eac8d95c57f5bd440e8f743db364db91e3027efb52541230383724 SHA512 acea97a4adc6157a818db9afdcda514cf050cd85c5619531063c2acf74642f86c286b413976404c50d9af3cce6c4da2edea087c7a43ffec2516436a3f47d3e56 WHIRLPOOL 2c7a7b3baae65fcc0234689e1e9cc70cb89b80c96fc28eee359489c485bbe8f401605352b4f6dde3b5b58a3ae39cff8b6c81c6be5e5ee1f1d68aba8b91cbe226 diff --git a/media-libs/mesa/mesa-17.3.0_rc4.ebuild b/media-libs/mesa/mesa-17.3.0_rc4.ebuild new file mode 100644 index 000000000000..03a35c8a2c1c --- /dev/null +++ b/media-libs/mesa/mesa-17.3.0_rc4.ebuild @@ -0,0 +1,585 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git" + +if [[ ${PV} = 9999 ]]; then + GIT_ECLASS="git-r3" + EXPERIMENTAL="true" +fi + +PYTHON_COMPAT=( python2_7 ) + +inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS} + +OPENGL_DIR="xorg-x11" + +MY_P="${P/_/-}" + +DESCRIPTION="OpenGL-like graphic library for Linux" +HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/" + +if [[ $PV == 9999 ]]; then + SRC_URI="" +else + SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz" + 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" +fi + +LICENSE="MIT" +SLOT="0" +RESTRICT="!bindist? ( bindist )" + +RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" +VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware" +for card in ${VIDEO_CARDS}; do + IUSE_VIDEO_CARDS+=" video_cards_${card}" +done + +IUSE="${IUSE_VIDEO_CARDS} + bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind + +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind + vdpau vulkan wayland xvmc xa" + +REQUIRED_USE=" + d3d9? ( dri3 gallium ) + llvm? ( gallium ) + opencl? ( gallium llvm ) + openmax? ( gallium ) + gles1? ( egl ) + gles2? ( egl ) + vaapi? ( gallium ) + vdpau? ( gallium ) + vulkan? ( || ( video_cards_i965 video_cards_radeonsi ) + video_cards_radeonsi? ( llvm ) ) + wayland? ( egl gbm ) + xa? ( gallium ) + video_cards_freedreno? ( gallium ) + video_cards_intel? ( classic ) + video_cards_i915? ( || ( classic gallium ) ) + video_cards_i965? ( classic ) + video_cards_imx? ( gallium video_cards_vivante ) + video_cards_nouveau? ( || ( classic gallium ) ) + video_cards_radeon? ( || ( classic gallium ) + gallium? ( x86? ( llvm ) amd64? ( llvm ) ) ) + video_cards_r100? ( classic ) + video_cards_r200? ( classic ) + video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) + video_cards_r600? ( gallium ) + video_cards_radeonsi? ( gallium llvm ) + video_cards_vc4? ( gallium ) + video_cards_virgl? ( gallium ) + video_cards_vivante? ( gallium gbm ) + video_cards_vmware? ( gallium ) +" + +LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.85" +# keep correct libdrm and dri2proto dep +# keep blocks in rdepend for binpkg +RDEPEND=" + !=app-eselect/eselect-opengl-1.3.0 + >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] + >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}] + >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] + >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] + >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] + >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] + >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] + >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}] + x11-libs/libXfixes:=[${MULTILIB_USEDEP}] + unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] ) + llvm? ( + video_cards_radeonsi? ( + virtual/libelf:0=[${MULTILIB_USEDEP}] + ) + video_cards_r600? ( + virtual/libelf:0=[${MULTILIB_USEDEP}] + ) + video_cards_radeon? ( + virtual/libelf:0=[${MULTILIB_USEDEP}] + ) + ) + opencl? ( + app-eselect/eselect-opencl + dev-libs/libclc + virtual/libelf:0=[${MULTILIB_USEDEP}] + ) + openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] ) + vaapi? ( + >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}] + video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 ) + ) + vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] ) + wayland? ( + >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}] + >=dev-libs/wayland-protocols-1.8 + ) + xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) + ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}] + + video_cards_intel? ( + !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) + ) + video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) +" +for card in ${RADEON_CARDS}; do + RDEPEND="${RDEPEND} + video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) + " +done +RDEPEND="${RDEPEND} + video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) +" + +# Please keep the LLVM dependency block separate. Since LLVM is slotted, +# we need to *really* make sure we're not pulling one than more slot +# simultaneously. +# +# How to use it: +# 1. List all the working slots (with min versions) in ||, newest first. +# 2. Update the := to specify *max* version, e.g. < 7. +# 3. Specify LLVM_MAX_SLOT, e.g. 6. +LLVM_DEPSTR=" + || ( + sys-devel/llvm:6[${MULTILIB_USEDEP}] + sys-devel/llvm:5[${MULTILIB_USEDEP}] + sys-devel/llvm:4[${MULTILIB_USEDEP}] + >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}] + ) + sys-devel/llvm:=[${MULTILIB_USEDEP}] +" +LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]} +CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang} +CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]} +RDEPEND="${RDEPEND} + llvm? ( + opencl? ( + video_cards_r600? ( + ${CLANG_DEPSTR_AMDGPU} + ) + !video_cards_r600? ( + video_cards_radeonsi? ( + ${CLANG_DEPSTR_AMDGPU} + ) + ) + !video_cards_r600? ( + !video_cards_radeonsi? ( + video_cards_radeon? ( + ${CLANG_DEPSTR_AMDGPU} + ) + ) + ) + !video_cards_r600? ( + !video_cards_radeon? ( + !video_cards_radeonsi? ( + ${CLANG_DEPSTR} + ) + ) + ) + ) + !opencl? ( + video_cards_r600? ( + ${LLVM_DEPSTR_AMDGPU} + ) + !video_cards_r600? ( + video_cards_radeonsi? ( + ${LLVM_DEPSTR_AMDGPU} + ) + ) + !video_cards_r600? ( + !video_cards_radeonsi? ( + video_cards_radeon? ( + ${LLVM_DEPSTR_AMDGPU} + ) + ) + ) + !video_cards_r600? ( + !video_cards_radeon? ( + !video_cards_radeonsi? ( + ${LLVM_DEPSTR} + ) + ) + ) + ) + ) +" +unset {LLVM,CLANG}_DEPSTR{,_AMDGPU} + +DEPEND="${RDEPEND} + ${PYTHON_DEPS} + opencl? ( + >=sys-devel/gcc-4.6 + ) + sys-devel/gettext + virtual/pkgconfig + valgrind? ( dev-util/valgrind ) + >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}] + dri3? ( + >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}] + >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}] + ) + >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}] + >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}] + >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}] + >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}] + vulkan? ( + $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") + ) +" +[[ ${PV} == 9999 ]] && DEPEND+=" + sys-devel/bison + sys-devel/flex + $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") +" + +S="${WORKDIR}/${MY_P}" +EGIT_CHECKOUT_DIR=${S} + +QA_WX_LOAD=" +x86? ( + !pic? ( + usr/lib*/libglapi.so.0.0.0 + usr/lib*/libGLESv1_CM.so.1.1.0 + usr/lib*/libGLESv2.so.2.0.0 + usr/lib*/libGL.so.1.2.0 + usr/lib*/libOSMesa.so.8.0.0 + ) +)" + +llvm_check_deps() { + local flags=${MULTILIB_USEDEP} + if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi + then + flags+=",llvm_targets_AMDGPU(-)" + fi + + if use opencl; then + has_version "sys-devel/clang[${flags}]" || return 1 + fi + has_version "sys-devel/llvm[${flags}]" +} + +pkg_setup() { + # warning message for bug 459306 + if use llvm && has_version sys-devel/llvm[!debug=]; then + ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" + ewarn "detected! This can cause problems. For details, see bug 459306." + fi + + if use llvm; then + llvm_pkg_setup + fi + python-any-r1_pkg_setup +} + +src_prepare() { + [[ ${PV} == 9999 ]] && eautoreconf + eapply_user +} + +multilib_src_configure() { + local myconf + + if use classic; then + # Configurable DRI drivers + driver_enable swrast + + # Intel code + driver_enable video_cards_i915 i915 + driver_enable video_cards_i965 i965 + if ! use video_cards_i915 && \ + ! use video_cards_i965; then + driver_enable video_cards_intel i915 i965 + fi + + # Nouveau code + driver_enable video_cards_nouveau nouveau + + # ATI code + driver_enable video_cards_r100 radeon + driver_enable video_cards_r200 r200 + if ! use video_cards_r100 && \ + ! use video_cards_r200; then + driver_enable video_cards_radeon radeon r200 + fi + fi + + if use egl; then + myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")" + fi + + if use gallium; then + myconf+=" + $(use_enable d3d9 nine) + $(use_enable llvm) + $(use_enable openmax omx-bellagio) + $(use_enable vaapi va) + $(use_enable vdpau) + $(use_enable xa) + $(use_enable xvmc) + " + use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers" + + gallium_enable swrast + gallium_enable video_cards_vc4 vc4 + gallium_enable video_cards_vivante etnaviv + gallium_enable video_cards_vmware svga + gallium_enable video_cards_nouveau nouveau + gallium_enable video_cards_i915 i915 + gallium_enable video_cards_imx imx + if ! use video_cards_i915 && \ + ! use video_cards_i965; then + gallium_enable video_cards_intel i915 + fi + + gallium_enable video_cards_r300 r300 + gallium_enable video_cards_r600 r600 + gallium_enable video_cards_radeonsi radeonsi + if ! use video_cards_r300 && \ + ! use video_cards_r600; then + gallium_enable video_cards_radeon r300 r600 + fi + + gallium_enable video_cards_freedreno freedreno + # opencl stuff + if use opencl; then + myconf+=" + $(use_enable opencl) + --with-clang-libdir="${EPREFIX}/usr/lib" + " + fi + + gallium_enable video_cards_virgl virgl + 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)" + fi + + # on abi_x86_32 hardened we need to have asm disable + if [[ ${ABI} == x86* ]] && use pic; then + myconf+=" --disable-asm" + fi + + if use gallium; then + myconf+=" $(use_enable osmesa gallium-osmesa)" + else + myconf+=" $(use_enable osmesa)" + fi + + # build fails with BSD indent, bug #428112 + use userland_GNU || export INDENT=cat + + ECONF_SOURCE="${S}" \ + econf \ + --enable-dri \ + --enable-glx \ + --enable-shared-glapi \ + $(use_enable !bindist texture-float) \ + $(use_enable d3d9 nine) \ + $(use_enable debug) \ + $(use_enable dri3) \ + $(use_enable egl) \ + $(use_enable gbm) \ + $(use_enable gles1) \ + $(use_enable gles2) \ + $(use_enable nptl glx-tls) \ + $(use_enable unwind libunwind) \ + --enable-valgrind=$(usex valgrind auto no) \ + --enable-llvm-shared-libs \ + --with-dri-drivers=${DRI_DRIVERS} \ + --with-gallium-drivers=${GALLIUM_DRIVERS} \ + --with-vulkan-drivers=${VULKAN_DRIVERS} \ + PYTHON2="${PYTHON}" \ + ${myconf} +} + +multilib_src_install() { + emake install DESTDIR="${D}" + + if use classic || use gallium; then + ebegin "Moving DRI/Gallium drivers for dynamic switching" + local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so ) + keepdir /usr/$(get_libdir)/dri + dodir /usr/$(get_libdir)/mesa + for x in ${gallium_drivers[@]}; do + if [ -f "$(get_libdir)/gallium/${x}" ]; then + mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \ + || die "Failed to move ${x}" + fi + done + if use classic; then + emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install + fi + for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do + if [ -f ${x} -o -L ${x} ]; then + mv -f "${x}" "${x/dri/mesa}" \ + || die "Failed to move ${x}" + fi + done + pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed" + ln -s ../mesa/*.so . || die "Creating symlink failed" + # remove symlinks to drivers known to eselect + for x in ${gallium_drivers[@]}; do + if [ -f ${x} -o -L ${x} ]; then + rm "${x}" || die "Failed to remove ${x}" + fi + done + popd + eend $? + fi + if use opencl; then + ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching" + local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa" + dodir ${cl_dir}/{lib,include} + if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then + mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \ + "${ED}"${cl_dir} + fi + if [ -f "${ED}/usr/include/CL/opencl.h" ]; then + mv -f "${ED}"/usr/include/CL \ + "${ED}"${cl_dir}/include + fi + eend $? + fi + + if use openmax; then + echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx" + doenvd "${T}"/99mesaxdgomx + keepdir /usr/share/mesa/xdg + fi +} + +multilib_src_install_all() { + find "${ED}" -name '*.la' -delete + einstalldocs + + if use !bindist; then + dodoc docs/patents.txt + fi + + # Install config file for eselect mesa + insinto /usr/share/mesa + newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf +} + +multilib_src_test() { + if use llvm; then + 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' + pushd src/gallium/drivers/llvmpipe >/dev/null || die + emake ${llvm_tests} + pax-mark m ${llvm_tests} + popd >/dev/null || die + fi + emake check +} + +pkg_postinst() { + # Switch to the xorg implementation. + echo + eselect opengl set --use-old ${OPENGL_DIR} + + # Select classic/gallium drivers + if use classic || use gallium; then + eselect mesa set --auto + fi + + # Switch to mesa opencl + if use opencl; then + eselect opencl set --use-old ${PN} + fi + + # run omxregister-bellagio to make the OpenMAX drivers known system-wide + if use openmax; then + ebegin "Registering OpenMAX drivers" + BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \ + OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \ + omxregister-bellagio + eend $? + fi + + # warn about patent encumbered texture-float + if use !bindist; then + elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" + elog "enabled. Please see patents.txt for an explanation." + fi + + if ! has_version media-libs/libtxc_dxtn; then + elog "Note that in order to have full S3TC support, it is necessary to install" + elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice" + elog "textures in some apps, and some others even require this to run." + fi +} + +pkg_prerm() { + if use openmax; then + rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister + fi +} + +# $1 - VIDEO_CARDS flag +# other args - names of DRI drivers to enable +# TODO: avoid code duplication for a more elegant implementation +driver_enable() { + case $# in + # for enabling unconditionally + 1) + DRI_DRIVERS+=",$1" + ;; + *) + if use $1; then + shift + for i in $@; do + DRI_DRIVERS+=",${i}" + done + fi + ;; + esac +} + +gallium_enable() { + case $# in + # for enabling unconditionally + 1) + GALLIUM_DRIVERS+=",$1" + ;; + *) + if use $1; then + shift + for i in $@; do + GALLIUM_DRIVERS+=",${i}" + done + fi + ;; + 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 +} -- cgit v1.2.3