summaryrefslogtreecommitdiff
path: root/media-libs/mesa
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-08-25 07:36:27 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-08-25 07:36:27 +0100
commit43793fab84041cfc5c60c0151d1591b8a69fb24a (patch)
tree6208a7f4fc744684fce0f55acbb47511acace498 /media-libs/mesa
parent28e3d252dc8ac8a5635206dfefe1cfe05058d1db (diff)
gentoo resync : 25.08.2018
Diffstat (limited to 'media-libs/mesa')
-rw-r--r--media-libs/mesa/Manifest16
-rw-r--r--media-libs/mesa/mesa-18.1.6.ebuild (renamed from media-libs/mesa/mesa-18.1.5.ebuild)2
-rw-r--r--media-libs/mesa/mesa-18.1.7.ebuild (renamed from media-libs/mesa/mesa-18.1.4.ebuild)0
-rw-r--r--media-libs/mesa/mesa-18.2.0_rc3.ebuild (renamed from media-libs/mesa/mesa-18.2.0_rc2.ebuild)174
-rw-r--r--media-libs/mesa/mesa-18.2.0_rc4.ebuild547
-rw-r--r--media-libs/mesa/mesa-9999.ebuild176
6 files changed, 808 insertions, 107 deletions
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
index f50351e62780..c5711cc5603b 100644
--- a/media-libs/mesa/Manifest
+++ b/media-libs/mesa/Manifest
@@ -1,13 +1,15 @@
AUX eselect-mesa.conf.9.2 1630 BLAKE2B 6c67ef9b5dc94f2f26378c004a459680b05084900a9199107a23f9c55514b59438265bce9ca207b05e2d20c3aa43e475d3f228c283dc965402c962a4cd0b6ebf SHA512 0fa9a23b4fba10599268266a82c7fa8dc5bfa1a0d565732875064c381dc4ff40c23faddb02b5849b1522eb9b7fd2ec2a0fac14406442a4aa0afa44bf760b42b5
DIST mesa-17.3.9.tar.xz 10660456 BLAKE2B 54f4a75f9040e50e9eea8f5c52a276578379d25d2a01ac4767ab12bee85fe5dae1492d5bb1df06b6e8c6b0fe960bbd5ea38691c75d08a6b4302c64377ce58e54 SHA512 83deffbc6b9823b8e93cccf57d7952106f3d55fea881e3924f9f9586f0e9347a6e3a1a36cc19c24af819f2fde3af9496652a6ff56132511a5618d5774404f63f
DIST mesa-18.0.5.tar.xz 10952996 BLAKE2B 708cdb2ef95a618430cd4e7eb45bcab0f6575774065b61f53787aa378385fe0dfa0b04f9c80c5426f9581851edc545a75c137777dc304ac8ba57465d365fcd50 SHA512 63b47cdca7f8282aab7aaa66233411f02918e5c4804b7a0010de2b1867fe90171e492ff031dfc4aa20968dfc99bd7dceb5d35fd44c709e54a2ece61175a60f3d
-DIST mesa-18.1.4.tar.xz 11133392 BLAKE2B b0c205e5baa04bb018333ffd89942f86f19edd3f610cce004db23bad4ebc1a3379ea35e72c85ccc08c34c8bc0991c1f0b595227fae2259e4b76895542d3f25b9 SHA512 04b8e5bbfa640f2303c388ab701fc2aca7f6d5d127ca5a9f9409975556813ba8e94305d27c9cea236a0e6d44a38b97e2877509268a96d9ed2a6762ab385aa3dc
-DIST mesa-18.1.5.tar.xz 11137340 BLAKE2B 3c18d2d73aa7ee920344691bd6de68b27b5cfb37e707921e04e3989596f3e5a088ac7171b033bb61473627cc1a5bf11d24a1f28d8483164b855f8023a74497e1 SHA512 f0bcb903bbf2ff7fc0b4a8fe100ea26ee91c0029b64adaf5fc4877ed7681f325c54b1be8eb0b140bff620da79f30a96375c2e1085e504ebfaf50e57f6da93013
-DIST mesa-18.2.0-rc2.tar.xz 11325108 BLAKE2B 5eb18c5b65d1e72959be85f40e45e355d1a8a3f72d2d54bc986b303648d376e5357a08ab7d63393d4949c8380376caefcff4946cc80677afe1d6073801200d55 SHA512 a60e6f1a0e819a1231946f9a50609ae670595c8dcd7d9d7ff1f928485e450dd25c622a451369c1f2999c3b986d2c5d9f4e6afd0e6cf24a7ae56595265f5d2aee
+DIST mesa-18.1.6.tar.xz 11142884 BLAKE2B fdd156fe7debf5223285dfa238070a2bd7d8ec684dec168afab78b9d2d38d53c10d939aaa64f34c2910e542dce3869adfca6383fca6a854c6dd03287a044b0e3 SHA512 2966210800215f5ced2720691063a8519b51ebeab9fb1e99bde4b1bd7ccc719d6395a1c29f25c88efe62d1592cf14ceafc163aca349490b1f8cee81070d46fcc
+DIST mesa-18.1.7.tar.xz 4833280 BLAKE2B 3c997ed40838a2dcce82b474f0120169e13eadc9db571492e200f10aabebff0867e3ff47bb9acb8c9ebbc594e996aab560be8f199bf96ef422e9e894861a6e2d SHA512 f5e2f39ba53886b61b2596c2caf4116063d1dd8b13318604f377eeebde1763e42ea9eb74fbe895494958fa9f4da323bd7279f72ef7e7d384d3e18287b74d8093
+DIST mesa-18.2.0-rc3.tar.xz 11327960 BLAKE2B 7ce236d6a308904a8f76b2fda86af181ae4e422d637caffb45ffd5ce0ed427fdfbd107f44c52825bff173ec8aaf4e3a3dbae939167da9f6a1a719b7366914526 SHA512 175dbdffdcdf61c7ac0e4e1fae021daba80311fac02074ad6dea208971ab50c68bc43ba8d7b36ecf82b7081c051d301cb562f66785446973b88657d48f7bb663
+DIST mesa-18.2.0-rc4.tar.xz 11320208 BLAKE2B bf99295f462ec8162bced6ff6d8496f3d2246ef85b5b6512f1b2d6c6ac63c04a2677b0e0368e857e0becd0ea08d96c53c557a4a103bbee8e169d3e1f80dd9092 SHA512 8aa5c75567c23228c80174c36f1cbc30bea79e5a5cf93804a9ca6c6142c428c55ea256b0a76d83493a52d60d4c4ace96ae81434f01fcdfc1971151bf3900f655
EBUILD mesa-17.3.9.ebuild 14465 BLAKE2B 9fbe7ed8fd4f46d918288fe6f8b944d56cdd470c804d2786a19ef713b65c6b609e7286425c2cdc47aa52fd509af02eb077bea83ba04fa9dc232b2e6e19e59b1f SHA512 2f09d42d19cb4ef714d6b5fc1b6526f630393428522d98d24106d351a135e93eab172a2072e11cd9968e9c9e18da82b3f96cd7f6b0dc81ab316db80d6c542e3a
EBUILD mesa-18.0.5.ebuild 14421 BLAKE2B d1170f83f571b84a1c3906b02aff38190c9586e3a22928b3f85b16c98448c928574faa18975bc01210c524d10221af679a894c975f83e0cdbca0146b553950a1 SHA512 a9d5c7284211a34f8022388838fedf2df792bac3188cc4e12ed4a5f362a978651b39c571402d798e559bc625708a2dd3a0363c19ccc43dfed9de81eda40e22b7
-EBUILD mesa-18.1.4.ebuild 13432 BLAKE2B 0ecb168929a67a1829e9b1e8ace99091813afb6e7facddae82e22b89c0011abfa0fba0d577649dff24b6ec6569651077ae77069f7ec6ad59d1bfe023ffa3f53c SHA512 19c6d34947e4962014b3df6738d2564bd6c0172be81d6101b051bdef96e8b1f2d901b8566aa4ed9212f42c190251477e70ad16188655c17ce32848703190d02f
-EBUILD mesa-18.1.5.ebuild 13432 BLAKE2B 0ecb168929a67a1829e9b1e8ace99091813afb6e7facddae82e22b89c0011abfa0fba0d577649dff24b6ec6569651077ae77069f7ec6ad59d1bfe023ffa3f53c SHA512 19c6d34947e4962014b3df6738d2564bd6c0172be81d6101b051bdef96e8b1f2d901b8566aa4ed9212f42c190251477e70ad16188655c17ce32848703190d02f
-EBUILD mesa-18.2.0_rc2.ebuild 11982 BLAKE2B a7a84d5edfdd47d27e4a6b49a75c93ad31eedae896ee6e0e673c1f1e10e5104d4dca6921a20ce8edd5bfac736ab7a461e3d3c78312156dccf5124e8b3d7f0e5f SHA512 bcd6dd622284752f37e7b41478d1a167f7033a6c34767892bb1c8d34b38bfc3899c32d4ac5ef7459e12678611f3747ae4f22d045124dac9d93b32f8d5a15cd15
-EBUILD mesa-9999.ebuild 12003 BLAKE2B 4b4c2b86f66e48d5891f7afafb4d265b996f5b3bfce06bd539a6298a2ccbea9e9a8ef96e1890e0c5478e95cd64d6855c9172cd571309f77c7da29d49f9a953f5 SHA512 42e75d4c83f9fcffe2a0df96b6cd9ffde8fe8cec298f63fb9d80ce1efc72dd27305486cde97e9cb0c4013df78117c3d47864a26faaa676161e7645a412851696
+EBUILD mesa-18.1.6.ebuild 13426 BLAKE2B 0bff5bf2683d72f587f338059891d0793e46388c928889f1f87f0188bdaaac53598bf54ecd43d8df5e52eb8ca283a6ef345929c7ccefd986d8a9a88c0eb40c64 SHA512 d91efb79205c93049d00f577088dcb43e258ae85d942c65516ff404d07aad36dfdb37d4f1a791c2ce0b0fbe695e9ca7304093dfd11175bcce5bb8a19373f1bde
+EBUILD mesa-18.1.7.ebuild 13432 BLAKE2B 0ecb168929a67a1829e9b1e8ace99091813afb6e7facddae82e22b89c0011abfa0fba0d577649dff24b6ec6569651077ae77069f7ec6ad59d1bfe023ffa3f53c SHA512 19c6d34947e4962014b3df6738d2564bd6c0172be81d6101b051bdef96e8b1f2d901b8566aa4ed9212f42c190251477e70ad16188655c17ce32848703190d02f
+EBUILD mesa-18.2.0_rc3.ebuild 14361 BLAKE2B fc960ca9fb0edc6c3b5069cbe78b9538bfa8e934de75964a5e13520aea452d9234d7469a654595252139dd508a74ffe5b9f0e6fa2d94ed216f91b7dd2dfe6dff SHA512 ef0d0754e18789bb297d83ac6abc1b4d626bfc1c0499854627cdce47cc36ec5421f28959b533b3d9c1171321e3b85069ad156aa9193b5c1e48c2345d67fb2169
+EBUILD mesa-18.2.0_rc4.ebuild 14361 BLAKE2B fc960ca9fb0edc6c3b5069cbe78b9538bfa8e934de75964a5e13520aea452d9234d7469a654595252139dd508a74ffe5b9f0e6fa2d94ed216f91b7dd2dfe6dff SHA512 ef0d0754e18789bb297d83ac6abc1b4d626bfc1c0499854627cdce47cc36ec5421f28959b533b3d9c1171321e3b85069ad156aa9193b5c1e48c2345d67fb2169
+EBUILD mesa-9999.ebuild 14412 BLAKE2B 9f12d63fbf9025703d11620eef373739e3040e36805dac1fae16dd5c31a7ea7f68358bd4b30a13852ddf9c1ede0ac233b37320af528ab5171ce761131c6c8df8 SHA512 35e440cc790485dbf6e898e2a8c82e79ab768b65b46434b127c0e82e0670fee9ee4f49f284a3f82b5e0d097f43dcb31a509ee294c5cea62c7f08b7ab0b31ab40
MISC metadata.xml 2095 BLAKE2B c1c858a478bbb1c7e38a45dbf00e380a3d26c56920db1897521a7e9f4eb005157e535207ae2274d744e3ce5514a57654eb0effb2cfc773263a0f417874cdc742 SHA512 c3db8aeb4f4ae7ea27c8b48cb26ee9348d84e6fb4b99df815b177e62e78cd980a7834c152e2c10c6fdbe2b91a032861a0c0503625874bfb6df58ccc3bf54e705
diff --git a/media-libs/mesa/mesa-18.1.5.ebuild b/media-libs/mesa/mesa-18.1.6.ebuild
index fab799310391..bb7a9cee34d2 100644
--- a/media-libs/mesa/mesa-18.1.5.ebuild
+++ b/media-libs/mesa/mesa-18.1.6.ebuild
@@ -25,7 +25,7 @@ if [[ $PV == 9999 ]]; then
SRC_URI=""
else
SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
+ KEYWORDS="alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
fi
LICENSE="MIT"
diff --git a/media-libs/mesa/mesa-18.1.4.ebuild b/media-libs/mesa/mesa-18.1.7.ebuild
index fab799310391..fab799310391 100644
--- a/media-libs/mesa/mesa-18.1.4.ebuild
+++ b/media-libs/mesa/mesa-18.1.7.ebuild
diff --git a/media-libs/mesa/mesa-18.2.0_rc2.ebuild b/media-libs/mesa/mesa-18.2.0_rc3.ebuild
index af17740a3a81..76e780a05ff7 100644
--- a/media-libs/mesa/mesa-18.2.0_rc2.ebuild
+++ b/media-libs/mesa/mesa-18.2.0_rc3.ebuild
@@ -37,22 +37,17 @@ done
IUSE="${IUSE_VIDEO_CARDS}
+classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm lm_sensors
- opencl osmesa openmax pax_kernel pic selinux test unwind vaapi valgrind
- vdpau vulkan wayland xa xvmc"
+ opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind vdpau
+ vulkan wayland xa xvmc"
REQUIRED_USE="
- d3d9? ( dri3 gallium )
- llvm? ( gallium )
- opencl? ( gallium llvm || ( video_cards_r600 video_cards_radeonsi ) )
- openmax? ( gallium )
+ d3d9? ( dri3 )
gles1? ( egl )
gles2? ( egl )
- vaapi? ( gallium )
- vdpau? ( gallium )
- vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
+ vulkan? ( dri3
+ || ( 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 ) )
@@ -104,10 +99,6 @@ RDEPEND="
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 )
@@ -222,7 +213,8 @@ DEPEND="${RDEPEND}
virtual/pkgconfig
valgrind? ( dev-util/valgrind )
x11-base/xorg-proto
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
"
S="${WORKDIR}/${MY_P}"
@@ -252,6 +244,72 @@ llvm_check_deps() {
has_version "sys-devel/llvm[${flags}]"
}
+pkg_pretend() {
+ if use d3d9; then
+ if ! use video_cards_r300 &&
+ ! use video_cards_r600 &&
+ ! use video_cards_radeonsi &&
+ ! use video_cards_nouveau &&
+ ! use video_cards_vmware; then
+ ewarn "Ignoring USE=d3d9 since VIDEO_CARDS does not contain r300, r600, radeonsi, nouveau, or vmware"
+ fi
+ fi
+
+ 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; then
+ ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno or nouveau"
+ 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 d3d9 && ewarn "Ignoring USE=d3d9 since USE does not contain gallium"
+ 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
@@ -295,25 +353,66 @@ multilib_src_configure() {
if use gallium; then
emesonargs+=(
- $(meson_use d3d9 gallium-nine)
$(meson_use llvm)
- -Dgallium-omx=$(usex openmax bellagio disabled)
- $(meson_use vaapi gallium-va)
- $(meson_use vdpau gallium-vdpau)
- $(meson_use xa gallium-xa)
- $(meson_use xvmc gallium-xvmc)
+ $(meson_use lm_sensors lmsensors)
+ $(meson_use unwind libunwind)
)
- use vaapi && emesonargs+=( -Dva-libs-path=/usr/$(get_libdir)/va/drivers )
+
+ 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; 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_i915 i915
gallium_enable video_cards_imx imx
- if ! use video_cards_i915 && \
- ! use video_cards_i965; then
- gallium_enable video_cards_intel i915
+
+ # 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
@@ -373,8 +472,6 @@ multilib_src_configure() {
$(meson_use gles1)
$(meson_use gles2)
$(meson_use selinux)
- $(meson_use unwind libunwind)
- $(meson_use lm_sensors lmsensors)
-Dvalgrind=$(usex valgrind auto false)
-Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
-Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
@@ -405,12 +502,6 @@ multilib_src_install() {
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() {
@@ -430,21 +521,6 @@ pkg_postinst() {
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
-}
-
-pkg_prerm() {
- if use openmax; then
- rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
- fi
}
# $1 - VIDEO_CARDS flag (check skipped for "--")
diff --git a/media-libs/mesa/mesa-18.2.0_rc4.ebuild b/media-libs/mesa/mesa-18.2.0_rc4.ebuild
new file mode 100644
index 000000000000..76e780a05ff7
--- /dev/null
+++ b/media-libs/mesa/mesa-18.2.0_rc4.ebuild
@@ -0,0 +1,547 @@
+# Copyright 1999-2018 Gentoo Foundation
+# 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 ~arm-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 )
+ 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? (
+ app-eselect/eselect-opencl
+ 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 d3d9; then
+ if ! use video_cards_r300 &&
+ ! use video_cards_r600 &&
+ ! use video_cards_radeonsi &&
+ ! use video_cards_nouveau &&
+ ! use video_cards_vmware; then
+ ewarn "Ignoring USE=d3d9 since VIDEO_CARDS does not contain r300, r600, radeonsi, nouveau, or vmware"
+ fi
+ fi
+
+ 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; then
+ ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno or nouveau"
+ 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 d3d9 && ewarn "Ignoring USE=d3d9 since USE does not contain gallium"
+ 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
+
+ if use egl; then
+ emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
+ fi
+
+ 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; 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
+ # opencl stuff
+ if use opencl; then
+ emesonargs+=(
+ -Dgallium-opencl="$(usex opencl standalone disabled)"
+ )
+ fi
+
+ gallium_enable video_cards_virgl virgl
+ 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)
+ )
+ meson_src_configure
+}
+
+multilib_src_compile() {
+ meson_src_compile
+}
+
+multilib_src_install() {
+ meson_src_install
+
+ 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
+}
+
+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}
+
+ # Switch to mesa opencl
+ if use opencl; then
+ eselect opencl set --use-old ${PN}
+ fi
+}
+
+# $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-9999.ebuild b/media-libs/mesa/mesa-9999.ebuild
index 48cf2cd6807d..229179f667aa 100644
--- a/media-libs/mesa/mesa-9999.ebuild
+++ b/media-libs/mesa/mesa-9999.ebuild
@@ -3,7 +3,7 @@
EAPI=6
-PYTHON_COMPAT=( python2_7 )
+PYTHON_COMPAT=( python3_4 python3_5 python3_6 python3_7 )
inherit llvm meson multilib-minimal pax-utils python-any-r1
@@ -37,22 +37,17 @@ done
IUSE="${IUSE_VIDEO_CARDS}
+classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm lm_sensors
- opencl osmesa openmax pax_kernel pic selinux test unwind vaapi valgrind
- vdpau vulkan wayland xa xvmc"
+ opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind vdpau
+ vulkan wayland xa xvmc"
REQUIRED_USE="
- d3d9? ( dri3 gallium )
- llvm? ( gallium )
- opencl? ( gallium llvm || ( video_cards_r600 video_cards_radeonsi ) )
- openmax? ( gallium )
+ d3d9? ( dri3 )
gles1? ( egl )
gles2? ( egl )
- vaapi? ( gallium )
- vdpau? ( gallium )
- vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
+ vulkan? ( dri3
+ || ( 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 ) )
@@ -104,10 +99,6 @@ RDEPEND="
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 )
@@ -222,7 +213,8 @@ DEPEND="${RDEPEND}
virtual/pkgconfig
valgrind? ( dev-util/valgrind )
x11-base/xorg-proto
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
"
S="${WORKDIR}/${MY_P}"
@@ -252,6 +244,72 @@ llvm_check_deps() {
has_version "sys-devel/llvm[${flags}]"
}
+pkg_pretend() {
+ if use d3d9; then
+ if ! use video_cards_r300 &&
+ ! use video_cards_r600 &&
+ ! use video_cards_radeonsi &&
+ ! use video_cards_nouveau &&
+ ! use video_cards_vmware; then
+ ewarn "Ignoring USE=d3d9 since VIDEO_CARDS does not contain r300, r600, radeonsi, nouveau, or vmware"
+ fi
+ fi
+
+ 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; then
+ ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno or nouveau"
+ 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 d3d9 && ewarn "Ignoring USE=d3d9 since USE does not contain gallium"
+ 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
@@ -295,25 +353,66 @@ multilib_src_configure() {
if use gallium; then
emesonargs+=(
- $(meson_use d3d9 gallium-nine)
$(meson_use llvm)
- -Dgallium-omx=$(usex openmax bellagio disabled)
- $(meson_use vaapi gallium-va)
- $(meson_use vdpau gallium-vdpau)
- $(meson_use xa gallium-xa)
- $(meson_use xvmc gallium-xvmc)
+ $(meson_use lm_sensors lmsensors)
+ $(meson_use unwind libunwind)
)
- use vaapi && emesonargs+=( -Dva-libs-path=/usr/$(get_libdir)/va/drivers )
+
+ 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; 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_i915 i915
gallium_enable video_cards_imx imx
- if ! use video_cards_i915 && \
- ! use video_cards_i965; then
- gallium_enable video_cards_intel i915
+
+ # 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
@@ -373,8 +472,6 @@ multilib_src_configure() {
$(meson_use gles1)
$(meson_use gles2)
$(meson_use selinux)
- $(meson_use unwind libunwind)
- $(meson_use lm_sensors lmsensors)
-Dvalgrind=$(usex valgrind auto false)
-Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
-Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
@@ -405,12 +502,6 @@ multilib_src_install() {
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() {
@@ -430,21 +521,6 @@ pkg_postinst() {
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
-}
-
-pkg_prerm() {
- if use openmax; then
- rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
- fi
}
# $1 - VIDEO_CARDS flag (check skipped for "--")