summaryrefslogtreecommitdiff
path: root/media-libs/mesa/mesa-9999.ebuild
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/mesa-9999.ebuild
parent28e3d252dc8ac8a5635206dfefe1cfe05058d1db (diff)
gentoo resync : 25.08.2018
Diffstat (limited to 'media-libs/mesa/mesa-9999.ebuild')
-rw-r--r--media-libs/mesa/mesa-9999.ebuild176
1 files changed, 126 insertions, 50 deletions
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 "--")