From de49812990871e1705b64051c35161d5e6400269 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 24 Dec 2018 14:11:38 +0000 Subject: gentoo resync : 24.12.2018 --- media-libs/mesa/Manifest | 20 +- .../mesa-18.2.4-meson-fix-libatomic-tests.patch | 13 - ...2.4-meson-link-gallium-nine-with-pthreads.patch | 34 -- media-libs/mesa/mesa-18.1.9.ebuild | 540 --------------------- media-libs/mesa/mesa-18.2.4.ebuild | 520 -------------------- media-libs/mesa/mesa-18.2.5.ebuild | 515 -------------------- media-libs/mesa/mesa-18.2.7.ebuild | 515 ++++++++++++++++++++ media-libs/mesa/mesa-18.3.0.ebuild | 519 ++++++++++++++++++++ media-libs/mesa/mesa-18.3.0_rc2.ebuild | 515 -------------------- media-libs/mesa/mesa-18.3.0_rc3.ebuild | 519 -------------------- media-libs/mesa/mesa-18.3.1.ebuild | 519 ++++++++++++++++++++ media-libs/mesa/metadata.xml | 2 - 12 files changed, 1560 insertions(+), 2671 deletions(-) delete mode 100644 media-libs/mesa/files/mesa-18.2.4-meson-fix-libatomic-tests.patch delete mode 100644 media-libs/mesa/files/mesa-18.2.4-meson-link-gallium-nine-with-pthreads.patch delete mode 100644 media-libs/mesa/mesa-18.1.9.ebuild delete mode 100644 media-libs/mesa/mesa-18.2.4.ebuild delete mode 100644 media-libs/mesa/mesa-18.2.5.ebuild create mode 100644 media-libs/mesa/mesa-18.2.7.ebuild create mode 100644 media-libs/mesa/mesa-18.3.0.ebuild delete mode 100644 media-libs/mesa/mesa-18.3.0_rc2.ebuild delete mode 100644 media-libs/mesa/mesa-18.3.0_rc3.ebuild create mode 100644 media-libs/mesa/mesa-18.3.1.ebuild (limited to 'media-libs/mesa') diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest index 2be4a85426dc..08bad4bd317c 100644 --- a/media-libs/mesa/Manifest +++ b/media-libs/mesa/Manifest @@ -1,14 +1,8 @@ -AUX mesa-18.2.4-meson-fix-libatomic-tests.patch 453 BLAKE2B 9095f34ccb452cb39026d71712e313133a23e13dfd4faf2022e030c450f4cae398463ea0c32ed7983e0a697237115d14b5eea22f705df7206c395ace5ac1b587 SHA512 4ec8ebe1ba6a74af9e69510457ba621184151ac0c3866bd3137bac527ea3a8b633b195ff1db1f8b7567e9e847f2b7da2c3315ffd54c1d9d1c7ac71995d34362a -AUX mesa-18.2.4-meson-link-gallium-nine-with-pthreads.patch 1294 BLAKE2B 2ff1fbfca0276baa6bc504ec31801cc0a61efb64ee46cd745d7f85413aa90d4153adeda23cc9f8534d79a884803d96579ad74efa6a98e1319622bcd7afe9a443 SHA512 40f920f9d9ce7e15d1b9b93753937bbba0bb1abc5848e55bd5b564b43d8507f6279530621bf81508990fb2735e8fc4bba6a5f1566b73424342b5d3e6db47a1c5 -DIST mesa-18.1.9.tar.xz 11146188 BLAKE2B 753f0fa3780502d56927f9b0e6124b4728cb5aa3600de78585487fb8e178c6987a72b79fb56e6c310757d157f9f85f12b73a6889bd361b51b62fb1dc1c20eecd SHA512 22db2950d25a3d9393e7c622c783bd177c21695569c8a95683bf77e92318e1db85672a134d4bea30c1f49a24e52bc3a2c1a0ac15deafb3a8fcbfb6de6a18adc2 -DIST mesa-18.2.4.tar.xz 11377556 BLAKE2B b11c33ade744fb976862fecccbcc4c97196a005e40a00ef02bd8d409b66b3aa11f97baee13f2aa92f2d7c5461b2ef44beae3103687dea9ee29e92439a068f08a SHA512 088d43b087f4005752e4db75eaa6897e0fcb6de7b9a1f2d2b2ce3b5557d1dff829022e0092e8b1038ff01182c863ca0f26c97b9adde34bca462d3fa24502bfde -DIST mesa-18.2.5.tar.xz 11365620 BLAKE2B 401fbbcb0e56a97122c11b7d47e506fe86795e942ca412abfa0c29010434447d96bc17fa0e7fc43090c94d7907fc0acaed5f7dada164e8906dca43da0b64a932 SHA512 dd454c720241dffa61f3380be62479979a43004b2a52293b817bd3ea95f75960edee680e7380a13fae09b67a90dc0393e4a022d543db91b2f142f2468a9661f0 -DIST mesa-18.3.0-rc2.tar.xz 11862200 BLAKE2B 4776d1dbf9fdab9dffc36ce8cdd5531491251c9d6f8317ec962d0a0556201ecf72a8cbc9ef2870085041e12702bba2a8bbbbbe011d21ed440eec08fe81b2f96e SHA512 af12adafbeac33f1ee527a0c7f61c24251912b5ee0a9e55d46f0133e6897b0ca91486ae2b3236159e43addef4de474a7b71ec3932083e68b9e94e480ee91c9fa -DIST mesa-18.3.0-rc3.tar.xz 11862412 BLAKE2B b310ebdc2a62bc0ff9796cfafab1252d46eadc17c3e0abad894776c73b4c640eedc6481666a0ad111abd1dfd8f40f2419b6afca03804225a10ff53080d2f582b SHA512 5ddc7ba15c47aeb3b6239147a43ff79435fce7d8a9a14b63f14d6382f9e911899821ad3e07a0c2dc5dbf3735b2fe5ee534d34614fbf1f89029d2de5d95955eeb -EBUILD mesa-18.1.9.ebuild 13412 BLAKE2B 976868904cf8b157abafad9d16a3e59bda73a272829e5c74f1d812ace952f77857e4cb3aca17b0fe750e64584119b402a01156b096094249e6cb0bdd136529d7 SHA512 6e2ac62053d96fc7af4311dd6b3dad379726c4c98f585077c31246e4e481e517c8a3a200d0d9b66da26dce08c63c1410c5573490ff74f7313f9f673b9fe78f05 -EBUILD mesa-18.2.4.ebuild 13715 BLAKE2B fb43fd7d0dff90e428cfe0b58b15039161866acda4e076d078bb5d79736d87ddaaf194cce0c6eb529daead4a545311a47dcc2ac88205d57d71d7558f7fa6403c SHA512 e2ab7b5b0e959873a39231985580db6898ae31af17a81ebe6d622cb5ceb678b910e59687fcf3923889f1a7d6752bf2ede9ca66cf413b6e313102d7a947a0aedc -EBUILD mesa-18.2.5.ebuild 13585 BLAKE2B e3190c215b0866f3c85506d02e3505a08625dfe5a1044cc02bdc46ebb59195239769f3b2ddc4947d28621c5195972d9b853881542d6bec45a921be499507fc6d SHA512 f740e5057b5c6a2297d9db5d853c9f2acfdf832b27edaf2f375769ec05053ecc9c0ed7635539d082260b42a6c736cbf68ac7358387f5433a33d91b828b2eab63 -EBUILD mesa-18.3.0_rc2.ebuild 13622 BLAKE2B 4ced396113689260f14557b3985c6c230a0ac121d2858c0b61a0d58133c1929d8f372894feffa1f8e40d369ae7b286909a3dcc901a50e236c1769dfbd0e15f63 SHA512 efb34ae15bf3f2ae9d304383933441af9bc5027f86682d9d4114c2382addc962827352234349606ecb88e859e386337296663377a53d5305056cd888e635ef64 -EBUILD mesa-18.3.0_rc3.ebuild 13704 BLAKE2B 39d69163bca102707ce713ba577736000e2eabe96c5fbbe4b24a2fce2396ab4554be1ce114e311315b58a9607b7d702bacbe2547f109fa306d009993cd7399f5 SHA512 7bef8c12c120e69aa0f167481a8be1a65ff606be4e254bfde563422e74914e570ceb1bf710bd23edce3b22ede5a5f9f308c8681a2b8f5f9f59979fbb152c1e1b +DIST mesa-18.2.7.tar.xz 11356060 BLAKE2B efad9f46ab1a5d007accce557da717ae69fe49e56f7a4bc90193b91a7d7be22ac899fc37d66fd6e9844091450c999a0288515f3ea39612d3fbe63b426a9690ac SHA512 81f7b7108352cb3d8cf4b600ce2b0db6eb8420df550bf9f7087d83c2ab0f8dc32abe188f8ce5f52066e432fb64d9d17fc0edfbc9d0cb0650d0041f14064d9d77 +DIST mesa-18.3.0.tar.xz 11865356 BLAKE2B e9529a6257b3dd914e9bfe5c88bfbc30d652a045dfd9ed1387b12db9e6a89968b3affc5bc91d4d773035c505f32c3749216ae3666787bf97f1b23dcd8e0f7d3a SHA512 6643d8a100c50efee7178fe950e7cccad24c3a98538d3a13c7c6570add30a56776b4e5f279e2b0a20c4038e682e9461ca5a4fd4ac23a7f60d2f4a0c972525c42 +DIST mesa-18.3.1.tar.xz 11865960 BLAKE2B 6863a6d3891d1d2916139f71a5beefd7d83c81a0753d2c6885126636647cb5f7332dc308a9927f149951b122770ed07bc96ff5361dd23fbe1e07fb31d9c05147 SHA512 a68d39158cf1e868d70730d0641a0cfe4c6e5b3cd1bc0c47f54022402aca03503933084f6ddc722bf88c9b6d1281ba5c847ec4fed8092a9b33f90527d08e12db +EBUILD mesa-18.2.7.ebuild 13582 BLAKE2B 23767ed855b88bbae877fa5d21c97b17fd79d1648e4c2395204ab4e7b26036949b5014eb71c6d070bc992823c122f132048292f5c304392da66fbceb49960c3f SHA512 529e00bb5a0c01e4abdd7017b46a815d66e82f83eb799bfc071c23a365d5a35e9de1e6b429e796f1233b3433dd45b79b2f027355c91c3b6632386abb2b18950e +EBUILD mesa-18.3.0.ebuild 13704 BLAKE2B 39d69163bca102707ce713ba577736000e2eabe96c5fbbe4b24a2fce2396ab4554be1ce114e311315b58a9607b7d702bacbe2547f109fa306d009993cd7399f5 SHA512 7bef8c12c120e69aa0f167481a8be1a65ff606be4e254bfde563422e74914e570ceb1bf710bd23edce3b22ede5a5f9f308c8681a2b8f5f9f59979fbb152c1e1b +EBUILD mesa-18.3.1.ebuild 13704 BLAKE2B 39d69163bca102707ce713ba577736000e2eabe96c5fbbe4b24a2fce2396ab4554be1ce114e311315b58a9607b7d702bacbe2547f109fa306d009993cd7399f5 SHA512 7bef8c12c120e69aa0f167481a8be1a65ff606be4e254bfde563422e74914e570ceb1bf710bd23edce3b22ede5a5f9f308c8681a2b8f5f9f59979fbb152c1e1b EBUILD mesa-9999.ebuild 13725 BLAKE2B b786f2832136dc5a4973377513d90b1573b065917d971dcce13910cfc2cc1e7b4e329faae108741fd7c23a4c9856e2dc3bd141a80d979e82447312f98739f2eb SHA512 df291492547683d74be6712f180971a0c64e18aa011b7ec69e599a0c54166b63c95c4ec148292c05a13bb7cb58a31b3f8fca45590d2fdd5525d0a2f6b251ffee -MISC metadata.xml 2095 BLAKE2B c1c858a478bbb1c7e38a45dbf00e380a3d26c56920db1897521a7e9f4eb005157e535207ae2274d744e3ce5514a57654eb0effb2cfc773263a0f417874cdc742 SHA512 c3db8aeb4f4ae7ea27c8b48cb26ee9348d84e6fb4b99df815b177e62e78cd980a7834c152e2c10c6fdbe2b91a032861a0c0503625874bfb6df58ccc3bf54e705 +MISC metadata.xml 1865 BLAKE2B 5c972239c02d0b4c212306d21326706af866576673802c7e28f28434bf1afe4145e89b7fc26947ba2126ecc9b5e57e41f248c9a23dc3e097efaddee177a4b904 SHA512 11a4e9b63b8d7fa041c76ff39694f138781443f80ae8942f845f6b9c30d560c25de83c62ca53f94f5129e42f2ca11c8478e4b5beae427c8352f7489f66e84795 diff --git a/media-libs/mesa/files/mesa-18.2.4-meson-fix-libatomic-tests.patch b/media-libs/mesa/files/mesa-18.2.4-meson-fix-libatomic-tests.patch deleted file mode 100644 index d8709eae8f72..000000000000 --- a/media-libs/mesa/files/mesa-18.2.4-meson-fix-libatomic-tests.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/meson.build b/meson.build -index 690e7d3d8aa..fb08e905ebd 100644 ---- a/meson.build -+++ b/meson.build -@@ -906,7 +906,7 @@ if not cc.links('''#include - return __sync_add_and_fetch(&v, (uint64_t)1); - }''', - name : 'GCC 64bit atomics') -- pre_args += '-DMISSING_64_BIT_ATOMICS' -+ pre_args += '-DMISSING_64BIT_ATOMICS' - endif - - # TODO: shared/static? Is this even worth doing? diff --git a/media-libs/mesa/files/mesa-18.2.4-meson-link-gallium-nine-with-pthreads.patch b/media-libs/mesa/files/mesa-18.2.4-meson-link-gallium-nine-with-pthreads.patch deleted file mode 100644 index 11d4f9cac07d..000000000000 --- a/media-libs/mesa/files/mesa-18.2.4-meson-link-gallium-nine-with-pthreads.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 7652931d33b36c93b2e84713baa8c283d568402e Mon Sep 17 00:00:00 2001 -From: Dylan Baker -Date: Thu, 1 Nov 2018 14:12:57 -0700 -Subject: [PATCH] meson: link gallium nine with pthreads - -In some cases (not building with llvm, which automatically pulls in -pthreads) nine needs to be directly linked with pthreads. Fixes building -on x86 (32 bit) without llvm. - -Distro bug: https://bugs.gentoo.org/670094 -Fixes: 6b4c7047d57178d3362a710ad503057c6a582ca3 - ("meson: build gallium nine state_tracker") -Tested-by: Rafal Lalik -Reviewed-by: Matt Turner ---- - src/gallium/targets/d3dadapter9/meson.build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/gallium/targets/d3dadapter9/meson.build b/src/gallium/targets/d3dadapter9/meson.build -index bd05b4f9692..bc72b1110a0 100644 ---- a/src/gallium/targets/d3dadapter9/meson.build -+++ b/src/gallium/targets/d3dadapter9/meson.build -@@ -53,7 +53,7 @@ libgallium_nine = shared_library( - libswkmsdri, - ], - dependencies : [ -- dep_selinux, dep_expat, dep_libdrm, dep_llvm, -+ dep_selinux, dep_expat, dep_libdrm, dep_llvm, dep_thread, - driver_swrast, driver_r300, driver_r600, driver_radeonsi, driver_nouveau, - driver_i915, driver_svga, - ], --- -2.16.4 - diff --git a/media-libs/mesa/mesa-18.1.9.ebuild b/media-libs/mesa/mesa-18.1.9.ebuild deleted file mode 100644 index b325261df672..000000000000 --- a/media-libs/mesa/mesa-18.1.9.ebuild +++ /dev/null @@ -1,540 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -EGIT_REPO_URI="https://gitlab.freedesktop.org/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 ~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 || ( video_cards_r600 video_cards_radeonsi ) ) - 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.91" -RDEPEND=" - !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.13:=[${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}] - x11-misc/xdg-utils - ) - 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.15.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="6" -LLVM_DEPSTR=" - || ( - sys-devel/llvm:7[${MULTILIB_USEDEP}] - 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-base/xorg-proto - 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() { - eapply_user - [[ ${PV} == 9999 ]] && eautoreconf -} - -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 \ - --disable-opencl-icd \ - --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 wayland; then - # These files are now provided by >=dev-libs/wayland-1.15.0 - rm "${ED}/usr/$(get_libdir)/libwayland-egl.so" || die - rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1" || die - rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1.0.0" || die - rm "${ED}/usr/$(get_libdir)/pkgconfig/wayland-egl.pc" || die - 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 -} - -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} - - # 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 /usr/share/doc/${P}/patents.txt.bz2 for an" - elog "explanation." - 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 -} diff --git a/media-libs/mesa/mesa-18.2.4.ebuild b/media-libs/mesa/mesa-18.2.4.ebuild deleted file mode 100644 index 661f4153d490..000000000000 --- a/media-libs/mesa/mesa-18.2.4.ebuild +++ /dev/null @@ -1,520 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python2_7 ) - -inherit llvm meson multilib-minimal pax-utils python-any-r1 - -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 - EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git" - EXPERIMENTAL="true" - inherit git-r3 -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 ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" -fi - -LICENSE="MIT" -SLOT="0" -RESTRICT=" - !test? ( test ) -" - -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} - +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm lm_sensors - opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind vdpau - vulkan wayland xa xvmc" - -REQUIRED_USE=" - d3d9? ( dri3 || ( video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) ) - gles1? ( egl ) - gles2? ( egl ) - vulkan? ( dri3 - || ( video_cards_i965 video_cards_radeonsi ) - video_cards_radeonsi? ( llvm ) ) - wayland? ( egl gbm ) - 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.93" -RDEPEND=" - !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.13:=[${MULTILIB_USEDEP}] - x11-libs/libXfixes:=[${MULTILIB_USEDEP}] - gallium? ( - 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}] - ) - ) - lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] ) - opencl? ( - dev-libs/ocl-icd[khronos-headers,${MULTILIB_USEDEP}] - dev-libs/libclc - virtual/libelf:0=[${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}] ) - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) - ) - wayland? ( - >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}] - >=dev-libs/wayland-protocols-1.8 - ) - ${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="7" -LLVM_DEPSTR=" - || ( - sys-devel/llvm:7[${MULTILIB_USEDEP}] - 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/bison - sys-devel/flex - sys-devel/gettext - virtual/pkgconfig - valgrind? ( dev-util/valgrind ) - x11-base/xorg-proto - x11-libs/libXrandr[${MULTILIB_USEDEP}] - $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${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.0.0 - usr/lib*/libGLESv2.so.2.0.0 - usr/lib*/libGL.so.1.2.0 - usr/lib*/libOSMesa.so.8.0.0 - ) -)" - -PATCHES=( - "${FILESDIR}"/${P}-meson-link-gallium-nine-with-pthreads.patch - "${FILESDIR}"/${P}-meson-fix-libatomic-tests.patch -) - -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_pretend() { - if use opencl; then - if ! use video_cards_r600 && - ! use video_cards_radeonsi; then - ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi" - fi - fi - - if use vaapi; then - if ! use video_cards_r600 && - ! use video_cards_radeonsi && - ! use video_cards_nouveau; then - ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau" - fi - fi - - if use vdpau; then - if ! use video_cards_r300 && - ! use video_cards_r600 && - ! use video_cards_radeonsi && - ! use video_cards_nouveau; then - ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau" - fi - fi - - if use xa; then - if ! use video_cards_freedreno && - ! use video_cards_nouveau && - ! use video_cards_vmware; then - ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware" - fi - fi - - if use xvmc; then - if ! use video_cards_r600 && - ! use video_cards_nouveau; then - ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau" - fi - fi - - if ! use gallium; then - use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium" - use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium" - use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium" - use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium" - use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium" - use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium" - use xa && ewarn "Ignoring USE=xa since USE does not contain gallium" - use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium" - fi - - if ! use llvm; then - use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm" - fi -} - -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 -} - -multilib_src_configure() { - local emesonargs=() - - if use classic; then - # Intel code - dri_driver_enable video_cards_i915 i915 - dri_driver_enable video_cards_i965 i965 - if ! use video_cards_i915 && \ - ! use video_cards_i965; then - dri_driver_enable video_cards_intel i915 i965 - fi - - # Nouveau code - dri_driver_enable video_cards_nouveau nouveau - - # ATI code - dri_driver_enable video_cards_r100 r100 - dri_driver_enable video_cards_r200 r200 - if ! use video_cards_r100 && \ - ! use video_cards_r200; then - dri_driver_enable video_cards_radeon r100 r200 - fi - fi - - emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") ) - - if use gallium; then - emesonargs+=( - $(meson_use llvm) - $(meson_use lm_sensors lmsensors) - $(meson_use unwind libunwind) - ) - - if use video_cards_r300 || - use video_cards_r600 || - use video_cards_radeonsi || - use video_cards_nouveau || - use video_cards_vmware; then - emesonargs+=($(meson_use d3d9 gallium-nine)) - else - emesonargs+=(-Dgallium-nine=false) - fi - - if use video_cards_r600 || - use video_cards_radeonsi || - use video_cards_nouveau; then - emesonargs+=($(meson_use vaapi gallium-va)) - use vaapi && emesonargs+=( -Dva-libs-path=/usr/$(get_libdir)/va/drivers ) - else - emesonargs+=(-Dgallium-va=false) - fi - - if use video_cards_r300 || - use video_cards_r600 || - use video_cards_radeonsi || - use video_cards_nouveau; then - emesonargs+=($(meson_use vdpau gallium-vdpau)) - else - emesonargs+=(-Dgallium-vdpau=false) - fi - - if use video_cards_freedreno || - use video_cards_nouveau || - use video_cards_vmware; then - emesonargs+=($(meson_use xa gallium-xa)) - else - emesonargs+=(-Dgallium-xa=false) - fi - - if use video_cards_r600 || - use video_cards_nouveau; then - emesonargs+=($(meson_use xvmc gallium-xvmc)) - else - emesonargs+=(-Dgallium-xvmc=false) - fi - - 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_imx imx - - # Only one i915 driver (classic vs gallium). Default to classic. - if ! use classic; then - gallium_enable video_cards_i915 i915 - if ! use video_cards_i915 && \ - ! use video_cards_i965; then - gallium_enable video_cards_intel i915 - fi - 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 - gallium_enable video_cards_virgl virgl - - # opencl stuff - emesonargs+=( - -Dgallium-opencl="$(usex opencl icd disabled)" - ) - fi - - if use vulkan; then - vulkan_enable video_cards_i965 intel - vulkan_enable video_cards_radeonsi amd - fi - - # x86 hardened pax_kernel needs glx-rts, bug 240956 - if [[ ${ABI} == x86 ]]; then - emesonargs+=( $(meson_use pax_kernel glx-read-only-text) ) - fi - - # on abi_x86_32 hardened we need to have asm disable - if [[ ${ABI} == x86* ]] && use pic; then - emesonargs+=( -Dasm=false ) - fi - - if use gallium; then - gallium_enable -- swrast - emesonargs+=( -Dosmesa=$(usex osmesa gallium none) ) - else - dri_driver_enable -- swrast - emesonargs+=( -Dosmesa=$(usex osmesa classic none) ) - fi - - driver_list() { - local drivers="$(sort -u <<< "${1// /$'\n'}")" - echo "${drivers//$'\n'/,}" - } - - emesonargs+=( - $(meson_use test build-tests) - -Dglx=dri - -Dshared-glapi=true - $(meson_use dri3) - $(meson_use egl) - $(meson_use gbm) - $(meson_use gles1) - $(meson_use gles2) - $(meson_use selinux) - -Dvalgrind=$(usex valgrind auto false) - -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}") - -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}") - -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}") - --buildtype $(usex debug debug plain) - -Db_ndebug=$(usex debug false true) - ) - meson_src_configure -} - -multilib_src_compile() { - meson_src_compile -} - -multilib_src_install() { - meson_src_install -} - -multilib_src_install_all() { - einstalldocs -} - -multilib_src_test() { - meson_src_test -} - -pkg_postinst() { - # Switch to the xorg implementation. - echo - eselect opengl set --use-old ${OPENGL_DIR} -} - -# $1 - VIDEO_CARDS flag (check skipped for "--") -# other args - names of DRI drivers to enable -dri_driver_enable() { - if [[ $1 == -- ]] || use $1; then - shift - DRI_DRIVERS+=("$@") - fi -} - -gallium_enable() { - if [[ $1 == -- ]] || use $1; then - shift - GALLIUM_DRIVERS+=("$@") - fi -} - -vulkan_enable() { - if [[ $1 == -- ]] || use $1; then - shift - VULKAN_DRIVERS+=("$@") - fi -} diff --git a/media-libs/mesa/mesa-18.2.5.ebuild b/media-libs/mesa/mesa-18.2.5.ebuild deleted file mode 100644 index d0ebd9e8fc02..000000000000 --- a/media-libs/mesa/mesa-18.2.5.ebuild +++ /dev/null @@ -1,515 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python2_7 ) - -inherit llvm meson multilib-minimal pax-utils python-any-r1 - -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 - EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git" - EXPERIMENTAL="true" - inherit git-r3 -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 ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" -fi - -LICENSE="MIT" -SLOT="0" -RESTRICT=" - !test? ( test ) -" - -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} - +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm lm_sensors - opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind vdpau - vulkan wayland xa xvmc" - -REQUIRED_USE=" - d3d9? ( dri3 || ( video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) ) - gles1? ( egl ) - gles2? ( egl ) - vulkan? ( dri3 - || ( video_cards_i965 video_cards_radeonsi ) - video_cards_radeonsi? ( llvm ) ) - wayland? ( egl gbm ) - 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.93" -RDEPEND=" - !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.13:=[${MULTILIB_USEDEP}] - x11-libs/libXfixes:=[${MULTILIB_USEDEP}] - gallium? ( - 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}] - ) - ) - lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] ) - opencl? ( - dev-libs/ocl-icd[khronos-headers,${MULTILIB_USEDEP}] - dev-libs/libclc - virtual/libelf:0=[${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}] ) - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) - ) - wayland? ( - >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}] - >=dev-libs/wayland-protocols-1.8 - ) - ${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="7" -LLVM_DEPSTR=" - || ( - sys-devel/llvm:7[${MULTILIB_USEDEP}] - 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/bison - sys-devel/flex - sys-devel/gettext - virtual/pkgconfig - valgrind? ( dev-util/valgrind ) - x11-base/xorg-proto - x11-libs/libXrandr[${MULTILIB_USEDEP}] - $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${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.0.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_pretend() { - if use opencl; then - if ! use video_cards_r600 && - ! use video_cards_radeonsi; then - ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi" - fi - fi - - if use vaapi; then - if ! use video_cards_r600 && - ! use video_cards_radeonsi && - ! use video_cards_nouveau; then - ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau" - fi - fi - - if use vdpau; then - if ! use video_cards_r300 && - ! use video_cards_r600 && - ! use video_cards_radeonsi && - ! use video_cards_nouveau; then - ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau" - fi - fi - - if use xa; then - if ! use video_cards_freedreno && - ! use video_cards_nouveau && - ! use video_cards_vmware; then - ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware" - fi - fi - - if use xvmc; then - if ! use video_cards_r600 && - ! use video_cards_nouveau; then - ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau" - fi - fi - - if ! use gallium; then - use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium" - use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium" - use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium" - use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium" - use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium" - use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium" - use xa && ewarn "Ignoring USE=xa since USE does not contain gallium" - use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium" - fi - - if ! use llvm; then - use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm" - fi -} - -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 -} - -multilib_src_configure() { - local emesonargs=() - - if use classic; then - # Intel code - dri_driver_enable video_cards_i915 i915 - dri_driver_enable video_cards_i965 i965 - if ! use video_cards_i915 && \ - ! use video_cards_i965; then - dri_driver_enable video_cards_intel i915 i965 - fi - - # Nouveau code - dri_driver_enable video_cards_nouveau nouveau - - # ATI code - dri_driver_enable video_cards_r100 r100 - dri_driver_enable video_cards_r200 r200 - if ! use video_cards_r100 && \ - ! use video_cards_r200; then - dri_driver_enable video_cards_radeon r100 r200 - fi - fi - - emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") ) - - if use gallium; then - emesonargs+=( - $(meson_use llvm) - $(meson_use lm_sensors lmsensors) - $(meson_use unwind libunwind) - ) - - if use video_cards_r300 || - use video_cards_r600 || - use video_cards_radeonsi || - use video_cards_nouveau || - use video_cards_vmware; then - emesonargs+=($(meson_use d3d9 gallium-nine)) - else - emesonargs+=(-Dgallium-nine=false) - fi - - if use video_cards_r600 || - use video_cards_radeonsi || - use video_cards_nouveau; then - emesonargs+=($(meson_use vaapi gallium-va)) - use vaapi && emesonargs+=( -Dva-libs-path=/usr/$(get_libdir)/va/drivers ) - else - emesonargs+=(-Dgallium-va=false) - fi - - if use video_cards_r300 || - use video_cards_r600 || - use video_cards_radeonsi || - use video_cards_nouveau; then - emesonargs+=($(meson_use vdpau gallium-vdpau)) - else - emesonargs+=(-Dgallium-vdpau=false) - fi - - if use video_cards_freedreno || - use video_cards_nouveau || - use video_cards_vmware; then - emesonargs+=($(meson_use xa gallium-xa)) - else - emesonargs+=(-Dgallium-xa=false) - fi - - if use video_cards_r600 || - use video_cards_nouveau; then - emesonargs+=($(meson_use xvmc gallium-xvmc)) - else - emesonargs+=(-Dgallium-xvmc=false) - fi - - 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_imx imx - - # Only one i915 driver (classic vs gallium). Default to classic. - if ! use classic; then - gallium_enable video_cards_i915 i915 - if ! use video_cards_i915 && \ - ! use video_cards_i965; then - gallium_enable video_cards_intel i915 - fi - 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 - gallium_enable video_cards_virgl virgl - - # opencl stuff - emesonargs+=( - -Dgallium-opencl="$(usex opencl icd disabled)" - ) - fi - - if use vulkan; then - vulkan_enable video_cards_i965 intel - vulkan_enable video_cards_radeonsi amd - fi - - # x86 hardened pax_kernel needs glx-rts, bug 240956 - if [[ ${ABI} == x86 ]]; then - emesonargs+=( $(meson_use pax_kernel glx-read-only-text) ) - fi - - # on abi_x86_32 hardened we need to have asm disable - if [[ ${ABI} == x86* ]] && use pic; then - emesonargs+=( -Dasm=false ) - fi - - if use gallium; then - gallium_enable -- swrast - emesonargs+=( -Dosmesa=$(usex osmesa gallium none) ) - else - dri_driver_enable -- swrast - emesonargs+=( -Dosmesa=$(usex osmesa classic none) ) - fi - - driver_list() { - local drivers="$(sort -u <<< "${1// /$'\n'}")" - echo "${drivers//$'\n'/,}" - } - - emesonargs+=( - $(meson_use test build-tests) - -Dglx=dri - -Dshared-glapi=true - $(meson_use dri3) - $(meson_use egl) - $(meson_use gbm) - $(meson_use gles1) - $(meson_use gles2) - $(meson_use selinux) - -Dvalgrind=$(usex valgrind auto false) - -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}") - -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}") - -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}") - --buildtype $(usex debug debug plain) - -Db_ndebug=$(usex debug false true) - ) - meson_src_configure -} - -multilib_src_compile() { - meson_src_compile -} - -multilib_src_install() { - meson_src_install -} - -multilib_src_install_all() { - einstalldocs -} - -multilib_src_test() { - meson_src_test -} - -pkg_postinst() { - # Switch to the xorg implementation. - echo - eselect opengl set --use-old ${OPENGL_DIR} -} - -# $1 - VIDEO_CARDS flag (check skipped for "--") -# other args - names of DRI drivers to enable -dri_driver_enable() { - if [[ $1 == -- ]] || use $1; then - shift - DRI_DRIVERS+=("$@") - fi -} - -gallium_enable() { - if [[ $1 == -- ]] || use $1; then - shift - GALLIUM_DRIVERS+=("$@") - fi -} - -vulkan_enable() { - if [[ $1 == -- ]] || use $1; then - shift - VULKAN_DRIVERS+=("$@") - fi -} diff --git a/media-libs/mesa/mesa-18.2.7.ebuild b/media-libs/mesa/mesa-18.2.7.ebuild new file mode 100644 index 000000000000..d0b6f1befec9 --- /dev/null +++ b/media-libs/mesa/mesa-18.2.7.ebuild @@ -0,0 +1,515 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 ) + +inherit llvm meson multilib-minimal pax-utils python-any-r1 + +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 + EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git" + EXPERIMENTAL="true" + inherit git-r3 +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 ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" +fi + +LICENSE="MIT" +SLOT="0" +RESTRICT=" + !test? ( test ) +" + +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} + +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm lm_sensors + opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind vdpau + vulkan wayland xa xvmc" + +REQUIRED_USE=" + d3d9? ( dri3 || ( video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) ) + gles1? ( egl ) + gles2? ( egl ) + vulkan? ( dri3 + || ( video_cards_i965 video_cards_radeonsi ) + video_cards_radeonsi? ( llvm ) ) + wayland? ( egl gbm ) + 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.93" +RDEPEND=" + !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.13:=[${MULTILIB_USEDEP}] + x11-libs/libXfixes:=[${MULTILIB_USEDEP}] + gallium? ( + 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}] + ) + ) + lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] ) + opencl? ( + dev-libs/ocl-icd[khronos-headers,${MULTILIB_USEDEP}] + dev-libs/libclc + virtual/libelf:0=[${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}] ) + xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) + ) + wayland? ( + >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}] + >=dev-libs/wayland-protocols-1.8 + ) + ${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="7" +LLVM_DEPSTR=" + || ( + sys-devel/llvm:7[${MULTILIB_USEDEP}] + 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/bison + sys-devel/flex + sys-devel/gettext + virtual/pkgconfig + valgrind? ( dev-util/valgrind ) + x11-base/xorg-proto + x11-libs/libXrandr[${MULTILIB_USEDEP}] + $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${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.0.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_pretend() { + if use opencl; then + if ! use video_cards_r600 && + ! use video_cards_radeonsi; then + ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi" + fi + fi + + if use vaapi; then + if ! use video_cards_r600 && + ! use video_cards_radeonsi && + ! use video_cards_nouveau; then + ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau" + fi + fi + + if use vdpau; then + if ! use video_cards_r300 && + ! use video_cards_r600 && + ! use video_cards_radeonsi && + ! use video_cards_nouveau; then + ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau" + fi + fi + + if use xa; then + if ! use video_cards_freedreno && + ! use video_cards_nouveau && + ! use video_cards_vmware; then + ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware" + fi + fi + + if use xvmc; then + if ! use video_cards_r600 && + ! use video_cards_nouveau; then + ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau" + fi + fi + + if ! use gallium; then + use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium" + use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium" + use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium" + use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium" + use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium" + use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium" + use xa && ewarn "Ignoring USE=xa since USE does not contain gallium" + use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium" + fi + + if ! use llvm; then + use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm" + fi +} + +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 +} + +multilib_src_configure() { + local emesonargs=() + + if use classic; then + # Intel code + dri_driver_enable video_cards_i915 i915 + dri_driver_enable video_cards_i965 i965 + if ! use video_cards_i915 && \ + ! use video_cards_i965; then + dri_driver_enable video_cards_intel i915 i965 + fi + + # Nouveau code + dri_driver_enable video_cards_nouveau nouveau + + # ATI code + dri_driver_enable video_cards_r100 r100 + dri_driver_enable video_cards_r200 r200 + if ! use video_cards_r100 && \ + ! use video_cards_r200; then + dri_driver_enable video_cards_radeon r100 r200 + fi + fi + + emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") ) + + if use gallium; then + emesonargs+=( + $(meson_use llvm) + $(meson_use lm_sensors lmsensors) + $(meson_use unwind libunwind) + ) + + if use video_cards_r300 || + use video_cards_r600 || + use video_cards_radeonsi || + use video_cards_nouveau || + use video_cards_vmware; then + emesonargs+=($(meson_use d3d9 gallium-nine)) + else + emesonargs+=(-Dgallium-nine=false) + fi + + if use video_cards_r600 || + use video_cards_radeonsi || + use video_cards_nouveau; then + emesonargs+=($(meson_use vaapi gallium-va)) + use vaapi && emesonargs+=( -Dva-libs-path=/usr/$(get_libdir)/va/drivers ) + else + emesonargs+=(-Dgallium-va=false) + fi + + if use video_cards_r300 || + use video_cards_r600 || + use video_cards_radeonsi || + use video_cards_nouveau; then + emesonargs+=($(meson_use vdpau gallium-vdpau)) + else + emesonargs+=(-Dgallium-vdpau=false) + fi + + if use video_cards_freedreno || + use video_cards_nouveau || + use video_cards_vmware; then + emesonargs+=($(meson_use xa gallium-xa)) + else + emesonargs+=(-Dgallium-xa=false) + fi + + if use video_cards_r600 || + use video_cards_nouveau; then + emesonargs+=($(meson_use xvmc gallium-xvmc)) + else + emesonargs+=(-Dgallium-xvmc=false) + fi + + 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_imx imx + + # Only one i915 driver (classic vs gallium). Default to classic. + if ! use classic; then + gallium_enable video_cards_i915 i915 + if ! use video_cards_i915 && \ + ! use video_cards_i965; then + gallium_enable video_cards_intel i915 + fi + 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 + gallium_enable video_cards_virgl virgl + + # opencl stuff + emesonargs+=( + -Dgallium-opencl="$(usex opencl icd disabled)" + ) + fi + + if use vulkan; then + vulkan_enable video_cards_i965 intel + vulkan_enable video_cards_radeonsi amd + fi + + # x86 hardened pax_kernel needs glx-rts, bug 240956 + if [[ ${ABI} == x86 ]]; then + emesonargs+=( $(meson_use pax_kernel glx-read-only-text) ) + fi + + # on abi_x86_32 hardened we need to have asm disable + if [[ ${ABI} == x86* ]] && use pic; then + emesonargs+=( -Dasm=false ) + fi + + if use gallium; then + gallium_enable -- swrast + emesonargs+=( -Dosmesa=$(usex osmesa gallium none) ) + else + dri_driver_enable -- swrast + emesonargs+=( -Dosmesa=$(usex osmesa classic none) ) + fi + + driver_list() { + local drivers="$(sort -u <<< "${1// /$'\n'}")" + echo "${drivers//$'\n'/,}" + } + + emesonargs+=( + $(meson_use test build-tests) + -Dglx=dri + -Dshared-glapi=true + $(meson_use dri3) + $(meson_use egl) + $(meson_use gbm) + $(meson_use gles1) + $(meson_use gles2) + $(meson_use selinux) + -Dvalgrind=$(usex valgrind auto false) + -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}") + -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}") + -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}") + --buildtype $(usex debug debug plain) + -Db_ndebug=$(usex debug false true) + ) + meson_src_configure +} + +multilib_src_compile() { + meson_src_compile +} + +multilib_src_install() { + meson_src_install +} + +multilib_src_install_all() { + einstalldocs +} + +multilib_src_test() { + meson_src_test +} + +pkg_postinst() { + # Switch to the xorg implementation. + echo + eselect opengl set --use-old ${OPENGL_DIR} +} + +# $1 - VIDEO_CARDS flag (check skipped for "--") +# other args - names of DRI drivers to enable +dri_driver_enable() { + if [[ $1 == -- ]] || use $1; then + shift + DRI_DRIVERS+=("$@") + fi +} + +gallium_enable() { + if [[ $1 == -- ]] || use $1; then + shift + GALLIUM_DRIVERS+=("$@") + fi +} + +vulkan_enable() { + if [[ $1 == -- ]] || use $1; then + shift + VULKAN_DRIVERS+=("$@") + fi +} diff --git a/media-libs/mesa/mesa-18.3.0.ebuild b/media-libs/mesa/mesa-18.3.0.ebuild new file mode 100644 index 000000000000..c65792857090 --- /dev/null +++ b/media-libs/mesa/mesa-18.3.0.ebuild @@ -0,0 +1,519 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python3_4 python3_5 python3_6 python3_7 ) + +inherit llvm meson multilib-minimal pax-utils python-any-r1 + +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 + EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git" + EXPERIMENTAL="true" + inherit git-r3 +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 ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" +fi + +LICENSE="MIT" +SLOT="0" +RESTRICT=" + !test? ( test ) +" + +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} + +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm lm_sensors + opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind vdpau + vulkan wayland xa xvmc" + +REQUIRED_USE=" + d3d9? ( dri3 || ( video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) ) + gles1? ( egl ) + gles2? ( egl ) + vulkan? ( dri3 + || ( video_cards_i965 video_cards_radeonsi ) + video_cards_radeonsi? ( llvm ) ) + wayland? ( egl gbm ) + 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.96" +RDEPEND=" + !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.13:=[${MULTILIB_USEDEP}] + x11-libs/libXfixes:=[${MULTILIB_USEDEP}] + gallium? ( + 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}] + ) + ) + lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] ) + opencl? ( + dev-libs/ocl-icd[khronos-headers,${MULTILIB_USEDEP}] + dev-libs/libclc + virtual/libelf:0=[${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}] ) + xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) + ) + wayland? ( + >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}] + >=dev-libs/wayland-protocols-1.8 + ) + ${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="7" +LLVM_DEPSTR=" + || ( + sys-devel/llvm:7[${MULTILIB_USEDEP}] + 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/bison + sys-devel/flex + sys-devel/gettext + virtual/pkgconfig + valgrind? ( dev-util/valgrind ) + x11-base/xorg-proto + x11-libs/libXrandr[${MULTILIB_USEDEP}] + $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${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.0.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_pretend() { + if use opencl; then + if ! use video_cards_r600 && + ! use video_cards_radeonsi; then + ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi" + fi + fi + + if use vaapi; then + if ! use video_cards_r600 && + ! use video_cards_radeonsi && + ! use video_cards_nouveau; then + ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau" + fi + fi + + if use vdpau; then + if ! use video_cards_r300 && + ! use video_cards_r600 && + ! use video_cards_radeonsi && + ! use video_cards_nouveau; then + ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau" + fi + fi + + if use xa; then + if ! use video_cards_freedreno && + ! use video_cards_nouveau && + ! use video_cards_vmware; then + ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware" + fi + fi + + if use xvmc; then + if ! use video_cards_r600 && + ! use video_cards_nouveau; then + ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau" + fi + fi + + if ! use gallium; then + use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium" + use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium" + use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium" + use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium" + use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium" + use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium" + use xa && ewarn "Ignoring USE=xa since USE does not contain gallium" + use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium" + fi + + if ! use llvm; then + use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm" + fi +} + +python_check_deps() { + has_version ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]" +} + +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 +} + +multilib_src_configure() { + local emesonargs=() + + if use classic; then + # Intel code + dri_driver_enable video_cards_i915 i915 + dri_driver_enable video_cards_i965 i965 + if ! use video_cards_i915 && \ + ! use video_cards_i965; then + dri_driver_enable video_cards_intel i915 i965 + fi + + # Nouveau code + dri_driver_enable video_cards_nouveau nouveau + + # ATI code + dri_driver_enable video_cards_r100 r100 + dri_driver_enable video_cards_r200 r200 + if ! use video_cards_r100 && \ + ! use video_cards_r200; then + dri_driver_enable video_cards_radeon r100 r200 + fi + fi + + emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") ) + + if use gallium; then + emesonargs+=( + $(meson_use llvm) + $(meson_use lm_sensors lmsensors) + $(meson_use unwind libunwind) + ) + + if use video_cards_r300 || + use video_cards_r600 || + use video_cards_radeonsi || + use video_cards_nouveau || + use video_cards_vmware; then + emesonargs+=($(meson_use d3d9 gallium-nine)) + else + emesonargs+=(-Dgallium-nine=false) + fi + + if use video_cards_r600 || + use video_cards_radeonsi || + use video_cards_nouveau; then + emesonargs+=($(meson_use vaapi gallium-va)) + use vaapi && emesonargs+=( -Dva-libs-path=/usr/$(get_libdir)/va/drivers ) + else + emesonargs+=(-Dgallium-va=false) + fi + + if use video_cards_r300 || + use video_cards_r600 || + use video_cards_radeonsi || + use video_cards_nouveau; then + emesonargs+=($(meson_use vdpau gallium-vdpau)) + else + emesonargs+=(-Dgallium-vdpau=false) + fi + + if use video_cards_freedreno || + use video_cards_nouveau || + use video_cards_vmware; then + emesonargs+=($(meson_use xa gallium-xa)) + else + emesonargs+=(-Dgallium-xa=false) + fi + + if use video_cards_r600 || + use video_cards_nouveau; then + emesonargs+=($(meson_use xvmc gallium-xvmc)) + else + emesonargs+=(-Dgallium-xvmc=false) + fi + + 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_imx imx + + # Only one i915 driver (classic vs gallium). Default to classic. + if ! use classic; then + gallium_enable video_cards_i915 i915 + if ! use video_cards_i915 && \ + ! use video_cards_i965; then + gallium_enable video_cards_intel i915 + fi + 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 + gallium_enable video_cards_virgl virgl + + # opencl stuff + emesonargs+=( + -Dgallium-opencl="$(usex opencl icd disabled)" + ) + fi + + if use vulkan; then + vulkan_enable video_cards_i965 intel + vulkan_enable video_cards_radeonsi amd + fi + + # x86 hardened pax_kernel needs glx-rts, bug 240956 + if [[ ${ABI} == x86 ]]; then + emesonargs+=( $(meson_use pax_kernel glx-read-only-text) ) + fi + + # on abi_x86_32 hardened we need to have asm disable + if [[ ${ABI} == x86* ]] && use pic; then + emesonargs+=( -Dasm=false ) + fi + + if use gallium; then + gallium_enable -- swrast + emesonargs+=( -Dosmesa=$(usex osmesa gallium none) ) + else + dri_driver_enable -- swrast + emesonargs+=( -Dosmesa=$(usex osmesa classic none) ) + fi + + driver_list() { + local drivers="$(sort -u <<< "${1// /$'\n'}")" + echo "${drivers//$'\n'/,}" + } + + emesonargs+=( + $(meson_use test build-tests) + -Dglx=dri + -Dshared-glapi=true + $(meson_use dri3) + $(meson_use egl) + $(meson_use gbm) + $(meson_use gles1) + $(meson_use gles2) + $(meson_use selinux) + -Dvalgrind=$(usex valgrind auto false) + -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}") + -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}") + -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}") + --buildtype $(usex debug debug plain) + -Db_ndebug=$(usex debug false true) + ) + meson_src_configure +} + +multilib_src_compile() { + meson_src_compile +} + +multilib_src_install() { + meson_src_install +} + +multilib_src_install_all() { + einstalldocs +} + +multilib_src_test() { + meson_src_test +} + +pkg_postinst() { + # Switch to the xorg implementation. + echo + eselect opengl set --use-old ${OPENGL_DIR} +} + +# $1 - VIDEO_CARDS flag (check skipped for "--") +# other args - names of DRI drivers to enable +dri_driver_enable() { + if [[ $1 == -- ]] || use $1; then + shift + DRI_DRIVERS+=("$@") + fi +} + +gallium_enable() { + if [[ $1 == -- ]] || use $1; then + shift + GALLIUM_DRIVERS+=("$@") + fi +} + +vulkan_enable() { + if [[ $1 == -- ]] || use $1; then + shift + VULKAN_DRIVERS+=("$@") + fi +} diff --git a/media-libs/mesa/mesa-18.3.0_rc2.ebuild b/media-libs/mesa/mesa-18.3.0_rc2.ebuild deleted file mode 100644 index 58c89ce78f02..000000000000 --- a/media-libs/mesa/mesa-18.3.0_rc2.ebuild +++ /dev/null @@ -1,515 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python3_4 python3_5 python3_6 python3_7 ) - -inherit llvm meson multilib-minimal pax-utils python-any-r1 - -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 - EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git" - EXPERIMENTAL="true" - inherit git-r3 -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 ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" -fi - -LICENSE="MIT" -SLOT="0" -RESTRICT=" - !test? ( test ) -" - -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} - +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm lm_sensors - opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind vdpau - vulkan wayland xa xvmc" - -REQUIRED_USE=" - d3d9? ( dri3 || ( video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) ) - gles1? ( egl ) - gles2? ( egl ) - vulkan? ( dri3 - || ( video_cards_i965 video_cards_radeonsi ) - video_cards_radeonsi? ( llvm ) ) - wayland? ( egl gbm ) - 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.96" -RDEPEND=" - !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.13:=[${MULTILIB_USEDEP}] - x11-libs/libXfixes:=[${MULTILIB_USEDEP}] - gallium? ( - 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}] - ) - ) - lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] ) - opencl? ( - dev-libs/ocl-icd[khronos-headers,${MULTILIB_USEDEP}] - dev-libs/libclc - virtual/libelf:0=[${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}] ) - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) - ) - wayland? ( - >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}] - >=dev-libs/wayland-protocols-1.8 - ) - ${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="7" -LLVM_DEPSTR=" - || ( - sys-devel/llvm:7[${MULTILIB_USEDEP}] - 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/bison - sys-devel/flex - sys-devel/gettext - virtual/pkgconfig - valgrind? ( dev-util/valgrind ) - x11-base/xorg-proto - x11-libs/libXrandr[${MULTILIB_USEDEP}] - $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${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.0.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_pretend() { - if use opencl; then - if ! use video_cards_r600 && - ! use video_cards_radeonsi; then - ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi" - fi - fi - - if use vaapi; then - if ! use video_cards_r600 && - ! use video_cards_radeonsi && - ! use video_cards_nouveau; then - ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau" - fi - fi - - if use vdpau; then - if ! use video_cards_r300 && - ! use video_cards_r600 && - ! use video_cards_radeonsi && - ! use video_cards_nouveau; then - ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau" - fi - fi - - if use xa; then - if ! use video_cards_freedreno && - ! use video_cards_nouveau && - ! use video_cards_vmware; then - ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware" - fi - fi - - if use xvmc; then - if ! use video_cards_r600 && - ! use video_cards_nouveau; then - ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau" - fi - fi - - if ! use gallium; then - use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium" - use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium" - use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium" - use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium" - use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium" - use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium" - use xa && ewarn "Ignoring USE=xa since USE does not contain gallium" - use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium" - fi - - if ! use llvm; then - use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm" - fi -} - -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 -} - -multilib_src_configure() { - local emesonargs=() - - if use classic; then - # Intel code - dri_driver_enable video_cards_i915 i915 - dri_driver_enable video_cards_i965 i965 - if ! use video_cards_i915 && \ - ! use video_cards_i965; then - dri_driver_enable video_cards_intel i915 i965 - fi - - # Nouveau code - dri_driver_enable video_cards_nouveau nouveau - - # ATI code - dri_driver_enable video_cards_r100 r100 - dri_driver_enable video_cards_r200 r200 - if ! use video_cards_r100 && \ - ! use video_cards_r200; then - dri_driver_enable video_cards_radeon r100 r200 - fi - fi - - emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") ) - - if use gallium; then - emesonargs+=( - $(meson_use llvm) - $(meson_use lm_sensors lmsensors) - $(meson_use unwind libunwind) - ) - - if use video_cards_r300 || - use video_cards_r600 || - use video_cards_radeonsi || - use video_cards_nouveau || - use video_cards_vmware; then - emesonargs+=($(meson_use d3d9 gallium-nine)) - else - emesonargs+=(-Dgallium-nine=false) - fi - - if use video_cards_r600 || - use video_cards_radeonsi || - use video_cards_nouveau; then - emesonargs+=($(meson_use vaapi gallium-va)) - use vaapi && emesonargs+=( -Dva-libs-path=/usr/$(get_libdir)/va/drivers ) - else - emesonargs+=(-Dgallium-va=false) - fi - - if use video_cards_r300 || - use video_cards_r600 || - use video_cards_radeonsi || - use video_cards_nouveau; then - emesonargs+=($(meson_use vdpau gallium-vdpau)) - else - emesonargs+=(-Dgallium-vdpau=false) - fi - - if use video_cards_freedreno || - use video_cards_nouveau || - use video_cards_vmware; then - emesonargs+=($(meson_use xa gallium-xa)) - else - emesonargs+=(-Dgallium-xa=false) - fi - - if use video_cards_r600 || - use video_cards_nouveau; then - emesonargs+=($(meson_use xvmc gallium-xvmc)) - else - emesonargs+=(-Dgallium-xvmc=false) - fi - - 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_imx imx - - # Only one i915 driver (classic vs gallium). Default to classic. - if ! use classic; then - gallium_enable video_cards_i915 i915 - if ! use video_cards_i915 && \ - ! use video_cards_i965; then - gallium_enable video_cards_intel i915 - fi - 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 - gallium_enable video_cards_virgl virgl - - # opencl stuff - emesonargs+=( - -Dgallium-opencl="$(usex opencl icd disabled)" - ) - fi - - if use vulkan; then - vulkan_enable video_cards_i965 intel - vulkan_enable video_cards_radeonsi amd - fi - - # x86 hardened pax_kernel needs glx-rts, bug 240956 - if [[ ${ABI} == x86 ]]; then - emesonargs+=( $(meson_use pax_kernel glx-read-only-text) ) - fi - - # on abi_x86_32 hardened we need to have asm disable - if [[ ${ABI} == x86* ]] && use pic; then - emesonargs+=( -Dasm=false ) - fi - - if use gallium; then - gallium_enable -- swrast - emesonargs+=( -Dosmesa=$(usex osmesa gallium none) ) - else - dri_driver_enable -- swrast - emesonargs+=( -Dosmesa=$(usex osmesa classic none) ) - fi - - driver_list() { - local drivers="$(sort -u <<< "${1// /$'\n'}")" - echo "${drivers//$'\n'/,}" - } - - emesonargs+=( - $(meson_use test build-tests) - -Dglx=dri - -Dshared-glapi=true - $(meson_use dri3) - $(meson_use egl) - $(meson_use gbm) - $(meson_use gles1) - $(meson_use gles2) - $(meson_use selinux) - -Dvalgrind=$(usex valgrind auto false) - -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}") - -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}") - -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}") - --buildtype $(usex debug debug plain) - -Db_ndebug=$(usex debug false true) - ) - meson_src_configure -} - -multilib_src_compile() { - meson_src_compile -} - -multilib_src_install() { - meson_src_install -} - -multilib_src_install_all() { - einstalldocs -} - -multilib_src_test() { - meson_src_test -} - -pkg_postinst() { - # Switch to the xorg implementation. - echo - eselect opengl set --use-old ${OPENGL_DIR} -} - -# $1 - VIDEO_CARDS flag (check skipped for "--") -# other args - names of DRI drivers to enable -dri_driver_enable() { - if [[ $1 == -- ]] || use $1; then - shift - DRI_DRIVERS+=("$@") - fi -} - -gallium_enable() { - if [[ $1 == -- ]] || use $1; then - shift - GALLIUM_DRIVERS+=("$@") - fi -} - -vulkan_enable() { - if [[ $1 == -- ]] || use $1; then - shift - VULKAN_DRIVERS+=("$@") - fi -} diff --git a/media-libs/mesa/mesa-18.3.0_rc3.ebuild b/media-libs/mesa/mesa-18.3.0_rc3.ebuild deleted file mode 100644 index c65792857090..000000000000 --- a/media-libs/mesa/mesa-18.3.0_rc3.ebuild +++ /dev/null @@ -1,519 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python3_4 python3_5 python3_6 python3_7 ) - -inherit llvm meson multilib-minimal pax-utils python-any-r1 - -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 - EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git" - EXPERIMENTAL="true" - inherit git-r3 -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 ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" -fi - -LICENSE="MIT" -SLOT="0" -RESTRICT=" - !test? ( test ) -" - -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} - +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm lm_sensors - opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind vdpau - vulkan wayland xa xvmc" - -REQUIRED_USE=" - d3d9? ( dri3 || ( video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) ) - gles1? ( egl ) - gles2? ( egl ) - vulkan? ( dri3 - || ( video_cards_i965 video_cards_radeonsi ) - video_cards_radeonsi? ( llvm ) ) - wayland? ( egl gbm ) - 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.96" -RDEPEND=" - !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.13:=[${MULTILIB_USEDEP}] - x11-libs/libXfixes:=[${MULTILIB_USEDEP}] - gallium? ( - 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}] - ) - ) - lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] ) - opencl? ( - dev-libs/ocl-icd[khronos-headers,${MULTILIB_USEDEP}] - dev-libs/libclc - virtual/libelf:0=[${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}] ) - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) - ) - wayland? ( - >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}] - >=dev-libs/wayland-protocols-1.8 - ) - ${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="7" -LLVM_DEPSTR=" - || ( - sys-devel/llvm:7[${MULTILIB_USEDEP}] - 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/bison - sys-devel/flex - sys-devel/gettext - virtual/pkgconfig - valgrind? ( dev-util/valgrind ) - x11-base/xorg-proto - x11-libs/libXrandr[${MULTILIB_USEDEP}] - $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${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.0.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_pretend() { - if use opencl; then - if ! use video_cards_r600 && - ! use video_cards_radeonsi; then - ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi" - fi - fi - - if use vaapi; then - if ! use video_cards_r600 && - ! use video_cards_radeonsi && - ! use video_cards_nouveau; then - ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau" - fi - fi - - if use vdpau; then - if ! use video_cards_r300 && - ! use video_cards_r600 && - ! use video_cards_radeonsi && - ! use video_cards_nouveau; then - ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau" - fi - fi - - if use xa; then - if ! use video_cards_freedreno && - ! use video_cards_nouveau && - ! use video_cards_vmware; then - ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware" - fi - fi - - if use xvmc; then - if ! use video_cards_r600 && - ! use video_cards_nouveau; then - ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau" - fi - fi - - if ! use gallium; then - use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium" - use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium" - use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium" - use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium" - use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium" - use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium" - use xa && ewarn "Ignoring USE=xa since USE does not contain gallium" - use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium" - fi - - if ! use llvm; then - use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm" - fi -} - -python_check_deps() { - has_version ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]" -} - -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 -} - -multilib_src_configure() { - local emesonargs=() - - if use classic; then - # Intel code - dri_driver_enable video_cards_i915 i915 - dri_driver_enable video_cards_i965 i965 - if ! use video_cards_i915 && \ - ! use video_cards_i965; then - dri_driver_enable video_cards_intel i915 i965 - fi - - # Nouveau code - dri_driver_enable video_cards_nouveau nouveau - - # ATI code - dri_driver_enable video_cards_r100 r100 - dri_driver_enable video_cards_r200 r200 - if ! use video_cards_r100 && \ - ! use video_cards_r200; then - dri_driver_enable video_cards_radeon r100 r200 - fi - fi - - emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") ) - - if use gallium; then - emesonargs+=( - $(meson_use llvm) - $(meson_use lm_sensors lmsensors) - $(meson_use unwind libunwind) - ) - - if use video_cards_r300 || - use video_cards_r600 || - use video_cards_radeonsi || - use video_cards_nouveau || - use video_cards_vmware; then - emesonargs+=($(meson_use d3d9 gallium-nine)) - else - emesonargs+=(-Dgallium-nine=false) - fi - - if use video_cards_r600 || - use video_cards_radeonsi || - use video_cards_nouveau; then - emesonargs+=($(meson_use vaapi gallium-va)) - use vaapi && emesonargs+=( -Dva-libs-path=/usr/$(get_libdir)/va/drivers ) - else - emesonargs+=(-Dgallium-va=false) - fi - - if use video_cards_r300 || - use video_cards_r600 || - use video_cards_radeonsi || - use video_cards_nouveau; then - emesonargs+=($(meson_use vdpau gallium-vdpau)) - else - emesonargs+=(-Dgallium-vdpau=false) - fi - - if use video_cards_freedreno || - use video_cards_nouveau || - use video_cards_vmware; then - emesonargs+=($(meson_use xa gallium-xa)) - else - emesonargs+=(-Dgallium-xa=false) - fi - - if use video_cards_r600 || - use video_cards_nouveau; then - emesonargs+=($(meson_use xvmc gallium-xvmc)) - else - emesonargs+=(-Dgallium-xvmc=false) - fi - - 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_imx imx - - # Only one i915 driver (classic vs gallium). Default to classic. - if ! use classic; then - gallium_enable video_cards_i915 i915 - if ! use video_cards_i915 && \ - ! use video_cards_i965; then - gallium_enable video_cards_intel i915 - fi - 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 - gallium_enable video_cards_virgl virgl - - # opencl stuff - emesonargs+=( - -Dgallium-opencl="$(usex opencl icd disabled)" - ) - fi - - if use vulkan; then - vulkan_enable video_cards_i965 intel - vulkan_enable video_cards_radeonsi amd - fi - - # x86 hardened pax_kernel needs glx-rts, bug 240956 - if [[ ${ABI} == x86 ]]; then - emesonargs+=( $(meson_use pax_kernel glx-read-only-text) ) - fi - - # on abi_x86_32 hardened we need to have asm disable - if [[ ${ABI} == x86* ]] && use pic; then - emesonargs+=( -Dasm=false ) - fi - - if use gallium; then - gallium_enable -- swrast - emesonargs+=( -Dosmesa=$(usex osmesa gallium none) ) - else - dri_driver_enable -- swrast - emesonargs+=( -Dosmesa=$(usex osmesa classic none) ) - fi - - driver_list() { - local drivers="$(sort -u <<< "${1// /$'\n'}")" - echo "${drivers//$'\n'/,}" - } - - emesonargs+=( - $(meson_use test build-tests) - -Dglx=dri - -Dshared-glapi=true - $(meson_use dri3) - $(meson_use egl) - $(meson_use gbm) - $(meson_use gles1) - $(meson_use gles2) - $(meson_use selinux) - -Dvalgrind=$(usex valgrind auto false) - -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}") - -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}") - -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}") - --buildtype $(usex debug debug plain) - -Db_ndebug=$(usex debug false true) - ) - meson_src_configure -} - -multilib_src_compile() { - meson_src_compile -} - -multilib_src_install() { - meson_src_install -} - -multilib_src_install_all() { - einstalldocs -} - -multilib_src_test() { - meson_src_test -} - -pkg_postinst() { - # Switch to the xorg implementation. - echo - eselect opengl set --use-old ${OPENGL_DIR} -} - -# $1 - VIDEO_CARDS flag (check skipped for "--") -# other args - names of DRI drivers to enable -dri_driver_enable() { - if [[ $1 == -- ]] || use $1; then - shift - DRI_DRIVERS+=("$@") - fi -} - -gallium_enable() { - if [[ $1 == -- ]] || use $1; then - shift - GALLIUM_DRIVERS+=("$@") - fi -} - -vulkan_enable() { - if [[ $1 == -- ]] || use $1; then - shift - VULKAN_DRIVERS+=("$@") - fi -} diff --git a/media-libs/mesa/mesa-18.3.1.ebuild b/media-libs/mesa/mesa-18.3.1.ebuild new file mode 100644 index 000000000000..c65792857090 --- /dev/null +++ b/media-libs/mesa/mesa-18.3.1.ebuild @@ -0,0 +1,519 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python3_4 python3_5 python3_6 python3_7 ) + +inherit llvm meson multilib-minimal pax-utils python-any-r1 + +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 + EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git" + EXPERIMENTAL="true" + inherit git-r3 +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 ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" +fi + +LICENSE="MIT" +SLOT="0" +RESTRICT=" + !test? ( test ) +" + +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} + +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm lm_sensors + opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind vdpau + vulkan wayland xa xvmc" + +REQUIRED_USE=" + d3d9? ( dri3 || ( video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) ) + gles1? ( egl ) + gles2? ( egl ) + vulkan? ( dri3 + || ( video_cards_i965 video_cards_radeonsi ) + video_cards_radeonsi? ( llvm ) ) + wayland? ( egl gbm ) + 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.96" +RDEPEND=" + !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.13:=[${MULTILIB_USEDEP}] + x11-libs/libXfixes:=[${MULTILIB_USEDEP}] + gallium? ( + 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}] + ) + ) + lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] ) + opencl? ( + dev-libs/ocl-icd[khronos-headers,${MULTILIB_USEDEP}] + dev-libs/libclc + virtual/libelf:0=[${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}] ) + xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) + ) + wayland? ( + >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}] + >=dev-libs/wayland-protocols-1.8 + ) + ${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="7" +LLVM_DEPSTR=" + || ( + sys-devel/llvm:7[${MULTILIB_USEDEP}] + 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/bison + sys-devel/flex + sys-devel/gettext + virtual/pkgconfig + valgrind? ( dev-util/valgrind ) + x11-base/xorg-proto + x11-libs/libXrandr[${MULTILIB_USEDEP}] + $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${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.0.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_pretend() { + if use opencl; then + if ! use video_cards_r600 && + ! use video_cards_radeonsi; then + ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi" + fi + fi + + if use vaapi; then + if ! use video_cards_r600 && + ! use video_cards_radeonsi && + ! use video_cards_nouveau; then + ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau" + fi + fi + + if use vdpau; then + if ! use video_cards_r300 && + ! use video_cards_r600 && + ! use video_cards_radeonsi && + ! use video_cards_nouveau; then + ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau" + fi + fi + + if use xa; then + if ! use video_cards_freedreno && + ! use video_cards_nouveau && + ! use video_cards_vmware; then + ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware" + fi + fi + + if use xvmc; then + if ! use video_cards_r600 && + ! use video_cards_nouveau; then + ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau" + fi + fi + + if ! use gallium; then + use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium" + use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium" + use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium" + use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium" + use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium" + use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium" + use xa && ewarn "Ignoring USE=xa since USE does not contain gallium" + use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium" + fi + + if ! use llvm; then + use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm" + fi +} + +python_check_deps() { + has_version ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]" +} + +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 +} + +multilib_src_configure() { + local emesonargs=() + + if use classic; then + # Intel code + dri_driver_enable video_cards_i915 i915 + dri_driver_enable video_cards_i965 i965 + if ! use video_cards_i915 && \ + ! use video_cards_i965; then + dri_driver_enable video_cards_intel i915 i965 + fi + + # Nouveau code + dri_driver_enable video_cards_nouveau nouveau + + # ATI code + dri_driver_enable video_cards_r100 r100 + dri_driver_enable video_cards_r200 r200 + if ! use video_cards_r100 && \ + ! use video_cards_r200; then + dri_driver_enable video_cards_radeon r100 r200 + fi + fi + + emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") ) + + if use gallium; then + emesonargs+=( + $(meson_use llvm) + $(meson_use lm_sensors lmsensors) + $(meson_use unwind libunwind) + ) + + if use video_cards_r300 || + use video_cards_r600 || + use video_cards_radeonsi || + use video_cards_nouveau || + use video_cards_vmware; then + emesonargs+=($(meson_use d3d9 gallium-nine)) + else + emesonargs+=(-Dgallium-nine=false) + fi + + if use video_cards_r600 || + use video_cards_radeonsi || + use video_cards_nouveau; then + emesonargs+=($(meson_use vaapi gallium-va)) + use vaapi && emesonargs+=( -Dva-libs-path=/usr/$(get_libdir)/va/drivers ) + else + emesonargs+=(-Dgallium-va=false) + fi + + if use video_cards_r300 || + use video_cards_r600 || + use video_cards_radeonsi || + use video_cards_nouveau; then + emesonargs+=($(meson_use vdpau gallium-vdpau)) + else + emesonargs+=(-Dgallium-vdpau=false) + fi + + if use video_cards_freedreno || + use video_cards_nouveau || + use video_cards_vmware; then + emesonargs+=($(meson_use xa gallium-xa)) + else + emesonargs+=(-Dgallium-xa=false) + fi + + if use video_cards_r600 || + use video_cards_nouveau; then + emesonargs+=($(meson_use xvmc gallium-xvmc)) + else + emesonargs+=(-Dgallium-xvmc=false) + fi + + 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_imx imx + + # Only one i915 driver (classic vs gallium). Default to classic. + if ! use classic; then + gallium_enable video_cards_i915 i915 + if ! use video_cards_i915 && \ + ! use video_cards_i965; then + gallium_enable video_cards_intel i915 + fi + 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 + gallium_enable video_cards_virgl virgl + + # opencl stuff + emesonargs+=( + -Dgallium-opencl="$(usex opencl icd disabled)" + ) + fi + + if use vulkan; then + vulkan_enable video_cards_i965 intel + vulkan_enable video_cards_radeonsi amd + fi + + # x86 hardened pax_kernel needs glx-rts, bug 240956 + if [[ ${ABI} == x86 ]]; then + emesonargs+=( $(meson_use pax_kernel glx-read-only-text) ) + fi + + # on abi_x86_32 hardened we need to have asm disable + if [[ ${ABI} == x86* ]] && use pic; then + emesonargs+=( -Dasm=false ) + fi + + if use gallium; then + gallium_enable -- swrast + emesonargs+=( -Dosmesa=$(usex osmesa gallium none) ) + else + dri_driver_enable -- swrast + emesonargs+=( -Dosmesa=$(usex osmesa classic none) ) + fi + + driver_list() { + local drivers="$(sort -u <<< "${1// /$'\n'}")" + echo "${drivers//$'\n'/,}" + } + + emesonargs+=( + $(meson_use test build-tests) + -Dglx=dri + -Dshared-glapi=true + $(meson_use dri3) + $(meson_use egl) + $(meson_use gbm) + $(meson_use gles1) + $(meson_use gles2) + $(meson_use selinux) + -Dvalgrind=$(usex valgrind auto false) + -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}") + -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}") + -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}") + --buildtype $(usex debug debug plain) + -Db_ndebug=$(usex debug false true) + ) + meson_src_configure +} + +multilib_src_compile() { + meson_src_compile +} + +multilib_src_install() { + meson_src_install +} + +multilib_src_install_all() { + einstalldocs +} + +multilib_src_test() { + meson_src_test +} + +pkg_postinst() { + # Switch to the xorg implementation. + echo + eselect opengl set --use-old ${OPENGL_DIR} +} + +# $1 - VIDEO_CARDS flag (check skipped for "--") +# other args - names of DRI drivers to enable +dri_driver_enable() { + if [[ $1 == -- ]] || use $1; then + shift + DRI_DRIVERS+=("$@") + fi +} + +gallium_enable() { + if [[ $1 == -- ]] || use $1; then + shift + GALLIUM_DRIVERS+=("$@") + fi +} + +vulkan_enable() { + if [[ $1 == -- ]] || use $1; then + shift + VULKAN_DRIVERS+=("$@") + fi +} diff --git a/media-libs/mesa/metadata.xml b/media-libs/mesa/metadata.xml index 8e1144c23b4f..ea7584d836e6 100644 --- a/media-libs/mesa/metadata.xml +++ b/media-libs/mesa/metadata.xml @@ -6,7 +6,6 @@ X11 - Disable patent-encumbered ARB_texture_float, EXT_texture_shared_exponent, and EXT_packed_float extensions. Build drivers based on the classic architecture. Enable Direct 3D9 API through Nine state tracker. Can be used together with patched wine. Enable DRI3 support. @@ -17,7 +16,6 @@ Enable GLESv2 support. Enable LLVM backend for Gallium3D. Enable the Clover Gallium OpenCL state tracker. - Enable OpenMAX video decode/encode acceleration for Gallium3D. Build the Mesa library for off-screen rendering. Enable if the user plans to run the package under a pax enabled hardened kernel disable optimized assembly code that is not PIC friendly -- cgit v1.2.3