summaryrefslogtreecommitdiff
path: root/media-libs/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/mesa')
-rw-r--r--media-libs/mesa/Manifest4
-rw-r--r--media-libs/mesa/mesa-17.1.8.ebuild2
-rw-r--r--media-libs/mesa/mesa-17.2.5.ebuild582
3 files changed, 586 insertions, 2 deletions
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
index 85e1d8692dc7..214f954d77c8 100644
--- a/media-libs/mesa/Manifest
+++ b/media-libs/mesa/Manifest
@@ -11,19 +11,21 @@ DIST mesa-17.2.1.tar.xz 10414776 SHA256 77385d17827cff24a3bae134342234f2efe7f7f9
DIST mesa-17.2.2.tar.xz 10359156 SHA256 cf522244d6a5a1ecde3fc00e7c96935253fe22f808f064cab98be6f3faa65782 SHA512 641342c68989b8d801c37e668b012d3b7c4ad43d8ca01b74f8cbb3a1ec25b7390f69fe7ebc84b29dab1c6a4ac01c882ec9fd4a6b331505629461bdbbe6aa3f7e WHIRLPOOL 74271721fb38a0c62f6f35d84ba9196e000f2fe2a32e75120288e77649a87e225464572d347fc149190b573d22c32dfee3e174d6a2578b3c649c4b72375a94ec
DIST mesa-17.2.3.tar.xz 10344180 SHA256 a0b0ec8f7b24dd044d7ab30a8c7e6d3767521e245f88d4ed5dd93315dc56f837 SHA512 749a0a46b772974633e405804ace7f509afb79f47811dbbdd390333721d744f2ac64f985ff1fd6c5aa3019b700be70bc1f75f60745ed9f4c5b08a9a8f77dfc76 WHIRLPOOL 333bdb9dd15726a4a19fa7a87d2044aba6ebaea2eb83dd436f916020221a8bc46d667e8710a701c52930217292ecdfd468b654a7846357aa8881356987f394c0
DIST mesa-17.2.4.tar.xz 10381984 SHA256 5ba408fecd6e1132e5490eec1a2f04466214e4c65c8b89b331be844768c2e550 SHA512 665b63aab6af3f8f263f182d85d9ad71db7a23bcbaf67d62fe53c258cb0f600266ac82e72d681ec20cf7c66b47d4076aad5c3f553519f19110ee577da2707085 WHIRLPOOL 29750c50a496cb27e0b4466bf0d1496434330a96259616dd7c368adc3d9478aa6ba1facf11ec4ff231a244f890781c12637327b1675c423786693c40f787945d
+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
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
EBUILD mesa-17.1.10.ebuild 13436 SHA256 dbf163c9d77fc1b9d0ee3af9563d6b27c850865c3f46bd6d698f9dea36fbd749 SHA512 b29bb8f80706f2bdf5602951b346901c0357e81e3e73afab1ca6ccdf1c1037660f6b66d05c999563bc22d0da68416c68368b8d741e1c961164161d8b5dd41170 WHIRLPOOL 1fec4c936b3559d718ad56b2d6def5dfdb95c517c72b33eaa668d8d4c4fae626a58e576e0f5ae7182e47c2da4b9c1d29001ef9627adfe5241587023da4adbd50
-EBUILD mesa-17.1.8.ebuild 13432 SHA256 d7ad46528ac26c9b0823fcb378ab5522b3747398d3ef5f456f39af4c593b530e SHA512 11139f3fce14046f534527784bf6f377cbee7453f72a2656f4d2240f9e83e94335b2a42434902f6f5e1f1bba7c7eb6f35083721d8f57e14f365065681e9e1834 WHIRLPOOL 31d0156f084f9e3abfe7bc72b67e42597deee915a5f6d0bdc78e65da8d6f91765cdb61dd536f72926ec8509a5f1b491f526bcbb8d4c77df47d4035dfe5ed531e
+EBUILD mesa-17.1.8.ebuild 13430 SHA256 ae99f445414efacc8eb29fa58ed86f90b40bf5fdbbf821001539be97fe684b0c SHA512 5c60f50fea2ba5c4aea96dd8d3a2eeb47b1bae500ba609006978c7d71841a2eb32abeb1c363e4d84ba3d6f8ebb044870830a984ae18a39db5181457e73d4a178 WHIRLPOOL dc1f2293d4cc412a9c6e7ef569bdd162c66b1e7d2054258ededd645b57cb27143b548dd04f3cc80986e0bb41bf57d959394246f09a19e5078b4a687abafcef5f
EBUILD mesa-17.1.9.ebuild 13436 SHA256 dbf163c9d77fc1b9d0ee3af9563d6b27c850865c3f46bd6d698f9dea36fbd749 SHA512 b29bb8f80706f2bdf5602951b346901c0357e81e3e73afab1ca6ccdf1c1037660f6b66d05c999563bc22d0da68416c68368b8d741e1c961164161d8b5dd41170 WHIRLPOOL 1fec4c936b3559d718ad56b2d6def5dfdb95c517c72b33eaa668d8d4c4fae626a58e576e0f5ae7182e47c2da4b9c1d29001ef9627adfe5241587023da4adbd50
EBUILD mesa-17.2.0.ebuild 13466 SHA256 4a0ec5433959232820e767d338943dd9c4da54614d165f1d44492b0ed11f95fd SHA512 27302424779fdd5a173f9ba07a0aa75c3efff98314741f9510cce3b6a157baa597d624ce35912abc1faac1b22d14d8cced08300c586be309193d4e22a69ff6b5 WHIRLPOOL fc08a3c90df865d65fb40379ab776043b6d9c96205af9be1f269b7888221a112a8228233cef3a481289fccfb69ee39f5ad2d313a639d6fa52a0f7d3a69ecee1a
EBUILD mesa-17.2.1.ebuild 14923 SHA256 2b96118b576ba0c40c9453aa832e1a2394b6fcbb3a581d4aa0c640dd536addf1 SHA512 ea96f945aa670ac38147688876fe6c302b6deb41223af6134ac8b958802d1733c5d509419786c8ccd4647fb62ef6fa1e94e9bac7cf1b67c89c606c9090435d9e WHIRLPOOL 59a8b64c5fa8a441a2afea56f08e6b5a09d9186b76f86007f8b16fe3ced33b664130d7d81789104d60a92b6a56e6a36c7a40d4020918e4c59a8f5ff52ef3a065
EBUILD mesa-17.2.2.ebuild 14923 SHA256 2b96118b576ba0c40c9453aa832e1a2394b6fcbb3a581d4aa0c640dd536addf1 SHA512 ea96f945aa670ac38147688876fe6c302b6deb41223af6134ac8b958802d1733c5d509419786c8ccd4647fb62ef6fa1e94e9bac7cf1b67c89c606c9090435d9e WHIRLPOOL 59a8b64c5fa8a441a2afea56f08e6b5a09d9186b76f86007f8b16fe3ced33b664130d7d81789104d60a92b6a56e6a36c7a40d4020918e4c59a8f5ff52ef3a065
EBUILD mesa-17.2.3.ebuild 15003 SHA256 776ed79613f55242943c6aa2554e7845401524d7b8f3132372f476355e966af8 SHA512 32f832d8898932935cb1985a5bab4dc4c70f0baf29657be7b409f53578f205591ab8bfec3a6d77c827ebc20114de3c8292ad1defca26ceff615764d5dfdacffe WHIRLPOOL ba82e86a2fd48c3c2a9a71b348b8af390f2e0f2f70803ce9dca9ec4b4ef3a758b7a4a31d971d594e32648cc7f6e2a9fe7cc550f7031db3766c32cf8daa6b3670
EBUILD mesa-17.2.4.ebuild 15003 SHA256 776ed79613f55242943c6aa2554e7845401524d7b8f3132372f476355e966af8 SHA512 32f832d8898932935cb1985a5bab4dc4c70f0baf29657be7b409f53578f205591ab8bfec3a6d77c827ebc20114de3c8292ad1defca26ceff615764d5dfdacffe WHIRLPOOL ba82e86a2fd48c3c2a9a71b348b8af390f2e0f2f70803ce9dca9ec4b4ef3a758b7a4a31d971d594e32648cc7f6e2a9fe7cc550f7031db3766c32cf8daa6b3670
+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-9999.ebuild 15160 SHA256 75fe901f83804d0eead4452891e74f312a0d6231df217f36a6a6161dafd9ac69 SHA512 00c5035ccf1132f48cb50b9d13c8a07ea004888a7fb610dbcac142d0a711ad9b3b547d5b090d3d88b8fffa8aecc56cfc7f68d4208abde574d1aaf503d55cbf7c WHIRLPOOL b1436b93f1fb73c222dd211e75229007f38f196a6658ea71e9950faa08762599242abd186f78e9ce3eac6187773f5e71b84ca04ab5e20568a5a203f4203a5ac8
diff --git a/media-libs/mesa/mesa-17.1.8.ebuild b/media-libs/mesa/mesa-17.1.8.ebuild
index 07313a557eb7..f0443941a305 100644
--- a/media-libs/mesa/mesa-17.1.8.ebuild
+++ b/media-libs/mesa/mesa-17.1.8.ebuild
@@ -25,7 +25,7 @@ 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"
+ 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"
diff --git a/media-libs/mesa/mesa-17.2.5.ebuild b/media-libs/mesa/mesa-17.2.5.ebuild
new file mode 100644
index 000000000000..12be4d77969f
--- /dev/null
+++ b/media-libs/mesa/mesa-17.2.5.ebuild
@@ -0,0 +1,582 @@
+# 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/"
+
+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_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.82"
+# keep correct libdrm and dri2proto dep
+# keep blocks in rdepend for binpkg
+RDEPEND="
+ !<x11-base/xorg-server-1.7
+ !<=x11-proto/xf86driproto-2.0.3
+ abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
+ classic? ( app-eselect/eselect-mesa )
+ gallium? ( app-eselect/eselect-mesa )
+ >=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_MAX_SLOT="5"
+LLVM_DEPSTR="
+ || (
+ 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}]
+"
+[[ ${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)
+ $(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
+}