public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2016-02-22 17:53 Matt Turner
  0 siblings, 0 replies; 16+ messages in thread
From: Matt Turner @ 2016-02-22 17:53 UTC (permalink / raw
  To: gentoo-commits

commit:     377609202ac910df5f1e4e30f18552c23315482a
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 22 17:50:18 2016 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Mon Feb 22 17:53:02 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37760920

media-libs/mesa: Add patch to fix use-after-free in NIR.

Bug: https://bugs.gentoo.org/574912

 .../mesa-11.1.2-i965-fix-use-after-free.patch      |  47 +++
 media-libs/mesa/mesa-11.1.2-r1.ebuild              | 463 +++++++++++++++++++++
 2 files changed, 510 insertions(+)

diff --git a/media-libs/mesa/files/mesa-11.1.2-i965-fix-use-after-free.patch b/media-libs/mesa/files/mesa-11.1.2-i965-fix-use-after-free.patch
new file mode 100644
index 0000000..87ad498
--- /dev/null
+++ b/media-libs/mesa/files/mesa-11.1.2-i965-fix-use-after-free.patch
@@ -0,0 +1,47 @@
+From 1c145df858ba5ab539386692d9350909fb8f8c82 Mon Sep 17 00:00:00 2001
+From: Jason Ekstrand <jason.ekstrand@intel.com>
+Date: Wed, 10 Feb 2016 12:07:49 -0800
+Subject: [PATCH] nir/lower_vec_to_movs: Better report channels handled by
+ insert_mov
+
+This fixes two issues.  First, we had a use-after-free in the case where
+the instruction got deleted and we tried to return mov->dest.write_mask.
+Second, in the case where we are doing a self-mov of a register, we delete
+those channels that are moved to themselves from the write-mask.  This
+means that those channels aren't reported as being handled even though they
+are.  We now stash off the write-mask before remove unneeded channels so
+that they still get reported as handled.
+
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94073
+Reviewed-by: Matt Turner <mattst88@gmail.com>
+Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
+(cherry picked from commit 70dff4a55e767de8b9ce10f055b94ebb1f6a9755)
+---
+ src/glsl/nir/nir_lower_vec_to_movs.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/glsl/nir/nir_lower_vec_to_movs.c b/src/glsl/nir/nir_lower_vec_to_movs.c
+index 736a66c..0783596 100644
+--- a/src/glsl/nir/nir_lower_vec_to_movs.c
++++ b/src/glsl/nir/nir_lower_vec_to_movs.c
+@@ -83,6 +83,8 @@ insert_mov(nir_alu_instr *vec, unsigned start_idx, nir_shader *shader)
+       }
+    }
+ 
++   unsigned channels_handled = mov->dest.write_mask;
++
+    /* In some situations (if the vecN is involved in a phi-web), we can end
+     * up with a mov from a register to itself.  Some of those channels may end
+     * up doing nothing and there's no reason to have them as part of the mov.
+@@ -103,7 +105,7 @@ insert_mov(nir_alu_instr *vec, unsigned start_idx, nir_shader *shader)
+       ralloc_free(mov);
+    }
+ 
+-   return mov->dest.write_mask;
++   return channels_handled;
+ }
+ 
+ static bool
+-- 
+2.4.10
+

diff --git a/media-libs/mesa/mesa-11.1.2-r1.ebuild b/media-libs/mesa/mesa-11.1.2-r1.ebuild
new file mode 100644
index 0000000..7dd5cc6
--- /dev/null
+++ b/media-libs/mesa/mesa-11.1.2-r1.ebuild
@@ -0,0 +1,463 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa"
+
+if [[ ${PV} = 9999 ]]; then
+	GIT_ECLASS="git-r3"
+	EXPERIMENTAL="true"
+fi
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
+
+OPENGL_DIR="xorg-x11"
+
+MY_P="${P/_/-}"
+FOLDER="${PV/_rc*/}"
+
+DESCRIPTION="OpenGL-like graphic library for Linux"
+HOMEPAGE="http://mesa3d.sourceforge.net/"
+
+if [[ $PV == 9999 ]]; then
+	SRC_URI=""
+	KEYWORDS=""
+else
+	SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_P}.tar.xz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+RESTRICT="!bindist? ( bindist )"
+
+INTEL_CARDS="i915 i965 ilo intel"
+RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
+VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno nouveau 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 +llvm
+	+nptl opencl osmesa pax_kernel openmax pic selinux +udev vaapi vdpau
+	wayland xvmc xa kernel_FreeBSD"
+
+REQUIRED_USE="
+	d3d9?   ( dri3 gallium )
+	llvm?   ( gallium )
+	opencl? ( gallium llvm )
+	openmax? ( gallium )
+	gles1?  ( egl )
+	gles2?  ( egl )
+	vaapi? ( gallium )
+	vdpau? ( gallium )
+	wayland? ( egl gbm )
+	xa?  ( gallium )
+	video_cards_freedreno?  ( gallium )
+	video_cards_intel?  ( classic )
+	video_cards_i915?   ( || ( classic gallium ) )
+	video_cards_i965?   ( classic )
+	video_cards_ilo?    ( gallium )
+	video_cards_nouveau? ( || ( classic gallium ) )
+	video_cards_radeon? ( || ( classic gallium )
+						  gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
+	video_cards_r100?   ( classic )
+	video_cards_r200?   ( classic )
+	video_cards_r300?   ( gallium x86? ( llvm ) amd64? ( llvm ) )
+	video_cards_r600?   ( gallium )
+	video_cards_radeonsi?   ( gallium llvm )
+	video_cards_vmware? ( gallium )
+	${PYTHON_REQUIRED_USE}
+"
+
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.64"
+# keep correct libdrm and dri2proto dep
+# keep blocks in rdepend for binpkg
+RDEPEND="
+	!<x11-base/xorg-server-1.7
+	!<=x11-proto/xf86driproto-2.0.3
+	abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
+	classic? ( app-eselect/eselect-mesa )
+	gallium? ( app-eselect/eselect-mesa )
+	>=app-eselect/eselect-opengl-1.3.0
+	udev? ( kernel_linux? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) )
+	>=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
+	>=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
+	>=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
+	>=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
+	>=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
+	>=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
+	>=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
+	x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
+	llvm? ( !kernel_FreeBSD? (
+		video_cards_radeonsi? ( || (
+			>=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+			>=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+			) )
+		!video_cards_r600? (
+			video_cards_radeon? ( || (
+				>=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+				>=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+				) )
+		) )
+		>=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
+	)
+	opencl? (
+				app-eselect/eselect-opencl
+				dev-libs/libclc
+				!kernel_FreeBSD? ( || (
+					>=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+					>=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+				) )
+			)
+	openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
+	vaapi? ( >=x11-libs/libva-1.6.0:=[${MULTILIB_USEDEP}] )
+	vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
+	wayland? ( >=dev-libs/wayland-1.2.0:=[${MULTILIB_USEDEP}] )
+	xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
+	${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vmware?,${MULTILIB_USEDEP}]
+"
+for card in ${INTEL_CARDS}; do
+	RDEPEND="${RDEPEND}
+		video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
+	"
+done
+
+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] )
+"
+
+DEPEND="${RDEPEND}
+	llvm? (
+		video_cards_radeonsi? ( sys-devel/llvm[video_cards_radeon] )
+	)
+	opencl? (
+				>=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
+				>=sys-devel/clang-3.4.2:=[${MULTILIB_USEDEP}]
+				>=sys-devel/gcc-4.6
+	)
+	sys-devel/gettext
+	virtual/pkgconfig
+	>=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
+	dri3? (
+		>=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
+		>=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
+	)
+	>=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
+	>=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
+	>=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
+	>=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
+"
+[[ ${PV} == 9999 ]] && DEPEND+="
+	sys-devel/bison
+	sys-devel/flex
+	${PYTHON_DEPS}
+	$(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
+	)
+)"
+
+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
+
+	python-any-r1_pkg_setup
+}
+
+src_prepare() {
+	epatch "${FILESDIR}"/${PN}-11.1.2-i965-fix-use-after-free.patch
+
+	[[ ${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-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
+	fi
+
+	if use gallium; then
+		myconf+="
+			$(use_enable d3d9 nine)
+			$(use_enable llvm gallium-llvm)
+			$(use_enable openmax omx)
+			$(use_enable vaapi va)
+			$(use_enable vdpau)
+			$(use_enable xa)
+			$(use_enable xvmc)
+		"
+		use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
+
+		gallium_enable swrast
+		gallium_enable video_cards_vmware svga
+		gallium_enable video_cards_nouveau nouveau
+		gallium_enable video_cards_i915 i915
+		gallium_enable video_cards_ilo ilo
+		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
+	fi
+
+	# x86 hardened pax_kernel needs glx-read-only-text, 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
+
+	# 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 osmesa) \
+		$(use_enable !udev sysfs) \
+		--enable-llvm-shared-libs \
+		--with-dri-drivers=${DRI_DRIVERS} \
+		--with-gallium-drivers=${GALLIUM_DRIVERS} \
+		PYTHON2="${PYTHON}" \
+		${myconf}
+}
+
+multilib_src_install() {
+	emake install DESTDIR="${D}"
+
+	if use classic || use gallium; then
+			ebegin "Moving DRI/Gallium drivers for dynamic switching"
+			local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
+			keepdir /usr/$(get_libdir)/dri
+			dodir /usr/$(get_libdir)/mesa
+			for x in ${gallium_drivers[@]}; do
+				if [ -f "$(get_libdir)/gallium/${x}" ]; then
+					mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
+						|| die "Failed to move ${x}"
+				fi
+			done
+			if use classic; then
+				emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
+			fi
+			for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
+				if [ -f ${x} -o -L ${x} ]; then
+					mv -f "${x}" "${x/dri/mesa}" \
+						|| die "Failed to move ${x}"
+				fi
+			done
+			pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
+			ln -s ../mesa/*.so . || die "Creating symlink failed"
+			# remove symlinks to drivers known to eselect
+			for x in ${gallium_drivers[@]}; do
+				if [ -f ${x} -o -L ${x} ]; then
+					rm "${x}" || die "Failed to remove ${x}"
+				fi
+			done
+			popd
+		eend $?
+	fi
+	if use opencl; then
+		ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
+		local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
+		dodir ${cl_dir}/{lib,include}
+		if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
+			mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
+			"${ED}"${cl_dir}
+		fi
+		if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
+			mv -f "${ED}"/usr/include/CL \
+			"${ED}"${cl_dir}/include
+		fi
+		eend $?
+	fi
+
+	if use openmax; then
+		echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
+		doenvd "${T}"/99mesaxdgomx
+		keepdir /usr/share/mesa/xdg
+	fi
+}
+
+multilib_src_install_all() {
+	prune_libtool_files --all
+	einstalldocs
+
+	if use !bindist; then
+		dodoc docs/patents.txt
+	fi
+
+	# Install config file for eselect mesa
+	insinto /usr/share/mesa
+	newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
+}
+
+multilib_src_test() {
+	if use llvm; then
+		local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
+		pushd src/gallium/drivers/llvmpipe >/dev/null || die
+		emake ${llvm_tests}
+		pax-mark m ${llvm_tests}
+		popd >/dev/null || die
+	fi
+	emake check
+}
+
+pkg_postinst() {
+	# Switch to the xorg implementation.
+	echo
+	eselect opengl set --use-old ${OPENGL_DIR}
+
+	# Select classic/gallium drivers
+	if use classic || use gallium; then
+		eselect mesa set --auto
+	fi
+
+	# Switch to mesa opencl
+	if use opencl; then
+		eselect opencl set --use-old ${PN}
+	fi
+
+	# run omxregister-bellagio to make the OpenMAX drivers known system-wide
+	if use openmax; then
+		ebegin "Registering OpenMAX drivers"
+		BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
+			OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
+			omxregister-bellagio
+		eend $?
+	fi
+
+	# warn about patent encumbered texture-float
+	if use !bindist; then
+		elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
+		elog "enabled. Please see patents.txt for an explanation."
+	fi
+
+	if ! has_version media-libs/libtxc_dxtn; then
+		elog "Note that in order to have full S3TC support, it is necessary to install"
+		elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
+		elog "textures in some apps, and some others even require this to run."
+	fi
+}
+
+pkg_prerm() {
+	if use openmax; then
+		rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
+	fi
+}
+
+# $1 - VIDEO_CARDS flag
+# other args - names of DRI drivers to enable
+# TODO: avoid code duplication for a more elegant implementation
+driver_enable() {
+	case $# in
+		# for enabling unconditionally
+		1)
+			DRI_DRIVERS+=",$1"
+			;;
+		*)
+			if use $1; then
+				shift
+				for i in $@; do
+					DRI_DRIVERS+=",${i}"
+				done
+			fi
+			;;
+	esac
+}
+
+gallium_enable() {
+	case $# in
+		# for enabling unconditionally
+		1)
+			GALLIUM_DRIVERS+=",$1"
+			;;
+		*)
+			if use $1; then
+				shift
+				for i in $@; do
+					GALLIUM_DRIVERS+=",${i}"
+				done
+			fi
+			;;
+	esac
+}


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2016-04-21  4:46 Matt Turner
  0 siblings, 0 replies; 16+ messages in thread
From: Matt Turner @ 2016-04-21  4:46 UTC (permalink / raw
  To: gentoo-commits

commit:     d8b647210caa34dddbc38c98af1a6772b44fcae0
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 21 04:46:29 2016 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Thu Apr 21 04:46:42 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8b64721

media-libs/mesa: Drop old.

 media-libs/mesa/Manifest                           |   2 -
 .../mesa-11.1.2-i965-fix-use-after-free.patch      |  47 ---
 media-libs/mesa/mesa-11.1.2-r1.ebuild              | 464 --------------------
 media-libs/mesa/mesa-11.2.0.ebuild                 | 467 ---------------------
 4 files changed, 980 deletions(-)

diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
index 352db04..5e37d4b 100644
--- a/media-libs/mesa/Manifest
+++ b/media-libs/mesa/Manifest
@@ -2,8 +2,6 @@ DIST MesaLib-10.3.7.tar.bz2 7287153 SHA256 43c6ced15e237cbb21b3082d7c0b42777c50c
 DIST MesaLib-7.10.3.tar.bz2 6056837 SHA256 1e701fc839b872677ddca9ed8784d754c9da1fbeda98173980e06aa7df0e85c0 SHA512 aa1f5f068b305fae5519e11cad2db9c6dc647d3122252bbcb210f13ac6ef1b667ae750344898bca7c5bfae94934db05eff915cb7417a59590e6d3ba230817aa8 WHIRLPOOL 5c2adda647936ed4163a4e4d5afad8344eb576712f9432f697aa0fc22ca17d7aaf0aeb6ad2d4e7e0825dc27cae570660332450778f8091e9b27aad2865c9b5fc
 DIST mesa-11.0.6.tar.xz 7272972 SHA256 8340e64cdc91999840404c211496f3de38e7b4cb38db34e2f72f1642c5134760 SHA512 946a66803395ef0f4d3b328e981e03a87bb5173a523be5da1dd3363002fceacd8dcbfdbf9716e31bb4247b23cc5ef112b24bb4ef0709b514bc8160c6cbf1dbf3 WHIRLPOOL 19729acb5fbbcff3a99b4d7644750dff4a7a2d41c3f25f2e004938faf0c72abd33e97f5d23d2804f84b957824757b5f64f3a7f54a2dd8999b2a71eb9b1976e0b
 DIST mesa-11.0.9.tar.xz 7282648 SHA256 a1262ff1c66a16ccf341186cf0e57b306b8589eb2cc5ce92ffb6788ab01d2b01 SHA512 8bf9c3bfe61f5d22182b9611d66051d83dfb302cc349921bc1d895acc8681b3e22e77cb360e2f12383fd928793b306f8f98998caa457dc04e3ff4e5561ea78f7 WHIRLPOOL a3477542b5ebfed9b69bd29e7f58a01b02c70d49399afb873744de08e776d712eaca3443f88dbdee25b1d3d35a4eb9dae75a3b9d7d6d652d41cded763836c59a
-DIST mesa-11.1.2.tar.xz 7561920 SHA256 8f72aead896b340ba0f7a4a474bfaf71681f5d675592aec1cb7ba698e319148b SHA512 4037728cbe7c5c492cf1e6d20c61250c0ff4fe82cf89ba1cd6ff029776220160359dce197582d2c3f3f7ba5d76fe6b055515210fc46b59f821fc66f453cb77ae WHIRLPOOL e7a848f542c13eae1a79c89a6bff3fbc0c82041924f1cbecac7eaba6363edebfce568353829c41eb38c0c309e0aa35f36027b0dca262ed54d6627542d74f6bca
 DIST mesa-11.1.3.tar.xz 7566584 SHA256 51f6658a214d75e4d9f05207586d7ed56ebba75c6b10841176fb6675efa310ac SHA512 b9aae6a2d8f517c83fd16c5cb6b17ddf07156bc169a560a440de49e594f8c04e32c62c4522eddbd77827e51b7cd42754639655241c7dbf092d5abb1aab42b551 WHIRLPOOL dd1475a77a327de07ecabc91502d9250d30d53d89ad33c4c4b757c33868ef0c51858b97094f325366f7f36778902b065833d17482e5b2d8c4a4ce6c2c5adec68
-DIST mesa-11.2.0.tar.xz 7856132 SHA256 1c1fed2674abf3f16ed2623e9a5694d6752c293194e18462ebc644a19cfaafb2 SHA512 ce56d9669cb31f465b67fa056428f59c89b60480da1e0b3e293dc740a12ed2ead0574c356017c13dfb4666616843808b9a1b7501eac14fb774981739c7d363b7 WHIRLPOOL 7c2439e836072d7a046605f068c0a50414ac742df622a8a538eb910293e029d84a161531c9b1cf5ecb230c619547cf10cda7eb12e0744903b22c8e813f8b53eb
 DIST mesa-11.2.1.tar.xz 7857308 SHA256 a65207e9ae5c5f1c29f863c6a2cc98a7ab99762a24b82a248337f0ea9cfce01b SHA512 e70df5f1a80c2904fd15db13c2a0d26eef3b3826cc77ccf79c50dc63e385a2123394c3c7f197882c8d35d8aa6cb9200a8fca705ccf3631000de89599c21891ac WHIRLPOOL 35d69c235717171d0628441fc10ab305ce21a302056aae97b453f3f5a33d8a691a983c7731872d1c45f4456c53192f9aa7f42b1b9016f1f4980ee358f1aeab9f
 DIST mesa-7.10.1-gentoo-patches-01.tar.bz2 5488 SHA256 31cd4f6d1a0a70249c40452919074856d120cd473a01a8457e3dc147a1b622d8 SHA512 c62b45b32e396e67f629003fc5242b7b4df054b8e20b5237489212bc4f0171534915a02fc9efa68965068121d10660b5cd92a419efabe33fd4596a97a39249c2 WHIRLPOOL 5f171959e3a31f5c38438b4806ce371bb8fdf1c7a87501865e4ed5d5ab284cda9568b7773005997d7a1cff151f95e64c027b36c0be48a4dd288a7ab8b5f69b97

diff --git a/media-libs/mesa/files/mesa-11.1.2-i965-fix-use-after-free.patch b/media-libs/mesa/files/mesa-11.1.2-i965-fix-use-after-free.patch
deleted file mode 100644
index 87ad498..0000000
--- a/media-libs/mesa/files/mesa-11.1.2-i965-fix-use-after-free.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 1c145df858ba5ab539386692d9350909fb8f8c82 Mon Sep 17 00:00:00 2001
-From: Jason Ekstrand <jason.ekstrand@intel.com>
-Date: Wed, 10 Feb 2016 12:07:49 -0800
-Subject: [PATCH] nir/lower_vec_to_movs: Better report channels handled by
- insert_mov
-
-This fixes two issues.  First, we had a use-after-free in the case where
-the instruction got deleted and we tried to return mov->dest.write_mask.
-Second, in the case where we are doing a self-mov of a register, we delete
-those channels that are moved to themselves from the write-mask.  This
-means that those channels aren't reported as being handled even though they
-are.  We now stash off the write-mask before remove unneeded channels so
-that they still get reported as handled.
-
-Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94073
-Reviewed-by: Matt Turner <mattst88@gmail.com>
-Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
-(cherry picked from commit 70dff4a55e767de8b9ce10f055b94ebb1f6a9755)
----
- src/glsl/nir/nir_lower_vec_to_movs.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/src/glsl/nir/nir_lower_vec_to_movs.c b/src/glsl/nir/nir_lower_vec_to_movs.c
-index 736a66c..0783596 100644
---- a/src/glsl/nir/nir_lower_vec_to_movs.c
-+++ b/src/glsl/nir/nir_lower_vec_to_movs.c
-@@ -83,6 +83,8 @@ insert_mov(nir_alu_instr *vec, unsigned start_idx, nir_shader *shader)
-       }
-    }
- 
-+   unsigned channels_handled = mov->dest.write_mask;
-+
-    /* In some situations (if the vecN is involved in a phi-web), we can end
-     * up with a mov from a register to itself.  Some of those channels may end
-     * up doing nothing and there's no reason to have them as part of the mov.
-@@ -103,7 +105,7 @@ insert_mov(nir_alu_instr *vec, unsigned start_idx, nir_shader *shader)
-       ralloc_free(mov);
-    }
- 
--   return mov->dest.write_mask;
-+   return channels_handled;
- }
- 
- static bool
--- 
-2.4.10
-

diff --git a/media-libs/mesa/mesa-11.1.2-r1.ebuild b/media-libs/mesa/mesa-11.1.2-r1.ebuild
deleted file mode 100644
index 09284a7..0000000
--- a/media-libs/mesa/mesa-11.1.2-r1.ebuild
+++ /dev/null
@@ -1,464 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa"
-
-if [[ ${PV} = 9999 ]]; then
-	GIT_ECLASS="git-r3"
-	EXPERIMENTAL="true"
-fi
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit autotools multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
-
-OPENGL_DIR="xorg-x11"
-
-MY_P="${P/_/-}"
-FOLDER="${PV/_rc*/}"
-
-DESCRIPTION="OpenGL-like graphic library for Linux"
-HOMEPAGE="http://mesa3d.sourceforge.net/"
-
-if [[ $PV == 9999 ]]; then
-	SRC_URI=""
-	KEYWORDS=""
-else
-	SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-RESTRICT="!bindist? ( bindist )"
-
-INTEL_CARDS="i915 i965 ilo intel"
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
-VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno nouveau 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 +llvm
-	+nptl opencl osmesa pax_kernel openmax pic selinux +udev vaapi vdpau
-	wayland xvmc xa kernel_FreeBSD"
-
-REQUIRED_USE="
-	d3d9?   ( dri3 gallium )
-	llvm?   ( gallium )
-	opencl? ( gallium llvm )
-	openmax? ( gallium )
-	gles1?  ( egl )
-	gles2?  ( egl )
-	vaapi? ( gallium )
-	vdpau? ( gallium )
-	wayland? ( egl gbm )
-	xa?  ( gallium )
-	video_cards_freedreno?  ( gallium )
-	video_cards_intel?  ( classic )
-	video_cards_i915?   ( || ( classic gallium ) )
-	video_cards_i965?   ( classic )
-	video_cards_ilo?    ( gallium )
-	video_cards_nouveau? ( || ( classic gallium ) )
-	video_cards_radeon? ( || ( classic gallium )
-						  gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
-	video_cards_r100?   ( classic )
-	video_cards_r200?   ( classic )
-	video_cards_r300?   ( gallium x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_r600?   ( gallium )
-	video_cards_radeonsi?   ( gallium llvm )
-	video_cards_vmware? ( gallium )
-	${PYTHON_REQUIRED_USE}
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.64"
-# keep correct libdrm and dri2proto dep
-# keep blocks in rdepend for binpkg
-RDEPEND="
-	!<x11-base/xorg-server-1.7
-	!<=x11-proto/xf86driproto-2.0.3
-	abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
-	classic? ( app-eselect/eselect-mesa )
-	gallium? ( app-eselect/eselect-mesa )
-	>=app-eselect/eselect-opengl-1.3.0
-	udev? ( kernel_linux? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) )
-	>=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
-	x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
-	llvm? ( !kernel_FreeBSD? (
-		video_cards_radeonsi? ( || (
-			>=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
-			>=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
-			) )
-		!video_cards_r600? (
-			video_cards_radeon? ( || (
-				>=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
-				>=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
-				) )
-		) )
-		>=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
-		<sys-devel/llvm-3.8
-	)
-	opencl? (
-				app-eselect/eselect-opencl
-				dev-libs/libclc
-				!kernel_FreeBSD? ( || (
-					>=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
-					>=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
-				) )
-			)
-	openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
-	vaapi? ( >=x11-libs/libva-1.6.0:=[${MULTILIB_USEDEP}] )
-	vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
-	wayland? ( >=dev-libs/wayland-1.2.0:=[${MULTILIB_USEDEP}] )
-	xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
-	${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vmware?,${MULTILIB_USEDEP}]
-"
-for card in ${INTEL_CARDS}; do
-	RDEPEND="${RDEPEND}
-		video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
-	"
-done
-
-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] )
-"
-
-DEPEND="${RDEPEND}
-	llvm? (
-		video_cards_radeonsi? ( sys-devel/llvm[video_cards_radeon] )
-	)
-	opencl? (
-				>=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
-				>=sys-devel/clang-3.4.2:=[${MULTILIB_USEDEP}]
-				>=sys-devel/gcc-4.6
-	)
-	sys-devel/gettext
-	virtual/pkgconfig
-	>=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
-	dri3? (
-		>=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
-		>=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
-	)
-	>=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
-	>=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
-	>=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
-	>=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
-"
-[[ ${PV} == 9999 ]] && DEPEND+="
-	sys-devel/bison
-	sys-devel/flex
-	${PYTHON_DEPS}
-	$(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
-	)
-)"
-
-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
-
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	epatch "${FILESDIR}"/${PN}-11.1.2-i965-fix-use-after-free.patch
-
-	[[ ${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-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
-	fi
-
-	if use gallium; then
-		myconf+="
-			$(use_enable d3d9 nine)
-			$(use_enable llvm gallium-llvm)
-			$(use_enable openmax omx)
-			$(use_enable vaapi va)
-			$(use_enable vdpau)
-			$(use_enable xa)
-			$(use_enable xvmc)
-		"
-		use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
-
-		gallium_enable swrast
-		gallium_enable video_cards_vmware svga
-		gallium_enable video_cards_nouveau nouveau
-		gallium_enable video_cards_i915 i915
-		gallium_enable video_cards_ilo ilo
-		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
-	fi
-
-	# x86 hardened pax_kernel needs glx-read-only-text, 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
-
-	# 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 osmesa) \
-		$(use_enable !udev sysfs) \
-		--enable-llvm-shared-libs \
-		--with-dri-drivers=${DRI_DRIVERS} \
-		--with-gallium-drivers=${GALLIUM_DRIVERS} \
-		PYTHON2="${PYTHON}" \
-		${myconf}
-}
-
-multilib_src_install() {
-	emake install DESTDIR="${D}"
-
-	if use classic || use gallium; then
-			ebegin "Moving DRI/Gallium drivers for dynamic switching"
-			local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
-			keepdir /usr/$(get_libdir)/dri
-			dodir /usr/$(get_libdir)/mesa
-			for x in ${gallium_drivers[@]}; do
-				if [ -f "$(get_libdir)/gallium/${x}" ]; then
-					mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
-						|| die "Failed to move ${x}"
-				fi
-			done
-			if use classic; then
-				emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
-			fi
-			for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
-				if [ -f ${x} -o -L ${x} ]; then
-					mv -f "${x}" "${x/dri/mesa}" \
-						|| die "Failed to move ${x}"
-				fi
-			done
-			pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
-			ln -s ../mesa/*.so . || die "Creating symlink failed"
-			# remove symlinks to drivers known to eselect
-			for x in ${gallium_drivers[@]}; do
-				if [ -f ${x} -o -L ${x} ]; then
-					rm "${x}" || die "Failed to remove ${x}"
-				fi
-			done
-			popd
-		eend $?
-	fi
-	if use opencl; then
-		ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
-		local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
-		dodir ${cl_dir}/{lib,include}
-		if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
-			mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
-			"${ED}"${cl_dir}
-		fi
-		if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
-			mv -f "${ED}"/usr/include/CL \
-			"${ED}"${cl_dir}/include
-		fi
-		eend $?
-	fi
-
-	if use openmax; then
-		echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
-		doenvd "${T}"/99mesaxdgomx
-		keepdir /usr/share/mesa/xdg
-	fi
-}
-
-multilib_src_install_all() {
-	prune_libtool_files --all
-	einstalldocs
-
-	if use !bindist; then
-		dodoc docs/patents.txt
-	fi
-
-	# Install config file for eselect mesa
-	insinto /usr/share/mesa
-	newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
-}
-
-multilib_src_test() {
-	if use llvm; then
-		local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
-		pushd src/gallium/drivers/llvmpipe >/dev/null || die
-		emake ${llvm_tests}
-		pax-mark m ${llvm_tests}
-		popd >/dev/null || die
-	fi
-	emake check
-}
-
-pkg_postinst() {
-	# Switch to the xorg implementation.
-	echo
-	eselect opengl set --use-old ${OPENGL_DIR}
-
-	# Select classic/gallium drivers
-	if use classic || use gallium; then
-		eselect mesa set --auto
-	fi
-
-	# Switch to mesa opencl
-	if use opencl; then
-		eselect opencl set --use-old ${PN}
-	fi
-
-	# run omxregister-bellagio to make the OpenMAX drivers known system-wide
-	if use openmax; then
-		ebegin "Registering OpenMAX drivers"
-		BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
-			OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
-			omxregister-bellagio
-		eend $?
-	fi
-
-	# warn about patent encumbered texture-float
-	if use !bindist; then
-		elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
-		elog "enabled. Please see patents.txt for an explanation."
-	fi
-
-	if ! has_version media-libs/libtxc_dxtn; then
-		elog "Note that in order to have full S3TC support, it is necessary to install"
-		elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
-		elog "textures in some apps, and some others even require this to run."
-	fi
-}
-
-pkg_prerm() {
-	if use openmax; then
-		rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
-	fi
-}
-
-# $1 - VIDEO_CARDS flag
-# other args - names of DRI drivers to enable
-# TODO: avoid code duplication for a more elegant implementation
-driver_enable() {
-	case $# in
-		# for enabling unconditionally
-		1)
-			DRI_DRIVERS+=",$1"
-			;;
-		*)
-			if use $1; then
-				shift
-				for i in $@; do
-					DRI_DRIVERS+=",${i}"
-				done
-			fi
-			;;
-	esac
-}
-
-gallium_enable() {
-	case $# in
-		# for enabling unconditionally
-		1)
-			GALLIUM_DRIVERS+=",$1"
-			;;
-		*)
-			if use $1; then
-				shift
-				for i in $@; do
-					GALLIUM_DRIVERS+=",${i}"
-				done
-			fi
-			;;
-	esac
-}

diff --git a/media-libs/mesa/mesa-11.2.0.ebuild b/media-libs/mesa/mesa-11.2.0.ebuild
deleted file mode 100644
index 6c2c4eb..0000000
--- a/media-libs/mesa/mesa-11.2.0.ebuild
+++ /dev/null
@@ -1,467 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa"
-
-if [[ ${PV} = 9999 ]]; then
-	GIT_ECLASS="git-r3"
-	EXPERIMENTAL="true"
-fi
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit autotools multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
-
-OPENGL_DIR="xorg-x11"
-
-MY_P="${P/_/-}"
-FOLDER="${PV/_rc*/}"
-
-DESCRIPTION="OpenGL-like graphic library for Linux"
-HOMEPAGE="http://mesa3d.sourceforge.net/"
-
-if [[ $PV == 9999 ]]; then
-	SRC_URI=""
-	KEYWORDS=""
-else
-	SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-RESTRICT="!bindist? ( bindist )"
-
-INTEL_CARDS="i915 i965 ilo intel"
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
-VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno nouveau 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 +llvm
-	+nptl opencl osmesa pax_kernel openmax pic selinux +udev vaapi vdpau
-	wayland xvmc xa kernel_FreeBSD"
-
-REQUIRED_USE="
-	d3d9?   ( dri3 gallium )
-	llvm?   ( gallium )
-	opencl? ( gallium llvm )
-	openmax? ( gallium )
-	gles1?  ( egl )
-	gles2?  ( egl )
-	vaapi? ( gallium )
-	vdpau? ( gallium )
-	wayland? ( egl gbm )
-	xa?  ( gallium )
-	video_cards_freedreno?  ( gallium )
-	video_cards_intel?  ( classic )
-	video_cards_i915?   ( || ( classic gallium ) )
-	video_cards_i965?   ( classic )
-	video_cards_ilo?    ( gallium )
-	video_cards_nouveau? ( || ( classic gallium ) )
-	video_cards_radeon? ( || ( classic gallium )
-						  gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
-	video_cards_r100?   ( classic )
-	video_cards_r200?   ( classic )
-	video_cards_r300?   ( gallium x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_r600?   ( gallium )
-	video_cards_radeonsi?   ( gallium llvm )
-	video_cards_vmware? ( gallium )
-	${PYTHON_REQUIRED_USE}
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.67"
-# keep correct libdrm and dri2proto dep
-# keep blocks in rdepend for binpkg
-RDEPEND="
-	!<x11-base/xorg-server-1.7
-	!<=x11-proto/xf86driproto-2.0.3
-	abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
-	classic? ( app-eselect/eselect-mesa )
-	gallium? ( app-eselect/eselect-mesa )
-	>=app-eselect/eselect-opengl-1.3.0
-	udev? ( kernel_linux? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) )
-	>=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
-	x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
-	llvm? ( !kernel_FreeBSD? (
-		video_cards_radeonsi? ( || (
-			>=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
-			>=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
-			) )
-		!video_cards_r600? (
-			video_cards_radeon? ( || (
-				>=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
-				>=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
-				) )
-		) )
-		>=sys-devel/llvm-3.6.0:=[${MULTILIB_USEDEP}]
-	)
-	opencl? (
-				app-eselect/eselect-opencl
-				dev-libs/libclc
-				!kernel_FreeBSD? ( || (
-					>=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
-					>=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
-				) )
-			)
-	openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
-	vaapi? ( >=x11-libs/libva-1.6.0:=[${MULTILIB_USEDEP}] )
-	vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
-	wayland? ( >=dev-libs/wayland-1.2.0:=[${MULTILIB_USEDEP}] )
-	xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
-	${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vmware?,${MULTILIB_USEDEP}]
-"
-for card in ${INTEL_CARDS}; do
-	RDEPEND="${RDEPEND}
-		video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
-	"
-done
-
-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] )
-"
-
-DEPEND="${RDEPEND}
-	llvm? (
-		video_cards_radeonsi? ( sys-devel/llvm[video_cards_radeon] )
-	)
-	opencl? (
-				>=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
-				>=sys-devel/clang-3.4.2:=[${MULTILIB_USEDEP}]
-				>=sys-devel/gcc-4.6
-	)
-	sys-devel/gettext
-	virtual/pkgconfig
-	>=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
-	dri3? (
-		>=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
-		>=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
-	)
-	>=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
-	>=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
-	>=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
-	>=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
-"
-[[ ${PV} == 9999 ]] && DEPEND+="
-	sys-devel/bison
-	sys-devel/flex
-	${PYTHON_DEPS}
-	$(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
-	)
-)"
-
-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
-
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	[[ ${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-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
-	fi
-
-	if use gallium; then
-		myconf+="
-			$(use_enable d3d9 nine)
-			$(use_enable llvm gallium-llvm)
-			$(use_enable openmax omx)
-			$(use_enable vaapi va)
-			$(use_enable vdpau)
-			$(use_enable xa)
-			$(use_enable xvmc)
-		"
-		use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
-
-		gallium_enable swrast
-		gallium_enable video_cards_vmware svga
-		gallium_enable video_cards_nouveau nouveau
-		gallium_enable video_cards_i915 i915
-		gallium_enable video_cards_ilo ilo
-		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
-	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 \
-		--disable-shader-cache \
-		$(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 !udev sysfs) \
-		--enable-llvm-shared-libs \
-		--with-dri-drivers=${DRI_DRIVERS} \
-		--with-gallium-drivers=${GALLIUM_DRIVERS} \
-		PYTHON2="${PYTHON}" \
-		${myconf}
-}
-
-multilib_src_install() {
-	emake install DESTDIR="${D}"
-
-	if use classic || use gallium; then
-			ebegin "Moving DRI/Gallium drivers for dynamic switching"
-			local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
-			keepdir /usr/$(get_libdir)/dri
-			dodir /usr/$(get_libdir)/mesa
-			for x in ${gallium_drivers[@]}; do
-				if [ -f "$(get_libdir)/gallium/${x}" ]; then
-					mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
-						|| die "Failed to move ${x}"
-				fi
-			done
-			if use classic; then
-				emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
-			fi
-			for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
-				if [ -f ${x} -o -L ${x} ]; then
-					mv -f "${x}" "${x/dri/mesa}" \
-						|| die "Failed to move ${x}"
-				fi
-			done
-			pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
-			ln -s ../mesa/*.so . || die "Creating symlink failed"
-			# remove symlinks to drivers known to eselect
-			for x in ${gallium_drivers[@]}; do
-				if [ -f ${x} -o -L ${x} ]; then
-					rm "${x}" || die "Failed to remove ${x}"
-				fi
-			done
-			popd
-		eend $?
-	fi
-	if use opencl; then
-		ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
-		local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
-		dodir ${cl_dir}/{lib,include}
-		if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
-			mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
-			"${ED}"${cl_dir}
-		fi
-		if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
-			mv -f "${ED}"/usr/include/CL \
-			"${ED}"${cl_dir}/include
-		fi
-		eend $?
-	fi
-
-	if use openmax; then
-		echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
-		doenvd "${T}"/99mesaxdgomx
-		keepdir /usr/share/mesa/xdg
-	fi
-}
-
-multilib_src_install_all() {
-	prune_libtool_files --all
-	einstalldocs
-
-	if use !bindist; then
-		dodoc docs/patents.txt
-	fi
-
-	# Install config file for eselect mesa
-	insinto /usr/share/mesa
-	newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
-}
-
-multilib_src_test() {
-	if use llvm; then
-		local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
-		pushd src/gallium/drivers/llvmpipe >/dev/null || die
-		emake ${llvm_tests}
-		pax-mark m ${llvm_tests}
-		popd >/dev/null || die
-	fi
-	emake check
-}
-
-pkg_postinst() {
-	# Switch to the xorg implementation.
-	echo
-	eselect opengl set --use-old ${OPENGL_DIR}
-
-	# Select classic/gallium drivers
-	if use classic || use gallium; then
-		eselect mesa set --auto
-	fi
-
-	# Switch to mesa opencl
-	if use opencl; then
-		eselect opencl set --use-old ${PN}
-	fi
-
-	# run omxregister-bellagio to make the OpenMAX drivers known system-wide
-	if use openmax; then
-		ebegin "Registering OpenMAX drivers"
-		BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
-			OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
-			omxregister-bellagio
-		eend $?
-	fi
-
-	# warn about patent encumbered texture-float
-	if use !bindist; then
-		elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
-		elog "enabled. Please see patents.txt for an explanation."
-	fi
-
-	if ! has_version media-libs/libtxc_dxtn; then
-		elog "Note that in order to have full S3TC support, it is necessary to install"
-		elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
-		elog "textures in some apps, and some others even require this to run."
-	fi
-}
-
-pkg_prerm() {
-	if use openmax; then
-		rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
-	fi
-}
-
-# $1 - VIDEO_CARDS flag
-# other args - names of DRI drivers to enable
-# TODO: avoid code duplication for a more elegant implementation
-driver_enable() {
-	case $# in
-		# for enabling unconditionally
-		1)
-			DRI_DRIVERS+=",$1"
-			;;
-		*)
-			if use $1; then
-				shift
-				for i in $@; do
-					DRI_DRIVERS+=",${i}"
-				done
-			fi
-			;;
-	esac
-}
-
-gallium_enable() {
-	case $# in
-		# for enabling unconditionally
-		1)
-			GALLIUM_DRIVERS+=",$1"
-			;;
-		*)
-			if use $1; then
-				shift
-				for i in $@; do
-					GALLIUM_DRIVERS+=",${i}"
-				done
-			fi
-			;;
-	esac
-}


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2016-08-01  4:34 Mike Frysinger
  0 siblings, 0 replies; 16+ messages in thread
From: Mike Frysinger @ 2016-08-01  4:34 UTC (permalink / raw
  To: gentoo-commits

commit:     4d2930abce11997e17fe986ae1827f7dd75b3a56
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Mon Aug  1 04:29:23 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Mon Aug  1 04:29:23 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d2930ab

media-libs/mesa: fix build w/newer glibc #580392

 media-libs/mesa/files/mesa-12.0-sysmacros.patch | 43 +++++++++++++++++++++++++
 media-libs/mesa/mesa-12.0.1.ebuild              |  1 +
 2 files changed, 44 insertions(+)

diff --git a/media-libs/mesa/files/mesa-12.0-sysmacros.patch b/media-libs/mesa/files/mesa-12.0-sysmacros.patch
new file mode 100644
index 0000000..d4b0679
--- /dev/null
+++ b/media-libs/mesa/files/mesa-12.0-sysmacros.patch
@@ -0,0 +1,43 @@
+https://bugs.gentoo.org/580392
+
+fixed in upstream here:
+	https://cgit.freedesktop.org/mesa/mesa/commit/?id=20553e4a2d952f6dc37f40f63d2c86b0718c58f9
+
+this is a hack for the 12.0 branch
+
+--- a/src/gallium/winsys/svga/drm/vmw_screen.c
++++ b/src/gallium/winsys/svga/drm/vmw_screen.c
+@@ -31,6 +31,9 @@
+ #include "pipe/p_compiler.h"
+ #include "util/u_hash_table.h"
+ #include <sys/types.h>
++#ifdef __linux__
++#include <sys/sysmacros.h>
++#endif
+ #include <sys/stat.h>
+ #include <unistd.h>
+ 
+--- a/src/gbm/main/gbm.c
++++ b/src/gbm/main/gbm.c
+@@ -31,6 +31,9 @@
+ #include <stdint.h>
+ 
+ #include <sys/types.h>
++#ifdef __linux__
++#include <sys/sysmacros.h>
++#endif
+ #include <sys/stat.h>
+ #include <unistd.h>
+ #include <errno.h>
+--- a/src/loader/loader.c
++++ b/src/loader/loader.c
+@@ -80,6 +80,9 @@
+ #include "xmlpool.h"
+ #endif
+ #endif
++#ifdef __linux__
++#include <sys/sysmacros.h>
++#endif
+ #ifdef HAVE_SYSFS
+ #include <sys/types.h>
+ #endif

diff --git a/media-libs/mesa/mesa-12.0.1.ebuild b/media-libs/mesa/mesa-12.0.1.ebuild
index 3d273ed..ff35a80 100644
--- a/media-libs/mesa/mesa-12.0.1.ebuild
+++ b/media-libs/mesa/mesa-12.0.1.ebuild
@@ -186,6 +186,7 @@ pkg_setup() {
 
 src_prepare() {
 	[[ ${PV} == 9999 ]] && eautoreconf
+	epatch "${FILESDIR}"/${PN}-12.0-sysmacros.patch #580392
 }
 
 multilib_src_configure() {


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2016-11-15 14:32 Michał Górny
  0 siblings, 0 replies; 16+ messages in thread
From: Michał Górny @ 2016-11-15 14:32 UTC (permalink / raw
  To: gentoo-commits

commit:     266fbd96dfbed56ec1737de331a33fccfe4ad030
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 13 10:08:11 2016 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Nov 15 14:31:53 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=266fbd96

media-libs/mesa: Drop old

 media-libs/mesa/Manifest                           |    1 -
 media-libs/mesa/files/glx_ro_text_segm.patch       |   28 -
 .../mesa-10.2-dont-require-llvm-for-r300.patch     |   11 -
 .../mesa/files/mesa-10.3.7-dont-use-clrsb.patch    |   36 -
 .../mesa/files/mesa-10.3.7-format_utils.c.patch    | 1089 --------------------
 .../mesa/files/mesa-10.5.1-fstat-include.patch     |   37 -
 media-libs/mesa/mesa-10.3.7-r1.ebuild              |  523 ----------
 media-libs/mesa/metadata.xml                       |    1 -
 8 files changed, 1726 deletions(-)

diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
index c8c3d33..71596a3 100644
--- a/media-libs/mesa/Manifest
+++ b/media-libs/mesa/Manifest
@@ -1,4 +1,3 @@
-DIST MesaLib-10.3.7.tar.bz2 7287153 SHA256 43c6ced15e237cbb21b3082d7c0b42777c50c1f731d0d4b5efb5231063fb6a5b SHA512 bbc027c4146c42aaa160990f5281c71a342d32c10ba56f91da1a60dd4cb7d620ff49b72553d24bc1d87470e2baf9be81b5bdee9abe49d6acc57902fccb9e2e5f WHIRLPOOL 7fa32e70c6aabb84a06f2f852f77eac839aea08726c442742b3d3abdb94a0fd9f033439ab0cb16865f4ee14e1538cb86937856bbdfd1f9090e8e7c43eac52e03
 DIST mesa-11.0.6.tar.xz 7272972 SHA256 8340e64cdc91999840404c211496f3de38e7b4cb38db34e2f72f1642c5134760 SHA512 946a66803395ef0f4d3b328e981e03a87bb5173a523be5da1dd3363002fceacd8dcbfdbf9716e31bb4247b23cc5ef112b24bb4ef0709b514bc8160c6cbf1dbf3 WHIRLPOOL 19729acb5fbbcff3a99b4d7644750dff4a7a2d41c3f25f2e004938faf0c72abd33e97f5d23d2804f84b957824757b5f64f3a7f54a2dd8999b2a71eb9b1976e0b
 DIST mesa-11.0.9.tar.xz 7282648 SHA256 a1262ff1c66a16ccf341186cf0e57b306b8589eb2cc5ce92ffb6788ab01d2b01 SHA512 8bf9c3bfe61f5d22182b9611d66051d83dfb302cc349921bc1d895acc8681b3e22e77cb360e2f12383fd928793b306f8f98998caa457dc04e3ff4e5561ea78f7 WHIRLPOOL a3477542b5ebfed9b69bd29e7f58a01b02c70d49399afb873744de08e776d712eaca3443f88dbdee25b1d3d35a4eb9dae75a3b9d7d6d652d41cded763836c59a
 DIST mesa-11.1.4.tar.xz 7570840 SHA256 0f781e9072655305f576efd4204d183bf99ac8cb8d9e0dd9fc2b4093230a0eba SHA512 ee83649eb30d0545e0ee950e8a23791c7e4faa01125e9d39fe9ab474cc2813bc7c813b35ce261e837e7c5189fdb3446f5413317ed8663fbdb1083e1d04944ebd WHIRLPOOL d36921620d401cacfb985d66172519b5abcbeb85b2cceac69170139193cd13fda565dffc13858d39e073ea89c4affb4e3960b6013a19247be4e05aa0750d3e55

diff --git a/media-libs/mesa/files/glx_ro_text_segm.patch b/media-libs/mesa/files/glx_ro_text_segm.patch
deleted file mode 100644
index 495b7dc..00000000
--- a/media-libs/mesa/files/glx_ro_text_segm.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-2011-02-09	Jeremy Huddleston <jeremyhu@freedesktop.org
-
-	#240956
-	* configure.ac	add support to enable readonly test segment on x86
-
---- configure.ac.orig	2008-11-17 23:19:38.000000000 +0100
-+++ configure.ac	2008-11-17 23:20:17.000000000 +0100
-@@ -499,6 +499,20 @@
-     enable_xcb=no
- fi
- 
-+
-+dnl readonly text segment on x86 hardened platforms
-+AC_ARG_ENABLE([glx_rts],
-+    [AS_HELP_STRING([--enable-glx-rts],
-+        [on x86, use a readonly text segment for libGL @<:@default=disabled@:>@])],
-+    [enable_glx_rts="$enableval"],
-+    [enable_glx_rts=no])
-+if test "x$enable_glx_rts" = xyes; then
-+    DEFINES="$DEFINES -DGLX_X86_READONLY_TEXT"
-+else
-+    enable_glx_rts=no
-+fi
-+
-+
- dnl
- dnl libGL configuration per driver
- dnl

diff --git a/media-libs/mesa/files/mesa-10.2-dont-require-llvm-for-r300.patch b/media-libs/mesa/files/mesa-10.2-dont-require-llvm-for-r300.patch
deleted file mode 100644
index a85a3c1..00000000
--- a/media-libs/mesa/files/mesa-10.2-dont-require-llvm-for-r300.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -Naur a/configure.ac b/configure.ac
---- a/configure.ac	2014-03-03 04:05:33.110522943 +0100
-+++ b/configure.ac	2014-03-03 04:06:44.165518094 +0100
-@@ -1774,7 +1774,6 @@
-             HAVE_GALLIUM_R300=yes
-             PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
-             gallium_require_drm_loader
--            gallium_require_llvm "Gallium R300"
-             GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300"
-             gallium_check_st "radeon/drm" "r300/dri" "" "" ""
-             DRICOMMON_NEED_LIBDRM=yes

diff --git a/media-libs/mesa/files/mesa-10.3.7-dont-use-clrsb.patch b/media-libs/mesa/files/mesa-10.3.7-dont-use-clrsb.patch
deleted file mode 100644
index c38757d..00000000
--- a/media-libs/mesa/files/mesa-10.3.7-dont-use-clrsb.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 32e98e8ef06f0bb6ad55f9fb5858be77c03367b0 Mon Sep 17 00:00:00 2001
-From: Matt Turner <mattst88@gmail.com>
-Date: Mon, 2 Feb 2015 17:26:49 -0800
-Subject: [PATCH] gallium/util: Don't use __builtin_clrsb in util_last_bit().
-
-Unclear circumstances lead to undefined symbols on x86.
-
-Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=536916
-Cc: mesa-stable@lists.freedesktop.org
-Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
----
- src/gallium/auxiliary/util/u_math.h | 4 ----
- 1 file changed, 4 deletions(-)
-
-diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h
-index 19c7343..ca6d0f1 100644
---- a/src/gallium/auxiliary/util/u_math.h
-+++ b/src/gallium/auxiliary/util/u_math.h
-@@ -561,14 +561,10 @@ util_last_bit(unsigned u)
- static INLINE unsigned
- util_last_bit_signed(int i)
- {
--#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 407) && !defined(__INTEL_COMPILER)
--   return 31 - __builtin_clrsb(i);
--#else
-    if (i >= 0)
-       return util_last_bit(i);
-    else
-       return util_last_bit(~(unsigned)i);
--#endif
- }
- 
- /* Destructively loop over all of the bits in a mask as in:
--- 
-2.0.4
-

diff --git a/media-libs/mesa/files/mesa-10.3.7-format_utils.c.patch b/media-libs/mesa/files/mesa-10.3.7-format_utils.c.patch
deleted file mode 100644
index e1fba03..00000000
--- a/media-libs/mesa/files/mesa-10.3.7-format_utils.c.patch
+++ /dev/null
@@ -1,1089 +0,0 @@
-From cfeb394224f2daeb2139cf4ec489a4dd8297a44d Mon Sep 17 00:00:00 2001
-From: Brian Paul <brianp@vmware.com>
-Date: Fri, 12 Sep 2014 08:31:15 -0600
-Subject: [PATCH] mesa: break up _mesa_swizzle_and_convert() to reduce compile
- time
-
-This reduces gcc -O3 compile time to 1/4 of what it was on my system.
-Reduces MSVC release build time too.
-
-Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
----
- src/mesa/main/format_utils.c | 1030 ++++++++++++++++++++++--------------------
- 1 file changed, 550 insertions(+), 480 deletions(-)
-
-diff --git a/src/mesa/main/format_utils.c b/src/mesa/main/format_utils.c
-index 240e3bc..29d779a 100644
---- a/src/mesa/main/format_utils.c
-+++ b/src/mesa/main/format_utils.c
-@@ -352,9 +352,14 @@ swizzle_convert_try_memcpy(void *dst, GLenum dst_type, int num_dst_channels,
-  */
- #define SWIZZLE_CONVERT(DST_TYPE, SRC_TYPE, CONV)                 \
-    do {                                                           \
-+      const uint8_t swizzle_x = swizzle[0];                       \
-+      const uint8_t swizzle_y = swizzle[1];                       \
-+      const uint8_t swizzle_z = swizzle[2];                       \
-+      const uint8_t swizzle_w = swizzle[3];                       \
-       const SRC_TYPE *typed_src = void_src;                       \
-       DST_TYPE *typed_dst = void_dst;                             \
-       DST_TYPE tmp[7];                                            \
-+      int s, j;                                                   \
-       tmp[4] = 0;                                                 \
-       tmp[5] = one;                                               \
-       switch (num_dst_channels) {                                 \
-@@ -423,7 +428,527 @@ swizzle_convert_try_memcpy(void *dst, GLenum dst_type, int num_dst_channels,
-          }                                                        \
-          break;                                                   \
-       }                                                           \
--   } while (0);
-+   } while (0)
-+
-+
-+static void
-+convert_float(void *void_dst, int num_dst_channels,
-+              const void *void_src, GLenum src_type, int num_src_channels,
-+              const uint8_t swizzle[4], bool normalized, int count)
-+{
-+   const float one = 1.0f;
-+
-+   switch (src_type) {
-+   case GL_FLOAT:
-+      SWIZZLE_CONVERT(float, float, src);
-+      break;
-+   case GL_HALF_FLOAT:
-+      SWIZZLE_CONVERT(float, uint16_t, _mesa_half_to_float(src));
-+      break;
-+   case GL_UNSIGNED_BYTE:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(float, uint8_t, unorm_to_float(src, 8));
-+      } else {
-+         SWIZZLE_CONVERT(float, uint8_t, src);
-+      }
-+      break;
-+   case GL_BYTE:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(float, int8_t, snorm_to_float(src, 8));
-+      } else {
-+         SWIZZLE_CONVERT(float, int8_t, src);
-+      }
-+      break;
-+   case GL_UNSIGNED_SHORT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(float, uint16_t, unorm_to_float(src, 16));
-+      } else {
-+         SWIZZLE_CONVERT(float, uint16_t, src);
-+      }
-+      break;
-+   case GL_SHORT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(float, int16_t, snorm_to_float(src, 16));
-+      } else {
-+         SWIZZLE_CONVERT(float, int16_t, src);
-+      }
-+      break;
-+   case GL_UNSIGNED_INT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(float, uint32_t, unorm_to_float(src, 32));
-+      } else {
-+         SWIZZLE_CONVERT(float, uint32_t, src);
-+      }
-+      break;
-+   case GL_INT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(float, int32_t, snorm_to_float(src, 32));
-+      } else {
-+         SWIZZLE_CONVERT(float, int32_t, src);
-+      }
-+      break;
-+   default:
-+      assert(!"Invalid channel type combination");
-+   }
-+}
-+
-+
-+static void
-+convert_half_float(void *void_dst, int num_dst_channels,
-+                   const void *void_src, GLenum src_type, int num_src_channels,
-+                   const uint8_t swizzle[4], bool normalized, int count)
-+{
-+   const uint16_t one = _mesa_float_to_half(1.0f);
-+
-+   switch (src_type) {
-+   case GL_FLOAT:
-+      SWIZZLE_CONVERT(uint16_t, float, _mesa_float_to_half(src));
-+      break;
-+   case GL_HALF_FLOAT:
-+      SWIZZLE_CONVERT(uint16_t, uint16_t, src);
-+      break;
-+   case GL_UNSIGNED_BYTE:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint16_t, uint8_t, unorm_to_half(src, 8));
-+      } else {
-+         SWIZZLE_CONVERT(uint16_t, uint8_t, _mesa_float_to_half(src));
-+      }
-+      break;
-+   case GL_BYTE:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint16_t, int8_t, snorm_to_half(src, 8));
-+      } else {
-+         SWIZZLE_CONVERT(uint16_t, int8_t, _mesa_float_to_half(src));
-+      }
-+      break;
-+   case GL_UNSIGNED_SHORT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint16_t, uint16_t, unorm_to_half(src, 16));
-+      } else {
-+         SWIZZLE_CONVERT(uint16_t, uint16_t, _mesa_float_to_half(src));
-+      }
-+      break;
-+   case GL_SHORT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint16_t, int16_t, snorm_to_half(src, 16));
-+      } else {
-+         SWIZZLE_CONVERT(uint16_t, int16_t, _mesa_float_to_half(src));
-+      }
-+      break;
-+   case GL_UNSIGNED_INT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint16_t, uint32_t, unorm_to_half(src, 32));
-+      } else {
-+         SWIZZLE_CONVERT(uint16_t, uint32_t, _mesa_float_to_half(src));
-+      }
-+      break;
-+   case GL_INT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint16_t, int32_t, snorm_to_half(src, 32));
-+      } else {
-+         SWIZZLE_CONVERT(uint16_t, int32_t, _mesa_float_to_half(src));
-+      }
-+      break;
-+   default:
-+      assert(!"Invalid channel type combination");
-+   }
-+}
-+
-+
-+static void
-+convert_ubyte(void *void_dst, int num_dst_channels,
-+              const void *void_src, GLenum src_type, int num_src_channels,
-+              const uint8_t swizzle[4], bool normalized, int count)
-+{
-+   const uint8_t one = normalized ? UINT8_MAX : 1;
-+
-+   switch (src_type) {
-+   case GL_FLOAT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint8_t, float, float_to_unorm(src, 8));
-+      } else {
-+         SWIZZLE_CONVERT(uint8_t, float, (src < 0) ? 0 : src);
-+      }
-+      break;
-+   case GL_HALF_FLOAT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint8_t, uint16_t, half_to_unorm(src, 8));
-+      } else {
-+         SWIZZLE_CONVERT(uint8_t, uint16_t, half_to_uint(src));
-+      }
-+      break;
-+   case GL_UNSIGNED_BYTE:
-+      SWIZZLE_CONVERT(uint8_t, uint8_t, src);
-+      break;
-+   case GL_BYTE:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint8_t, int8_t, snorm_to_unorm(src, 8, 8));
-+      } else {
-+         SWIZZLE_CONVERT(uint8_t, int8_t, (src < 0) ? 0 : src);
-+      }
-+      break;
-+   case GL_UNSIGNED_SHORT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint8_t, uint16_t, unorm_to_unorm(src, 16, 8));
-+      } else {
-+         SWIZZLE_CONVERT(uint8_t, uint16_t, src);
-+      }
-+      break;
-+   case GL_SHORT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint8_t, int16_t, snorm_to_unorm(src, 16, 8));
-+      } else {
-+         SWIZZLE_CONVERT(uint8_t, int16_t, (src < 0) ? 0 : src);
-+      }
-+      break;
-+   case GL_UNSIGNED_INT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint8_t, uint32_t, unorm_to_unorm(src, 32, 8));
-+      } else {
-+         SWIZZLE_CONVERT(uint8_t, uint32_t, src);
-+      }
-+      break;
-+   case GL_INT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint8_t, int32_t, snorm_to_unorm(src, 32, 8));
-+      } else {
-+         SWIZZLE_CONVERT(uint8_t, int32_t, (src < 0) ? 0 : src);
-+      }
-+      break;
-+   default:
-+      assert(!"Invalid channel type combination");
-+   }
-+}
-+
-+
-+static void
-+convert_byte(void *void_dst, int num_dst_channels,
-+             const void *void_src, GLenum src_type, int num_src_channels,
-+             const uint8_t swizzle[4], bool normalized, int count)
-+{
-+   const int8_t one = normalized ? INT8_MAX : 1;
-+
-+   switch (src_type) {
-+   case GL_FLOAT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint8_t, float, float_to_snorm(src, 8));
-+      } else {
-+         SWIZZLE_CONVERT(uint8_t, float, src);
-+      }
-+      break;
-+   case GL_HALF_FLOAT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint8_t, uint16_t, half_to_snorm(src, 8));
-+      } else {
-+         SWIZZLE_CONVERT(uint8_t, uint16_t, _mesa_half_to_float(src));
-+      }
-+      break;
-+   case GL_UNSIGNED_BYTE:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(int8_t, uint8_t, unorm_to_snorm(src, 8, 8));
-+      } else {
-+         SWIZZLE_CONVERT(int8_t, uint8_t, src);
-+      }
-+      break;
-+   case GL_BYTE:
-+      SWIZZLE_CONVERT(int8_t, int8_t, src);
-+      break;
-+   case GL_UNSIGNED_SHORT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(int8_t, uint16_t, unorm_to_snorm(src, 16, 8));
-+      } else {
-+         SWIZZLE_CONVERT(int8_t, uint16_t, src);
-+      }
-+      break;
-+   case GL_SHORT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(int8_t, int16_t, snorm_to_snorm(src, 16, 8));
-+      } else {
-+         SWIZZLE_CONVERT(int8_t, int16_t, src);
-+      }
-+      break;
-+   case GL_UNSIGNED_INT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(int8_t, uint32_t, unorm_to_snorm(src, 32, 8));
-+      } else {
-+         SWIZZLE_CONVERT(int8_t, uint32_t, src);
-+      }
-+      break;
-+   case GL_INT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(int8_t, int32_t, snorm_to_snorm(src, 32, 8));
-+      } else {
-+         SWIZZLE_CONVERT(int8_t, int32_t, src);
-+      }
-+      break;
-+   default:
-+      assert(!"Invalid channel type combination");
-+   }
-+}
-+
-+
-+static void
-+convert_ushort(void *void_dst, int num_dst_channels,
-+               const void *void_src, GLenum src_type, int num_src_channels,
-+               const uint8_t swizzle[4], bool normalized, int count)
-+{
-+   const uint16_t one = normalized ? UINT16_MAX : 1;
-+   
-+   switch (src_type) {
-+   case GL_FLOAT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint16_t, float, float_to_unorm(src, 16));
-+      } else {
-+         SWIZZLE_CONVERT(uint16_t, float, (src < 0) ? 0 : src);
-+      }
-+      break;
-+   case GL_HALF_FLOAT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint16_t, uint16_t, half_to_unorm(src, 16));
-+      } else {
-+         SWIZZLE_CONVERT(uint16_t, uint16_t, half_to_uint(src));
-+      }
-+      break;
-+   case GL_UNSIGNED_BYTE:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint16_t, uint8_t, unorm_to_unorm(src, 8, 16));
-+      } else {
-+         SWIZZLE_CONVERT(uint16_t, uint8_t, src);
-+      }
-+      break;
-+   case GL_BYTE:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint16_t, int8_t, snorm_to_unorm(src, 8, 16));
-+      } else {
-+         SWIZZLE_CONVERT(uint16_t, int8_t, (src < 0) ? 0 : src);
-+      }
-+      break;
-+   case GL_UNSIGNED_SHORT:
-+      SWIZZLE_CONVERT(uint16_t, uint16_t, src);
-+      break;
-+   case GL_SHORT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint16_t, int16_t, snorm_to_unorm(src, 16, 16));
-+      } else {
-+         SWIZZLE_CONVERT(uint16_t, int16_t, (src < 0) ? 0 : src);
-+      }
-+      break;
-+   case GL_UNSIGNED_INT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint16_t, uint32_t, unorm_to_unorm(src, 32, 16));
-+      } else {
-+         SWIZZLE_CONVERT(uint16_t, uint32_t, src);
-+      }
-+      break;
-+   case GL_INT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint16_t, int32_t, snorm_to_unorm(src, 32, 16));
-+      } else {
-+         SWIZZLE_CONVERT(uint16_t, int32_t, (src < 0) ? 0 : src);
-+      }
-+      break;
-+   default:
-+      assert(!"Invalid channel type combination");
-+   }
-+}
-+
-+
-+static void
-+convert_short(void *void_dst, int num_dst_channels,
-+              const void *void_src, GLenum src_type, int num_src_channels,
-+              const uint8_t swizzle[4], bool normalized, int count)
-+{
-+   const int16_t one = normalized ? INT16_MAX : 1;
-+
-+   switch (src_type) {
-+   case GL_FLOAT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint16_t, float, float_to_snorm(src, 16));
-+      } else {
-+         SWIZZLE_CONVERT(uint16_t, float, src);
-+      }
-+      break;
-+   case GL_HALF_FLOAT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint16_t, uint16_t, half_to_snorm(src, 16));
-+      } else {
-+         SWIZZLE_CONVERT(uint16_t, uint16_t, _mesa_half_to_float(src));
-+      }
-+      break;
-+   case GL_UNSIGNED_BYTE:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(int16_t, uint8_t, unorm_to_snorm(src, 8, 16));
-+      } else {
-+         SWIZZLE_CONVERT(int16_t, uint8_t, src);
-+      }
-+      break;
-+   case GL_BYTE:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(int16_t, int8_t, snorm_to_snorm(src, 8, 16));
-+      } else {
-+         SWIZZLE_CONVERT(int16_t, int8_t, src);
-+      }
-+      break;
-+   case GL_UNSIGNED_SHORT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(int16_t, uint16_t, unorm_to_snorm(src, 16, 16));
-+      } else {
-+         SWIZZLE_CONVERT(int16_t, uint16_t, src);
-+      }
-+      break;
-+   case GL_SHORT:
-+      SWIZZLE_CONVERT(int16_t, int16_t, src);
-+      break;
-+   case GL_UNSIGNED_INT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(int16_t, uint32_t, unorm_to_snorm(src, 32, 16));
-+      } else {
-+         SWIZZLE_CONVERT(int16_t, uint32_t, src);
-+      }
-+      break;
-+   case GL_INT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(int16_t, int32_t, snorm_to_snorm(src, 32, 16));
-+      } else {
-+         SWIZZLE_CONVERT(int16_t, int32_t, src);
-+      }
-+      break;
-+   default:
-+      assert(!"Invalid channel type combination");
-+   }
-+}
-+
-+static void
-+convert_uint(void *void_dst, int num_dst_channels,
-+             const void *void_src, GLenum src_type, int num_src_channels,
-+             const uint8_t swizzle[4], bool normalized, int count)
-+{
-+   const uint32_t one = normalized ? UINT32_MAX : 1;
-+
-+   switch (src_type) {
-+   case GL_FLOAT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint32_t, float, float_to_unorm(src, 32));
-+      } else {
-+         SWIZZLE_CONVERT(uint32_t, float, (src < 0) ? 0 : src);
-+      }
-+      break;
-+   case GL_HALF_FLOAT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint32_t, uint16_t, half_to_unorm(src, 32));
-+      } else {
-+         SWIZZLE_CONVERT(uint32_t, uint16_t, half_to_uint(src));
-+      }
-+      break;
-+   case GL_UNSIGNED_BYTE:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint32_t, uint8_t, unorm_to_unorm(src, 8, 32));
-+      } else {
-+         SWIZZLE_CONVERT(uint32_t, uint8_t, src);
-+      }
-+      break;
-+   case GL_BYTE:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint32_t, int8_t, snorm_to_unorm(src, 8, 32));
-+      } else {
-+         SWIZZLE_CONVERT(uint32_t, int8_t, (src < 0) ? 0 : src);
-+      }
-+      break;
-+   case GL_UNSIGNED_SHORT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint32_t, uint16_t, unorm_to_unorm(src, 16, 32));
-+      } else {
-+         SWIZZLE_CONVERT(uint32_t, uint16_t, src);
-+      }
-+      break;
-+   case GL_SHORT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint32_t, int16_t, snorm_to_unorm(src, 16, 32));
-+      } else {
-+         SWIZZLE_CONVERT(uint32_t, int16_t, (src < 0) ? 0 : src);
-+      }
-+      break;
-+   case GL_UNSIGNED_INT:
-+      SWIZZLE_CONVERT(uint32_t, uint32_t, src);
-+      break;
-+   case GL_INT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint32_t, int32_t, snorm_to_unorm(src, 32, 32));
-+      } else {
-+         SWIZZLE_CONVERT(uint32_t, int32_t, (src < 0) ? 0 : src);
-+      }
-+      break;
-+   default:
-+      assert(!"Invalid channel type combination");
-+   }
-+}
-+
-+
-+static void
-+convert_int(void *void_dst, int num_dst_channels,
-+            const void *void_src, GLenum src_type, int num_src_channels,
-+            const uint8_t swizzle[4], bool normalized, int count)
-+{
-+   const int32_t one = normalized ? INT32_MAX : 12;
-+
-+   switch (src_type) {
-+   case GL_FLOAT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint32_t, float, float_to_snorm(src, 32));
-+      } else {
-+         SWIZZLE_CONVERT(uint32_t, float, src);
-+      }
-+      break;
-+   case GL_HALF_FLOAT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(uint32_t, uint16_t, half_to_snorm(src, 32));
-+      } else {
-+         SWIZZLE_CONVERT(uint32_t, uint16_t, _mesa_half_to_float(src));
-+      }
-+      break;
-+   case GL_UNSIGNED_BYTE:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(int32_t, uint8_t, unorm_to_snorm(src, 8, 32));
-+      } else {
-+         SWIZZLE_CONVERT(int32_t, uint8_t, src);
-+      }
-+      break;
-+   case GL_BYTE:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(int32_t, int8_t, snorm_to_snorm(src, 8, 32));
-+      } else {
-+         SWIZZLE_CONVERT(int32_t, int8_t, src);
-+      }
-+      break;
-+   case GL_UNSIGNED_SHORT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(int32_t, uint16_t, unorm_to_snorm(src, 16, 32));
-+      } else {
-+         SWIZZLE_CONVERT(int32_t, uint16_t, src);
-+      }
-+      break;
-+   case GL_SHORT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(int32_t, int16_t, snorm_to_snorm(src, 16, 32));
-+      } else {
-+         SWIZZLE_CONVERT(int32_t, int16_t, src);
-+      }
-+      break;
-+   case GL_UNSIGNED_INT:
-+      if (normalized) {
-+         SWIZZLE_CONVERT(int32_t, uint32_t, unorm_to_snorm(src, 32, 32));
-+      } else {
-+         SWIZZLE_CONVERT(int32_t, uint32_t, src);
-+      }
-+      break;
-+   case GL_INT:
-+      SWIZZLE_CONVERT(int32_t, int32_t, src);
-+      break;
-+   default:
-+      assert(!"Invalid channel type combination");
-+   }
-+}
-+
- 
- /**
-  * Convert between array-based color formats.
-@@ -478,499 +1003,44 @@ _mesa_swizzle_and_convert(void *void_dst, GLenum dst_type, int num_dst_channels,
-                           const void *void_src, GLenum src_type, int num_src_channels,
-                           const uint8_t swizzle[4], bool normalized, int count)
- {
--   int s, j;
--   register uint8_t swizzle_x, swizzle_y, swizzle_z, swizzle_w;
--
-    if (swizzle_convert_try_memcpy(void_dst, dst_type, num_dst_channels,
-                                   void_src, src_type, num_src_channels,
-                                   swizzle, normalized, count))
-       return;
- 
--   swizzle_x = swizzle[0];
--   swizzle_y = swizzle[1];
--   swizzle_z = swizzle[2];
--   swizzle_w = swizzle[3];
--
-    switch (dst_type) {
-    case GL_FLOAT:
--   {
--      const float one = 1.0f;
--      switch (src_type) {
--      case GL_FLOAT:
--         SWIZZLE_CONVERT(float, float, src)
--         break;
--      case GL_HALF_FLOAT:
--         SWIZZLE_CONVERT(float, uint16_t, _mesa_half_to_float(src))
--         break;
--      case GL_UNSIGNED_BYTE:
--         if (normalized) {
--            SWIZZLE_CONVERT(float, uint8_t, unorm_to_float(src, 8))
--         } else {
--            SWIZZLE_CONVERT(float, uint8_t, src)
--         }
--         break;
--      case GL_BYTE:
--         if (normalized) {
--            SWIZZLE_CONVERT(float, int8_t, snorm_to_float(src, 8))
--         } else {
--            SWIZZLE_CONVERT(float, int8_t, src)
--         }
--         break;
--      case GL_UNSIGNED_SHORT:
--         if (normalized) {
--            SWIZZLE_CONVERT(float, uint16_t, unorm_to_float(src, 16))
--         } else {
--            SWIZZLE_CONVERT(float, uint16_t, src)
--         }
--         break;
--      case GL_SHORT:
--         if (normalized) {
--            SWIZZLE_CONVERT(float, int16_t, snorm_to_float(src, 16))
--         } else {
--            SWIZZLE_CONVERT(float, int16_t, src)
--         }
--         break;
--      case GL_UNSIGNED_INT:
--         if (normalized) {
--            SWIZZLE_CONVERT(float, uint32_t, unorm_to_float(src, 32))
--         } else {
--            SWIZZLE_CONVERT(float, uint32_t, src)
--         }
--         break;
--      case GL_INT:
--         if (normalized) {
--            SWIZZLE_CONVERT(float, int32_t, snorm_to_float(src, 32))
--         } else {
--            SWIZZLE_CONVERT(float, int32_t, src)
--         }
--         break;
--      default:
--         assert(!"Invalid channel type combination");
--      }
--   }
--   break;
-+      convert_float(void_dst, num_dst_channels, void_src, src_type,
-+                    num_src_channels, swizzle, normalized, count);
-+      break;
-    case GL_HALF_FLOAT:
--   {
--      const uint16_t one = _mesa_float_to_half(1.0f);
--      switch (src_type) {
--      case GL_FLOAT:
--         SWIZZLE_CONVERT(uint16_t, float, _mesa_float_to_half(src))
--         break;
--      case GL_HALF_FLOAT:
--         SWIZZLE_CONVERT(uint16_t, uint16_t, src)
--         break;
--      case GL_UNSIGNED_BYTE:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint16_t, uint8_t, unorm_to_half(src, 8))
--         } else {
--            SWIZZLE_CONVERT(uint16_t, uint8_t, _mesa_float_to_half(src))
--         }
--         break;
--      case GL_BYTE:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint16_t, int8_t, snorm_to_half(src, 8))
--         } else {
--            SWIZZLE_CONVERT(uint16_t, int8_t, _mesa_float_to_half(src))
--         }
--         break;
--      case GL_UNSIGNED_SHORT:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint16_t, uint16_t, unorm_to_half(src, 16))
--         } else {
--            SWIZZLE_CONVERT(uint16_t, uint16_t, _mesa_float_to_half(src))
--         }
--         break;
--      case GL_SHORT:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint16_t, int16_t, snorm_to_half(src, 16))
--         } else {
--            SWIZZLE_CONVERT(uint16_t, int16_t, _mesa_float_to_half(src))
--         }
--         break;
--      case GL_UNSIGNED_INT:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint16_t, uint32_t, unorm_to_half(src, 32))
--         } else {
--            SWIZZLE_CONVERT(uint16_t, uint32_t, _mesa_float_to_half(src))
--         }
--         break;
--      case GL_INT:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint16_t, int32_t, snorm_to_half(src, 32))
--         } else {
--            SWIZZLE_CONVERT(uint16_t, int32_t, _mesa_float_to_half(src))
--         }
--         break;
--      default:
--         assert(!"Invalid channel type combination");
--      }
--   }
--   break;
-+      convert_half_float(void_dst, num_dst_channels, void_src, src_type,
-+                    num_src_channels, swizzle, normalized, count);
-+      break;
-    case GL_UNSIGNED_BYTE:
--   {
--      const uint8_t one = normalized ? UINT8_MAX : 1;
--      switch (src_type) {
--      case GL_FLOAT:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint8_t, float, float_to_unorm(src, 8))
--         } else {
--            SWIZZLE_CONVERT(uint8_t, float, (src < 0) ? 0 : src)
--         }
--         break;
--      case GL_HALF_FLOAT:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint8_t, uint16_t, half_to_unorm(src, 8))
--         } else {
--            SWIZZLE_CONVERT(uint8_t, uint16_t, half_to_uint(src))
--         }
--         break;
--      case GL_UNSIGNED_BYTE:
--         SWIZZLE_CONVERT(uint8_t, uint8_t, src)
--         break;
--      case GL_BYTE:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint8_t, int8_t, snorm_to_unorm(src, 8, 8))
--         } else {
--            SWIZZLE_CONVERT(uint8_t, int8_t, (src < 0) ? 0 : src)
--         }
--         break;
--      case GL_UNSIGNED_SHORT:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint8_t, uint16_t, unorm_to_unorm(src, 16, 8))
--         } else {
--            SWIZZLE_CONVERT(uint8_t, uint16_t, src)
--         }
--         break;
--      case GL_SHORT:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint8_t, int16_t, snorm_to_unorm(src, 16, 8))
--         } else {
--            SWIZZLE_CONVERT(uint8_t, int16_t, (src < 0) ? 0 : src)
--         }
--         break;
--      case GL_UNSIGNED_INT:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint8_t, uint32_t, unorm_to_unorm(src, 32, 8))
--         } else {
--            SWIZZLE_CONVERT(uint8_t, uint32_t, src)
--         }
--         break;
--      case GL_INT:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint8_t, int32_t, snorm_to_unorm(src, 32, 8))
--         } else {
--            SWIZZLE_CONVERT(uint8_t, int32_t, (src < 0) ? 0 : src)
--         }
--         break;
--      default:
--         assert(!"Invalid channel type combination");
--      }
--   }
--   break;
-+      convert_ubyte(void_dst, num_dst_channels, void_src, src_type,
-+                    num_src_channels, swizzle, normalized, count);
-+      break;
-    case GL_BYTE:
--   {
--      const int8_t one = normalized ? INT8_MAX : 1;
--      switch (src_type) {
--      case GL_FLOAT:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint8_t, float, float_to_snorm(src, 8))
--         } else {
--            SWIZZLE_CONVERT(uint8_t, float, src)
--         }
--         break;
--      case GL_HALF_FLOAT:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint8_t, uint16_t, half_to_snorm(src, 8))
--         } else {
--            SWIZZLE_CONVERT(uint8_t, uint16_t, _mesa_half_to_float(src))
--         }
--         break;
--      case GL_UNSIGNED_BYTE:
--         if (normalized) {
--            SWIZZLE_CONVERT(int8_t, uint8_t, unorm_to_snorm(src, 8, 8))
--         } else {
--            SWIZZLE_CONVERT(int8_t, uint8_t, src)
--         }
--         break;
--      case GL_BYTE:
--         SWIZZLE_CONVERT(int8_t, int8_t, src)
--         break;
--      case GL_UNSIGNED_SHORT:
--         if (normalized) {
--            SWIZZLE_CONVERT(int8_t, uint16_t, unorm_to_snorm(src, 16, 8))
--         } else {
--            SWIZZLE_CONVERT(int8_t, uint16_t, src)
--         }
--         break;
--      case GL_SHORT:
--         if (normalized) {
--            SWIZZLE_CONVERT(int8_t, int16_t, snorm_to_snorm(src, 16, 8))
--         } else {
--            SWIZZLE_CONVERT(int8_t, int16_t, src)
--         }
--         break;
--      case GL_UNSIGNED_INT:
--         if (normalized) {
--            SWIZZLE_CONVERT(int8_t, uint32_t, unorm_to_snorm(src, 32, 8))
--         } else {
--            SWIZZLE_CONVERT(int8_t, uint32_t, src)
--         }
--         break;
--      case GL_INT:
--         if (normalized) {
--            SWIZZLE_CONVERT(int8_t, int32_t, snorm_to_snorm(src, 32, 8))
--         } else {
--            SWIZZLE_CONVERT(int8_t, int32_t, src)
--         }
--         break;
--      default:
--         assert(!"Invalid channel type combination");
--      }
--   }
--   break;
-+      convert_byte(void_dst, num_dst_channels, void_src, src_type,
-+                   num_src_channels, swizzle, normalized, count);
-+      break;
-    case GL_UNSIGNED_SHORT:
--   {
--      const uint16_t one = normalized ? UINT16_MAX : 1;
--      switch (src_type) {
--      case GL_FLOAT:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint16_t, float, float_to_unorm(src, 16))
--         } else {
--            SWIZZLE_CONVERT(uint16_t, float, (src < 0) ? 0 : src)
--         }
--         break;
--      case GL_HALF_FLOAT:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint16_t, uint16_t, half_to_unorm(src, 16))
--         } else {
--            SWIZZLE_CONVERT(uint16_t, uint16_t, half_to_uint(src))
--         }
--         break;
--      case GL_UNSIGNED_BYTE:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint16_t, uint8_t, unorm_to_unorm(src, 8, 16))
--         } else {
--            SWIZZLE_CONVERT(uint16_t, uint8_t, src)
--         }
--         break;
--      case GL_BYTE:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint16_t, int8_t, snorm_to_unorm(src, 8, 16))
--         } else {
--            SWIZZLE_CONVERT(uint16_t, int8_t, (src < 0) ? 0 : src)
--         }
--         break;
--      case GL_UNSIGNED_SHORT:
--         SWIZZLE_CONVERT(uint16_t, uint16_t, src)
--         break;
--      case GL_SHORT:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint16_t, int16_t, snorm_to_unorm(src, 16, 16))
--         } else {
--            SWIZZLE_CONVERT(uint16_t, int16_t, (src < 0) ? 0 : src)
--         }
--         break;
--      case GL_UNSIGNED_INT:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint16_t, uint32_t, unorm_to_unorm(src, 32, 16))
--         } else {
--            SWIZZLE_CONVERT(uint16_t, uint32_t, src)
--         }
--         break;
--      case GL_INT:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint16_t, int32_t, snorm_to_unorm(src, 32, 16))
--         } else {
--            SWIZZLE_CONVERT(uint16_t, int32_t, (src < 0) ? 0 : src)
--         }
--         break;
--      default:
--         assert(!"Invalid channel type combination");
--      }
--   }
--   break;
-+      convert_ushort(void_dst, num_dst_channels, void_src, src_type,
-+                     num_src_channels, swizzle, normalized, count);
-+      break;
-    case GL_SHORT:
--   {
--      const int16_t one = normalized ? INT16_MAX : 1;
--      switch (src_type) {
--      case GL_FLOAT:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint16_t, float, float_to_snorm(src, 16))
--         } else {
--            SWIZZLE_CONVERT(uint16_t, float, src)
--         }
--         break;
--      case GL_HALF_FLOAT:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint16_t, uint16_t, half_to_snorm(src, 16))
--         } else {
--            SWIZZLE_CONVERT(uint16_t, uint16_t, _mesa_half_to_float(src))
--         }
--         break;
--      case GL_UNSIGNED_BYTE:
--         if (normalized) {
--            SWIZZLE_CONVERT(int16_t, uint8_t, unorm_to_snorm(src, 8, 16))
--         } else {
--            SWIZZLE_CONVERT(int16_t, uint8_t, src)
--         }
--         break;
--      case GL_BYTE:
--         if (normalized) {
--            SWIZZLE_CONVERT(int16_t, int8_t, snorm_to_snorm(src, 8, 16))
--         } else {
--            SWIZZLE_CONVERT(int16_t, int8_t, src)
--         }
--         break;
--      case GL_UNSIGNED_SHORT:
--         if (normalized) {
--            SWIZZLE_CONVERT(int16_t, uint16_t, unorm_to_snorm(src, 16, 16))
--         } else {
--            SWIZZLE_CONVERT(int16_t, uint16_t, src)
--         }
--         break;
--      case GL_SHORT:
--         SWIZZLE_CONVERT(int16_t, int16_t, src)
--         break;
--      case GL_UNSIGNED_INT:
--         if (normalized) {
--            SWIZZLE_CONVERT(int16_t, uint32_t, unorm_to_snorm(src, 32, 16))
--         } else {
--            SWIZZLE_CONVERT(int16_t, uint32_t, src)
--         }
--         break;
--      case GL_INT:
--         if (normalized) {
--            SWIZZLE_CONVERT(int16_t, int32_t, snorm_to_snorm(src, 32, 16))
--         } else {
--            SWIZZLE_CONVERT(int16_t, int32_t, src)
--         }
--         break;
--      default:
--         assert(!"Invalid channel type combination");
--      }
--   }
--   break;
-+      convert_short(void_dst, num_dst_channels, void_src, src_type,
-+                    num_src_channels, swizzle, normalized, count);
-+      break;
-    case GL_UNSIGNED_INT:
--   {
--      const uint32_t one = normalized ? UINT32_MAX : 1;
--      switch (src_type) { case GL_FLOAT:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint32_t, float, float_to_unorm(src, 32))
--         } else {
--            SWIZZLE_CONVERT(uint32_t, float, (src < 0) ? 0 : src)
--         }
--         break;
--      case GL_HALF_FLOAT:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint32_t, uint16_t, half_to_unorm(src, 32))
--         } else {
--            SWIZZLE_CONVERT(uint32_t, uint16_t, half_to_uint(src))
--         }
--         break;
--      case GL_UNSIGNED_BYTE:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint32_t, uint8_t, unorm_to_unorm(src, 8, 32))
--         } else {
--            SWIZZLE_CONVERT(uint32_t, uint8_t, src)
--         }
--         break;
--      case GL_BYTE:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint32_t, int8_t, snorm_to_unorm(src, 8, 32))
--         } else {
--            SWIZZLE_CONVERT(uint32_t, int8_t, (src < 0) ? 0 : src)
--         }
--         break;
--      case GL_UNSIGNED_SHORT:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint32_t, uint16_t, unorm_to_unorm(src, 16, 32))
--         } else {
--            SWIZZLE_CONVERT(uint32_t, uint16_t, src)
--         }
--         break;
--      case GL_SHORT:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint32_t, int16_t, snorm_to_unorm(src, 16, 32))
--         } else {
--            SWIZZLE_CONVERT(uint32_t, int16_t, (src < 0) ? 0 : src)
--         }
--         break;
--      case GL_UNSIGNED_INT:
--         SWIZZLE_CONVERT(uint32_t, uint32_t, src)
--         break;
--      case GL_INT:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint32_t, int32_t, snorm_to_unorm(src, 32, 32))
--         } else {
--            SWIZZLE_CONVERT(uint32_t, int32_t, (src < 0) ? 0 : src)
--         }
--         break;
--      default:
--         assert(!"Invalid channel type combination");
--      }
--   }
--   break;
-+      convert_uint(void_dst, num_dst_channels, void_src, src_type,
-+                   num_src_channels, swizzle, normalized, count);
-+      break;
-    case GL_INT:
--   {
--      const int32_t one = normalized ? INT32_MAX : 1;
--      switch (src_type) {
--      case GL_FLOAT:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint32_t, float, float_to_snorm(src, 32))
--         } else {
--            SWIZZLE_CONVERT(uint32_t, float, src)
--         }
--         break;
--      case GL_HALF_FLOAT:
--         if (normalized) {
--            SWIZZLE_CONVERT(uint32_t, uint16_t, half_to_snorm(src, 32))
--         } else {
--            SWIZZLE_CONVERT(uint32_t, uint16_t, _mesa_half_to_float(src))
--         }
--         break;
--      case GL_UNSIGNED_BYTE:
--         if (normalized) {
--            SWIZZLE_CONVERT(int32_t, uint8_t, unorm_to_snorm(src, 8, 32))
--         } else {
--            SWIZZLE_CONVERT(int32_t, uint8_t, src)
--         }
--         break;
--      case GL_BYTE:
--         if (normalized) {
--            SWIZZLE_CONVERT(int32_t, int8_t, snorm_to_snorm(src, 8, 32))
--         } else {
--            SWIZZLE_CONVERT(int32_t, int8_t, src)
--         }
--         break;
--      case GL_UNSIGNED_SHORT:
--         if (normalized) {
--            SWIZZLE_CONVERT(int32_t, uint16_t, unorm_to_snorm(src, 16, 32))
--         } else {
--            SWIZZLE_CONVERT(int32_t, uint16_t, src)
--         }
--         break;
--      case GL_SHORT:
--         if (normalized) {
--            SWIZZLE_CONVERT(int32_t, int16_t, snorm_to_snorm(src, 16, 32))
--         } else {
--            SWIZZLE_CONVERT(int32_t, int16_t, src)
--         }
--         break;
--      case GL_UNSIGNED_INT:
--         if (normalized) {
--            SWIZZLE_CONVERT(int32_t, uint32_t, unorm_to_snorm(src, 32, 32))
--         } else {
--            SWIZZLE_CONVERT(int32_t, uint32_t, src)
--         }
--         break;
--      case GL_INT:
--         SWIZZLE_CONVERT(int32_t, int32_t, src)
--         break;
--      default:
--         assert(!"Invalid channel type combination");
--      }
--   }
--   break;
-+      convert_int(void_dst, num_dst_channels, void_src, src_type,
-+                  num_src_channels, swizzle, normalized, count);
-+      break;
-    default:
-       assert(!"Invalid channel type");
-    }
--- 
-2.0.5
-

diff --git a/media-libs/mesa/files/mesa-10.5.1-fstat-include.patch b/media-libs/mesa/files/mesa-10.5.1-fstat-include.patch
deleted file mode 100644
index 212d00d..00000000
--- a/media-libs/mesa/files/mesa-10.5.1-fstat-include.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 771cd266b9d00bdcf2cf7acaa3c8363c358d7478 Mon Sep 17 00:00:00 2001
-From: Emil Velikov <emil.l.velikov@gmail.com>
-Date: Wed, 11 Mar 2015 19:12:35 +0000
-Subject: loader: include <sys/stat.h> for non-sysfs builds
-
-Required by fstat(), otherwise we'll error out due to implicit function
-declaration.
-
-Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
-Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89530
-Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
-Reported-by: Vadim Rutkovsky <vrutkovs@redhat.com>
-Tested-by: Vadim Rutkovsky <vrutkovs@redhat.com>
-
-diff --git a/src/loader/loader.c b/src/loader/loader.c
-index 9ff5115..17bf133 100644
---- a/src/loader/loader.c
-+++ b/src/loader/loader.c
-@@ -64,6 +64,7 @@
-  *    Rob Clark <robclark@freedesktop.org>
-  */
- 
-+#include <sys/stat.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <string.h>
-@@ -80,7 +81,6 @@
- #endif
- #endif
- #ifdef HAVE_SYSFS
--#include <sys/stat.h>
- #include <sys/types.h>
- #endif
- #include "loader.h"
--- 
-cgit v0.10.2
-

diff --git a/media-libs/mesa/mesa-10.3.7-r1.ebuild b/media-libs/mesa/mesa-10.3.7-r1.ebuild
deleted file mode 100644
index 5f83757..00000000
--- a/media-libs/mesa/mesa-10.3.7-r1.ebuild
+++ /dev/null
@@ -1,523 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa"
-
-if [[ ${PV} = 9999* ]]; then
-	GIT_ECLASS="git-r3"
-	EXPERIMENTAL="true"
-fi
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit base autotools multilib multilib-minimal flag-o-matic \
-	python-any-r1 toolchain-funcs pax-utils ${GIT_ECLASS}
-
-OPENGL_DIR="xorg-x11"
-
-MY_PN="${PN/m/M}"
-MY_P="${MY_PN}-${PV/_/-}"
-MY_SRC_P="${MY_PN}Lib-${PV/_/-}"
-
-FOLDER="${PV/.0/}"
-
-DESCRIPTION="OpenGL-like graphic library for Linux"
-HOMEPAGE="http://mesa3d.sourceforge.net/"
-
-#SRC_PATCHES="mirror://gentoo/${P}-gentoo-patches-01.tar.bz2"
-if [[ $PV = 9999* ]]; then
-	SRC_URI="${SRC_PATCHES}"
-else
-	SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_SRC_P}.tar.bz2
-		${SRC_PATCHES}"
-fi
-
-# The code is MIT/X11.
-# GLES[2]/gl[2]{,ext,platform}.h are SGI-B-2.0
-LICENSE="MIT SGI-B-2.0"
-SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
-RESTRICT="!bindist? ( bindist )"
-
-INTEL_CARDS="i915 i965 ilo intel"
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
-VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno nouveau vmware"
-for card in ${VIDEO_CARDS}; do
-	IUSE_VIDEO_CARDS+=" video_cards_${card}"
-done
-
-IUSE="${IUSE_VIDEO_CARDS}
-	bindist +classic debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm +nptl
-	opencl openvg osmesa pax_kernel openmax pic selinux
-	+udev vdpau wayland xvmc xa kernel_FreeBSD kernel_linux"
-
-REQUIRED_USE="
-	llvm?   ( gallium )
-	openvg? ( egl gallium )
-	opencl? (
-		gallium
-		llvm
-	)
-	openmax? ( gallium )
-	gles1?  ( egl )
-	gles2?  ( egl )
-	wayland? ( egl gbm )
-	xa?  ( gallium )
-	video_cards_freedreno?  ( gallium )
-	video_cards_intel?  ( || ( classic gallium ) )
-	video_cards_i915?   ( || ( classic gallium ) )
-	video_cards_i965?   ( classic )
-	video_cards_ilo?    ( gallium )
-	video_cards_nouveau? ( || ( classic gallium ) )
-	video_cards_radeon? ( || ( classic gallium ) )
-	video_cards_r100?   ( classic )
-	video_cards_r200?   ( classic )
-	video_cards_r300?   ( gallium )
-	video_cards_r600?   ( gallium )
-	video_cards_radeonsi?   ( gallium llvm )
-	video_cards_vmware? ( gallium )
-	${PYTHON_REQUIRED_USE}
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.56"
-# keep correct libdrm and dri2proto dep
-# keep blocks in rdepend for binpkg
-RDEPEND="
-	!<x11-base/xorg-server-1.7
-	!<=x11-proto/xf86driproto-2.0.3
-	abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
-	classic? ( app-eselect/eselect-mesa )
-	gallium? ( app-eselect/eselect-mesa )
-	>=app-eselect/eselect-opengl-1.2.7
-	udev? ( kernel_linux? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) )
-	>=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
-	llvm? (
-		video_cards_radeonsi? ( virtual/libelf:0=[${MULTILIB_USEDEP}] )
-		video_cards_r600? ( virtual/libelf:0=[${MULTILIB_USEDEP}] )
-		!video_cards_r600? (
-			video_cards_radeon? ( virtual/libelf:0=[${MULTILIB_USEDEP}] )
-		)
-		>=sys-devel/llvm-3.3-r3:=[${MULTILIB_USEDEP}]
-		<sys-devel/llvm-3.6
-		video_cards_radeonsi? ( >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}] )
-	)
-	opencl? (
-				app-eselect/eselect-opencl
-				dev-libs/libclc
-			)
-	openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
-	vdpau? ( >=x11-libs/libvdpau-0.7:=[${MULTILIB_USEDEP}] )
-	wayland? ( >=dev-libs/wayland-1.2.0:=[${MULTILIB_USEDEP}] )
-	xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
-	${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vmware?,${MULTILIB_USEDEP}]
-"
-for card in ${INTEL_CARDS}; do
-	RDEPEND="${RDEPEND}
-		video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
-	"
-done
-
-for card in ${RADEON_CARDS}; do
-	RDEPEND="${RDEPEND}
-		video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
-	"
-done
-
-DEPEND="${RDEPEND}
-	${PYTHON_DEPS}
-	llvm? (
-		video_cards_radeonsi? ( sys-devel/llvm[video_cards_radeon] )
-	)
-	opencl? (
-				>=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
-				>=sys-devel/clang-3.4.2:=[${MULTILIB_USEDEP}]
-				>=sys-devel/gcc-4.6
-	)
-	sys-devel/bison
-	sys-devel/flex
-	sys-devel/gettext
-	virtual/pkgconfig
-	>=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
-	dri3? (
-		>=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
-		>=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
-	)
-	>=x11-proto/glproto-1.4.16-r1:=[${MULTILIB_USEDEP}]
-	>=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
-	>=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
-	>=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
-"
-
-S="${WORKDIR}/${MY_P}"
-EGIT_CHECKOUT_DIR=${S}
-
-# It is slow without texrels, if someone wants slow
-# mesa without texrels +pic use is worth the shot
-QA_EXECSTACK="usr/lib*/opengl/xorg-x11/lib/libGL.so*"
-QA_WX_LOAD="usr/lib*/opengl/xorg-x11/lib/libGL.so*"
-
-# Think about: ggi, fbcon, no-X configs
-
-pkg_setup() {
-	# workaround toc-issue wrt #386545
-	use ppc64 && append-flags -mminimal-toc
-
-	# 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
-
-	python-any-r1_pkg_setup
-}
-
-src_unpack() {
-	default
-	[[ $PV = 9999* ]] && git-r3_src_unpack
-}
-
-src_prepare() {
-	# apply patches
-	if [[ ${PV} != 9999* && -n ${SRC_PATCHES} ]]; then
-		EPATCH_FORCE="yes" \
-		EPATCH_SOURCE="${WORKDIR}/patches" \
-		EPATCH_SUFFIX="patch" \
-		epatch
-	fi
-
-	epatch "${FILESDIR}"/${PN}-10.3.7-dont-use-clrsb.patch
-	epatch "${FILESDIR}"/${PN}-10.3.7-format_utils.c.patch
-	epatch "${FILESDIR}"/${PN}-10.5.1-fstat-include.patch
-
-	# relax the requirement that r300 must have llvm, bug 380303
-	epatch "${FILESDIR}"/${PN}-10.2-dont-require-llvm-for-r300.patch
-
-	# fix for hardened pax_kernel, bug 240956
-	[[ ${PV} != 9999* ]] && epatch "${FILESDIR}"/glx_ro_text_segm.patch
-
-	# Solaris needs some recent POSIX stuff in our case
-	if [[ ${CHOST} == *-solaris* ]] ; then
-		sed -i -e "s/-DSVR4/-D_POSIX_C_SOURCE=200112L/" configure.ac || die
-	fi
-
-	base_src_prepare
-
-	eautoreconf
-	multilib_copy_sources
-}
-
-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-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm") "
-	fi
-
-	if use gallium; then
-		myconf+="
-			$(use_enable llvm gallium-llvm)
-			$(use_enable openvg)
-			$(use_enable openvg gallium-egl)
-			$(use_enable openmax omx)
-			$(use_enable vdpau)
-			$(use_enable xa)
-			$(use_enable xvmc)
-		"
-		gallium_enable swrast
-		gallium_enable video_cards_vmware svga
-		gallium_enable video_cards_nouveau nouveau
-		gallium_enable video_cards_i915 i915
-		gallium_enable video_cards_ilo ilo
-		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-opencl-libdir="${EPREFIX}/usr/$(get_libdir)/OpenCL/vendors/mesa"
-				--with-clang-libdir="${EPREFIX}/usr/lib"
-				"
-		fi
-	fi
-
-	# x86 hardened pax_kernel needs glx-rts, bug 240956
-	if use pax_kernel; then
-		myconf+="
-			$(use_enable x86 glx-rts)
-		"
-	fi
-
-	# on abi_x86_32 hardened we need to have asm disable
-	if [[ ${ABI} == x86* ]] && use pic; then
-		myconf+=" --disable-asm"
-	fi
-
-	# build fails with BSD indent, bug #428112
-	use userland_GNU || export INDENT=cat
-
-	econf \
-		--enable-dri \
-		--enable-glx \
-		--enable-shared-glapi \
-		$(use_enable !bindist texture-float) \
-		$(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 osmesa) \
-		$(use_enable !udev sysfs) \
-		--enable-llvm-shared-libs \
-		--with-dri-drivers=${DRI_DRIVERS} \
-		--with-gallium-drivers=${GALLIUM_DRIVERS} \
-		PYTHON2="${PYTHON}" \
-		${myconf}
-}
-
-multilib_src_install() {
-	emake install DESTDIR="${D}"
-
-	# Move libGL and others from /usr/lib to /usr/lib/opengl/blah/lib
-	# because user can eselect desired GL provider.
-	ebegin "Moving libGL and friends for dynamic switching"
-		local x
-		local gl_dir="/usr/$(get_libdir)/opengl/${OPENGL_DIR}/"
-		dodir ${gl_dir}/{lib,extensions,include/GL}
-		for x in "${ED}"/usr/$(get_libdir)/lib{EGL,GL*,OpenVG}.{la,a,so*}; do
-			if [ -f ${x} -o -L ${x} ]; then
-				mv -f "${x}" "${ED}${gl_dir}"/lib \
-					|| die "Failed to move ${x}"
-			fi
-		done
-		for x in "${ED}"/usr/include/GL/{gl.h,glx.h,glext.h,glxext.h}; do
-			if [ -f ${x} -o -L ${x} ]; then
-				mv -f "${x}" "${ED}${gl_dir}"/include/GL \
-					|| die "Failed to move ${x}"
-			fi
-		done
-		for x in "${ED}"/usr/include/{EGL,GLES*,VG,KHR}; do
-			if [ -d ${x} ]; then
-				mv -f "${x}" "${ED}${gl_dir}"/include \
-					|| die "Failed to move ${x}"
-			fi
-		done
-	eend $?
-
-	if use classic || use gallium; then
-			ebegin "Moving DRI/Gallium drivers for dynamic switching"
-			local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
-			keepdir /usr/$(get_libdir)/dri
-			dodir /usr/$(get_libdir)/mesa
-			for x in ${gallium_drivers[@]}; do
-				if [ -f "$(get_libdir)/gallium/${x}" ]; then
-					mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
-						|| die "Failed to move ${x}"
-				fi
-			done
-			if use classic; then
-				emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
-			fi
-			for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
-				if [ -f ${x} -o -L ${x} ]; then
-					mv -f "${x}" "${x/dri/mesa}" \
-						|| die "Failed to move ${x}"
-				fi
-			done
-			pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
-			ln -s ../mesa/*.so . || die "Creating symlink failed"
-			# remove symlinks to drivers known to eselect
-			for x in ${gallium_drivers[@]}; do
-				if [ -f ${x} -o -L ${x} ]; then
-					rm "${x}" || die "Failed to remove ${x}"
-				fi
-			done
-			popd
-		eend $?
-	fi
-	if use opencl; then
-		ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
-		local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
-		dodir ${cl_dir}/{lib,include}
-		if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
-			mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
-			"${ED}"${cl_dir}
-		fi
-		if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
-			mv -f "${ED}"/usr/include/CL \
-			"${ED}"${cl_dir}/include
-		fi
-		eend $?
-	fi
-
-	if use openmax; then
-		echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
-		doenvd "${T}"/99mesaxdgomx
-		keepdir /usr/share/mesa/xdg
-	fi
-}
-
-multilib_src_install_all() {
-	prune_libtool_files --all
-	einstalldocs
-
-	if use !bindist; then
-		dodoc docs/patents.txt
-	fi
-
-	# Install config file for eselect mesa
-	insinto /usr/share/mesa
-	newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
-}
-
-multilib_src_test() {
-	if use llvm; then
-		local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
-		pushd src/gallium/drivers/llvmpipe >/dev/null || die
-		emake ${llvm_tests}
-		pax-mark m ${llvm_tests}
-		popd >/dev/null || die
-	fi
-	emake check
-}
-
-pkg_postinst() {
-	# Switch to the xorg implementation.
-	echo
-	eselect opengl set --use-old ${OPENGL_DIR}
-
-	# switch to xorg-x11 and back if necessary, bug #374647 comment 11
-	OLD_IMPLEM="$(eselect opengl show)"
-	if [[ ${OPENGL_DIR}x != ${OLD_IMPLEM}x ]]; then
-		eselect opengl set ${OPENGL_DIR}
-		eselect opengl set ${OLD_IMPLEM}
-	fi
-
-	# Select classic/gallium drivers
-	if use classic || use gallium; then
-		eselect mesa set --auto
-	fi
-
-	# Switch to mesa opencl
-	if use opencl; then
-		eselect opencl set --use-old ${PN}
-	fi
-
-	# run omxregister-bellagio to make the OpenMAX drivers known system-wide
-	if use openmax; then
-		ebegin "Registering OpenMAX drivers"
-		BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
-			OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
-			omxregister-bellagio
-		eend $?
-	fi
-
-	# warn about patent encumbered texture-float
-	if use !bindist; then
-		elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
-		elog "enabled. Please see patents.txt for an explanation."
-	fi
-
-	local using_radeon r_flag
-	for r_flag in ${RADEON_CARDS}; do
-		if use video_cards_${r_flag}; then
-			using_radeon=1
-			break
-		fi
-	done
-
-	if [[ ${using_radeon} = 1 ]] && ! has_version media-libs/libtxc_dxtn; then
-		elog "Note that in order to have full S3TC support, it is necessary to install"
-		elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
-		elog "textures in some apps, and some others even require this to run."
-	fi
-}
-
-pkg_prerm() {
-	if use openmax; then
-		rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
-	fi
-}
-
-# $1 - VIDEO_CARDS flag
-# other args - names of DRI drivers to enable
-# TODO: avoid code duplication for a more elegant implementation
-driver_enable() {
-	case $# in
-		# for enabling unconditionally
-		1)
-			DRI_DRIVERS+=",$1"
-			;;
-		*)
-			if use $1; then
-				shift
-				for i in $@; do
-					DRI_DRIVERS+=",${i}"
-				done
-			fi
-			;;
-	esac
-}
-
-gallium_enable() {
-	case $# in
-		# for enabling unconditionally
-		1)
-			GALLIUM_DRIVERS+=",$1"
-			;;
-		*)
-			if use $1; then
-				shift
-				for i in $@; do
-					GALLIUM_DRIVERS+=",${i}"
-				done
-			fi
-			;;
-	esac
-}

diff --git a/media-libs/mesa/metadata.xml b/media-libs/mesa/metadata.xml
index f8485a8..054cb72 100644
--- a/media-libs/mesa/metadata.xml
+++ b/media-libs/mesa/metadata.xml
@@ -22,7 +22,6 @@
 		<flag name="opencl">Enable the Clover Gallium OpenCL state tracker.</flag>
 		<flag name="openmax">Enable OpenMAX video decode/encode acceleration for Gallium3D.</flag>
 		<flag name="openssl">Use <pkg>dev-libs/openssl</pkg> for low level sha1 utility functions. May cause issues with games from Steam.</flag>
-		<flag name="openvg">Enable the OpenVG 2D acceleration API for Gallium3D.</flag>
 		<flag name="osmesa">Build the Mesa library for off-screen rendering.</flag>
 		<flag name="pax_kernel">Enable if the user plans to run the package under a pax enabled hardened kernel</flag>
 		<flag name="pic">disable optimized assembly code that is not PIC friendly</flag>


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2017-03-03  0:03 Matt Turner
  0 siblings, 0 replies; 16+ messages in thread
From: Matt Turner @ 2017-03-03  0:03 UTC (permalink / raw
  To: gentoo-commits

commit:     2104b7bb6990014b7e1c83dfa22f44d9af8d58ad
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  2 23:57:09 2017 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Mar  3 00:03:11 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2104b7bb

media-libs/mesa: Apply patch to fix Clover build with AltiVec.

Bug: https://bugs.gentoo.org/587210
Bug: https://bugs.freedesktop.org/68504

 ...er-Work-around-build-failure-with-AltiVec.patch | 70 ++++++++++++++++++++++
 ...er-Work-around-build-failure-with-AltiVec.patch | 69 +++++++++++++++++++++
 media-libs/mesa/mesa-13.0.5.ebuild                 |  4 +-
 media-libs/mesa/mesa-17.0.0.ebuild                 |  5 +-
 4 files changed, 146 insertions(+), 2 deletions(-)

diff --git a/media-libs/mesa/files/mesa-13-clover-Work-around-build-failure-with-AltiVec.patch b/media-libs/mesa/files/mesa-13-clover-Work-around-build-failure-with-AltiVec.patch
new file mode 100644
index 00000000000..0d2c65ac56e
--- /dev/null
+++ b/media-libs/mesa/files/mesa-13-clover-Work-around-build-failure-with-AltiVec.patch
@@ -0,0 +1,70 @@
+From 71a2b2e8a580d2c0bee84b898d8531b27f3c7811 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Thu, 2 Mar 2017 04:43:21 +0000
+Subject: [PATCH] clover: Work around build failure with AltiVec.
+
+Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=587210
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68504
+Acked-by: Francisco Jerez <currojerez@riseup.net>
+(cherry picked from commit 7d1195c1e4d071fe796bf5f210c468ea1cc86225)
+---
+ configure.ac                                  | 14 ++++++++++++++
+ src/gallium/state_trackers/clover/Makefile.am |  3 +++
+ 2 files changed, 17 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index fd78fbb..3646e45 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1974,6 +1974,20 @@ if test "x$enable_opencl" = xyes; then
+     if test "x$have_libelf" != xyes; then
+        AC_MSG_ERROR([Clover requires libelf])
+     fi
++
++    if test "x${ac_cv_cxx_compiler_gnu}" = xyes; then
++        altivec_enabled=no
++        AC_COMPILE_IFELSE([AC_LANG_SOURCE([
++        #if !defined(__VEC__) || !defined(__ALTIVEC__)
++        #error "AltiVec not enabled"
++        #endif
++        ])], altivec_enabled=yes)
++
++        if test "$altivec_enabled" = yes; then
++            CLOVER_STD_OVERRIDE="-std=gnu++11"
++        fi
++        AC_SUBST([CLOVER_STD_OVERRIDE])
++    fi
+ fi
+ AM_CONDITIONAL(HAVE_CLOVER, test "x$enable_opencl" = xyes)
+ AM_CONDITIONAL(HAVE_CLOVER_ICD, test "x$enable_opencl_icd" = xyes)
+diff --git a/src/gallium/state_trackers/clover/Makefile.am b/src/gallium/state_trackers/clover/Makefile.am
+index 8abcfec..edf1e26 100644
+--- a/src/gallium/state_trackers/clover/Makefile.am
++++ b/src/gallium/state_trackers/clover/Makefile.am
+@@ -33,6 +33,7 @@ noinst_LTLIBRARIES = libclover.la libcltgsi.la libclllvm.la
+ 
+ libcltgsi_la_CXXFLAGS = \
+ 	-std=c++11 \
++	$(CLOVER_STD_OVERRIDE) \
+ 	$(VISIBILITY_CXXFLAGS)
+ 
+ libcltgsi_la_SOURCES = $(TGSI_SOURCES)
+@@ -41,6 +42,7 @@ libclllvm_la_CXXFLAGS = \
+ 	-std=c++11 \
+ 	$(VISIBILITY_CXXFLAGS) \
+ 	$(LLVM_CXXFLAGS) \
++	$(CLOVER_STD_OVERRIDE) \
+ 	$(DEFINES) \
+ 	$(LIBELF_CFLAGS) \
+ 	-DLIBCLC_INCLUDEDIR=\"$(LIBCLC_INCLUDEDIR)/\" \
+@@ -51,6 +53,7 @@ libclllvm_la_SOURCES = $(LLVM_SOURCES)
+ 
+ libclover_la_CXXFLAGS = \
+ 	-std=c++11 \
++	$(CLOVER_STD_OVERRIDE) \
+ 	$(VISIBILITY_CXXFLAGS)
+ 
+ libclover_la_LIBADD = \
+-- 
+2.10.2
+

diff --git a/media-libs/mesa/files/mesa-17-clover-Work-around-build-failure-with-AltiVec.patch b/media-libs/mesa/files/mesa-17-clover-Work-around-build-failure-with-AltiVec.patch
new file mode 100644
index 00000000000..87f5f9d0143
--- /dev/null
+++ b/media-libs/mesa/files/mesa-17-clover-Work-around-build-failure-with-AltiVec.patch
@@ -0,0 +1,69 @@
+From 7d1195c1e4d071fe796bf5f210c468ea1cc86225 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Thu, 2 Mar 2017 04:43:21 +0000
+Subject: [PATCH] clover: Work around build failure with AltiVec.
+
+Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=587210
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68504
+Acked-by: Francisco Jerez <currojerez@riseup.net>
+---
+ configure.ac                                  | 14 ++++++++++++++
+ src/gallium/state_trackers/clover/Makefile.am |  3 +++
+ 2 files changed, 17 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index a3d1a00..57c4b1e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2033,6 +2033,20 @@ if test "x$enable_opencl" = xyes; then
+        AC_MSG_ERROR([Clover requires libelf])
+     fi
+ 
++    if test "x${ac_cv_cxx_compiler_gnu}" = xyes; then
++        altivec_enabled=no
++        AC_COMPILE_IFELSE([AC_LANG_SOURCE([
++        #if !defined(__VEC__) || !defined(__ALTIVEC__)
++        #error "AltiVec not enabled"
++        #endif
++        ])], altivec_enabled=yes)
++
++        if test "$altivec_enabled" = yes; then
++            CLOVER_STD_OVERRIDE="-std=gnu++11"
++        fi
++        AC_SUBST([CLOVER_STD_OVERRIDE])
++    fi
++
+     llvm_require_version $LLVM_REQUIRED_OPENCL "opencl"
+ 
+     llvm_add_default_components "opencl"
+diff --git a/src/gallium/state_trackers/clover/Makefile.am b/src/gallium/state_trackers/clover/Makefile.am
+index a657e5b..3213935 100644
+--- a/src/gallium/state_trackers/clover/Makefile.am
++++ b/src/gallium/state_trackers/clover/Makefile.am
+@@ -32,6 +32,7 @@ noinst_LTLIBRARIES = libclover.la libcltgsi.la libclllvm.la
+ 
+ libcltgsi_la_CXXFLAGS = \
+ 	-std=c++11 \
++	$(CLOVER_STD_OVERRIDE) \
+ 	$(VISIBILITY_CXXFLAGS)
+ 
+ libcltgsi_la_SOURCES = $(TGSI_SOURCES)
+@@ -40,6 +41,7 @@ libclllvm_la_CXXFLAGS = \
+ 	-std=c++11 \
+ 	$(VISIBILITY_CXXFLAGS) \
+ 	$(LLVM_CXXFLAGS) \
++	$(CLOVER_STD_OVERRIDE) \
+ 	$(DEFINES) \
+ 	$(LIBELF_CFLAGS) \
+ 	-DLIBCLC_INCLUDEDIR=\"$(LIBCLC_INCLUDEDIR)/\" \
+@@ -50,6 +52,7 @@ libclllvm_la_SOURCES = $(LLVM_SOURCES)
+ 
+ libclover_la_CXXFLAGS = \
+ 	-std=c++11 \
++	$(CLOVER_STD_OVERRIDE) \
+ 	$(VISIBILITY_CXXFLAGS)
+ 
+ libclover_la_LIBADD = \
+-- 
+2.10.2
+

diff --git a/media-libs/mesa/mesa-13.0.5.ebuild b/media-libs/mesa/mesa-13.0.5.ebuild
index 9e3022a4336..83fa8ce7bd7 100644
--- a/media-libs/mesa/mesa-13.0.5.ebuild
+++ b/media-libs/mesa/mesa-13.0.5.ebuild
@@ -198,7 +198,9 @@ pkg_setup() {
 }
 
 src_prepare() {
-	[[ ${PV} == 9999 ]] && eautoreconf
+	epatch "${FILESDIR}"/${PN}-13-clover-Work-around-build-failure-with-AltiVec.patch
+
+	eautoreconf
 }
 
 multilib_src_configure() {

diff --git a/media-libs/mesa/mesa-17.0.0.ebuild b/media-libs/mesa/mesa-17.0.0.ebuild
index c3c5a2c4faa..0aea8a38fb1 100644
--- a/media-libs/mesa/mesa-17.0.0.ebuild
+++ b/media-libs/mesa/mesa-17.0.0.ebuild
@@ -206,7 +206,10 @@ pkg_setup() {
 }
 
 src_prepare() {
-	[[ ${PV} == 9999 ]] && eautoreconf
+	eapply "${FILESDIR}"/${PN}-17-clover-Work-around-build-failure-with-AltiVec.patch
+
+	eautoreconf
+
 	eapply_user
 }
 


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2017-03-16 20:37 Matt Turner
  0 siblings, 0 replies; 16+ messages in thread
From: Matt Turner @ 2017-03-16 20:37 UTC (permalink / raw
  To: gentoo-commits

commit:     ba67c4678613abad7523adc4b03f9572ebb49761
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 12 03:12:58 2017 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Thu Mar 16 20:36:42 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ba67c467

media-libs/mesa: Drop old versions

 media-libs/mesa/Manifest                        |   3 -
 media-libs/mesa/files/mesa-12.0-sysmacros.patch |  43 ---
 media-libs/mesa/mesa-11.2.2.ebuild              | 459 -----------------------
 media-libs/mesa/mesa-12.0.1.ebuild              | 465 -----------------------
 media-libs/mesa/mesa-12.0.6.ebuild              | 466 ------------------------
 5 files changed, 1436 deletions(-)

diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
index 009c9f6b385..5984bca57d4 100644
--- a/media-libs/mesa/Manifest
+++ b/media-libs/mesa/Manifest
@@ -1,5 +1,2 @@
-DIST mesa-11.2.2.tar.xz 7860932 SHA256 40e148812388ec7c6d7b6657d5a16e2e8dabba8b97ddfceea5197947647bdfb4 SHA512 fd1fcb1bc97e52784a4b3dedfd8c8ba95bc1b03a62b132d2e16154d076be7a6fabbca1bcba705a7916a1507d811d7f3e6c3488aa386d5e63891282fb1713ce52 WHIRLPOOL 96ecc968b2dad4d0574751565c8fbd383da7e30eb2b805f964d31c11633bfb9e27c461150bd436cb4400bde1c4f28f326f37a3f942b4d13b03ddf49e5ce4620e
-DIST mesa-12.0.1.tar.xz 8571144 SHA256 bab24fb79f78c876073527f515ed871fc9c81d816f66c8a0b051d8d653896389 SHA512 11898336478d1f5bd3946d695b9599647c0b9084ad8890b4fa89daa922a217e5ca6d8b72f5801e362c3dd7723382f2daaa655b54f65a6d088ad8cfdb85f10023 WHIRLPOOL 9923990fc35142b8c877cbbfdfa7d362ae94c8c637360f28e348943dc6f380bdf5aee944c04da6337994f0f15790c8d1a55bea1f0b00afa780305e5862c78601
-DIST mesa-12.0.6.tar.xz 8662900 SHA256 7d6da9744c1022a4c2ab6ad01a206984d00443fb691568011d01b3dd97e36448 SHA512 2492044f6a3c9d98937146e3a3bd8e262cb1edbb11c3e6d5114fe8c83aa9c846ec3f266b9712adb66fbe080121043772899ca18ddcc3b7a838a84417b6701aae WHIRLPOOL b9993201880536de33852f767001c93f35e6bbc851aac2f2f261b45e9c8a1614b9ad1d121eeef1e737e2943195dbe7489bf34e8f79d705eac2489e59b3206c9a
 DIST mesa-13.0.5.tar.xz 9171480 SHA256 bfcea7e2c801525a60895c8aff11aa68457ee9aa35d01a4638e1f310a3f5ef87 SHA512 db5f6a97b40ee6e45ba81280ab4543354e9f274c7112c5a43b8970244f329902a22f68d5eeddad5b64502507f462ffbcc028efc5dff93822adf95d30ba5903c1 WHIRLPOOL 164116608908331d4e8d69c4d2b92dc22e8e6d98725a20e8c2da5cc24b4e9ae9e05ee9c7209d55371b419e0f4e6c1d4752a46d149a968a6b83612aa77f7e480e
 DIST mesa-17.0.1.tar.xz 9447712 SHA256 96fd70ef5f31d276a17e424e7e1bb79447ccbbe822b56844213ef932e7ad1b0c SHA512 f3a807fbf30327a1dccb690e484276ab1b2b1e33b0440884b6476607e08aa3513d5c9d4b6dd345415decb93747d334c70bffe9e49eae787b48ef6c08989aeb7c WHIRLPOOL 955800014b4155eba5dea6f4ae50e7a302467d4063a5ff0378b6c3b833f924787fd923248f8746bdbbef3e57135ae44eb1a38248c08112ad5435b645fc955ec4

diff --git a/media-libs/mesa/files/mesa-12.0-sysmacros.patch b/media-libs/mesa/files/mesa-12.0-sysmacros.patch
deleted file mode 100644
index d4b06791fad..00000000000
--- a/media-libs/mesa/files/mesa-12.0-sysmacros.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-https://bugs.gentoo.org/580392
-
-fixed in upstream here:
-	https://cgit.freedesktop.org/mesa/mesa/commit/?id=20553e4a2d952f6dc37f40f63d2c86b0718c58f9
-
-this is a hack for the 12.0 branch
-
---- a/src/gallium/winsys/svga/drm/vmw_screen.c
-+++ b/src/gallium/winsys/svga/drm/vmw_screen.c
-@@ -31,6 +31,9 @@
- #include "pipe/p_compiler.h"
- #include "util/u_hash_table.h"
- #include <sys/types.h>
-+#ifdef __linux__
-+#include <sys/sysmacros.h>
-+#endif
- #include <sys/stat.h>
- #include <unistd.h>
- 
---- a/src/gbm/main/gbm.c
-+++ b/src/gbm/main/gbm.c
-@@ -31,6 +31,9 @@
- #include <stdint.h>
- 
- #include <sys/types.h>
-+#ifdef __linux__
-+#include <sys/sysmacros.h>
-+#endif
- #include <sys/stat.h>
- #include <unistd.h>
- #include <errno.h>
---- a/src/loader/loader.c
-+++ b/src/loader/loader.c
-@@ -80,6 +80,9 @@
- #include "xmlpool.h"
- #endif
- #endif
-+#ifdef __linux__
-+#include <sys/sysmacros.h>
-+#endif
- #ifdef HAVE_SYSFS
- #include <sys/types.h>
- #endif

diff --git a/media-libs/mesa/mesa-11.2.2.ebuild b/media-libs/mesa/mesa-11.2.2.ebuild
deleted file mode 100644
index 0b13149a787..00000000000
--- a/media-libs/mesa/mesa-11.2.2.ebuild
+++ /dev/null
@@ -1,459 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa"
-
-if [[ ${PV} = 9999 ]]; then
-	GIT_ECLASS="git-r3"
-	EXPERIMENTAL="true"
-fi
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit autotools multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
-
-OPENGL_DIR="xorg-x11"
-
-MY_P="${P/_/-}"
-FOLDER="${PV/_rc*/}"
-
-DESCRIPTION="OpenGL-like graphic library for Linux"
-HOMEPAGE="https://www.mesa3d.org/"
-
-if [[ $PV == 9999 ]]; then
-	SRC_URI=""
-	KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86"
-else
-	SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_P}.tar.xz"
-	KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-RESTRICT="!bindist? ( bindist )"
-
-INTEL_CARDS="i915 i965 intel"
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
-VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno nouveau vc4 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 +llvm
-	+nptl opencl osmesa pax_kernel openmax pic selinux +udev vaapi vdpau
-	wayland xvmc xa kernel_FreeBSD"
-
-REQUIRED_USE="
-	d3d9?   ( dri3 gallium )
-	llvm?   ( gallium )
-	opencl? ( gallium llvm )
-	openmax? ( gallium )
-	gles1?  ( egl )
-	gles2?  ( egl )
-	vaapi? ( gallium )
-	vdpau? ( gallium )
-	wayland? ( egl gbm )
-	xa?  ( gallium )
-	video_cards_freedreno?  ( gallium )
-	video_cards_intel?  ( classic )
-	video_cards_i915?   ( || ( classic gallium ) )
-	video_cards_i965?   ( classic )
-	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_vmware? ( gallium )
-	${PYTHON_REQUIRED_USE}
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.67"
-# keep correct libdrm and dri2proto dep
-# keep blocks in rdepend for binpkg
-RDEPEND="
-	!<x11-base/xorg-server-1.7
-	!<=x11-proto/xf86driproto-2.0.3
-	abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
-	classic? ( app-eselect/eselect-mesa )
-	gallium? ( app-eselect/eselect-mesa )
-	>=app-eselect/eselect-opengl-1.3.0
-	udev? ( kernel_linux? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) )
-	>=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
-	x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
-	llvm? ( !kernel_FreeBSD? (
-		video_cards_radeonsi? ( virtual/libelf:0=[${MULTILIB_USEDEP}] )
-		!video_cards_r600? (
-			video_cards_radeon? ( virtual/libelf:0=[${MULTILIB_USEDEP}] )
-		) )
-		>=sys-devel/llvm-3.6.0:=[${MULTILIB_USEDEP}]
-	)
-	opencl? (
-				app-eselect/eselect-opencl
-				dev-libs/libclc
-				!kernel_FreeBSD? ( virtual/libelf:0=[${MULTILIB_USEDEP}] )
-			)
-	openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
-	vaapi? ( >=x11-libs/libva-1.6.0:=[${MULTILIB_USEDEP}] )
-	vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
-	wayland? ( >=dev-libs/wayland-1.2.0:=[${MULTILIB_USEDEP}] )
-	xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
-	${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vmware?,${MULTILIB_USEDEP}]
-"
-for card in ${INTEL_CARDS}; do
-	RDEPEND="${RDEPEND}
-		video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
-	"
-done
-
-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] )
-"
-
-DEPEND="${RDEPEND}
-	llvm? (
-		video_cards_radeonsi? ( || (
-			sys-devel/llvm[llvm_targets_AMDGPU]
-			sys-devel/llvm[video_cards_radeon]
-		) )
-	)
-	opencl? (
-				>=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
-				>=sys-devel/clang-3.4.2:=[${MULTILIB_USEDEP}]
-				>=sys-devel/gcc-4.6
-	)
-	sys-devel/gettext
-	virtual/pkgconfig
-	>=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
-	dri3? (
-		>=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
-		>=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
-	)
-	>=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
-	>=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
-	>=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
-	>=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
-"
-[[ ${PV} == 9999 ]] && DEPEND+="
-	sys-devel/bison
-	sys-devel/flex
-	${PYTHON_DEPS}
-	$(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
-	)
-)"
-
-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
-
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	[[ ${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-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
-	fi
-
-	if use gallium; then
-		myconf+="
-			$(use_enable d3d9 nine)
-			$(use_enable llvm gallium-llvm)
-			$(use_enable openmax omx)
-			$(use_enable vaapi va)
-			$(use_enable vdpau)
-			$(use_enable xa)
-			$(use_enable xvmc)
-		"
-		use vaapi && myconf+=" --with-va-libdir=${EPREFIX}/usr/$(get_libdir)/va/drivers"
-
-		gallium_enable swrast
-		gallium_enable video_cards_vc4 vc4
-		gallium_enable video_cards_vmware svga
-		gallium_enable video_cards_nouveau nouveau
-		gallium_enable video_cards_i915 i915
-		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
-	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 \
-		--disable-shader-cache \
-		$(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 !udev sysfs) \
-		--enable-llvm-shared-libs \
-		--with-dri-drivers=${DRI_DRIVERS} \
-		--with-gallium-drivers=${GALLIUM_DRIVERS} \
-		PYTHON2="${PYTHON}" \
-		${myconf}
-}
-
-multilib_src_install() {
-	emake install DESTDIR="${D}"
-
-	if use classic || use gallium; then
-			ebegin "Moving DRI/Gallium drivers for dynamic switching"
-			local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
-			keepdir /usr/$(get_libdir)/dri
-			dodir /usr/$(get_libdir)/mesa
-			for x in ${gallium_drivers[@]}; do
-				if [ -f "$(get_libdir)/gallium/${x}" ]; then
-					mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
-						|| die "Failed to move ${x}"
-				fi
-			done
-			if use classic; then
-				emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
-			fi
-			for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
-				if [ -f ${x} -o -L ${x} ]; then
-					mv -f "${x}" "${x/dri/mesa}" \
-						|| die "Failed to move ${x}"
-				fi
-			done
-			pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
-			ln -s ../mesa/*.so . || die "Creating symlink failed"
-			# remove symlinks to drivers known to eselect
-			for x in ${gallium_drivers[@]}; do
-				if [ -f ${x} -o -L ${x} ]; then
-					rm "${x}" || die "Failed to remove ${x}"
-				fi
-			done
-			popd
-		eend $?
-	fi
-	if use opencl; then
-		ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
-		local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
-		dodir ${cl_dir}/{lib,include}
-		if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
-			mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
-			"${ED}"${cl_dir}
-		fi
-		if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
-			mv -f "${ED}"/usr/include/CL \
-			"${ED}"${cl_dir}/include
-		fi
-		eend $?
-	fi
-
-	if use openmax; then
-		echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
-		doenvd "${T}"/99mesaxdgomx
-		keepdir /usr/share/mesa/xdg
-	fi
-}
-
-multilib_src_install_all() {
-	prune_libtool_files --all
-	einstalldocs
-
-	if use !bindist; then
-		dodoc docs/patents.txt
-	fi
-
-	# Install config file for eselect mesa
-	insinto /usr/share/mesa
-	newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
-}
-
-multilib_src_test() {
-	if use llvm; then
-		local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
-		pushd src/gallium/drivers/llvmpipe >/dev/null || die
-		emake ${llvm_tests}
-		pax-mark m ${llvm_tests}
-		popd >/dev/null || die
-	fi
-	emake check
-}
-
-pkg_postinst() {
-	# Switch to the xorg implementation.
-	echo
-	eselect opengl set --use-old ${OPENGL_DIR}
-
-	# Select classic/gallium drivers
-	if use classic || use gallium; then
-		eselect mesa set --auto
-	fi
-
-	# Switch to mesa opencl
-	if use opencl; then
-		eselect opencl set --use-old ${PN}
-	fi
-
-	# run omxregister-bellagio to make the OpenMAX drivers known system-wide
-	if use openmax; then
-		ebegin "Registering OpenMAX drivers"
-		BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
-			OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
-			omxregister-bellagio
-		eend $?
-	fi
-
-	# warn about patent encumbered texture-float
-	if use !bindist; then
-		elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
-		elog "enabled. Please see patents.txt for an explanation."
-	fi
-
-	if ! has_version media-libs/libtxc_dxtn; then
-		elog "Note that in order to have full S3TC support, it is necessary to install"
-		elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
-		elog "textures in some apps, and some others even require this to run."
-	fi
-}
-
-pkg_prerm() {
-	if use openmax; then
-		rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
-	fi
-}
-
-# $1 - VIDEO_CARDS flag
-# other args - names of DRI drivers to enable
-# TODO: avoid code duplication for a more elegant implementation
-driver_enable() {
-	case $# in
-		# for enabling unconditionally
-		1)
-			DRI_DRIVERS+=",$1"
-			;;
-		*)
-			if use $1; then
-				shift
-				for i in $@; do
-					DRI_DRIVERS+=",${i}"
-				done
-			fi
-			;;
-	esac
-}
-
-gallium_enable() {
-	case $# in
-		# for enabling unconditionally
-		1)
-			GALLIUM_DRIVERS+=",$1"
-			;;
-		*)
-			if use $1; then
-				shift
-				for i in $@; do
-					GALLIUM_DRIVERS+=",${i}"
-				done
-			fi
-			;;
-	esac
-}

diff --git a/media-libs/mesa/mesa-12.0.1.ebuild b/media-libs/mesa/mesa-12.0.1.ebuild
deleted file mode 100644
index 3a54b033e49..00000000000
--- a/media-libs/mesa/mesa-12.0.1.ebuild
+++ /dev/null
@@ -1,465 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa"
-
-if [[ ${PV} = 9999 ]]; then
-	GIT_ECLASS="git-r3"
-	EXPERIMENTAL="true"
-fi
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit autotools multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
-
-OPENGL_DIR="xorg-x11"
-
-MY_P="${P/_/-}"
-FOLDER="${PV/_rc*/}"
-
-DESCRIPTION="OpenGL-like graphic library for Linux"
-HOMEPAGE="https://www.mesa3d.org/"
-
-if [[ $PV == 9999 ]]; then
-	SRC_URI=""
-	KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86"
-else
-	SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_P}.tar.xz"
-	KEYWORDS="alpha amd64 ~arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-RESTRICT="!bindist? ( bindist )"
-
-INTEL_CARDS="i915 i965 intel"
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
-VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno nouveau vc4 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 +llvm
-	+nptl opencl osmesa pax_kernel openmax pic selinux +udev vaapi valgrind
-	vdpau wayland xvmc xa kernel_FreeBSD"
-
-REQUIRED_USE="
-	d3d9?   ( dri3 gallium )
-	llvm?   ( gallium )
-	opencl? ( gallium llvm )
-	openmax? ( gallium )
-	gles1?  ( egl )
-	gles2?  ( egl )
-	vaapi? ( gallium )
-	vdpau? ( gallium )
-	wayland? ( egl gbm )
-	xa?  ( gallium )
-	video_cards_freedreno?  ( gallium )
-	video_cards_intel?  ( classic )
-	video_cards_i915?   ( || ( classic gallium ) )
-	video_cards_i965?   ( classic )
-	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_vmware? ( gallium )
-	${PYTHON_REQUIRED_USE}
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.67"
-# keep correct libdrm and dri2proto dep
-# keep blocks in rdepend for binpkg
-RDEPEND="
-	!<x11-base/xorg-server-1.7
-	!<=x11-proto/xf86driproto-2.0.3
-	abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
-	classic? ( app-eselect/eselect-mesa )
-	gallium? ( app-eselect/eselect-mesa )
-	>=app-eselect/eselect-opengl-1.3.0
-	udev? ( kernel_linux? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) )
-	>=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
-	x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
-	llvm? ( !kernel_FreeBSD? (
-		video_cards_radeonsi? ( virtual/libelf:0=[${MULTILIB_USEDEP}] )
-		!video_cards_r600? (
-			video_cards_radeon? ( virtual/libelf:0=[${MULTILIB_USEDEP}] )
-		) )
-		>=sys-devel/llvm-3.6.0:=[${MULTILIB_USEDEP}]
-	)
-	opencl? (
-				app-eselect/eselect-opencl
-				dev-libs/libclc
-				!kernel_FreeBSD? ( virtual/libelf:0=[${MULTILIB_USEDEP}] )
-			)
-	openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
-	vaapi? (
-		>=x11-libs/libva-1.6.0:=[${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.2.0:=[${MULTILIB_USEDEP}] )
-	xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
-	${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vmware?,${MULTILIB_USEDEP}]
-"
-for card in ${INTEL_CARDS}; do
-	RDEPEND="${RDEPEND}
-		video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
-	"
-done
-
-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] )
-"
-
-DEPEND="${RDEPEND}
-	llvm? (
-		video_cards_radeonsi? ( || (
-			sys-devel/llvm[llvm_targets_AMDGPU]
-			sys-devel/llvm[video_cards_radeon]
-		) )
-	)
-	opencl? (
-				>=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
-				>=sys-devel/clang-3.4.2:=[${MULTILIB_USEDEP}]
-				>=sys-devel/gcc-4.6
-	)
-	sys-devel/gettext
-	virtual/pkgconfig
-	valgrind? ( dev-util/valgrind )
-	>=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
-	dri3? (
-		>=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
-		>=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
-	)
-	>=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
-	>=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
-	>=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
-	>=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
-"
-[[ ${PV} == 9999 ]] && DEPEND+="
-	sys-devel/bison
-	sys-devel/flex
-	${PYTHON_DEPS}
-	$(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
-	)
-)"
-
-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
-
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	[[ ${PV} == 9999 ]] && eautoreconf
-	epatch "${FILESDIR}"/${PN}-12.0-sysmacros.patch #580392
-}
-
-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-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
-	fi
-
-	if use gallium; then
-		myconf+="
-			$(use_enable d3d9 nine)
-			$(use_enable llvm gallium-llvm)
-			$(use_enable openmax omx)
-			$(use_enable vaapi va)
-			$(use_enable vdpau)
-			$(use_enable xa)
-			$(use_enable xvmc)
-		"
-		use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
-
-		gallium_enable swrast
-		gallium_enable video_cards_vc4 vc4
-		gallium_enable video_cards_vmware svga
-		gallium_enable video_cards_nouveau nouveau
-		gallium_enable video_cards_i915 i915
-		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
-	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 \
-		--disable-shader-cache \
-		$(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 !udev sysfs) \
-		--enable-valgrind=$(usex valgrind auto no) \
-		--enable-llvm-shared-libs \
-		--with-dri-drivers=${DRI_DRIVERS} \
-		--with-gallium-drivers=${GALLIUM_DRIVERS} \
-		PYTHON2="${PYTHON}" \
-		${myconf}
-}
-
-multilib_src_install() {
-	emake install DESTDIR="${D}"
-
-	if use classic || use gallium; then
-			ebegin "Moving DRI/Gallium drivers for dynamic switching"
-			local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
-			keepdir /usr/$(get_libdir)/dri
-			dodir /usr/$(get_libdir)/mesa
-			for x in ${gallium_drivers[@]}; do
-				if [ -f "$(get_libdir)/gallium/${x}" ]; then
-					mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
-						|| die "Failed to move ${x}"
-				fi
-			done
-			if use classic; then
-				emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
-			fi
-			for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
-				if [ -f ${x} -o -L ${x} ]; then
-					mv -f "${x}" "${x/dri/mesa}" \
-						|| die "Failed to move ${x}"
-				fi
-			done
-			pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
-			ln -s ../mesa/*.so . || die "Creating symlink failed"
-			# remove symlinks to drivers known to eselect
-			for x in ${gallium_drivers[@]}; do
-				if [ -f ${x} -o -L ${x} ]; then
-					rm "${x}" || die "Failed to remove ${x}"
-				fi
-			done
-			popd
-		eend $?
-	fi
-	if use opencl; then
-		ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
-		local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
-		dodir ${cl_dir}/{lib,include}
-		if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
-			mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
-			"${ED}"${cl_dir}
-		fi
-		if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
-			mv -f "${ED}"/usr/include/CL \
-			"${ED}"${cl_dir}/include
-		fi
-		eend $?
-	fi
-
-	if use openmax; then
-		echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
-		doenvd "${T}"/99mesaxdgomx
-		keepdir /usr/share/mesa/xdg
-	fi
-}
-
-multilib_src_install_all() {
-	prune_libtool_files --all
-	einstalldocs
-
-	if use !bindist; then
-		dodoc docs/patents.txt
-	fi
-
-	# Install config file for eselect mesa
-	insinto /usr/share/mesa
-	newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
-}
-
-multilib_src_test() {
-	if use llvm; then
-		local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
-		pushd src/gallium/drivers/llvmpipe >/dev/null || die
-		emake ${llvm_tests}
-		pax-mark m ${llvm_tests}
-		popd >/dev/null || die
-	fi
-	emake check
-}
-
-pkg_postinst() {
-	# Switch to the xorg implementation.
-	echo
-	eselect opengl set --use-old ${OPENGL_DIR}
-
-	# Select classic/gallium drivers
-	if use classic || use gallium; then
-		eselect mesa set --auto
-	fi
-
-	# Switch to mesa opencl
-	if use opencl; then
-		eselect opencl set --use-old ${PN}
-	fi
-
-	# run omxregister-bellagio to make the OpenMAX drivers known system-wide
-	if use openmax; then
-		ebegin "Registering OpenMAX drivers"
-		BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
-			OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
-			omxregister-bellagio
-		eend $?
-	fi
-
-	# warn about patent encumbered texture-float
-	if use !bindist; then
-		elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
-		elog "enabled. Please see patents.txt for an explanation."
-	fi
-
-	if ! has_version media-libs/libtxc_dxtn; then
-		elog "Note that in order to have full S3TC support, it is necessary to install"
-		elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
-		elog "textures in some apps, and some others even require this to run."
-	fi
-}
-
-pkg_prerm() {
-	if use openmax; then
-		rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
-	fi
-}
-
-# $1 - VIDEO_CARDS flag
-# other args - names of DRI drivers to enable
-# TODO: avoid code duplication for a more elegant implementation
-driver_enable() {
-	case $# in
-		# for enabling unconditionally
-		1)
-			DRI_DRIVERS+=",$1"
-			;;
-		*)
-			if use $1; then
-				shift
-				for i in $@; do
-					DRI_DRIVERS+=",${i}"
-				done
-			fi
-			;;
-	esac
-}
-
-gallium_enable() {
-	case $# in
-		# for enabling unconditionally
-		1)
-			GALLIUM_DRIVERS+=",$1"
-			;;
-		*)
-			if use $1; then
-				shift
-				for i in $@; do
-					GALLIUM_DRIVERS+=",${i}"
-				done
-			fi
-			;;
-	esac
-}

diff --git a/media-libs/mesa/mesa-12.0.6.ebuild b/media-libs/mesa/mesa-12.0.6.ebuild
deleted file mode 100644
index db0363433ae..00000000000
--- a/media-libs/mesa/mesa-12.0.6.ebuild
+++ /dev/null
@@ -1,466 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa"
-
-if [[ ${PV} = 9999 ]]; then
-	GIT_ECLASS="git-r3"
-	EXPERIMENTAL="true"
-fi
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit autotools multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
-
-OPENGL_DIR="xorg-x11"
-
-MY_P="${P/_/-}"
-FOLDER="${PV/_rc*/}"
-
-DESCRIPTION="OpenGL-like graphic library for Linux"
-HOMEPAGE="https://www.mesa3d.org/"
-
-if [[ $PV == 9999 ]]; then
-	SRC_URI=""
-	KEYWORDS="~hppa"
-else
-	SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-RESTRICT="!bindist? ( bindist )"
-
-INTEL_CARDS="i915 i965 intel"
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
-VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno nouveau vc4 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 +llvm
-	+nptl opencl osmesa pax_kernel openmax pic selinux +udev vaapi valgrind
-	vdpau wayland xvmc xa kernel_FreeBSD"
-
-REQUIRED_USE="
-	d3d9?   ( dri3 gallium )
-	llvm?   ( gallium )
-	opencl? ( gallium llvm )
-	openmax? ( gallium )
-	gles1?  ( egl )
-	gles2?  ( egl )
-	vaapi? ( gallium )
-	vdpau? ( gallium )
-	wayland? ( egl gbm )
-	xa?  ( gallium )
-	video_cards_freedreno?  ( gallium )
-	video_cards_intel?  ( classic )
-	video_cards_i915?   ( || ( classic gallium ) )
-	video_cards_i965?   ( classic )
-	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_vmware? ( gallium )
-	${PYTHON_REQUIRED_USE}
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.67"
-# keep correct libdrm and dri2proto dep
-# keep blocks in rdepend for binpkg
-RDEPEND="
-	!<x11-base/xorg-server-1.7
-	!<=x11-proto/xf86driproto-2.0.3
-	abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
-	classic? ( app-eselect/eselect-mesa )
-	gallium? ( app-eselect/eselect-mesa )
-	>=app-eselect/eselect-opengl-1.3.0
-	udev? ( kernel_linux? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) )
-	>=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
-	x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
-	llvm? ( !kernel_FreeBSD? (
-		video_cards_radeonsi? ( virtual/libelf:0=[${MULTILIB_USEDEP}] )
-		!video_cards_r600? (
-			video_cards_radeon? ( virtual/libelf:0=[${MULTILIB_USEDEP}] )
-		) )
-		>=sys-devel/llvm-3.6.0:=[${MULTILIB_USEDEP}]
-	)
-	opencl? (
-				app-eselect/eselect-opencl
-				dev-libs/libclc
-				!kernel_FreeBSD? ( virtual/libelf:0=[${MULTILIB_USEDEP}] )
-			)
-	openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
-	vaapi? (
-		>=x11-libs/libva-1.6.0:=[${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.2.0:=[${MULTILIB_USEDEP}] )
-	xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
-	${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vmware?,${MULTILIB_USEDEP}]
-"
-for card in ${INTEL_CARDS}; do
-	RDEPEND="${RDEPEND}
-		video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
-	"
-done
-
-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] )
-"
-
-# FIXME: kill the sys-devel/llvm[video_cards_radeon] compat once
-# LLVM < 3.9 is out of the game
-DEPEND="${RDEPEND}
-	llvm? (
-		video_cards_radeonsi? ( || (
-			sys-devel/llvm[llvm_targets_AMDGPU]
-			sys-devel/llvm[video_cards_radeon]
-		) )
-	)
-	opencl? (
-				>=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
-				>=sys-devel/clang-3.4.2:=[${MULTILIB_USEDEP}]
-				>=sys-devel/gcc-4.6
-	)
-	sys-devel/gettext
-	virtual/pkgconfig
-	valgrind? ( dev-util/valgrind )
-	>=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
-	dri3? (
-		>=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
-		>=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
-	)
-	>=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
-	>=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
-	>=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
-	>=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
-"
-[[ ${PV} == 9999 ]] && DEPEND+="
-	sys-devel/bison
-	sys-devel/flex
-	${PYTHON_DEPS}
-	$(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
-	)
-)"
-
-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
-
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	[[ ${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-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
-	fi
-
-	if use gallium; then
-		myconf+="
-			$(use_enable d3d9 nine)
-			$(use_enable llvm gallium-llvm)
-			$(use_enable openmax omx)
-			$(use_enable vaapi va)
-			$(use_enable vdpau)
-			$(use_enable xa)
-			$(use_enable xvmc)
-		"
-		use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
-
-		gallium_enable swrast
-		gallium_enable video_cards_vc4 vc4
-		gallium_enable video_cards_vmware svga
-		gallium_enable video_cards_nouveau nouveau
-		gallium_enable video_cards_i915 i915
-		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
-	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 \
-		--disable-shader-cache \
-		$(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 !udev sysfs) \
-		--enable-valgrind=$(usex valgrind auto no) \
-		--enable-llvm-shared-libs \
-		--with-dri-drivers=${DRI_DRIVERS} \
-		--with-gallium-drivers=${GALLIUM_DRIVERS} \
-		PYTHON2="${PYTHON}" \
-		${myconf}
-}
-
-multilib_src_install() {
-	emake install DESTDIR="${D}"
-
-	if use classic || use gallium; then
-			ebegin "Moving DRI/Gallium drivers for dynamic switching"
-			local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
-			keepdir /usr/$(get_libdir)/dri
-			dodir /usr/$(get_libdir)/mesa
-			for x in ${gallium_drivers[@]}; do
-				if [ -f "$(get_libdir)/gallium/${x}" ]; then
-					mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
-						|| die "Failed to move ${x}"
-				fi
-			done
-			if use classic; then
-				emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
-			fi
-			for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
-				if [ -f ${x} -o -L ${x} ]; then
-					mv -f "${x}" "${x/dri/mesa}" \
-						|| die "Failed to move ${x}"
-				fi
-			done
-			pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
-			ln -s ../mesa/*.so . || die "Creating symlink failed"
-			# remove symlinks to drivers known to eselect
-			for x in ${gallium_drivers[@]}; do
-				if [ -f ${x} -o -L ${x} ]; then
-					rm "${x}" || die "Failed to remove ${x}"
-				fi
-			done
-			popd
-		eend $?
-	fi
-	if use opencl; then
-		ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
-		local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
-		dodir ${cl_dir}/{lib,include}
-		if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
-			mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
-			"${ED}"${cl_dir}
-		fi
-		if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
-			mv -f "${ED}"/usr/include/CL \
-			"${ED}"${cl_dir}/include
-		fi
-		eend $?
-	fi
-
-	if use openmax; then
-		echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
-		doenvd "${T}"/99mesaxdgomx
-		keepdir /usr/share/mesa/xdg
-	fi
-}
-
-multilib_src_install_all() {
-	prune_libtool_files --all
-	einstalldocs
-
-	if use !bindist; then
-		dodoc docs/patents.txt
-	fi
-
-	# Install config file for eselect mesa
-	insinto /usr/share/mesa
-	newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
-}
-
-multilib_src_test() {
-	if use llvm; then
-		local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
-		pushd src/gallium/drivers/llvmpipe >/dev/null || die
-		emake ${llvm_tests}
-		pax-mark m ${llvm_tests}
-		popd >/dev/null || die
-	fi
-	emake check
-}
-
-pkg_postinst() {
-	# Switch to the xorg implementation.
-	echo
-	eselect opengl set --use-old ${OPENGL_DIR}
-
-	# Select classic/gallium drivers
-	if use classic || use gallium; then
-		eselect mesa set --auto
-	fi
-
-	# Switch to mesa opencl
-	if use opencl; then
-		eselect opencl set --use-old ${PN}
-	fi
-
-	# run omxregister-bellagio to make the OpenMAX drivers known system-wide
-	if use openmax; then
-		ebegin "Registering OpenMAX drivers"
-		BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
-			OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
-			omxregister-bellagio
-		eend $?
-	fi
-
-	# warn about patent encumbered texture-float
-	if use !bindist; then
-		elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
-		elog "enabled. Please see patents.txt for an explanation."
-	fi
-
-	if ! has_version media-libs/libtxc_dxtn; then
-		elog "Note that in order to have full S3TC support, it is necessary to install"
-		elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
-		elog "textures in some apps, and some others even require this to run."
-	fi
-}
-
-pkg_prerm() {
-	if use openmax; then
-		rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
-	fi
-}
-
-# $1 - VIDEO_CARDS flag
-# other args - names of DRI drivers to enable
-# TODO: avoid code duplication for a more elegant implementation
-driver_enable() {
-	case $# in
-		# for enabling unconditionally
-		1)
-			DRI_DRIVERS+=",$1"
-			;;
-		*)
-			if use $1; then
-				shift
-				for i in $@; do
-					DRI_DRIVERS+=",${i}"
-				done
-			fi
-			;;
-	esac
-}
-
-gallium_enable() {
-	case $# in
-		# for enabling unconditionally
-		1)
-			GALLIUM_DRIVERS+=",$1"
-			;;
-		*)
-			if use $1; then
-				shift
-				for i in $@; do
-					GALLIUM_DRIVERS+=",${i}"
-				done
-			fi
-			;;
-	esac
-}


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2017-03-20 19:01 Matt Turner
  0 siblings, 0 replies; 16+ messages in thread
From: Matt Turner @ 2017-03-20 19:01 UTC (permalink / raw
  To: gentoo-commits

commit:     0e5e8c07ab47a1234338be0e27fb5f3692ee081b
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 20 18:49:24 2017 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Mon Mar 20 18:58:50 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e5e8c07

media-libs/mesa: Drop old version 17.0.1

 media-libs/mesa/Manifest                           |   1 -
 ...er-Work-around-build-failure-with-AltiVec.patch |  69 ---
 media-libs/mesa/mesa-17.0.1.ebuild                 | 516 ---------------------
 3 files changed, 586 deletions(-)

diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
index 95719d9cc39..7716fefdfdc 100644
--- a/media-libs/mesa/Manifest
+++ b/media-libs/mesa/Manifest
@@ -1,4 +1,3 @@
 DIST mesa-13.0.5.tar.xz 9171480 SHA256 bfcea7e2c801525a60895c8aff11aa68457ee9aa35d01a4638e1f310a3f5ef87 SHA512 db5f6a97b40ee6e45ba81280ab4543354e9f274c7112c5a43b8970244f329902a22f68d5eeddad5b64502507f462ffbcc028efc5dff93822adf95d30ba5903c1 WHIRLPOOL 164116608908331d4e8d69c4d2b92dc22e8e6d98725a20e8c2da5cc24b4e9ae9e05ee9c7209d55371b419e0f4e6c1d4752a46d149a968a6b83612aa77f7e480e
 DIST mesa-13.0.6.tar.xz 9179236 SHA256 29ef104a7fc082d352b1599bd6cb1d040be424ccd22f5e0eb7ee9b0e9acd3597 SHA512 2455e044647f674c2f1dd524143b61b8630713fa929bbf6fe1c981436a9c08dc933553d638a22b32d2799afb77be746355b48b1b20af172141c5b63891e94441 WHIRLPOOL 1fdaaf29de96225cf41a3bdeb559a35cf20fda524f80985b2bfdc52095dcb7f6b320704b7ccf754a6f80555925a6a80dfa2b1115a4bdd9bdc1ebb672f115208a
-DIST mesa-17.0.1.tar.xz 9447712 SHA256 96fd70ef5f31d276a17e424e7e1bb79447ccbbe822b56844213ef932e7ad1b0c SHA512 f3a807fbf30327a1dccb690e484276ab1b2b1e33b0440884b6476607e08aa3513d5c9d4b6dd345415decb93747d334c70bffe9e49eae787b48ef6c08989aeb7c WHIRLPOOL 955800014b4155eba5dea6f4ae50e7a302467d4063a5ff0378b6c3b833f924787fd923248f8746bdbbef3e57135ae44eb1a38248c08112ad5435b645fc955ec4
 DIST mesa-17.0.2.tar.xz 9451056 SHA256 f8f191f909e01e65de38d5bdea5fb057f21649a3aed20948be02348e77a689d4 SHA512 df0cb47d01dee16d1d72e0a5fd9d49ab412294761ca647cbb6b411e16892b8be503d87911591339d4630d16b7c948897bfa4321b2c5a8a4219fa58b347015471 WHIRLPOOL 3cb03a48da994202e6a39f4adc97e8b40f2bcc713f5fb859fbbdc0a068f3842a59bc916fa0e36138cf560c4bf25c3b70425d6ed9ea8096acc8bbd9ddebfd1acc

diff --git a/media-libs/mesa/files/mesa-17-clover-Work-around-build-failure-with-AltiVec.patch b/media-libs/mesa/files/mesa-17-clover-Work-around-build-failure-with-AltiVec.patch
deleted file mode 100644
index 87f5f9d0143..00000000000
--- a/media-libs/mesa/files/mesa-17-clover-Work-around-build-failure-with-AltiVec.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 7d1195c1e4d071fe796bf5f210c468ea1cc86225 Mon Sep 17 00:00:00 2001
-From: Matt Turner <mattst88@gmail.com>
-Date: Thu, 2 Mar 2017 04:43:21 +0000
-Subject: [PATCH] clover: Work around build failure with AltiVec.
-
-Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=587210
-Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68504
-Acked-by: Francisco Jerez <currojerez@riseup.net>
----
- configure.ac                                  | 14 ++++++++++++++
- src/gallium/state_trackers/clover/Makefile.am |  3 +++
- 2 files changed, 17 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index a3d1a00..57c4b1e 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -2033,6 +2033,20 @@ if test "x$enable_opencl" = xyes; then
-        AC_MSG_ERROR([Clover requires libelf])
-     fi
- 
-+    if test "x${ac_cv_cxx_compiler_gnu}" = xyes; then
-+        altivec_enabled=no
-+        AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-+        #if !defined(__VEC__) || !defined(__ALTIVEC__)
-+        #error "AltiVec not enabled"
-+        #endif
-+        ])], altivec_enabled=yes)
-+
-+        if test "$altivec_enabled" = yes; then
-+            CLOVER_STD_OVERRIDE="-std=gnu++11"
-+        fi
-+        AC_SUBST([CLOVER_STD_OVERRIDE])
-+    fi
-+
-     llvm_require_version $LLVM_REQUIRED_OPENCL "opencl"
- 
-     llvm_add_default_components "opencl"
-diff --git a/src/gallium/state_trackers/clover/Makefile.am b/src/gallium/state_trackers/clover/Makefile.am
-index a657e5b..3213935 100644
---- a/src/gallium/state_trackers/clover/Makefile.am
-+++ b/src/gallium/state_trackers/clover/Makefile.am
-@@ -32,6 +32,7 @@ noinst_LTLIBRARIES = libclover.la libcltgsi.la libclllvm.la
- 
- libcltgsi_la_CXXFLAGS = \
- 	-std=c++11 \
-+	$(CLOVER_STD_OVERRIDE) \
- 	$(VISIBILITY_CXXFLAGS)
- 
- libcltgsi_la_SOURCES = $(TGSI_SOURCES)
-@@ -40,6 +41,7 @@ libclllvm_la_CXXFLAGS = \
- 	-std=c++11 \
- 	$(VISIBILITY_CXXFLAGS) \
- 	$(LLVM_CXXFLAGS) \
-+	$(CLOVER_STD_OVERRIDE) \
- 	$(DEFINES) \
- 	$(LIBELF_CFLAGS) \
- 	-DLIBCLC_INCLUDEDIR=\"$(LIBCLC_INCLUDEDIR)/\" \
-@@ -50,6 +52,7 @@ libclllvm_la_SOURCES = $(LLVM_SOURCES)
- 
- libclover_la_CXXFLAGS = \
- 	-std=c++11 \
-+	$(CLOVER_STD_OVERRIDE) \
- 	$(VISIBILITY_CXXFLAGS)
- 
- libclover_la_LIBADD = \
--- 
-2.10.2
-

diff --git a/media-libs/mesa/mesa-17.0.1.ebuild b/media-libs/mesa/mesa-17.0.1.ebuild
deleted file mode 100644
index 6594ed90ea3..00000000000
--- a/media-libs/mesa/mesa-17.0.1.ebuild
+++ /dev/null
@@ -1,516 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git"
-
-if [[ ${PV} = 9999 ]]; then
-	GIT_ECLASS="git-r3"
-	EXPERIMENTAL="true"
-fi
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
-
-OPENGL_DIR="xorg-x11"
-
-MY_P="${P/_/-}"
-
-DESCRIPTION="OpenGL-like graphic library for Linux"
-HOMEPAGE="https://www.mesa3d.org/"
-
-if [[ $PV == 9999 ]]; then
-	SRC_URI=""
-else
-	SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-RESTRICT="!bindist? ( bindist )"
-
-INTEL_CARDS="i915 i965 intel"
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
-VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno imx nouveau vc4 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 +llvm
-	+nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind vdpau
-	vulkan wayland xvmc xa"
-
-REQUIRED_USE="
-	d3d9?   ( dri3 gallium )
-	llvm?   ( gallium )
-	opencl? ( gallium llvm )
-	openmax? ( gallium )
-	gles1?  ( egl )
-	gles2?  ( egl )
-	vaapi? ( gallium )
-	vdpau? ( gallium )
-	vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
-	          video_cards_radeonsi? ( llvm ) )
-	wayland? ( egl gbm )
-	xa?  ( gallium )
-	video_cards_freedreno?  ( gallium )
-	video_cards_intel?  ( classic )
-	video_cards_i915?   ( || ( classic gallium ) )
-	video_cards_i965?   ( classic )
-	video_cards_imx?    ( gallium )
-	video_cards_nouveau? ( || ( classic gallium ) )
-	video_cards_radeon? ( || ( classic gallium )
-						  gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
-	video_cards_r100?   ( classic )
-	video_cards_r200?   ( classic )
-	video_cards_r300?   ( gallium x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_r600?   ( gallium )
-	video_cards_radeonsi?   ( gallium llvm )
-	video_cards_vivante? ( gallium gbm )
-	video_cards_vmware? ( gallium )
-	${PYTHON_REQUIRED_USE}
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.74"
-# keep correct libdrm and dri2proto dep
-# keep blocks in rdepend for binpkg
-RDEPEND="
-	!<x11-base/xorg-server-1.7
-	!<=x11-proto/xf86driproto-2.0.3
-	abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
-	classic? ( app-eselect/eselect-mesa )
-	gallium? ( app-eselect/eselect-mesa )
-	>=app-eselect/eselect-opengl-1.3.0
-	>=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
-	>=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
-	x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
-	llvm? (
-		video_cards_radeonsi? (
-			virtual/libelf:0=[${MULTILIB_USEDEP}]
-			vulkan? (
-				|| (
-					sys-devel/llvm:4[${MULTILIB_USEDEP}]
-					>=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}] ) )
-		)
-		video_cards_r600? (
-			virtual/libelf:0=[${MULTILIB_USEDEP}]
-		)
-		video_cards_radeon? (
-			virtual/libelf:0=[${MULTILIB_USEDEP}]
-		)
-		|| (
-			sys-devel/llvm:4[${MULTILIB_USEDEP}]
-			>=sys-devel/llvm-3.6.0:0[${MULTILIB_USEDEP}]
-		)
-		<sys-devel/llvm-5:=[${MULTILIB_USEDEP}]
-	)
-	opencl? (
-				app-eselect/eselect-opencl
-				dev-libs/libclc
-				virtual/libelf:0=[${MULTILIB_USEDEP}]
-			)
-	openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
-	vaapi? (
-		>=x11-libs/libva-1.6.0:=[${MULTILIB_USEDEP}]
-		video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
-	)
-	vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
-	wayland? ( >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}] )
-	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}]
-"
-for card in ${INTEL_CARDS}; do
-	RDEPEND="${RDEPEND}
-		video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
-	"
-done
-
-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] )
-"
-
-# FIXME: kill the sys-devel/llvm[video_cards_radeon] compat once
-# LLVM < 3.9 is out of the game
-DEPEND="${RDEPEND}
-	llvm? (
-		video_cards_radeonsi? ( || (
-			sys-devel/llvm[llvm_targets_AMDGPU]
-			sys-devel/llvm[video_cards_radeon]
-		) )
-	)
-	opencl? (
-		|| (
-			sys-devel/llvm:4[${MULTILIB_USEDEP}]
-			>=sys-devel/llvm-3.6.0:0[${MULTILIB_USEDEP}]
-		)
-		|| (
-			sys-devel/clang:4[${MULTILIB_USEDEP}]
-			>=sys-devel/clang-3.6.0:0[${MULTILIB_USEDEP}]
-		)
-		>=sys-devel/gcc-4.6
-	)
-	sys-devel/gettext
-	virtual/pkgconfig
-	valgrind? ( dev-util/valgrind )
-	>=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
-	dri3? (
-		>=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
-		>=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
-	)
-	>=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
-	>=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
-	>=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
-	>=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
-"
-[[ ${PV} == 9999 ]] && DEPEND+="
-	sys-devel/bison
-	sys-devel/flex
-	${PYTHON_DEPS}
-	$(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
-	)
-)"
-
-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 || use opencl; then
-		LLVM_MAX_SLOT=4 llvm_pkg_setup
-	fi
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	eapply "${FILESDIR}"/${PN}-17-clover-Work-around-build-failure-with-AltiVec.patch
-
-	eautoreconf
-
-	eapply_user
-}
-
-multilib_src_configure() {
-	local myconf
-
-	if use classic; then
-		# Configurable DRI drivers
-		driver_enable swrast
-
-		# Intel code
-		driver_enable video_cards_i915 i915
-		driver_enable video_cards_i965 i965
-		if ! use video_cards_i915 && \
-			! use video_cards_i965; then
-			driver_enable video_cards_intel i915 i965
-		fi
-
-		# Nouveau code
-		driver_enable video_cards_nouveau nouveau
-
-		# ATI code
-		driver_enable video_cards_r100 radeon
-		driver_enable video_cards_r200 r200
-		if ! use video_cards_r100 && \
-				! use video_cards_r200; then
-			driver_enable video_cards_radeon radeon r200
-		fi
-	fi
-
-	if use egl; then
-		myconf+=" --with-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
-	fi
-
-	if use gallium; then
-		myconf+="
-			$(use_enable d3d9 nine)
-			$(use_enable llvm gallium-llvm)
-			$(use_enable openmax omx)
-			$(use_enable vaapi va)
-			$(use_enable vdpau)
-			$(use_enable xa)
-			$(use_enable xvmc)
-		"
-		use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
-
-		gallium_enable swrast
-		gallium_enable video_cards_vc4 vc4
-		gallium_enable video_cards_vivante etnaviv
-		gallium_enable video_cards_vmware svga
-		gallium_enable video_cards_nouveau nouveau
-		gallium_enable video_cards_i915 i915
-		gallium_enable video_cards_imx imx
-		if ! use video_cards_i915 && \
-			! use video_cards_i965; then
-			gallium_enable video_cards_intel i915
-		fi
-
-		gallium_enable video_cards_r300 r300
-		gallium_enable video_cards_r600 r600
-		gallium_enable video_cards_radeonsi radeonsi
-		if ! use video_cards_r300 && \
-				! use video_cards_r600; then
-			gallium_enable video_cards_radeon r300 r600
-		fi
-
-		gallium_enable video_cards_freedreno freedreno
-		# opencl stuff
-		if use opencl; then
-			myconf+="
-				$(use_enable opencl)
-				--with-clang-libdir="${EPREFIX}/usr/lib"
-				"
-		fi
-	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) \
-		--enable-valgrind=$(usex valgrind auto no) \
-		--enable-llvm-shared-libs \
-		--with-dri-drivers=${DRI_DRIVERS} \
-		--with-gallium-drivers=${GALLIUM_DRIVERS} \
-		--with-vulkan-drivers=${VULKAN_DRIVERS} \
-		PYTHON2="${PYTHON}" \
-		${myconf}
-}
-
-multilib_src_install() {
-	emake install DESTDIR="${D}"
-
-	if use classic || use gallium; then
-			ebegin "Moving DRI/Gallium drivers for dynamic switching"
-			local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
-			keepdir /usr/$(get_libdir)/dri
-			dodir /usr/$(get_libdir)/mesa
-			for x in ${gallium_drivers[@]}; do
-				if [ -f "$(get_libdir)/gallium/${x}" ]; then
-					mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
-						|| die "Failed to move ${x}"
-				fi
-			done
-			if use classic; then
-				emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
-			fi
-			for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
-				if [ -f ${x} -o -L ${x} ]; then
-					mv -f "${x}" "${x/dri/mesa}" \
-						|| die "Failed to move ${x}"
-				fi
-			done
-			pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
-			ln -s ../mesa/*.so . || die "Creating symlink failed"
-			# remove symlinks to drivers known to eselect
-			for x in ${gallium_drivers[@]}; do
-				if [ -f ${x} -o -L ${x} ]; then
-					rm "${x}" || die "Failed to remove ${x}"
-				fi
-			done
-			popd
-		eend $?
-	fi
-	if use opencl; then
-		ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
-		local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
-		dodir ${cl_dir}/{lib,include}
-		if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
-			mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
-			"${ED}"${cl_dir}
-		fi
-		if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
-			mv -f "${ED}"/usr/include/CL \
-			"${ED}"${cl_dir}/include
-		fi
-		eend $?
-	fi
-
-	if use openmax; then
-		echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
-		doenvd "${T}"/99mesaxdgomx
-		keepdir /usr/share/mesa/xdg
-	fi
-}
-
-multilib_src_install_all() {
-	find "${ED}" -name '*.la' -delete
-	einstalldocs
-
-	if use !bindist; then
-		dodoc docs/patents.txt
-	fi
-
-	# Install config file for eselect mesa
-	insinto /usr/share/mesa
-	newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
-}
-
-multilib_src_test() {
-	if use llvm; then
-		local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
-		pushd src/gallium/drivers/llvmpipe >/dev/null || die
-		emake ${llvm_tests}
-		pax-mark m ${llvm_tests}
-		popd >/dev/null || die
-	fi
-	emake check
-}
-
-pkg_postinst() {
-	# Switch to the xorg implementation.
-	echo
-	eselect opengl set --use-old ${OPENGL_DIR}
-
-	# Select classic/gallium drivers
-	if use classic || use gallium; then
-		eselect mesa set --auto
-	fi
-
-	# Switch to mesa opencl
-	if use opencl; then
-		eselect opencl set --use-old ${PN}
-	fi
-
-	# run omxregister-bellagio to make the OpenMAX drivers known system-wide
-	if use openmax; then
-		ebegin "Registering OpenMAX drivers"
-		BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
-			OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
-			omxregister-bellagio
-		eend $?
-	fi
-
-	# warn about patent encumbered texture-float
-	if use !bindist; then
-		elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
-		elog "enabled. Please see patents.txt for an explanation."
-	fi
-
-	if ! has_version media-libs/libtxc_dxtn; then
-		elog "Note that in order to have full S3TC support, it is necessary to install"
-		elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
-		elog "textures in some apps, and some others even require this to run."
-	fi
-}
-
-pkg_prerm() {
-	if use openmax; then
-		rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
-	fi
-}
-
-# $1 - VIDEO_CARDS flag
-# other args - names of DRI drivers to enable
-# TODO: avoid code duplication for a more elegant implementation
-driver_enable() {
-	case $# in
-		# for enabling unconditionally
-		1)
-			DRI_DRIVERS+=",$1"
-			;;
-		*)
-			if use $1; then
-				shift
-				for i in $@; do
-					DRI_DRIVERS+=",${i}"
-				done
-			fi
-			;;
-	esac
-}
-
-gallium_enable() {
-	case $# in
-		# for enabling unconditionally
-		1)
-			GALLIUM_DRIVERS+=",$1"
-			;;
-		*)
-			if use $1; then
-				shift
-				for i in $@; do
-					GALLIUM_DRIVERS+=",${i}"
-				done
-			fi
-			;;
-	esac
-}
-
-vulkan_enable() {
-	case $# in
-		# for enabling unconditionally
-		1)
-			VULKAN_DRIVERS+=",$1"
-			;;
-		*)
-			if use $1; then
-				shift
-				for i in $@; do
-					VULKAN_DRIVERS+=",${i}"
-				done
-			fi
-			;;
-	esac
-}


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2018-11-29  5:17 Matt Turner
  0 siblings, 0 replies; 16+ messages in thread
From: Matt Turner @ 2018-11-29  5:17 UTC (permalink / raw
  To: gentoo-commits

commit:     cf19fac9486c8d39e5aaa276e584815ebbb9400f
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 29 05:10:29 2018 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Thu Nov 29 05:17:18 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf19fac9

media-libs/mesa: Drop old versions

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 media-libs/mesa/Manifest                           |   4 -
 .../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.3.0_rc2.ebuild             | 515 --------------------
 media-libs/mesa/mesa-18.3.0_rc3.ebuild             | 519 --------------------
 media-libs/mesa/metadata.xml                       |   2 -
 8 files changed, 2147 deletions(-)

diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
index 2d2812b945c..f1d79738475 100644
--- a/media-libs/mesa/Manifest
+++ b/media-libs/mesa/Manifest
@@ -1,7 +1,3 @@
-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.2.6.tar.xz 11384440 BLAKE2B 33c2f5425a98d71ec813b52cc24e9934b0617438279f77c5f5d4bf9dba85931d387bf5c852ddf1f036c4baf7ca23761c8422eb2c61b84eeebea71e510c91335c SHA512 a7dd02f67384bb800dff70a0672a968ced96bb438605cdb39bde3e468d4dcf6162414a44e5da1abe7a1831fceb6f23e6c850eb5f80cfc5ee3861c14924c10ed4
-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
 DIST mesa-18.3.0-rc4.tar.xz 11863728 BLAKE2B 4b3ad84c09009c6555d97a24e276becc292ee9a63bd1f9f5abf8896e584aa5f7748f27c1a3d6059a908d9dc117aa6f26b6a444e63ee59a431b0b257049aa6b57 SHA512 ee1adf9f8237a4f72a8b44ba9aeeb58fad041240e98ab71da6203f2a634f4b9dcd2758b4b5c592104cd51e431acb5292e79d8dd5a61a21c18ae7f93a9d98af41

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 d8709eae8f7..00000000000
--- 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 <stdint.h>
-                      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 11d4f9cac07..00000000000
--- 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 <dylan@pnwbakers.com>
-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 <rafallalik@gmail.com>
-Reviewed-by: Matt Turner <mattst88@gmail.com>
----
- 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 b325261df67..00000000000
--- 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 661f4153d49..00000000000
--- 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.3.0_rc2.ebuild b/media-libs/mesa/mesa-18.3.0_rc2.ebuild
deleted file mode 100644
index 58c89ce78f0..00000000000
--- 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 c6579285709..00000000000
--- 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/metadata.xml b/media-libs/mesa/metadata.xml
index 8e1144c23b4..ea7584d836e 100644
--- a/media-libs/mesa/metadata.xml
+++ b/media-libs/mesa/metadata.xml
@@ -6,7 +6,6 @@
 		<name>X11</name>
 	</maintainer>
 	<use>
-		<flag name="bindist">Disable patent-encumbered ARB_texture_float, EXT_texture_shared_exponent, and EXT_packed_float extensions.</flag>
 		<flag name="classic">Build drivers based on the classic architecture.</flag>
 		<flag name="d3d9">Enable Direct 3D9 API through Nine state tracker. Can be used together with patched wine.</flag>
 		<flag name="dri3">Enable DRI3 support.</flag>
@@ -17,7 +16,6 @@
 		<flag name="gles2">Enable GLESv2 support.</flag>
 		<flag name="llvm">Enable LLVM backend for Gallium3D.</flag>
 		<flag name="opencl">Enable the Clover Gallium OpenCL state tracker.</flag>
-		<flag name="openmax">Enable OpenMAX video decode/encode acceleration for Gallium3D.</flag>
 		<flag name="osmesa">Build the Mesa library for off-screen rendering.</flag>
 		<flag name="pax_kernel">Enable if the user plans to run the package under a pax enabled hardened kernel</flag>
 		<flag name="pic">disable optimized assembly code that is not PIC friendly</flag>


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2020-04-13 16:32 Matt Turner
  0 siblings, 0 replies; 16+ messages in thread
From: Matt Turner @ 2020-04-13 16:32 UTC (permalink / raw
  To: gentoo-commits

commit:     a117c20f1b3127d4c397dddef4a7680359f1c9a3
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 13 16:06:42 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Mon Apr 13 16:32:44 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a117c20f

media-libs/mesa: Revbump in order to rebuild against libdrm

And patch the libdrm version requirement so we don't have this problem
again.

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 ...ify-the-maximum-required-libdrm-in-dri.pc.patch | 33 ++++++++++++++++++++++
 .../{mesa-20.0.4.ebuild => mesa-20.0.4-r1.ebuild}  |  4 +++
 2 files changed, 37 insertions(+)

diff --git a/media-libs/mesa/files/mesa-20.0.4-meson-Specify-the-maximum-required-libdrm-in-dri.pc.patch b/media-libs/mesa/files/mesa-20.0.4-meson-Specify-the-maximum-required-libdrm-in-dri.pc.patch
new file mode 100644
index 00000000000..09897526a65
--- /dev/null
+++ b/media-libs/mesa/files/mesa-20.0.4-meson-Specify-the-maximum-required-libdrm-in-dri.pc.patch
@@ -0,0 +1,33 @@
+From 316b352e946a9993a20f28abc741d34455a957a8 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Mon, 13 Apr 2020 09:20:18 -0700
+Subject: [PATCH] meson: Specify the maximum required libdrm in dri.pc
+
+When dealing with a regression in libdrm-2.4.101, I masked the package
+in Gentoo. In doing so, we discovered that Mesa's dri.pc specifies a
+version requirement in dri.pc for >= the version of libdrm Mesa was
+built against, thus preventing packages from being rebuilt with the
+older version of libdrm installed.
+
+Let's reduce this version requirement to the latest libdrm required by
+Mesa instead, since libdrm is backward compatible.
+---
+ src/mesa/drivers/dri/meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/mesa/drivers/dri/meson.build b/src/mesa/drivers/dri/meson.build
+index acf7d2eb128..b09ca16e38a 100644
+--- a/src/mesa/drivers/dri/meson.build
++++ b/src/mesa/drivers/dri/meson.build
+@@ -86,7 +86,7 @@ endif
+ if with_dri
+   dri_req_private = []
+   if dep_libdrm.found()
+-    dri_req_private = ['libdrm >= ' + dep_libdrm.version()]
++    dri_req_private = ['libdrm >= ' + _drm_ver]
+   endif
+ 
+   pkg.generate(
+-- 
+2.24.1
+

diff --git a/media-libs/mesa/mesa-20.0.4.ebuild b/media-libs/mesa/mesa-20.0.4-r1.ebuild
similarity index 99%
rename from media-libs/mesa/mesa-20.0.4.ebuild
rename to media-libs/mesa/mesa-20.0.4-r1.ebuild
index 18accf194ed..a0d7a8ff5ca 100644
--- a/media-libs/mesa/mesa-20.0.4.ebuild
+++ b/media-libs/mesa/mesa-20.0.4-r1.ebuild
@@ -246,6 +246,10 @@ x86? (
 	libglvnd? ( usr/lib/libGLX_mesa.so.0.0.0 )
 )"
 
+PATCHES=(
+	"${FILESDIR}"/${P}-meson-Specify-the-maximum-required-libdrm-in-dri.pc.patch
+)
+
 llvm_check_deps() {
 	local flags=${MULTILIB_USEDEP}
 	if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2021-09-22 21:22 Matt Turner
  0 siblings, 0 replies; 16+ messages in thread
From: Matt Turner @ 2021-09-22 21:22 UTC (permalink / raw
  To: gentoo-commits

commit:     417c6adf5fd72af2160f0b2c251bacb58f0307a4
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 22 21:15:28 2021 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed Sep 22 21:22:30 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=417c6adf

media-libs/mesa: Add patch to prevent fossil_db problems

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 ...ize_db-Don-t-corrupt-keys-during-entry-re.patch |  46 ++
 media-libs/mesa/mesa-21.1.8-r1.ebuild              | 560 +++++++++++++++++++++
 2 files changed, 606 insertions(+)

diff --git a/media-libs/mesa/files/21.1.8-util-fossilize_db-Don-t-corrupt-keys-during-entry-re.patch b/media-libs/mesa/files/21.1.8-util-fossilize_db-Don-t-corrupt-keys-during-entry-re.patch
new file mode 100644
index 00000000000..ebbb8abb1fe
--- /dev/null
+++ b/media-libs/mesa/files/21.1.8-util-fossilize_db-Don-t-corrupt-keys-during-entry-re.patch
@@ -0,0 +1,46 @@
+From 8de60a1654a875d0b55512a1508f541f706f9b97 Mon Sep 17 00:00:00 2001
+From: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
+Date: Sat, 4 Sep 2021 03:32:21 +0200
+Subject: [PATCH] util/fossilize_db: Don't corrupt keys during entry read.
+
+We change the hash that is still used to set entry->key.
+
+Fixes: d2d642cc014 "util/fossilize_db: Only allocate entries after full read."
+Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12725>
+---
+ src/util/fossilize_db.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/util/fossilize_db.c b/src/util/fossilize_db.c
+index e1709a1ff64..26024101b83 100644
+--- a/src/util/fossilize_db.c
++++ b/src/util/fossilize_db.c
+@@ -156,18 +156,18 @@ update_foz_index(struct foz_db *foz_db, FILE *db_idx, unsigned file_idx)
+       offset += header->payload_size;
+       parsed_offset = offset;
+ 
+-      /* Truncate the entry's hash string to a 64bit hash for use with a
+-       * 64bit hash table for looking up file offsets.
+-       */
+-      hash_str[16] = '\0';
+-      uint64_t key = strtoull(hash_str, NULL, 16);
+-
+       struct foz_db_entry *entry = ralloc(foz_db->mem_ctx,
+                                           struct foz_db_entry);
+       entry->header = *header;
+       entry->file_idx = file_idx;
+       _mesa_sha1_hex_to_sha1(entry->key, hash_str);
+ 
++      /* Truncate the entry's hash string to a 64bit hash for use with a
++       * 64bit hash table for looking up file offsets.
++       */
++      hash_str[16] = '\0';
++      uint64_t key = strtoull(hash_str, NULL, 16);
++
+       entry->offset = cache_offset;
+ 
+       _mesa_hash_table_u64_insert(foz_db->index_db, key, entry);
+-- 
+2.32.0
+

diff --git a/media-libs/mesa/mesa-21.1.8-r1.ebuild b/media-libs/mesa/mesa-21.1.8-r1.ebuild
new file mode 100644
index 00000000000..482b96c702a
--- /dev/null
+++ b/media-libs/mesa/mesa-21.1.8-r1.ebuild
@@ -0,0 +1,560 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+
+inherit llvm meson-multilib python-any-r1 linux-info
+
+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"
+	inherit git-r3
+else
+	SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~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 intel iris lima nouveau panfrost v3d 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 selinux test unwind vaapi valgrind vdpau vulkan
+	vulkan-overlay wayland +X xa xvmc zink +zstd"
+
+REQUIRED_USE="
+	d3d9?   ( dri3 || ( video_cards_iris video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
+	gles1?  ( egl )
+	gles2?  ( egl )
+	osmesa? ( gallium )
+	vulkan? ( dri3
+			  video_cards_radeonsi? ( llvm ) )
+	vulkan-overlay? ( vulkan )
+	wayland? ( egl gbm )
+	video_cards_freedreno?  ( gallium )
+	video_cards_intel?  ( classic )
+	video_cards_i915?   ( || ( classic gallium ) )
+	video_cards_i965?   ( classic )
+	video_cards_iris?   ( gallium )
+	video_cards_lima?   ( gallium )
+	video_cards_nouveau? ( || ( classic gallium ) )
+	video_cards_panfrost? ( 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_v3d? ( gallium )
+	video_cards_vc4? ( gallium )
+	video_cards_virgl? ( gallium )
+	video_cards_vivante? ( gallium gbm )
+	video_cards_vmware? ( gallium )
+	xa? ( X )
+	xvmc? ( X )
+	zink? ( gallium vulkan )
+"
+
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.105"
+RDEPEND="
+	>=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
+	>=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
+	>=sys-libs/zlib-1.2.8[${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? (
+					>=virtual/opencl-3[${MULTILIB_USEDEP}]
+					dev-libs/libclc
+					virtual/libelf:0=[${MULTILIB_USEDEP}]
+				)
+		vaapi? (
+			>=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
+		)
+		vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
+		xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
+	)
+	selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
+	wayland? (
+		>=dev-libs/wayland-1.18.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] )
+	vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] )
+	X? (
+		>=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
+		>=x11-libs/libxshmfence-1.1:=[${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}]
+	)
+	zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
+	zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
+"
+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. < 10.
+# 3. Specify LLVM_MAX_SLOT, e.g. 9.
+LLVM_MAX_SLOT="12"
+LLVM_DEPSTR="
+	|| (
+		sys-devel/llvm:12[${MULTILIB_USEDEP}]
+		sys-devel/llvm:11[${MULTILIB_USEDEP}]
+		sys-devel/llvm:10[${MULTILIB_USEDEP}]
+	)
+	<sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${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}
+	gallium? (
+		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}
+	valgrind? ( dev-util/valgrind )
+	X? (
+		x11-libs/libXrandr[${MULTILIB_USEDEP}]
+		x11-base/xorg-proto
+	)
+"
+BDEPEND="
+	${PYTHON_DEPS}
+	opencl? (
+		>=sys-devel/gcc-4.6
+	)
+	sys-devel/bison
+	sys-devel/flex
+	virtual/pkgconfig
+	$(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
+	wayland? ( dev-util/wayland-scanner[${MULTILIB_USEDEP}] )
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PV}-util-fossilize_db-Don-t-corrupt-keys-during-entry-re.patch
+)
+
+S="${WORKDIR}/${MY_P}"
+EGIT_CHECKOUT_DIR=${S}
+
+QA_WX_LOAD="
+x86? (
+	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
+	usr/lib/libGLX_mesa.so.0.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:${LLVM_SLOT}[${flags}]" || return 1
+	fi
+	has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
+}
+
+pkg_pretend() {
+	if use vulkan; then
+		if ! use video_cards_i965 &&
+		   ! use video_cards_iris &&
+		   ! use video_cards_radeonsi &&
+		   ! use video_cards_v3d; then
+			ewarn "Ignoring USE=vulkan     since VIDEO_CARDS does not contain i965, iris, radeonsi, or v3d"
+		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 &&
+		   ! 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
+
+	if use osmesa && ! use llvm; then
+		ewarn "OSMesa will be slow without enabling USE=llvm"
+	fi
+}
+
+python_check_deps() {
+	has_version -b ">=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 video_cards_i965 ||
+	   use video_cards_iris ||
+	   use video_cards_radeonsi; then
+		if kernel_is -ge 5 11 3; then
+			CONFIG_CHECK="~KCMP"
+		elif kernel_is -ge 5 11; then
+			CONFIG_CHECK="~CHECKPOINT_RESTORE"
+		elif kernel_is -ge 5 10 20; then
+			CONFIG_CHECK="~KCMP"
+		else
+			CONFIG_CHECK="~CHECKPOINT_RESTORE"
+		fi
+		linux-info_pkg_setup
+	fi
+
+	if use gallium && 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
+
+	local platforms
+	use X && platforms+="x11"
+	use wayland && platforms+=",wayland"
+	emesonargs+=(-Dplatforms=${platforms#,})
+
+	if use X || use egl; then
+		emesonargs+=(-Dglvnd=true)
+	else
+		emesonargs+=(-Dglvnd=false)
+	fi
+
+	if use gallium; then
+		emesonargs+=(
+			$(meson_feature llvm)
+			$(meson_feature lm-sensors lmsensors)
+			$(meson_feature unwind libunwind)
+		)
+
+		if use video_cards_iris ||
+		   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_feature vaapi gallium-va))
+			use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
+		else
+			emesonargs+=(-Dgallium-va=disabled)
+		fi
+
+		if use video_cards_r300 ||
+		   use video_cards_r600 ||
+		   use video_cards_radeonsi ||
+		   use video_cards_nouveau; then
+			emesonargs+=($(meson_feature vdpau gallium-vdpau))
+		else
+			emesonargs+=(-Dgallium-vdpau=disabled)
+		fi
+
+		if use video_cards_freedreno ||
+		   use video_cards_nouveau ||
+		   use video_cards_vmware; then
+			emesonargs+=($(meson_feature xa gallium-xa))
+		else
+			emesonargs+=(-Dgallium-xa=disabled)
+		fi
+
+		if use video_cards_r600 ||
+		   use video_cards_nouveau; then
+			emesonargs+=($(meson_feature xvmc gallium-xvmc))
+		else
+			emesonargs+=(-Dgallium-xvmc=disabled)
+		fi
+
+		if use video_cards_freedreno ||
+		   use video_cards_lima ||
+		   use video_cards_panfrost ||
+		   use video_cards_v3d ||
+		   use video_cards_vc4 ||
+		   use video_cards_vivante; then
+			gallium_enable -- kmsro
+		fi
+
+		gallium_enable -- swrast
+		gallium_enable video_cards_lima lima
+		gallium_enable video_cards_panfrost panfrost
+		gallium_enable video_cards_v3d v3d
+		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 zink zink
+
+		# 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_iris iris
+
+		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_iris intel
+		vulkan_enable video_cards_radeonsi amd
+		vulkan_enable video_cards_v3d broadcom
+	fi
+
+	driver_list() {
+		local drivers="$(sort -u <<< "${1// /$'\n'}")"
+		echo "${drivers//$'\n'/,}"
+	}
+
+	local vulkan_layers
+	use vulkan && vulkan_layers+="device-select"
+	use vulkan-overlay && vulkan_layers+=",overlay"
+	emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
+
+	emesonargs+=(
+		$(meson_use test build-tests)
+		-Dglx=$(usex X dri disabled)
+		-Dshared-glapi=enabled
+		$(meson_feature dri3)
+		$(meson_feature egl)
+		$(meson_feature gbm)
+		$(meson_feature gles1)
+		$(meson_feature gles2)
+		$(meson_use osmesa)
+		$(meson_use selinux)
+		$(meson_feature zstd)
+		-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_test() {
+	meson_src_test -t 100
+}
+
+# $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
+}


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2021-11-18  7:48 Matt Turner
  0 siblings, 0 replies; 16+ messages in thread
From: Matt Turner @ 2021-11-18  7:48 UTC (permalink / raw
  To: gentoo-commits

commit:     6bd6e3f0c59beae9c743bd289a4bcc2306ab7cc4
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 18 07:45:23 2021 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Thu Nov 18 07:46:51 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6bd6e3f0

media-libs/mesa: Drop old versions

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 media-libs/mesa/Manifest                           |   3 -
 ...ize_db-Don-t-corrupt-keys-during-entry-re.patch |  46 --
 media-libs/mesa/mesa-21.1.7.ebuild                 | 556 --------------------
 media-libs/mesa/mesa-21.1.8-r1.ebuild              | 561 ---------------------
 media-libs/mesa/mesa-21.2.2.ebuild                 | 552 --------------------
 media-libs/mesa/metadata.xml                       |   1 -
 6 files changed, 1719 deletions(-)

diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
index ffdcdbb9b071..23120cbe718b 100644
--- a/media-libs/mesa/Manifest
+++ b/media-libs/mesa/Manifest
@@ -1,5 +1,2 @@
-DIST mesa-21.1.7.tar.xz 15391776 BLAKE2B a9138f189ef953d5efa4e287fbbe795ef2539c113dc7e0f565d3f35dcfaa59ab08674bf37fda196ba34e5963637c3ebb133db40b558bd275e29c8387b1acfdfa SHA512 1fd677437f292c30fbf08bfef8c1088557841f426090ccba20ab2a222b08fb5c3ec48a7a0301466e03a23019d09414c700a4f5e299479cacd6972a9f3ba030c8
-DIST mesa-21.1.8.tar.xz 15410504 BLAKE2B 430a1a5f3120bb69b7eaab13438d9a09201f5b11c9d4581d7dd39f48041a1b70d7c125f36553a5c504d1164fe6e0e3d50853c209c4280787f4fa6935ab385b86 SHA512 80fcf2b1d59b49e384e9aa1ae63a3ce709833059af1ffd8eb821054c1976709134098cfc79fac1578a2f08a003223f1c96b38e2e650c5be49821c6f2fe1047af
-DIST mesa-21.2.2.tar.xz 15755212 BLAKE2B a9c0f847d8d372fac076bd1a2a2113f34d4f5f57d5d459f88b2d1a14bd8a2a442d70c2959637ac17836d8be13941c2192bf639f42d3a7eaf7d8cdb5175268389 SHA512 0a4877b405384088c8bdac3031444cd22377d19552c41c08fb8928d6edf23d5f5a237ef1d6c5f96e3293c2e90c63f4702813226b85cb304fe5e01dd2710ba697
 DIST mesa-21.2.5.tar.xz 15829684 BLAKE2B a5d00d6c566e699acd1f8cfcf1b52024c92cfa8a4cc9a6fb1d6493526ea0d65790ed97c47c5c174d4369e589caf1a361351df6d43aba89f818970f87f9a81059 SHA512 aaa1ebaa1e18eea76c3784c9a65942c3e417c1079d7bf75dcede574999dc459fb4d68d041cf2f767afb9cbfa834a985e0a4edd5a56b0fc90f8fdc506359aa5da
 DIST mesa-21.3.0-rc3.tar.xz 16349156 BLAKE2B bc25478b7ee2c6186baf8f8540da7d5a6847146badd37653b65e2d3a47f8a7ae866825058ad54b68563ddb4f8409180ebb7415925409b6f0b401be81a45eca9d SHA512 14c3cdf2085077db3ec6d7e7b66304fccdaf441dfd64cc085d6d83960fcbdaa18a48d8f6bcdc096def06b6d389f51c1a5cb0a6793a236d668e22c592bc8b2e4c

diff --git a/media-libs/mesa/files/21.1.8-util-fossilize_db-Don-t-corrupt-keys-during-entry-re.patch b/media-libs/mesa/files/21.1.8-util-fossilize_db-Don-t-corrupt-keys-during-entry-re.patch
deleted file mode 100644
index ebbb8abb1fe5..000000000000
--- a/media-libs/mesa/files/21.1.8-util-fossilize_db-Don-t-corrupt-keys-during-entry-re.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 8de60a1654a875d0b55512a1508f541f706f9b97 Mon Sep 17 00:00:00 2001
-From: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
-Date: Sat, 4 Sep 2021 03:32:21 +0200
-Subject: [PATCH] util/fossilize_db: Don't corrupt keys during entry read.
-
-We change the hash that is still used to set entry->key.
-
-Fixes: d2d642cc014 "util/fossilize_db: Only allocate entries after full read."
-Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
-Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12725>
----
- src/util/fossilize_db.c | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/src/util/fossilize_db.c b/src/util/fossilize_db.c
-index e1709a1ff64..26024101b83 100644
---- a/src/util/fossilize_db.c
-+++ b/src/util/fossilize_db.c
-@@ -156,18 +156,18 @@ update_foz_index(struct foz_db *foz_db, FILE *db_idx, unsigned file_idx)
-       offset += header->payload_size;
-       parsed_offset = offset;
- 
--      /* Truncate the entry's hash string to a 64bit hash for use with a
--       * 64bit hash table for looking up file offsets.
--       */
--      hash_str[16] = '\0';
--      uint64_t key = strtoull(hash_str, NULL, 16);
--
-       struct foz_db_entry *entry = ralloc(foz_db->mem_ctx,
-                                           struct foz_db_entry);
-       entry->header = *header;
-       entry->file_idx = file_idx;
-       _mesa_sha1_hex_to_sha1(entry->key, hash_str);
- 
-+      /* Truncate the entry's hash string to a 64bit hash for use with a
-+       * 64bit hash table for looking up file offsets.
-+       */
-+      hash_str[16] = '\0';
-+      uint64_t key = strtoull(hash_str, NULL, 16);
-+
-       entry->offset = cache_offset;
- 
-       _mesa_hash_table_u64_insert(foz_db->index_db, key, entry);
--- 
-2.32.0
-

diff --git a/media-libs/mesa/mesa-21.1.7.ebuild b/media-libs/mesa/mesa-21.1.7.ebuild
deleted file mode 100644
index 60dbbe0f7065..000000000000
--- a/media-libs/mesa/mesa-21.1.7.ebuild
+++ /dev/null
@@ -1,556 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7,8,9} )
-
-inherit llvm meson-multilib python-any-r1 linux-info
-
-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"
-	inherit git-r3
-else
-	SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
-	KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~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 intel iris lima nouveau panfrost v3d 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 selinux test unwind vaapi valgrind vdpau vulkan
-	vulkan-overlay wayland +X xa xvmc zink +zstd"
-
-REQUIRED_USE="
-	d3d9?   ( dri3 || ( video_cards_iris video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
-	gles1?  ( egl )
-	gles2?  ( egl )
-	osmesa? ( gallium )
-	vulkan? ( dri3
-			  video_cards_radeonsi? ( llvm ) )
-	vulkan-overlay? ( vulkan )
-	wayland? ( egl gbm )
-	video_cards_freedreno?  ( gallium )
-	video_cards_intel?  ( classic )
-	video_cards_i915?   ( || ( classic gallium ) )
-	video_cards_i965?   ( classic )
-	video_cards_iris?   ( gallium )
-	video_cards_lima?   ( gallium )
-	video_cards_nouveau? ( || ( classic gallium ) )
-	video_cards_panfrost? ( 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_v3d? ( gallium )
-	video_cards_vc4? ( gallium )
-	video_cards_virgl? ( gallium )
-	video_cards_vivante? ( gallium gbm )
-	video_cards_vmware? ( gallium )
-	xa? ( X )
-	xvmc? ( X )
-	zink? ( gallium vulkan )
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.105"
-RDEPEND="
-	>=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
-	>=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.8[${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? (
-					>=virtual/opencl-3[${MULTILIB_USEDEP}]
-					dev-libs/libclc
-					virtual/libelf:0=[${MULTILIB_USEDEP}]
-				)
-		vaapi? (
-			>=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
-		)
-		vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
-		xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
-	)
-	selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
-	wayland? (
-		>=dev-libs/wayland-1.18.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] )
-	vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] )
-	X? (
-		>=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
-		>=x11-libs/libxshmfence-1.1:=[${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}]
-	)
-	zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
-	zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
-"
-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. < 10.
-# 3. Specify LLVM_MAX_SLOT, e.g. 9.
-LLVM_MAX_SLOT="12"
-LLVM_DEPSTR="
-	|| (
-		sys-devel/llvm:12[${MULTILIB_USEDEP}]
-		sys-devel/llvm:11[${MULTILIB_USEDEP}]
-		sys-devel/llvm:10[${MULTILIB_USEDEP}]
-	)
-	<sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${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}
-	gallium? (
-		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}
-	valgrind? ( dev-util/valgrind )
-	X? (
-		x11-libs/libXrandr[${MULTILIB_USEDEP}]
-		x11-base/xorg-proto
-	)
-"
-BDEPEND="
-	${PYTHON_DEPS}
-	opencl? (
-		>=sys-devel/gcc-4.6
-	)
-	sys-devel/bison
-	sys-devel/flex
-	virtual/pkgconfig
-	$(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
-	wayland? ( dev-util/wayland-scanner[${MULTILIB_USEDEP}] )
-"
-
-S="${WORKDIR}/${MY_P}"
-EGIT_CHECKOUT_DIR=${S}
-
-QA_WX_LOAD="
-x86? (
-	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
-	usr/lib/libGLX_mesa.so.0.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:${LLVM_SLOT}[${flags}]" || return 1
-	fi
-	has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
-}
-
-pkg_pretend() {
-	if use vulkan; then
-		if ! use video_cards_i965 &&
-		   ! use video_cards_iris &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_v3d; then
-			ewarn "Ignoring USE=vulkan     since VIDEO_CARDS does not contain i965, iris, radeonsi, or v3d"
-		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 &&
-		   ! 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
-
-	if use osmesa && ! use llvm; then
-		ewarn "OSMesa will be slow without enabling USE=llvm"
-	fi
-}
-
-python_check_deps() {
-	has_version -b ">=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 video_cards_i965 ||
-	   use video_cards_iris ||
-	   use video_cards_radeonsi; then
-		if kernel_is -ge 5 11 3; then
-			CONFIG_CHECK="~KCMP"
-		elif kernel_is -ge 5 11; then
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		elif kernel_is -ge 5 10 20; then
-			CONFIG_CHECK="~KCMP"
-		else
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		fi
-		linux-info_pkg_setup
-	fi
-
-	if use gallium && 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
-
-	local platforms
-	use X && platforms+="x11"
-	use wayland && platforms+=",wayland"
-	emesonargs+=(-Dplatforms=${platforms#,})
-
-	if use X || use egl; then
-		emesonargs+=(-Dglvnd=true)
-	else
-		emesonargs+=(-Dglvnd=false)
-	fi
-
-	if use gallium; then
-		emesonargs+=(
-			$(meson_feature llvm)
-			$(meson_feature lm-sensors lmsensors)
-			$(meson_feature unwind libunwind)
-		)
-
-		if use video_cards_iris ||
-		   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_feature vaapi gallium-va))
-			use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
-		else
-			emesonargs+=(-Dgallium-va=disabled)
-		fi
-
-		if use video_cards_r300 ||
-		   use video_cards_r600 ||
-		   use video_cards_radeonsi ||
-		   use video_cards_nouveau; then
-			emesonargs+=($(meson_feature vdpau gallium-vdpau))
-		else
-			emesonargs+=(-Dgallium-vdpau=disabled)
-		fi
-
-		if use video_cards_freedreno ||
-		   use video_cards_nouveau ||
-		   use video_cards_vmware; then
-			emesonargs+=($(meson_feature xa gallium-xa))
-		else
-			emesonargs+=(-Dgallium-xa=disabled)
-		fi
-
-		if use video_cards_r600 ||
-		   use video_cards_nouveau; then
-			emesonargs+=($(meson_feature xvmc gallium-xvmc))
-		else
-			emesonargs+=(-Dgallium-xvmc=disabled)
-		fi
-
-		if use video_cards_freedreno ||
-		   use video_cards_lima ||
-		   use video_cards_panfrost ||
-		   use video_cards_v3d ||
-		   use video_cards_vc4 ||
-		   use video_cards_vivante; then
-			gallium_enable -- kmsro
-		fi
-
-		gallium_enable -- swrast
-		gallium_enable video_cards_lima lima
-		gallium_enable video_cards_panfrost panfrost
-		gallium_enable video_cards_v3d v3d
-		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 zink zink
-
-		# 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_iris iris
-
-		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_iris intel
-		vulkan_enable video_cards_radeonsi amd
-		vulkan_enable video_cards_v3d broadcom
-	fi
-
-	driver_list() {
-		local drivers="$(sort -u <<< "${1// /$'\n'}")"
-		echo "${drivers//$'\n'/,}"
-	}
-
-	local vulkan_layers
-	use vulkan && vulkan_layers+="device-select"
-	use vulkan-overlay && vulkan_layers+=",overlay"
-	emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
-
-	emesonargs+=(
-		$(meson_use test build-tests)
-		-Dglx=$(usex X dri disabled)
-		-Dshared-glapi=enabled
-		$(meson_feature dri3)
-		$(meson_feature egl)
-		$(meson_feature gbm)
-		$(meson_feature gles1)
-		$(meson_feature gles2)
-		$(meson_use osmesa)
-		$(meson_use selinux)
-		$(meson_feature zstd)
-		-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_test() {
-	meson_src_test -t 100
-}
-
-# $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-21.1.8-r1.ebuild b/media-libs/mesa/mesa-21.1.8-r1.ebuild
deleted file mode 100644
index 636dda43bd7e..000000000000
--- a/media-libs/mesa/mesa-21.1.8-r1.ebuild
+++ /dev/null
@@ -1,561 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7,8,9} )
-
-inherit llvm meson-multilib python-any-r1 linux-info
-
-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"
-	inherit git-r3
-else
-	SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~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 intel iris lima nouveau panfrost v3d vc4 virgl vivante vmware"
-for card in ${VIDEO_CARDS}; do
-	IUSE_VIDEO_CARDS+=" video_cards_${card}"
-done
-
-IUSE="${IUSE_VIDEO_CARDS}
-	+classic cpu_flags_x86_sse2 d3d9 debug +dri3 +egl +gallium +gbm gles1 +gles2 +llvm
-	lm-sensors opencl osmesa selinux test unwind vaapi valgrind vdpau vulkan
-	vulkan-overlay wayland +X xa xvmc zink +zstd"
-
-REQUIRED_USE="
-	d3d9?   ( dri3 || ( video_cards_iris video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
-	gles1?  ( egl )
-	gles2?  ( egl )
-	osmesa? ( gallium )
-	vulkan? ( dri3
-			  video_cards_radeonsi? ( llvm ) )
-	vulkan-overlay? ( vulkan )
-	wayland? ( egl gbm )
-	video_cards_freedreno?  ( gallium )
-	video_cards_intel?  ( classic )
-	video_cards_i915?   ( || ( classic gallium ) )
-	video_cards_i965?   ( classic )
-	video_cards_iris?   ( gallium )
-	video_cards_lima?   ( gallium )
-	video_cards_nouveau? ( || ( classic gallium ) )
-	video_cards_panfrost? ( 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_v3d? ( gallium )
-	video_cards_vc4? ( gallium )
-	video_cards_virgl? ( gallium )
-	video_cards_vivante? ( gallium gbm )
-	video_cards_vmware? ( gallium )
-	xa? ( X )
-	xvmc? ( X )
-	zink? ( gallium vulkan )
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.105"
-RDEPEND="
-	>=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
-	>=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.8[${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? (
-					>=virtual/opencl-3[${MULTILIB_USEDEP}]
-					dev-libs/libclc
-					virtual/libelf:0=[${MULTILIB_USEDEP}]
-				)
-		vaapi? (
-			>=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
-		)
-		vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
-		xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
-	)
-	selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
-	wayland? (
-		>=dev-libs/wayland-1.18.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] )
-	vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] )
-	X? (
-		>=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
-		>=x11-libs/libxshmfence-1.1:=[${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}]
-	)
-	zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
-	zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
-"
-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. < 10.
-# 3. Specify LLVM_MAX_SLOT, e.g. 9.
-LLVM_MAX_SLOT="12"
-LLVM_DEPSTR="
-	|| (
-		sys-devel/llvm:12[${MULTILIB_USEDEP}]
-		sys-devel/llvm:11[${MULTILIB_USEDEP}]
-		sys-devel/llvm:10[${MULTILIB_USEDEP}]
-	)
-	<sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${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}
-	gallium? (
-		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}
-	valgrind? ( dev-util/valgrind )
-	X? (
-		x11-libs/libXrandr[${MULTILIB_USEDEP}]
-		x11-base/xorg-proto
-	)
-"
-BDEPEND="
-	${PYTHON_DEPS}
-	opencl? (
-		>=sys-devel/gcc-4.6
-	)
-	sys-devel/bison
-	sys-devel/flex
-	virtual/pkgconfig
-	$(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
-	wayland? ( dev-util/wayland-scanner[${MULTILIB_USEDEP}] )
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PV}-util-fossilize_db-Don-t-corrupt-keys-during-entry-re.patch
-)
-
-S="${WORKDIR}/${MY_P}"
-EGIT_CHECKOUT_DIR=${S}
-
-QA_WX_LOAD="
-x86? (
-	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
-	usr/lib/libGLX_mesa.so.0.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:${LLVM_SLOT}[${flags}]" || return 1
-	fi
-	has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
-}
-
-pkg_pretend() {
-	if use vulkan; then
-		if ! use video_cards_i965 &&
-		   ! use video_cards_iris &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_v3d; then
-			ewarn "Ignoring USE=vulkan     since VIDEO_CARDS does not contain i965, iris, radeonsi, or v3d"
-		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 &&
-		   ! 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
-
-	if use osmesa && ! use llvm; then
-		ewarn "OSMesa will be slow without enabling USE=llvm"
-	fi
-}
-
-python_check_deps() {
-	has_version -b ">=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 video_cards_i965 ||
-	   use video_cards_iris ||
-	   use video_cards_radeonsi; then
-		if kernel_is -ge 5 11 3; then
-			CONFIG_CHECK="~KCMP"
-		elif kernel_is -ge 5 11; then
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		elif kernel_is -ge 5 10 20; then
-			CONFIG_CHECK="~KCMP"
-		else
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		fi
-		linux-info_pkg_setup
-	fi
-
-	if use gallium && 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
-
-	local platforms
-	use X && platforms+="x11"
-	use wayland && platforms+=",wayland"
-	emesonargs+=(-Dplatforms=${platforms#,})
-
-	if use X || use egl; then
-		emesonargs+=(-Dglvnd=true)
-	else
-		emesonargs+=(-Dglvnd=false)
-	fi
-
-	if use gallium; then
-		emesonargs+=(
-			$(meson_feature llvm)
-			$(meson_feature lm-sensors lmsensors)
-			$(meson_feature unwind libunwind)
-		)
-
-		if use video_cards_iris ||
-		   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_feature vaapi gallium-va))
-			use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
-		else
-			emesonargs+=(-Dgallium-va=disabled)
-		fi
-
-		if use video_cards_r300 ||
-		   use video_cards_r600 ||
-		   use video_cards_radeonsi ||
-		   use video_cards_nouveau; then
-			emesonargs+=($(meson_feature vdpau gallium-vdpau))
-		else
-			emesonargs+=(-Dgallium-vdpau=disabled)
-		fi
-
-		if use video_cards_freedreno ||
-		   use video_cards_nouveau ||
-		   use video_cards_vmware; then
-			emesonargs+=($(meson_feature xa gallium-xa))
-		else
-			emesonargs+=(-Dgallium-xa=disabled)
-		fi
-
-		if use video_cards_r600 ||
-		   use video_cards_nouveau; then
-			emesonargs+=($(meson_feature xvmc gallium-xvmc))
-		else
-			emesonargs+=(-Dgallium-xvmc=disabled)
-		fi
-
-		if use video_cards_freedreno ||
-		   use video_cards_lima ||
-		   use video_cards_panfrost ||
-		   use video_cards_v3d ||
-		   use video_cards_vc4 ||
-		   use video_cards_vivante; then
-			gallium_enable -- kmsro
-		fi
-
-		gallium_enable -- swrast
-		gallium_enable video_cards_lima lima
-		gallium_enable video_cards_panfrost panfrost
-		gallium_enable video_cards_v3d v3d
-		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 zink zink
-
-		# 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_iris iris
-
-		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_iris intel
-		vulkan_enable video_cards_radeonsi amd
-		vulkan_enable video_cards_v3d broadcom
-	fi
-
-	driver_list() {
-		local drivers="$(sort -u <<< "${1// /$'\n'}")"
-		echo "${drivers//$'\n'/,}"
-	}
-
-	local vulkan_layers
-	use vulkan && vulkan_layers+="device-select"
-	use vulkan-overlay && vulkan_layers+=",overlay"
-	emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
-
-	emesonargs+=(
-		$(meson_use test build-tests)
-		-Dglx=$(usex X dri disabled)
-		-Dshared-glapi=enabled
-		$(meson_feature dri3)
-		$(meson_feature egl)
-		$(meson_feature gbm)
-		$(meson_feature gles1)
-		$(meson_feature gles2)
-		$(meson_use osmesa)
-		$(meson_use selinux)
-		$(meson_feature zstd)
-		$(meson_use cpu_flags_x86_sse2 sse2)
-		-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_test() {
-	meson_src_test -t 100
-}
-
-# $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-21.2.2.ebuild b/media-libs/mesa/mesa-21.2.2.ebuild
deleted file mode 100644
index e3fd921bbaa0..000000000000
--- a/media-libs/mesa/mesa-21.2.2.ebuild
+++ /dev/null
@@ -1,552 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..10} )
-
-inherit llvm meson-multilib python-any-r1 linux-info
-
-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"
-	inherit git-r3
-else
-	SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~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 intel iris lima nouveau panfrost v3d vc4 virgl vivante vmware"
-for card in ${VIDEO_CARDS}; do
-	IUSE_VIDEO_CARDS+=" video_cards_${card}"
-done
-
-IUSE="${IUSE_VIDEO_CARDS}
-	+classic d3d9 debug +egl +gallium +gbm gles1 +gles2 +llvm
-	lm-sensors opencl osmesa selinux test unwind vaapi valgrind vdpau vulkan
-	vulkan-overlay wayland +X xa xvmc zink +zstd"
-
-REQUIRED_USE="
-	d3d9?   ( || ( video_cards_iris video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
-	gles1?  ( egl )
-	gles2?  ( egl )
-	osmesa? ( gallium )
-	vulkan? ( video_cards_radeonsi? ( llvm ) )
-	vulkan-overlay? ( vulkan )
-	wayland? ( egl gbm )
-	video_cards_freedreno?  ( gallium )
-	video_cards_intel?  ( classic )
-	video_cards_i915?   ( || ( classic gallium ) )
-	video_cards_i965?   ( classic )
-	video_cards_iris?   ( gallium )
-	video_cards_lima?   ( gallium )
-	video_cards_nouveau? ( || ( classic gallium ) )
-	video_cards_panfrost? ( 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_v3d? ( gallium )
-	video_cards_vc4? ( gallium )
-	video_cards_virgl? ( gallium )
-	video_cards_vivante? ( gallium gbm )
-	video_cards_vmware? ( gallium )
-	xa? ( X )
-	xvmc? ( X )
-	zink? ( gallium vulkan )
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.107"
-RDEPEND="
-	>=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
-	>=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.8[${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? (
-					>=virtual/opencl-3[${MULTILIB_USEDEP}]
-					dev-libs/libclc
-					virtual/libelf:0=[${MULTILIB_USEDEP}]
-				)
-		vaapi? (
-			>=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
-		)
-		vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
-		xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
-	)
-	selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
-	wayland? (
-		>=dev-libs/wayland-1.18.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] )
-	vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] )
-	X? (
-		>=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
-		>=x11-libs/libxshmfence-1.1:=[${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}]
-	)
-	zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
-	zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
-"
-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. < 10.
-# 3. Specify LLVM_MAX_SLOT, e.g. 9.
-LLVM_MAX_SLOT="12"
-LLVM_DEPSTR="
-	|| (
-		sys-devel/llvm:12[${MULTILIB_USEDEP}]
-		sys-devel/llvm:11[${MULTILIB_USEDEP}]
-	)
-	<sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${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}
-	gallium? (
-		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}
-	valgrind? ( dev-util/valgrind )
-	X? (
-		x11-libs/libXrandr[${MULTILIB_USEDEP}]
-		x11-base/xorg-proto
-	)
-"
-BDEPEND="
-	${PYTHON_DEPS}
-	opencl? (
-		>=sys-devel/gcc-4.6
-	)
-	sys-devel/bison
-	sys-devel/flex
-	virtual/pkgconfig
-	$(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
-	wayland? ( dev-util/wayland-scanner[${MULTILIB_USEDEP}] )
-"
-
-S="${WORKDIR}/${MY_P}"
-EGIT_CHECKOUT_DIR=${S}
-
-QA_WX_LOAD="
-x86? (
-	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
-	usr/lib/libGLX_mesa.so.0.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:${LLVM_SLOT}[${flags}]" || return 1
-	fi
-	has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
-}
-
-pkg_pretend() {
-	if use vulkan; then
-		if ! use video_cards_i965 &&
-		   ! use video_cards_iris &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_v3d; then
-			ewarn "Ignoring USE=vulkan     since VIDEO_CARDS does not contain i965, iris, radeonsi, or v3d"
-		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 &&
-		   ! 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
-
-	if use osmesa && ! use llvm; then
-		ewarn "OSMesa will be slow without enabling USE=llvm"
-	fi
-}
-
-python_check_deps() {
-	has_version -b ">=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 video_cards_i965 ||
-	   use video_cards_iris ||
-	   use video_cards_radeonsi; then
-		if kernel_is -ge 5 11 3; then
-			CONFIG_CHECK="~KCMP"
-		elif kernel_is -ge 5 11; then
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		elif kernel_is -ge 5 10 20; then
-			CONFIG_CHECK="~KCMP"
-		else
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		fi
-		linux-info_pkg_setup
-	fi
-
-	if use gallium && 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
-
-	local platforms
-	use X && platforms+="x11"
-	use wayland && platforms+=",wayland"
-	emesonargs+=(-Dplatforms=${platforms#,})
-
-	if use X || use egl; then
-		emesonargs+=(-Dglvnd=true)
-	else
-		emesonargs+=(-Dglvnd=false)
-	fi
-
-	if use gallium; then
-		emesonargs+=(
-			$(meson_feature llvm)
-			$(meson_feature lm-sensors lmsensors)
-			$(meson_feature unwind libunwind)
-		)
-
-		if use video_cards_iris ||
-		   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_feature vaapi gallium-va))
-			use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
-		else
-			emesonargs+=(-Dgallium-va=disabled)
-		fi
-
-		if use video_cards_r300 ||
-		   use video_cards_r600 ||
-		   use video_cards_radeonsi ||
-		   use video_cards_nouveau; then
-			emesonargs+=($(meson_feature vdpau gallium-vdpau))
-		else
-			emesonargs+=(-Dgallium-vdpau=disabled)
-		fi
-
-		if use video_cards_freedreno ||
-		   use video_cards_nouveau ||
-		   use video_cards_vmware; then
-			emesonargs+=($(meson_feature xa gallium-xa))
-		else
-			emesonargs+=(-Dgallium-xa=disabled)
-		fi
-
-		if use video_cards_r600 ||
-		   use video_cards_nouveau; then
-			emesonargs+=($(meson_feature xvmc gallium-xvmc))
-		else
-			emesonargs+=(-Dgallium-xvmc=disabled)
-		fi
-
-		if use video_cards_freedreno ||
-		   use video_cards_lima ||
-		   use video_cards_panfrost ||
-		   use video_cards_v3d ||
-		   use video_cards_vc4 ||
-		   use video_cards_vivante; then
-			gallium_enable -- kmsro
-		fi
-
-		gallium_enable -- swrast
-		gallium_enable video_cards_lima lima
-		gallium_enable video_cards_panfrost panfrost
-		gallium_enable video_cards_v3d v3d
-		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 zink zink
-
-		# 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_iris iris
-
-		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_iris intel
-		vulkan_enable video_cards_radeonsi amd
-		vulkan_enable video_cards_v3d broadcom
-	fi
-
-	driver_list() {
-		local drivers="$(sort -u <<< "${1// /$'\n'}")"
-		echo "${drivers//$'\n'/,}"
-	}
-
-	local vulkan_layers
-	use vulkan && vulkan_layers+="device-select"
-	use vulkan-overlay && vulkan_layers+=",overlay"
-	emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
-
-	emesonargs+=(
-		$(meson_use test build-tests)
-		-Dglx=$(usex X dri disabled)
-		-Dshared-glapi=enabled
-		-Ddri3=enabled
-		$(meson_feature egl)
-		$(meson_feature gbm)
-		$(meson_feature gles1)
-		$(meson_feature gles2)
-		$(meson_use osmesa)
-		$(meson_use selinux)
-		$(meson_feature zstd)
-		-Dvalgrind=$(usex valgrind auto disabled)
-		-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_test() {
-	meson_src_test -t 100
-}
-
-# $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 f94241f238a4..2b18aba1b084 100644
--- a/media-libs/mesa/metadata.xml
+++ b/media-libs/mesa/metadata.xml
@@ -8,7 +8,6 @@
 	<use>
 		<flag name="classic">Build drivers based on the classic architecture.</flag>
 		<flag name="d3d9">Enable Direct 3D9 API through Nine state tracker. Can be used together with patched wine.</flag>
-		<flag name="dri3">Enable DRI3 support.</flag>
 		<flag name="egl">Enable EGL support.</flag>
 		<flag name="gallium">Build drivers based on Gallium3D, the new architecture for 3D graphics drivers.</flag>
 		<flag name="gbm">Enable the Graphics Buffer Manager for EGL on KMS.</flag>


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2023-04-11 19:04 Sam James
  0 siblings, 0 replies; 16+ messages in thread
From: Sam James @ 2023-04-11 19:04 UTC (permalink / raw
  To: gentoo-commits

commit:     9d79f611e3930455eafc5b80cf9b2fb71aeb20b0
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 11 18:15:01 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Apr 11 19:04:15 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d79f611

media-libs/mesa: fix Wayland runtime warnings

These cause Firefox to crash because it isn't handling warnings correctly
either (it aborts immediately).

Closes: https://bugs.gentoo.org/904072
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../mesa-23.0.2-wayland-crash-warnings-2.patch     |  49 +++
 .../files/mesa-23.0.2-wayland-crash-warnings.patch |  37 ++
 media-libs/mesa/mesa-23.0.2-r1.ebuild              | 461 +++++++++++++++++++++
 3 files changed, 547 insertions(+)

diff --git a/media-libs/mesa/files/mesa-23.0.2-wayland-crash-warnings-2.patch b/media-libs/mesa/files/mesa-23.0.2-wayland-crash-warnings-2.patch
new file mode 100644
index 000000000000..5992583a1fa0
--- /dev/null
+++ b/media-libs/mesa/files/mesa-23.0.2-wayland-crash-warnings-2.patch
@@ -0,0 +1,49 @@
+https://bugs.gentoo.org/904072
+https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21647
+
+From 689ce66a4332524b4eb98877de6f75d05dd05c60 Mon Sep 17 00:00:00 2001
+From: Alexandros Frantzis <alexandros.frantzis@collabora.com>
+Date: Thu, 2 Mar 2023 10:10:42 +0200
+Subject: [PATCH] vulkan/wsi/wayland: Fix destruction of event queue with
+ proxies still attached.
+
+Destroy the surface dmabuf feedback proxy before destroying the event
+queue that the proxy is attached to.
+
+This silences a warning that libwayland 1.22 emits for programs that use
+Vulkan/Wayland:
+
+warning: queue 0x557a4efbcf70 destroyed while proxies still attached:
+  zwp_linux_dmabuf_feedback_v1@18 still attached
+
+Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21647>
+--- a/src/vulkan/wsi/wsi_common_wayland.c
++++ b/src/vulkan/wsi/wsi_common_wayland.c
+@@ -1157,18 +1157,18 @@ wsi_wl_surface_destroy(VkIcdSurfaceBase *icd_surface, VkInstance _instance,
+    struct wsi_wl_surface *wsi_wl_surface =
+       wl_container_of((VkIcdSurfaceWayland *)icd_surface, wsi_wl_surface, base);
+ 
+-   if (wsi_wl_surface->surface)
+-      wl_proxy_wrapper_destroy(wsi_wl_surface->surface);
+-
+-   if (wsi_wl_surface->display)
+-      wsi_wl_display_destroy(wsi_wl_surface->display);
+-
+    if (wsi_wl_surface->wl_dmabuf_feedback) {
+       zwp_linux_dmabuf_feedback_v1_destroy(wsi_wl_surface->wl_dmabuf_feedback);
+       dmabuf_feedback_fini(&wsi_wl_surface->dmabuf_feedback);
+       dmabuf_feedback_fini(&wsi_wl_surface->pending_dmabuf_feedback);
+    }
+ 
++   if (wsi_wl_surface->surface)
++      wl_proxy_wrapper_destroy(wsi_wl_surface->surface);
++
++   if (wsi_wl_surface->display)
++      wsi_wl_display_destroy(wsi_wl_surface->display);
++
+    vk_free2(&instance->alloc, pAllocator, wsi_wl_surface);
+ }
+ 
+-- 
+GitLab

diff --git a/media-libs/mesa/files/mesa-23.0.2-wayland-crash-warnings.patch b/media-libs/mesa/files/mesa-23.0.2-wayland-crash-warnings.patch
new file mode 100644
index 000000000000..537d070c091e
--- /dev/null
+++ b/media-libs/mesa/files/mesa-23.0.2-wayland-crash-warnings.patch
@@ -0,0 +1,37 @@
+https://bugs.gentoo.org/904072
+https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21646
+
+From ee5d2250fd159689aae3f7d632a6226971bea85c Mon Sep 17 00:00:00 2001
+From: Alexandros Frantzis <alexandros.frantzis@collabora.com>
+Date: Thu, 2 Mar 2023 09:35:08 +0200
+Subject: [PATCH] egl/wayland: Fix destruction of event queue with proxies
+ still attached.
+
+Destroy the display wrapper proxy before destroying the event queue that
+the proxy is attached to.
+
+This silences a warning that libwayland 1.22 emits for programs that use
+EGL/Wayland:
+
+warning: queue 0x562a5ed2cd20 destroyed while proxies still attached:
+  wl_display@1 still attached
+
+Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21646>
+--- a/src/egl/drivers/dri2/platform_wayland.c
++++ b/src/egl/drivers/dri2/platform_wayland.c
+@@ -2865,10 +2865,10 @@ dri2_teardown_wayland(struct dri2_egl_display *dri2_dpy)
+       wl_shm_destroy(dri2_dpy->wl_shm);
+    if (dri2_dpy->wl_registry)
+       wl_registry_destroy(dri2_dpy->wl_registry);
+-   if (dri2_dpy->wl_queue)
+-      wl_event_queue_destroy(dri2_dpy->wl_queue);
+    if (dri2_dpy->wl_dpy_wrapper)
+       wl_proxy_wrapper_destroy(dri2_dpy->wl_dpy_wrapper);
++   if (dri2_dpy->wl_queue)
++      wl_event_queue_destroy(dri2_dpy->wl_queue);
+ 
+    if (dri2_dpy->own_device)
+       wl_display_disconnect(dri2_dpy->wl_dpy);
+-- 
+GitLab

diff --git a/media-libs/mesa/mesa-23.0.2-r1.ebuild b/media-libs/mesa/mesa-23.0.2-r1.ebuild
new file mode 100644
index 000000000000..fa2f20039d30
--- /dev/null
+++ b/media-libs/mesa/mesa-23.0.2-r1.ebuild
@@ -0,0 +1,461 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+
+inherit llvm meson-multilib python-any-r1 linux-info
+
+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"
+	inherit git-r3
+else
+	SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+RESTRICT="!test? ( test )"
+
+RADEON_CARDS="r300 r600 radeon radeonsi"
+VIDEO_CARDS="${RADEON_CARDS} d3d12 freedreno intel lima nouveau panfrost v3d vc4 virgl vivante vmware"
+for card in ${VIDEO_CARDS}; do
+	IUSE_VIDEO_CARDS+=" video_cards_${card}"
+done
+
+IUSE="${IUSE_VIDEO_CARDS}
+	cpu_flags_x86_sse2 d3d9 debug gles1 +gles2 +llvm
+	lm-sensors opencl osmesa +proprietary-codecs selinux
+	test unwind vaapi valgrind vdpau vulkan
+	vulkan-overlay wayland +X xa zink +zstd"
+
+REQUIRED_USE="
+	d3d9?   ( || ( video_cards_intel video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
+	vulkan? ( video_cards_radeonsi? ( llvm ) )
+	vulkan-overlay? ( vulkan )
+	video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) )
+	video_cards_r300?   ( x86? ( llvm ) amd64? ( llvm ) )
+	video_cards_radeonsi?   ( llvm )
+	xa? ( X )
+	zink? ( vulkan )
+"
+
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.110"
+RDEPEND="
+	>=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
+	>=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
+	>=sys-libs/zlib-1.2.8[${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}]
+		)
+	)
+	lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
+	opencl? (
+				>=virtual/opencl-3[${MULTILIB_USEDEP}]
+				dev-libs/libclc
+				virtual/libelf:0=[${MULTILIB_USEDEP}]
+			)
+	vaapi? (
+		>=media-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
+	)
+	vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
+	selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
+	wayland? ( >=dev-libs/wayland-1.18.0[${MULTILIB_USEDEP}] )
+	${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_intel?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
+	X? (
+		>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+		>=x11-libs/libxshmfence-1.1[${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}]
+	)
+	zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
+	zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
+"
+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. < 10.
+# 3. Specify LLVM_MAX_SLOT, e.g. 9.
+LLVM_MAX_SLOT="16"
+LLVM_DEPSTR="
+	|| (
+		sys-devel/llvm:16[${MULTILIB_USEDEP}]
+		sys-devel/llvm:15[${MULTILIB_USEDEP}]
+	)
+	<sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${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}
+	video_cards_d3d12? ( dev-util/directx-headers[${MULTILIB_USEDEP}] )
+	valgrind? ( dev-util/valgrind )
+	wayland? ( >=dev-libs/wayland-protocols-1.24 )
+	X? (
+		x11-libs/libXrandr[${MULTILIB_USEDEP}]
+		x11-base/xorg-proto
+	)
+"
+BDEPEND="
+	${PYTHON_DEPS}
+	opencl? (
+		>=sys-devel/gcc-4.6
+	)
+	sys-devel/bison
+	sys-devel/flex
+	virtual/pkgconfig
+	$(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
+	vulkan? ( dev-util/glslang )
+	wayland? ( dev-util/wayland-scanner )
+"
+
+S="${WORKDIR}/${MY_P}"
+EGIT_CHECKOUT_DIR=${S}
+
+QA_WX_LOAD="
+x86? (
+	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
+	usr/lib/libGLX_mesa.so.0.0.0
+)"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-23.0.2-wayland-crash-warnings.patch
+	"${FILESDIR}"/${PN}-23.0.2-wayland-crash-warnings-2.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:${LLVM_SLOT}[${flags}]" || return 1
+	fi
+	has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
+}
+
+pkg_pretend() {
+	if use vulkan; then
+		if ! use video_cards_d3d12 &&
+		   ! use video_cards_freedreno &&
+		   ! use video_cards_intel &&
+		   ! use video_cards_radeonsi &&
+		   ! use video_cards_v3d; then
+			ewarn "Ignoring USE=vulkan     since VIDEO_CARDS does not contain d3d12, freedreno, intel, radeonsi, or v3d"
+		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_d3d12 &&
+		   ! use video_cards_r600 &&
+		   ! use video_cards_radeonsi &&
+		   ! use video_cards_nouveau; then
+			ewarn "Ignoring USE=vaapi      since VIDEO_CARDS does not contain d3d12, r600, radeonsi, or nouveau"
+		fi
+	fi
+
+	if use vdpau; then
+		if ! use video_cards_d3d12 &&
+		   ! 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 d3d12, 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 llvm; then
+		use opencl     && ewarn "Ignoring USE=opencl     since USE does not contain llvm"
+	fi
+
+	if use osmesa && ! use llvm; then
+		ewarn "OSMesa will be slow without enabling USE=llvm"
+	fi
+}
+
+python_check_deps() {
+	python_has_version -b ">=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 video_cards_intel ||
+	   use video_cards_radeonsi; then
+		if kernel_is -ge 5 11 3; then
+			CONFIG_CHECK="~KCMP"
+		elif kernel_is -ge 5 11; then
+			CONFIG_CHECK="~CHECKPOINT_RESTORE"
+		elif kernel_is -ge 5 10 20; then
+			CONFIG_CHECK="~KCMP"
+		else
+			CONFIG_CHECK="~CHECKPOINT_RESTORE"
+		fi
+		linux-info_pkg_setup
+	fi
+
+	if use llvm; then
+		llvm_pkg_setup
+	fi
+	python-any-r1_pkg_setup
+}
+
+multilib_src_configure() {
+	local emesonargs=()
+
+	local platforms
+	use X && platforms+="x11"
+	use wayland && platforms+=",wayland"
+	emesonargs+=(-Dplatforms=${platforms#,})
+
+	if use video_cards_intel ||
+	   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_d3d12 ||
+	   use video_cards_r600 ||
+	   use video_cards_radeonsi ||
+	   use video_cards_nouveau; then
+		emesonargs+=($(meson_feature vaapi gallium-va))
+		use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
+	else
+		emesonargs+=(-Dgallium-va=disabled)
+	fi
+
+	if use video_cards_d3d12; then
+		emesonargs+=($(meson_feature vaapi gallium-d3d12-video))
+	fi
+
+	if use video_cards_d3d12 ||
+	   use video_cards_r300 ||
+	   use video_cards_r600 ||
+	   use video_cards_radeonsi ||
+	   use video_cards_nouveau; then
+		emesonargs+=($(meson_feature vdpau gallium-vdpau))
+	else
+		emesonargs+=(-Dgallium-vdpau=disabled)
+	fi
+
+	if use video_cards_freedreno ||
+	   use video_cards_nouveau ||
+	   use video_cards_vmware; then
+		emesonargs+=($(meson_feature xa gallium-xa))
+	else
+		emesonargs+=(-Dgallium-xa=disabled)
+	fi
+
+	if use video_cards_freedreno ||
+	   use video_cards_lima ||
+	   use video_cards_panfrost ||
+	   use video_cards_v3d ||
+	   use video_cards_vc4 ||
+	   use video_cards_vivante; then
+		gallium_enable -- kmsro
+	fi
+
+	gallium_enable -- swrast
+	gallium_enable video_cards_freedreno freedreno
+	gallium_enable video_cards_intel crocus i915 iris
+	gallium_enable video_cards_lima lima
+	gallium_enable video_cards_d3d12 d3d12
+	gallium_enable video_cards_nouveau nouveau
+	gallium_enable video_cards_panfrost panfrost
+	gallium_enable video_cards_v3d v3d
+	gallium_enable video_cards_vc4 vc4
+	gallium_enable video_cards_virgl virgl
+	gallium_enable video_cards_vivante etnaviv
+	gallium_enable video_cards_vmware svga
+	gallium_enable zink zink
+
+	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
+
+	# opencl stuff
+	emesonargs+=(
+		-Dgallium-opencl="$(usex opencl icd disabled)"
+	)
+
+	if use vulkan; then
+		vulkan_enable video_cards_freedreno freedreno
+		vulkan_enable video_cards_intel intel intel_hasvk
+		vulkan_enable video_cards_d3d12 microsoft-experimental
+		vulkan_enable video_cards_radeonsi amd
+		vulkan_enable video_cards_v3d broadcom
+	fi
+
+	driver_list() {
+		local drivers="$(sort -u <<< "${1// /$'\n'}")"
+		echo "${drivers//$'\n'/,}"
+	}
+
+	local vulkan_layers
+	use vulkan && vulkan_layers+="device-select"
+	use vulkan-overlay && vulkan_layers+=",overlay"
+	emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
+
+	emesonargs+=(
+		$(meson_use test build-tests)
+		-Dglx=$(usex X dri disabled)
+		-Dshared-glapi=enabled
+		-Ddri3=enabled
+		-Degl=enabled
+		-Dgbm=enabled
+		-Dglvnd=true
+		$(meson_feature gles1)
+		$(meson_feature gles2)
+		$(meson_feature llvm)
+		$(meson_feature lm-sensors lmsensors)
+		$(meson_use osmesa)
+		$(meson_use selinux)
+		$(meson_feature unwind libunwind)
+		$(meson_feature zstd)
+		$(meson_use cpu_flags_x86_sse2 sse2)
+		-Dvalgrind=$(usex valgrind auto disabled)
+		-Dvideo-codecs=$(usex proprietary-codecs "h264dec,h264enc,h265dec,h265enc,vc1dec" "")
+		-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_test() {
+	meson_src_test -t 100
+}
+
+# $1 - VIDEO_CARDS flag (check skipped for "--")
+# other args - names of DRI drivers to enable
+gallium_enable() {
+	if [[ $1 == -- ]] || use $1; then
+		shift
+		GALLIUM_DRIVERS+=("$@")
+	fi
+}
+
+vulkan_enable() {
+	if [[ $1 == -- ]] || use $1; then
+		shift
+		VULKAN_DRIVERS+=("$@")
+	fi
+}


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2023-04-27  6:20 Sam James
  0 siblings, 0 replies; 16+ messages in thread
From: Sam James @ 2023-04-27  6:20 UTC (permalink / raw
  To: gentoo-commits

commit:     0f794d735103f871e077a6e645eb387513e6ef79
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 11 18:15:01 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Apr 27 06:19:21 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f794d73

media-libs/mesa: backport wayland warning patches again

See 9d79f611e3930455eafc5b80cf9b2fb71aeb20b0.

Closes: https://bugs.gentoo.org/905146
Bug: https://bugs.gentoo.org/904072
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-libs/mesa/Manifest                           |  1 +
 .../mesa-23.0.2-wayland-crash-warnings-2.patch     | 49 ++++++++++++++++++++++
 .../files/mesa-23.0.2-wayland-crash-warnings.patch | 37 ++++++++++++++++
 .../{mesa-23.0.3.ebuild => mesa-23.0.2-r1.ebuild}  |  6 ++-
 .../{mesa-23.0.3.ebuild => mesa-23.0.3-r1.ebuild}  |  5 +++
 5 files changed, 97 insertions(+), 1 deletion(-)

diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
index 6d35e3451cae..6d6f8a855f1a 100644
--- a/media-libs/mesa/Manifest
+++ b/media-libs/mesa/Manifest
@@ -1,2 +1,3 @@
 DIST mesa-22.3.7.tar.xz 17136476 BLAKE2B 291e94302d3a177f842def9339d1ba012bf10de792b7120985255168faac6b87a73d1d59d8b430f56ea2a2640ca0890a5c3721188b70c528b9aad9788d7e139d SHA512 c37bbcb3c0be1908726d6f83bfe98126d681935e401e03946e8b540611f832d2f272a2ac470600c2b77caa5b9a3a9059eb34bd9a93fcf88df114bedf8c39bf5a
+DIST mesa-23.0.2.tar.xz 17595964 BLAKE2B 5a90fcd8b7096dde1e6c82b9bb5b00622cc1cf35e4308419441d3489d66ed322843db89f2f1162c8c30f6bcddbce867447f83425a29145bd42a742b773ec1258 SHA512 c60c47d9430870ce1888018c8d887538ffc18cceaaff8649b6d38207bad873bcf7b37182675cfb0d1d7bfc589c605d7aca3f80c925d983efbd5d03cdbdcf881b
 DIST mesa-23.0.3.tar.xz 17627728 BLAKE2B e716d9ddce3da649239c1bc37ec208b9669f316f6b547ca0c69937043f371f0d59ead34fec427297171916045061ddb8783d126f6dec5ece90a0719003fe2c40 SHA512 52c778de61daa406c6a1e96a657e9b6fdcc71c8cfda80b7f53acc6470556c7d502c057b9481bb0c3d57ef0263263413fd0d25d53ebf5aa0246fbcc3309de64ae

diff --git a/media-libs/mesa/files/mesa-23.0.2-wayland-crash-warnings-2.patch b/media-libs/mesa/files/mesa-23.0.2-wayland-crash-warnings-2.patch
new file mode 100644
index 000000000000..5992583a1fa0
--- /dev/null
+++ b/media-libs/mesa/files/mesa-23.0.2-wayland-crash-warnings-2.patch
@@ -0,0 +1,49 @@
+https://bugs.gentoo.org/904072
+https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21647
+
+From 689ce66a4332524b4eb98877de6f75d05dd05c60 Mon Sep 17 00:00:00 2001
+From: Alexandros Frantzis <alexandros.frantzis@collabora.com>
+Date: Thu, 2 Mar 2023 10:10:42 +0200
+Subject: [PATCH] vulkan/wsi/wayland: Fix destruction of event queue with
+ proxies still attached.
+
+Destroy the surface dmabuf feedback proxy before destroying the event
+queue that the proxy is attached to.
+
+This silences a warning that libwayland 1.22 emits for programs that use
+Vulkan/Wayland:
+
+warning: queue 0x557a4efbcf70 destroyed while proxies still attached:
+  zwp_linux_dmabuf_feedback_v1@18 still attached
+
+Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21647>
+--- a/src/vulkan/wsi/wsi_common_wayland.c
++++ b/src/vulkan/wsi/wsi_common_wayland.c
+@@ -1157,18 +1157,18 @@ wsi_wl_surface_destroy(VkIcdSurfaceBase *icd_surface, VkInstance _instance,
+    struct wsi_wl_surface *wsi_wl_surface =
+       wl_container_of((VkIcdSurfaceWayland *)icd_surface, wsi_wl_surface, base);
+ 
+-   if (wsi_wl_surface->surface)
+-      wl_proxy_wrapper_destroy(wsi_wl_surface->surface);
+-
+-   if (wsi_wl_surface->display)
+-      wsi_wl_display_destroy(wsi_wl_surface->display);
+-
+    if (wsi_wl_surface->wl_dmabuf_feedback) {
+       zwp_linux_dmabuf_feedback_v1_destroy(wsi_wl_surface->wl_dmabuf_feedback);
+       dmabuf_feedback_fini(&wsi_wl_surface->dmabuf_feedback);
+       dmabuf_feedback_fini(&wsi_wl_surface->pending_dmabuf_feedback);
+    }
+ 
++   if (wsi_wl_surface->surface)
++      wl_proxy_wrapper_destroy(wsi_wl_surface->surface);
++
++   if (wsi_wl_surface->display)
++      wsi_wl_display_destroy(wsi_wl_surface->display);
++
+    vk_free2(&instance->alloc, pAllocator, wsi_wl_surface);
+ }
+ 
+-- 
+GitLab

diff --git a/media-libs/mesa/files/mesa-23.0.2-wayland-crash-warnings.patch b/media-libs/mesa/files/mesa-23.0.2-wayland-crash-warnings.patch
new file mode 100644
index 000000000000..537d070c091e
--- /dev/null
+++ b/media-libs/mesa/files/mesa-23.0.2-wayland-crash-warnings.patch
@@ -0,0 +1,37 @@
+https://bugs.gentoo.org/904072
+https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21646
+
+From ee5d2250fd159689aae3f7d632a6226971bea85c Mon Sep 17 00:00:00 2001
+From: Alexandros Frantzis <alexandros.frantzis@collabora.com>
+Date: Thu, 2 Mar 2023 09:35:08 +0200
+Subject: [PATCH] egl/wayland: Fix destruction of event queue with proxies
+ still attached.
+
+Destroy the display wrapper proxy before destroying the event queue that
+the proxy is attached to.
+
+This silences a warning that libwayland 1.22 emits for programs that use
+EGL/Wayland:
+
+warning: queue 0x562a5ed2cd20 destroyed while proxies still attached:
+  wl_display@1 still attached
+
+Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21646>
+--- a/src/egl/drivers/dri2/platform_wayland.c
++++ b/src/egl/drivers/dri2/platform_wayland.c
+@@ -2865,10 +2865,10 @@ dri2_teardown_wayland(struct dri2_egl_display *dri2_dpy)
+       wl_shm_destroy(dri2_dpy->wl_shm);
+    if (dri2_dpy->wl_registry)
+       wl_registry_destroy(dri2_dpy->wl_registry);
+-   if (dri2_dpy->wl_queue)
+-      wl_event_queue_destroy(dri2_dpy->wl_queue);
+    if (dri2_dpy->wl_dpy_wrapper)
+       wl_proxy_wrapper_destroy(dri2_dpy->wl_dpy_wrapper);
++   if (dri2_dpy->wl_queue)
++      wl_event_queue_destroy(dri2_dpy->wl_queue);
+ 
+    if (dri2_dpy->own_device)
+       wl_display_disconnect(dri2_dpy->wl_dpy);
+-- 
+GitLab

diff --git a/media-libs/mesa/mesa-23.0.3.ebuild b/media-libs/mesa/mesa-23.0.2-r1.ebuild
similarity index 98%
copy from media-libs/mesa/mesa-23.0.3.ebuild
copy to media-libs/mesa/mesa-23.0.2-r1.ebuild
index 1d4bb730495f..fa2f20039d30 100644
--- a/media-libs/mesa/mesa-23.0.3.ebuild
+++ b/media-libs/mesa/mesa-23.0.2-r1.ebuild
@@ -43,7 +43,6 @@ REQUIRED_USE="
 	video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) )
 	video_cards_r300?   ( x86? ( llvm ) amd64? ( llvm ) )
 	video_cards_radeonsi?   ( llvm )
-	vdpau? ( X )
 	xa? ( X )
 	zink? ( vulkan )
 "
@@ -206,6 +205,11 @@ x86? (
 	usr/lib/libGLX_mesa.so.0.0.0
 )"
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-23.0.2-wayland-crash-warnings.patch
+	"${FILESDIR}"/${PN}-23.0.2-wayland-crash-warnings-2.patch
+)
+
 llvm_check_deps() {
 	local flags=${MULTILIB_USEDEP}
 	if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi

diff --git a/media-libs/mesa/mesa-23.0.3.ebuild b/media-libs/mesa/mesa-23.0.3-r1.ebuild
similarity index 98%
rename from media-libs/mesa/mesa-23.0.3.ebuild
rename to media-libs/mesa/mesa-23.0.3-r1.ebuild
index 1d4bb730495f..767e5341ebf6 100644
--- a/media-libs/mesa/mesa-23.0.3.ebuild
+++ b/media-libs/mesa/mesa-23.0.3-r1.ebuild
@@ -206,6 +206,11 @@ x86? (
 	usr/lib/libGLX_mesa.so.0.0.0
 )"
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-23.0.2-wayland-crash-warnings.patch
+	"${FILESDIR}"/${PN}-23.0.2-wayland-crash-warnings-2.patch
+)
+
 llvm_check_deps() {
 	local flags=${MULTILIB_USEDEP}
 	if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2023-08-16 22:07 Matt Turner
  0 siblings, 0 replies; 16+ messages in thread
From: Matt Turner @ 2023-08-16 22:07 UTC (permalink / raw
  To: gentoo-commits

commit:     2fc21400cd3c0037cd3c64fe832a9ccb72b98aab
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 16 21:53:49 2023 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed Aug 16 22:07:19 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2fc21400

media-libs/mesa: Drop old versions

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 media-libs/mesa/Manifest                           |   8 -
 .../mesa-23.0.2-wayland-crash-warnings-2.patch     |  49 ---
 .../files/mesa-23.0.2-wayland-crash-warnings.patch |  37 --
 ...le-shader-cache-when-executing-intel_clc-.patch |  30 --
 media-libs/mesa/mesa-22.3.7-r1.ebuild              | 456 --------------------
 media-libs/mesa/mesa-23.0.3-r1.ebuild              | 462 ---------------------
 media-libs/mesa/mesa-23.1.0.ebuild                 | 449 --------------------
 media-libs/mesa/mesa-23.1.1.ebuild                 | 447 --------------------
 media-libs/mesa/mesa-23.1.2-r1.ebuild              | 449 --------------------
 media-libs/mesa/mesa-23.1.2.ebuild                 | 447 --------------------
 media-libs/mesa/mesa-23.1.3.ebuild                 | 450 --------------------
 media-libs/mesa/mesa-23.1.4.ebuild                 | 450 --------------------
 media-libs/mesa/mesa-23.1.5.ebuild                 | 450 --------------------
 13 files changed, 4184 deletions(-)

diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
index cd190e1e73f7..0be7b2cf8698 100644
--- a/media-libs/mesa/Manifest
+++ b/media-libs/mesa/Manifest
@@ -1,9 +1 @@
-DIST mesa-22.3.7.tar.xz 17136476 BLAKE2B 291e94302d3a177f842def9339d1ba012bf10de792b7120985255168faac6b87a73d1d59d8b430f56ea2a2640ca0890a5c3721188b70c528b9aad9788d7e139d SHA512 c37bbcb3c0be1908726d6f83bfe98126d681935e401e03946e8b540611f832d2f272a2ac470600c2b77caa5b9a3a9059eb34bd9a93fcf88df114bedf8c39bf5a
-DIST mesa-23.0.3.tar.xz 17627728 BLAKE2B e716d9ddce3da649239c1bc37ec208b9669f316f6b547ca0c69937043f371f0d59ead34fec427297171916045061ddb8783d126f6dec5ece90a0719003fe2c40 SHA512 52c778de61daa406c6a1e96a657e9b6fdcc71c8cfda80b7f53acc6470556c7d502c057b9481bb0c3d57ef0263263413fd0d25d53ebf5aa0246fbcc3309de64ae
-DIST mesa-23.1.0.tar.xz 18204148 BLAKE2B 47cc90da14a2c33bb54c7811e99b439fadef81a15b63e535210a329bad5e2524fcb415cc5ed51a8deb65ccc9a341af78f02178c93758f09946978179e494382c SHA512 bbcfd0dd8e5414826631e80edbbe48218115a7461ef4ac1f2e4e090a48d6c0e1ab3b51dd45e988d5f1572f29bfc03c33769263c0f3e04033138d5b1ec102e8c9
-DIST mesa-23.1.1.tar.xz 18299068 BLAKE2B b17a71205248f2e97c60aa944d8b5b19d51592ba9288d2f04a8498eabaa19308f7ec7a813b948d3fad1001ae14da8771e403c68f7a4159c7f3b8830b919d64dc SHA512 ac5522307d75ff71289a62e2e5827edca70a88e028563ed11907504b9727925186893cd40e5948f1f16c29d8ad9fad39012d7569276e2c75be97aef9c106baf8
-DIST mesa-23.1.2.tar.xz 18333300 BLAKE2B a98dddf9c6cd0f69ec980e1080b53c92513ac03161dfba3355b83da674d6148dbd66c7e0403795eea7c3ce28fb5ff392a96607f34e4caf68a58ac8eb157cf146 SHA512 728e79720d950b0f39fa55c21dff7caed3650e88dff52a2f3e70540a049f1baf78178e62e5d6b1e59c76f6555ab0be3f0043cfbddd4745c0a742ccef2f5774d4
-DIST mesa-23.1.3.tar.xz 18358052 BLAKE2B 99ce2a458c049b60cf13278d5e2e04d9eebefe04d5cbfcba7ff13421724bfd7877ec24086e513d249f1e7b1d537acea90e2ae53d71ef420213a5764ce61d8c4f SHA512 44f0658138ef99dcede5e4c33d5733af836283f05b031b07f3f8b3bc03b301bc7ab9dc15248829cf3dfc423f2da8935b372b25df8b9ef15a511ba16ccd913959
-DIST mesa-23.1.4.tar.xz 18414456 BLAKE2B 9c696766f4f7af9a2d12c6e7663f300e4dbcfc27ee210770151a8be76b3413b51aad1e2a00f4cf38695cf26d5b684e38a65de8a63723597a0ff97f3a9935b1a1 SHA512 4063c7848f507b5e25cfc862394268147254b90c9f3eb19035cce338b0a9cb611b7380c1c73f0e4feeddde68124225df7dee7b9db5f019603dfde2b88ff46a21
-DIST mesa-23.1.5.tar.xz 18438676 BLAKE2B 9919de93df171dd884ef39f52e480e62ef7f4cd55e43b507316af7de39b222ddec12914628d136d40a80f8398f517708a67a64b99858bba3c86686956b7c91bc SHA512 c5eac5a497561374eaf931214aebc9001820c5ab49f9b8c5634b62af081b03b2f21c169c936524b2953c8815eb27dfb5c8c12276b9b1c119722cd6fea0b22d85
 DIST mesa-23.1.6.tar.xz 18505124 BLAKE2B 78b71ede0655e538a71d22ecbfb0bed7497c258a16ce5f7d9b627a4c9372f26292a50aec848a4923524e4862b00a6d5d3d2521b05033d9cf39d31f037bdb9254 SHA512 24f1c626fa05a82bcdfb24b67b8e5f96f94d5748309631b83e8d7a62142853cd3be90b92c56bac3bc4d223bf40b424d6d6a9977537b899107295b7d45d7e2575

diff --git a/media-libs/mesa/files/mesa-23.0.2-wayland-crash-warnings-2.patch b/media-libs/mesa/files/mesa-23.0.2-wayland-crash-warnings-2.patch
deleted file mode 100644
index 5992583a1fa0..000000000000
--- a/media-libs/mesa/files/mesa-23.0.2-wayland-crash-warnings-2.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-https://bugs.gentoo.org/904072
-https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21647
-
-From 689ce66a4332524b4eb98877de6f75d05dd05c60 Mon Sep 17 00:00:00 2001
-From: Alexandros Frantzis <alexandros.frantzis@collabora.com>
-Date: Thu, 2 Mar 2023 10:10:42 +0200
-Subject: [PATCH] vulkan/wsi/wayland: Fix destruction of event queue with
- proxies still attached.
-
-Destroy the surface dmabuf feedback proxy before destroying the event
-queue that the proxy is attached to.
-
-This silences a warning that libwayland 1.22 emits for programs that use
-Vulkan/Wayland:
-
-warning: queue 0x557a4efbcf70 destroyed while proxies still attached:
-  zwp_linux_dmabuf_feedback_v1@18 still attached
-
-Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
-Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21647>
---- a/src/vulkan/wsi/wsi_common_wayland.c
-+++ b/src/vulkan/wsi/wsi_common_wayland.c
-@@ -1157,18 +1157,18 @@ wsi_wl_surface_destroy(VkIcdSurfaceBase *icd_surface, VkInstance _instance,
-    struct wsi_wl_surface *wsi_wl_surface =
-       wl_container_of((VkIcdSurfaceWayland *)icd_surface, wsi_wl_surface, base);
- 
--   if (wsi_wl_surface->surface)
--      wl_proxy_wrapper_destroy(wsi_wl_surface->surface);
--
--   if (wsi_wl_surface->display)
--      wsi_wl_display_destroy(wsi_wl_surface->display);
--
-    if (wsi_wl_surface->wl_dmabuf_feedback) {
-       zwp_linux_dmabuf_feedback_v1_destroy(wsi_wl_surface->wl_dmabuf_feedback);
-       dmabuf_feedback_fini(&wsi_wl_surface->dmabuf_feedback);
-       dmabuf_feedback_fini(&wsi_wl_surface->pending_dmabuf_feedback);
-    }
- 
-+   if (wsi_wl_surface->surface)
-+      wl_proxy_wrapper_destroy(wsi_wl_surface->surface);
-+
-+   if (wsi_wl_surface->display)
-+      wsi_wl_display_destroy(wsi_wl_surface->display);
-+
-    vk_free2(&instance->alloc, pAllocator, wsi_wl_surface);
- }
- 
--- 
-GitLab

diff --git a/media-libs/mesa/files/mesa-23.0.2-wayland-crash-warnings.patch b/media-libs/mesa/files/mesa-23.0.2-wayland-crash-warnings.patch
deleted file mode 100644
index 537d070c091e..000000000000
--- a/media-libs/mesa/files/mesa-23.0.2-wayland-crash-warnings.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-https://bugs.gentoo.org/904072
-https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21646
-
-From ee5d2250fd159689aae3f7d632a6226971bea85c Mon Sep 17 00:00:00 2001
-From: Alexandros Frantzis <alexandros.frantzis@collabora.com>
-Date: Thu, 2 Mar 2023 09:35:08 +0200
-Subject: [PATCH] egl/wayland: Fix destruction of event queue with proxies
- still attached.
-
-Destroy the display wrapper proxy before destroying the event queue that
-the proxy is attached to.
-
-This silences a warning that libwayland 1.22 emits for programs that use
-EGL/Wayland:
-
-warning: queue 0x562a5ed2cd20 destroyed while proxies still attached:
-  wl_display@1 still attached
-
-Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
-Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21646>
---- a/src/egl/drivers/dri2/platform_wayland.c
-+++ b/src/egl/drivers/dri2/platform_wayland.c
-@@ -2865,10 +2865,10 @@ dri2_teardown_wayland(struct dri2_egl_display *dri2_dpy)
-       wl_shm_destroy(dri2_dpy->wl_shm);
-    if (dri2_dpy->wl_registry)
-       wl_registry_destroy(dri2_dpy->wl_registry);
--   if (dri2_dpy->wl_queue)
--      wl_event_queue_destroy(dri2_dpy->wl_queue);
-    if (dri2_dpy->wl_dpy_wrapper)
-       wl_proxy_wrapper_destroy(dri2_dpy->wl_dpy_wrapper);
-+   if (dri2_dpy->wl_queue)
-+      wl_event_queue_destroy(dri2_dpy->wl_queue);
- 
-    if (dri2_dpy->own_device)
-       wl_display_disconnect(dri2_dpy->wl_dpy);
--- 
-GitLab

diff --git a/media-libs/mesa/files/mesa-23.1.0-intel-Disable-shader-cache-when-executing-intel_clc-.patch b/media-libs/mesa/files/mesa-23.1.0-intel-Disable-shader-cache-when-executing-intel_clc-.patch
deleted file mode 100644
index 511dfed9fab5..000000000000
--- a/media-libs/mesa/files/mesa-23.1.0-intel-Disable-shader-cache-when-executing-intel_clc-.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 28efca603bf11f361eb741d23ef181a3b6905f74 Mon Sep 17 00:00:00 2001
-From: Matt Turner <mattst88@gmail.com>
-Date: Thu, 11 May 2023 13:51:25 -0400
-Subject: [PATCH] intel: Disable shader cache when executing intel_clc during
- the build
-
-With the shader cache enabled, intel_clc attempts to write to ~/.cache.
-Many distributions' build systems limit file-system access, and will
-kill the process thus causing the build to fail.
-
-Fixes: 639665053fa ("anv/grl: Build OpenCL kernels")
----
- src/intel/vulkan/grl/meson.build | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/intel/vulkan/grl/meson.build b/src/intel/vulkan/grl/meson.build
-index 3d7567cfc13..c0056b3493d 100644
---- a/src/intel/vulkan/grl/meson.build
-+++ b/src/intel/vulkan/grl/meson.build
-@@ -142,6 +142,7 @@ foreach t : [['125', 'gfx125', 'dg2']]
-                                    # without modifying grl source code, remove
-                                    # if fixed there
-       ],
-+      env: ['MESA_SHADER_CACHE_DISABLE=true'],
-       depends : [prog_intel_clc]
-     )
-   endforeach
--- 
-2.39.3
-

diff --git a/media-libs/mesa/mesa-22.3.7-r1.ebuild b/media-libs/mesa/mesa-22.3.7-r1.ebuild
deleted file mode 100644
index 8a7b2e946b8e..000000000000
--- a/media-libs/mesa/mesa-22.3.7-r1.ebuild
+++ /dev/null
@@ -1,456 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..11} )
-
-inherit llvm meson-multilib python-any-r1 linux-info
-
-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"
-	inherit git-r3
-else
-	SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
-	KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-solaris"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-RESTRICT="!test? ( test )"
-
-RADEON_CARDS="r300 r600 radeon radeonsi"
-VIDEO_CARDS="${RADEON_CARDS} d3d12 freedreno intel lima nouveau panfrost v3d vc4 virgl vivante vmware"
-for card in ${VIDEO_CARDS}; do
-	IUSE_VIDEO_CARDS+=" video_cards_${card}"
-done
-
-IUSE="${IUSE_VIDEO_CARDS}
-	cpu_flags_x86_sse2 d3d9 debug gles1 +gles2 +llvm
-	lm-sensors opencl osmesa +proprietary-codecs selinux
-	test unwind vaapi valgrind vdpau vulkan
-	vulkan-overlay wayland +X xa zink +zstd"
-
-REQUIRED_USE="
-	d3d9?   ( || ( video_cards_intel video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
-	vulkan? ( video_cards_radeonsi? ( llvm ) )
-	vulkan-overlay? ( vulkan )
-	video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_r300?   ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_radeonsi?   ( llvm )
-	xa? ( X )
-	zink? ( vulkan )
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.110"
-RDEPEND="
-	>=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
-	>=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.8[${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}]
-		)
-	)
-	lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
-	opencl? (
-				>=virtual/opencl-3[${MULTILIB_USEDEP}]
-				dev-libs/libclc
-				virtual/libelf:0=[${MULTILIB_USEDEP}]
-			)
-	vaapi? (
-		>=media-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
-	)
-	vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
-	selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
-	wayland? ( >=dev-libs/wayland-1.18.0[${MULTILIB_USEDEP}] )
-	${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_intel?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
-	X? (
-		>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
-		>=x11-libs/libxshmfence-1.1[${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}]
-	)
-	zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
-	zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
-"
-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. < 10.
-# 3. Specify LLVM_MAX_SLOT, e.g. 9.
-LLVM_MAX_SLOT="16"
-LLVM_DEPSTR="
-	|| (
-		sys-devel/llvm:16[${MULTILIB_USEDEP}]
-		sys-devel/llvm:15[${MULTILIB_USEDEP}]
-	)
-	<sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${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}
-	video_cards_d3d12? ( dev-util/directx-headers[${MULTILIB_USEDEP}] )
-	valgrind? ( dev-util/valgrind )
-	wayland? ( >=dev-libs/wayland-protocols-1.24 )
-	X? (
-		x11-libs/libXrandr[${MULTILIB_USEDEP}]
-		x11-base/xorg-proto
-	)
-"
-BDEPEND="
-	${PYTHON_DEPS}
-	opencl? (
-		>=sys-devel/gcc-4.6
-	)
-	sys-devel/bison
-	sys-devel/flex
-	virtual/pkgconfig
-	$(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
-	vulkan? ( dev-util/glslang )
-	wayland? ( dev-util/wayland-scanner )
-"
-
-S="${WORKDIR}/${MY_P}"
-EGIT_CHECKOUT_DIR=${S}
-
-QA_WX_LOAD="
-x86? (
-	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
-	usr/lib/libGLX_mesa.so.0.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:${LLVM_SLOT}[${flags}]" || return 1
-	fi
-	has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
-}
-
-pkg_pretend() {
-	if use vulkan; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_freedreno &&
-		   ! use video_cards_intel &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_v3d; then
-			ewarn "Ignoring USE=vulkan     since VIDEO_CARDS does not contain d3d12, freedreno, intel, radeonsi, or v3d"
-		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_d3d12 &&
-		   ! use video_cards_r600 &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_nouveau; then
-			ewarn "Ignoring USE=vaapi      since VIDEO_CARDS does not contain d3d12, r600, radeonsi, or nouveau"
-		fi
-	fi
-
-	if use vdpau; then
-		if ! use video_cards_d3d12 &&
-		   ! 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 d3d12, 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 llvm; then
-		use opencl     && ewarn "Ignoring USE=opencl     since USE does not contain llvm"
-	fi
-
-	if use osmesa && ! use llvm; then
-		ewarn "OSMesa will be slow without enabling USE=llvm"
-	fi
-}
-
-python_check_deps() {
-	python_has_version -b ">=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 video_cards_intel ||
-	   use video_cards_radeonsi; then
-		if kernel_is -ge 5 11 3; then
-			CONFIG_CHECK="~KCMP"
-		elif kernel_is -ge 5 11; then
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		elif kernel_is -ge 5 10 20; then
-			CONFIG_CHECK="~KCMP"
-		else
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		fi
-		linux-info_pkg_setup
-	fi
-
-	if use llvm; then
-		llvm_pkg_setup
-	fi
-	python-any-r1_pkg_setup
-}
-
-multilib_src_configure() {
-	local emesonargs=()
-
-	local platforms
-	use X && platforms+="x11"
-	use wayland && platforms+=",wayland"
-	emesonargs+=(-Dplatforms=${platforms#,})
-
-	if use video_cards_intel ||
-	   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_d3d12 ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_nouveau; then
-		emesonargs+=($(meson_feature vaapi gallium-va))
-		use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
-	else
-		emesonargs+=(-Dgallium-va=disabled)
-	fi
-
-	if use video_cards_d3d12; then
-		emesonargs+=($(meson_feature vaapi gallium-d3d12-video))
-	fi
-
-	if use video_cards_d3d12 ||
-	   use video_cards_r300 ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_nouveau; then
-		emesonargs+=($(meson_feature vdpau gallium-vdpau))
-	else
-		emesonargs+=(-Dgallium-vdpau=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_nouveau ||
-	   use video_cards_vmware; then
-		emesonargs+=($(meson_feature xa gallium-xa))
-	else
-		emesonargs+=(-Dgallium-xa=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_lima ||
-	   use video_cards_panfrost ||
-	   use video_cards_v3d ||
-	   use video_cards_vc4 ||
-	   use video_cards_vivante; then
-		gallium_enable -- kmsro
-	fi
-
-	gallium_enable -- swrast
-	gallium_enable video_cards_freedreno freedreno
-	gallium_enable video_cards_intel crocus i915 iris
-	gallium_enable video_cards_lima lima
-	gallium_enable video_cards_d3d12 d3d12
-	gallium_enable video_cards_nouveau nouveau
-	gallium_enable video_cards_panfrost panfrost
-	gallium_enable video_cards_v3d v3d
-	gallium_enable video_cards_vc4 vc4
-	gallium_enable video_cards_virgl virgl
-	gallium_enable video_cards_vivante etnaviv
-	gallium_enable video_cards_vmware svga
-	gallium_enable zink zink
-
-	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
-
-	# opencl stuff
-	emesonargs+=(
-		-Dgallium-opencl="$(usex opencl icd disabled)"
-	)
-
-	if use vulkan; then
-		vulkan_enable video_cards_freedreno freedreno
-		vulkan_enable video_cards_intel intel intel_hasvk
-		vulkan_enable video_cards_d3d12 microsoft-experimental
-		vulkan_enable video_cards_radeonsi amd
-		vulkan_enable video_cards_v3d broadcom
-	fi
-
-	driver_list() {
-		local drivers="$(sort -u <<< "${1// /$'\n'}")"
-		echo "${drivers//$'\n'/,}"
-	}
-
-	local vulkan_layers
-	use vulkan && vulkan_layers+="device-select"
-	use vulkan-overlay && vulkan_layers+=",overlay"
-	emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
-
-	emesonargs+=(
-		$(meson_use test build-tests)
-		-Dglx=$(usex X dri disabled)
-		-Dshared-glapi=enabled
-		-Ddri3=enabled
-		-Degl=enabled
-		-Dgbm=enabled
-		-Dglvnd=true
-		$(meson_feature gles1)
-		$(meson_feature gles2)
-		$(meson_feature llvm)
-		$(meson_feature lm-sensors lmsensors)
-		$(meson_use osmesa)
-		$(meson_use selinux)
-		$(meson_feature unwind libunwind)
-		$(meson_feature zstd)
-		$(meson_use cpu_flags_x86_sse2 sse2)
-		-Dvalgrind=$(usex valgrind auto disabled)
-		-Dvideo-codecs=$(usex proprietary-codecs "h264dec,h264enc,h265dec,h265enc,vc1dec" "")
-		-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_test() {
-	meson_src_test -t 100
-}
-
-# $1 - VIDEO_CARDS flag (check skipped for "--")
-# other args - names of DRI drivers to enable
-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-23.0.3-r1.ebuild b/media-libs/mesa/mesa-23.0.3-r1.ebuild
deleted file mode 100644
index 738282587631..000000000000
--- a/media-libs/mesa/mesa-23.0.3-r1.ebuild
+++ /dev/null
@@ -1,462 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..11} )
-
-inherit llvm meson-multilib python-any-r1 linux-info
-
-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"
-	inherit git-r3
-else
-	SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
-	KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~loong ~mips ~ppc ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-solaris"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-RESTRICT="!test? ( test )"
-
-RADEON_CARDS="r300 r600 radeon radeonsi"
-VIDEO_CARDS="${RADEON_CARDS} d3d12 freedreno intel lima nouveau panfrost v3d vc4 virgl vivante vmware"
-for card in ${VIDEO_CARDS}; do
-	IUSE_VIDEO_CARDS+=" video_cards_${card}"
-done
-
-IUSE="${IUSE_VIDEO_CARDS}
-	cpu_flags_x86_sse2 d3d9 debug gles1 +gles2 +llvm
-	lm-sensors opencl osmesa +proprietary-codecs selinux
-	test unwind vaapi valgrind vdpau vulkan
-	vulkan-overlay wayland +X xa zink +zstd"
-
-REQUIRED_USE="
-	d3d9?   ( || ( video_cards_intel video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
-	vulkan? ( video_cards_radeonsi? ( llvm ) )
-	vulkan-overlay? ( vulkan )
-	video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_r300?   ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_radeonsi?   ( llvm )
-	vdpau? ( X )
-	xa? ( X )
-	zink? ( vulkan )
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.110"
-RDEPEND="
-	>=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
-	>=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.8[${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}]
-		)
-	)
-	lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
-	opencl? (
-				>=virtual/opencl-3[${MULTILIB_USEDEP}]
-				dev-libs/libclc
-				virtual/libelf:0=[${MULTILIB_USEDEP}]
-			)
-	vaapi? (
-		>=media-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
-	)
-	vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
-	selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
-	wayland? ( >=dev-libs/wayland-1.18.0[${MULTILIB_USEDEP}] )
-	${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_intel?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
-	X? (
-		>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
-		>=x11-libs/libxshmfence-1.1[${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}]
-	)
-	zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
-	zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
-"
-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. < 10.
-# 3. Specify LLVM_MAX_SLOT, e.g. 9.
-LLVM_MAX_SLOT="16"
-LLVM_DEPSTR="
-	|| (
-		sys-devel/llvm:16[${MULTILIB_USEDEP}]
-		sys-devel/llvm:15[${MULTILIB_USEDEP}]
-	)
-	<sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${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}
-	video_cards_d3d12? ( dev-util/directx-headers[${MULTILIB_USEDEP}] )
-	valgrind? ( dev-util/valgrind )
-	wayland? ( >=dev-libs/wayland-protocols-1.24 )
-	X? (
-		x11-libs/libXrandr[${MULTILIB_USEDEP}]
-		x11-base/xorg-proto
-	)
-"
-BDEPEND="
-	${PYTHON_DEPS}
-	opencl? (
-		>=sys-devel/gcc-4.6
-	)
-	sys-devel/bison
-	sys-devel/flex
-	virtual/pkgconfig
-	$(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
-	vulkan? ( dev-util/glslang )
-	wayland? ( dev-util/wayland-scanner )
-"
-
-S="${WORKDIR}/${MY_P}"
-EGIT_CHECKOUT_DIR=${S}
-
-QA_WX_LOAD="
-x86? (
-	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
-	usr/lib/libGLX_mesa.so.0.0.0
-)"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-23.0.2-wayland-crash-warnings.patch
-	"${FILESDIR}"/${PN}-23.0.2-wayland-crash-warnings-2.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:${LLVM_SLOT}[${flags}]" || return 1
-	fi
-	has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
-}
-
-pkg_pretend() {
-	if use vulkan; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_freedreno &&
-		   ! use video_cards_intel &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_v3d; then
-			ewarn "Ignoring USE=vulkan     since VIDEO_CARDS does not contain d3d12, freedreno, intel, radeonsi, or v3d"
-		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_d3d12 &&
-		   ! use video_cards_r600 &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_nouveau; then
-			ewarn "Ignoring USE=vaapi      since VIDEO_CARDS does not contain d3d12, r600, radeonsi, or nouveau"
-		fi
-	fi
-
-	if use vdpau; then
-		if ! use video_cards_d3d12 &&
-		   ! 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 d3d12, 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 llvm; then
-		use opencl     && ewarn "Ignoring USE=opencl     since USE does not contain llvm"
-	fi
-
-	if use osmesa && ! use llvm; then
-		ewarn "OSMesa will be slow without enabling USE=llvm"
-	fi
-}
-
-python_check_deps() {
-	python_has_version -b ">=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 video_cards_intel ||
-	   use video_cards_radeonsi; then
-		if kernel_is -ge 5 11 3; then
-			CONFIG_CHECK="~KCMP"
-		elif kernel_is -ge 5 11; then
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		elif kernel_is -ge 5 10 20; then
-			CONFIG_CHECK="~KCMP"
-		else
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		fi
-		linux-info_pkg_setup
-	fi
-
-	if use llvm; then
-		llvm_pkg_setup
-	fi
-	python-any-r1_pkg_setup
-}
-
-multilib_src_configure() {
-	local emesonargs=()
-
-	local platforms
-	use X && platforms+="x11"
-	use wayland && platforms+=",wayland"
-	emesonargs+=(-Dplatforms=${platforms#,})
-
-	if use video_cards_intel ||
-	   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_d3d12 ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_nouveau; then
-		emesonargs+=($(meson_feature vaapi gallium-va))
-		use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
-	else
-		emesonargs+=(-Dgallium-va=disabled)
-	fi
-
-	if use video_cards_d3d12; then
-		emesonargs+=($(meson_feature vaapi gallium-d3d12-video))
-	fi
-
-	if use video_cards_d3d12 ||
-	   use video_cards_r300 ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_nouveau; then
-		emesonargs+=($(meson_feature vdpau gallium-vdpau))
-	else
-		emesonargs+=(-Dgallium-vdpau=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_nouveau ||
-	   use video_cards_vmware; then
-		emesonargs+=($(meson_feature xa gallium-xa))
-	else
-		emesonargs+=(-Dgallium-xa=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_lima ||
-	   use video_cards_panfrost ||
-	   use video_cards_v3d ||
-	   use video_cards_vc4 ||
-	   use video_cards_vivante; then
-		gallium_enable -- kmsro
-	fi
-
-	gallium_enable -- swrast
-	gallium_enable video_cards_freedreno freedreno
-	gallium_enable video_cards_intel crocus i915 iris
-	gallium_enable video_cards_lima lima
-	gallium_enable video_cards_d3d12 d3d12
-	gallium_enable video_cards_nouveau nouveau
-	gallium_enable video_cards_panfrost panfrost
-	gallium_enable video_cards_v3d v3d
-	gallium_enable video_cards_vc4 vc4
-	gallium_enable video_cards_virgl virgl
-	gallium_enable video_cards_vivante etnaviv
-	gallium_enable video_cards_vmware svga
-	gallium_enable zink zink
-
-	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
-
-	# opencl stuff
-	emesonargs+=(
-		-Dgallium-opencl="$(usex opencl icd disabled)"
-	)
-
-	if use vulkan; then
-		vulkan_enable video_cards_freedreno freedreno
-		vulkan_enable video_cards_intel intel intel_hasvk
-		vulkan_enable video_cards_d3d12 microsoft-experimental
-		vulkan_enable video_cards_radeonsi amd
-		vulkan_enable video_cards_v3d broadcom
-	fi
-
-	driver_list() {
-		local drivers="$(sort -u <<< "${1// /$'\n'}")"
-		echo "${drivers//$'\n'/,}"
-	}
-
-	local vulkan_layers
-	use vulkan && vulkan_layers+="device-select"
-	use vulkan-overlay && vulkan_layers+=",overlay"
-	emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
-
-	emesonargs+=(
-		$(meson_use test build-tests)
-		-Dglx=$(usex X dri disabled)
-		-Dshared-glapi=enabled
-		-Ddri3=enabled
-		-Degl=enabled
-		-Dgbm=enabled
-		-Dglvnd=true
-		$(meson_feature gles1)
-		$(meson_feature gles2)
-		$(meson_feature llvm)
-		$(meson_feature lm-sensors lmsensors)
-		$(meson_use osmesa)
-		$(meson_use selinux)
-		$(meson_feature unwind libunwind)
-		$(meson_feature zstd)
-		$(meson_use cpu_flags_x86_sse2 sse2)
-		-Dvalgrind=$(usex valgrind auto disabled)
-		-Dvideo-codecs=$(usex proprietary-codecs "h264dec,h264enc,h265dec,h265enc,vc1dec" "")
-		-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_test() {
-	meson_src_test -t 100
-}
-
-# $1 - VIDEO_CARDS flag (check skipped for "--")
-# other args - names of DRI drivers to enable
-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-23.1.0.ebuild b/media-libs/mesa/mesa-23.1.0.ebuild
deleted file mode 100644
index 514e313ab820..000000000000
--- a/media-libs/mesa/mesa-23.1.0.ebuild
+++ /dev/null
@@ -1,449 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..11} )
-
-inherit llvm meson-multilib python-any-r1 linux-info
-
-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"
-	inherit git-r3
-else
-	SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-solaris"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-RESTRICT="!test? ( test )"
-
-RADEON_CARDS="r300 r600 radeon radeonsi"
-VIDEO_CARDS="${RADEON_CARDS} d3d12 freedreno intel lima nouveau panfrost v3d vc4 virgl vivante vmware"
-for card in ${VIDEO_CARDS}; do
-	IUSE_VIDEO_CARDS+=" video_cards_${card}"
-done
-
-IUSE="${IUSE_VIDEO_CARDS}
-	cpu_flags_x86_sse2 d3d9 debug gles1 +gles2 +llvm
-	lm-sensors opencl osmesa +proprietary-codecs selinux
-	test unwind vaapi valgrind vdpau vulkan
-	vulkan-overlay wayland +X xa zink +zstd"
-
-REQUIRED_USE="
-	d3d9? (
-		|| (
-			video_cards_intel
-			video_cards_r300
-			video_cards_r600
-			video_cards_radeonsi
-			video_cards_nouveau
-			video_cards_vmware
-		)
-	)
-	vulkan? ( video_cards_radeonsi? ( llvm ) )
-	vulkan-overlay? ( vulkan )
-	video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_r300?   ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_radeonsi?   ( llvm )
-	vdpau? ( X )
-	xa? ( X )
-	zink? ( vulkan )
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.110"
-RDEPEND="
-	>=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
-	>=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.8[${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}]
-		)
-	)
-	lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
-	opencl? (
-		>=virtual/opencl-3
-		dev-libs/libclc[spirv(-)]
-		>=dev-util/spirv-tools-1.3.231.0
-		virtual/libelf:0=
-	)
-	vaapi? (
-		>=media-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
-	)
-	vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
-	vulkan? (
-		video_cards_intel? (
-			amd64? (
-				dev-libs/libclc[spirv(-)]
-				>=dev-util/spirv-tools-1.3.231.0
-			)
-		)
-	)
-	selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
-	wayland? ( >=dev-libs/wayland-1.18.0[${MULTILIB_USEDEP}] )
-	${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_intel?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
-	X? (
-		>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
-		>=x11-libs/libxshmfence-1.1[${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}]
-	)
-	zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
-	zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
-"
-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. Specify LLVM_MAX_SLOT (inclusive), e.g. 16.
-# 2. Specify LLVM_MIN_SLOT (inclusive), e.g. 15.
-LLVM_MAX_SLOT="16"
-LLVM_MIN_SLOT="15"
-LLVM_USE_DEPS="llvm_targets_AMDGPU(+),${MULTILIB_USEDEP}"
-PER_SLOT_DEPSTR="
-	(
-		!opencl? ( sys-devel/llvm:@SLOT@[${LLVM_USE_DEPS}] )
-		opencl? ( sys-devel/clang:@SLOT@[${LLVM_USE_DEPS}] )
-		opencl? ( dev-util/spirv-llvm-translator:@SLOT@ )
-		vulkan? ( video_cards_intel? ( dev-util/spirv-llvm-translator:@SLOT@ ) )
-	)
-"
-LLVM_DEPSTR="
-	|| (
-		$(for ((slot=LLVM_MAX_SLOT; slot>=LLVM_MIN_SLOT; slot--)); do
-			echo "${PER_SLOT_DEPSTR//@SLOT@/${slot}}"
-		done)
-	)
-	!opencl? ( <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${LLVM_USE_DEPS}] )
-	opencl? ( <sys-devel/clang-$((LLVM_MAX_SLOT + 1)):=[${LLVM_USE_DEPS}] )
-"
-RDEPEND="${RDEPEND}
-	llvm? ( ${LLVM_DEPSTR} )
-"
-unset LLVM_MIN_SLOT {LLVM,PER_SLOT}_DEPSTR
-
-DEPEND="${RDEPEND}
-	video_cards_d3d12? ( dev-util/directx-headers[${MULTILIB_USEDEP}] )
-	valgrind? ( dev-util/valgrind )
-	wayland? ( >=dev-libs/wayland-protocols-1.24 )
-	X? (
-		x11-libs/libXrandr[${MULTILIB_USEDEP}]
-		x11-base/xorg-proto
-	)
-"
-BDEPEND="
-	>=dev-util/meson-1.0.0
-	${PYTHON_DEPS}
-	opencl? (
-		>=virtual/rust-1.62.0
-		>=dev-util/bindgen-0.58.0
-	)
-	sys-devel/bison
-	sys-devel/flex
-	virtual/pkgconfig
-	$(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
-	vulkan? (
-		dev-util/glslang
-		video_cards_intel? (
-			amd64? (
-				$(python_gen_any_dep "dev-python/ply[\${PYTHON_USEDEP}]")
-			)
-		)
-	)
-	wayland? ( dev-util/wayland-scanner )
-"
-
-S="${WORKDIR}/${MY_P}"
-EGIT_CHECKOUT_DIR=${S}
-
-QA_WX_LOAD="
-x86? (
-	usr/lib/libglapi.so.0.0.0
-	usr/lib/libOSMesa.so.8.0.0
-	usr/lib/libGLX_mesa.so.0.0.0
-)"
-
-llvm_check_deps() {
-	if use opencl; then
-		has_version "sys-devel/clang:${LLVM_SLOT}[${LLVM_USE_DEPS}]" || return 1
-	fi
-	if use opencl || { use vulkan && use video_cards_intel; }; then
-		has_version "dev-util/spirv-llvm-translator:${LLVM_SLOT}" || return 1
-	fi
-	has_version "sys-devel/llvm:${LLVM_SLOT}[${LLVM_USE_DEPS}]"
-}
-
-PATCHES=(
-	# Temporary rusticl workaround: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7717#note_1832122
-	"${FILESDIR}/clang_resource_dir.patch"
-
-	"${FILESDIR}"/${PN}-23.1.0-intel-Disable-shader-cache-when-executing-intel_clc-.patch
-)
-
-pkg_pretend() {
-	if use vulkan; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_freedreno &&
-		   ! use video_cards_intel &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_v3d; then
-			ewarn "Ignoring USE=vulkan     since VIDEO_CARDS does not contain d3d12, freedreno, intel, radeonsi, or v3d"
-		fi
-	fi
-
-	if use vaapi; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_r600 &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_nouveau; then
-			ewarn "Ignoring USE=vaapi      since VIDEO_CARDS does not contain d3d12, r600, radeonsi, or nouveau"
-		fi
-	fi
-
-	if use vdpau; then
-		if ! use video_cards_d3d12 &&
-		   ! 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 d3d12, 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 llvm; then
-		use opencl     && ewarn "Ignoring USE=opencl     since USE does not contain llvm"
-	fi
-
-	if use osmesa && ! use llvm; then
-		ewarn "OSMesa will be slow without enabling USE=llvm"
-	fi
-}
-
-python_check_deps() {
-	python_has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]" || return 1
-	if use vulkan && use video_cards_intel && use amd64; then
-		python_has_version -b "dev-python/ply[${PYTHON_USEDEP}]" || return 1
-	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 video_cards_intel ||
-	   use video_cards_radeonsi; then
-		if kernel_is -ge 5 11 3; then
-			CONFIG_CHECK="~KCMP"
-		elif kernel_is -ge 5 11; then
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		elif kernel_is -ge 5 10 20; then
-			CONFIG_CHECK="~KCMP"
-		else
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		fi
-		linux-info_pkg_setup
-	fi
-
-	if use llvm; then
-		llvm_pkg_setup
-	fi
-	python-any-r1_pkg_setup
-}
-
-multilib_src_configure() {
-	local emesonargs=()
-
-	local platforms
-	use X && platforms+="x11"
-	use wayland && platforms+=",wayland"
-	emesonargs+=(-Dplatforms=${platforms#,})
-
-	if use video_cards_intel ||
-	   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_d3d12 ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_nouveau; then
-		emesonargs+=($(meson_feature vaapi gallium-va))
-		use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
-	else
-		emesonargs+=(-Dgallium-va=disabled)
-	fi
-
-	if use video_cards_d3d12; then
-		emesonargs+=($(meson_feature vaapi gallium-d3d12-video))
-	fi
-
-	if use video_cards_d3d12 ||
-	   use video_cards_r300 ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_nouveau; then
-		emesonargs+=($(meson_feature vdpau gallium-vdpau))
-	else
-		emesonargs+=(-Dgallium-vdpau=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_nouveau ||
-	   use video_cards_vmware; then
-		emesonargs+=($(meson_feature xa gallium-xa))
-	else
-		emesonargs+=(-Dgallium-xa=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_lima ||
-	   use video_cards_panfrost ||
-	   use video_cards_v3d ||
-	   use video_cards_vc4 ||
-	   use video_cards_vivante; then
-		gallium_enable -- kmsro
-	fi
-
-	gallium_enable -- swrast
-	gallium_enable video_cards_freedreno freedreno
-	gallium_enable video_cards_intel crocus i915 iris
-	gallium_enable video_cards_lima lima
-	gallium_enable video_cards_d3d12 d3d12
-	gallium_enable video_cards_nouveau nouveau
-	gallium_enable video_cards_panfrost panfrost
-	gallium_enable video_cards_v3d v3d
-	gallium_enable video_cards_vc4 vc4
-	gallium_enable video_cards_virgl virgl
-	gallium_enable video_cards_vivante etnaviv
-	gallium_enable video_cards_vmware svga
-	gallium_enable zink zink
-
-	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
-
-	if use llvm && use opencl; then
-		PKG_CONFIG_PATH="$(get_llvm_prefix)/$(get_libdir)/pkgconfig"
-		# See https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/docs/rusticl.rst
-		emesonargs+=(
-			$(meson_native_true gallium-rusticl)
-			-Drust_std=2021
-		)
-	fi
-
-	if use vulkan; then
-		vulkan_enable video_cards_freedreno freedreno
-		vulkan_enable video_cards_intel intel intel_hasvk
-		vulkan_enable video_cards_d3d12 microsoft-experimental
-		vulkan_enable video_cards_radeonsi amd
-		vulkan_enable video_cards_v3d broadcom
-	fi
-
-	driver_list() {
-		local drivers="$(sort -u <<< "${1// /$'\n'}")"
-		echo "${drivers//$'\n'/,}"
-	}
-
-	local vulkan_layers
-	use vulkan && vulkan_layers+="device-select"
-	use vulkan-overlay && vulkan_layers+=",overlay"
-	emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
-
-	if use vulkan && use video_cards_intel; then
-		PKG_CONFIG_PATH="$(get_llvm_prefix)/$(get_libdir)/pkgconfig"
-		emesonargs+=($(meson_feature llvm intel-clc))
-	fi
-
-	emesonargs+=(
-		$(meson_use test build-tests)
-		-Dglx=$(usex X dri disabled)
-		-Dshared-glapi=enabled
-		-Ddri3=enabled
-		-Degl=enabled
-		-Dgbm=enabled
-		-Dglvnd=true
-		$(meson_feature gles1)
-		$(meson_feature gles2)
-		$(meson_feature llvm)
-		$(meson_feature lm-sensors lmsensors)
-		$(meson_use osmesa)
-		$(meson_use selinux)
-		$(meson_feature unwind libunwind)
-		$(meson_feature zstd)
-		$(meson_use cpu_flags_x86_sse2 sse2)
-		-Dvalgrind=$(usex valgrind auto disabled)
-		-Dvideo-codecs=$(usex proprietary-codecs "h264dec,h264enc,h265dec,h265enc,vc1dec" "")
-		-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_test() {
-	meson_src_test -t 100
-}
-
-# $1 - VIDEO_CARDS flag (check skipped for "--")
-# other args - names of DRI drivers to enable
-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-23.1.1.ebuild b/media-libs/mesa/mesa-23.1.1.ebuild
deleted file mode 100644
index f92b393b0f53..000000000000
--- a/media-libs/mesa/mesa-23.1.1.ebuild
+++ /dev/null
@@ -1,447 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..12} )
-
-inherit llvm meson-multilib python-any-r1 linux-info
-
-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"
-	inherit git-r3
-else
-	SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-solaris"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-RESTRICT="!test? ( test )"
-
-RADEON_CARDS="r300 r600 radeon radeonsi"
-VIDEO_CARDS="${RADEON_CARDS} d3d12 freedreno intel lima nouveau panfrost v3d vc4 virgl vivante vmware"
-for card in ${VIDEO_CARDS}; do
-	IUSE_VIDEO_CARDS+=" video_cards_${card}"
-done
-
-IUSE="${IUSE_VIDEO_CARDS}
-	cpu_flags_x86_sse2 d3d9 debug gles1 +gles2 +llvm
-	lm-sensors opencl osmesa +proprietary-codecs selinux
-	test unwind vaapi valgrind vdpau vulkan
-	vulkan-overlay wayland +X xa zink +zstd"
-
-REQUIRED_USE="
-	d3d9? (
-		|| (
-			video_cards_intel
-			video_cards_r300
-			video_cards_r600
-			video_cards_radeonsi
-			video_cards_nouveau
-			video_cards_vmware
-		)
-	)
-	vulkan? ( video_cards_radeonsi? ( llvm ) )
-	vulkan-overlay? ( vulkan )
-	video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_r300?   ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_radeonsi?   ( llvm )
-	vdpau? ( X )
-	xa? ( X )
-	zink? ( vulkan )
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.110"
-RDEPEND="
-	>=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
-	>=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.8[${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}]
-		)
-	)
-	lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
-	opencl? (
-		>=virtual/opencl-3
-		dev-libs/libclc[spirv(-)]
-		>=dev-util/spirv-tools-1.3.231.0
-		virtual/libelf:0=
-	)
-	vaapi? (
-		>=media-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
-	)
-	vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
-	vulkan? (
-		video_cards_intel? (
-			amd64? (
-				dev-libs/libclc[spirv(-)]
-				>=dev-util/spirv-tools-1.3.231.0
-			)
-		)
-	)
-	selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
-	wayland? ( >=dev-libs/wayland-1.18.0[${MULTILIB_USEDEP}] )
-	${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_intel?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
-	X? (
-		>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
-		>=x11-libs/libxshmfence-1.1[${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}]
-	)
-	zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
-	zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
-"
-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. Specify LLVM_MAX_SLOT (inclusive), e.g. 16.
-# 2. Specify LLVM_MIN_SLOT (inclusive), e.g. 15.
-LLVM_MAX_SLOT="16"
-LLVM_MIN_SLOT="15"
-LLVM_USE_DEPS="llvm_targets_AMDGPU(+),${MULTILIB_USEDEP}"
-PER_SLOT_DEPSTR="
-	(
-		!opencl? ( sys-devel/llvm:@SLOT@[${LLVM_USE_DEPS}] )
-		opencl? ( sys-devel/clang:@SLOT@[${LLVM_USE_DEPS}] )
-		opencl? ( dev-util/spirv-llvm-translator:@SLOT@ )
-		vulkan? ( video_cards_intel? ( dev-util/spirv-llvm-translator:@SLOT@ ) )
-	)
-"
-LLVM_DEPSTR="
-	|| (
-		$(for ((slot=LLVM_MAX_SLOT; slot>=LLVM_MIN_SLOT; slot--)); do
-			echo "${PER_SLOT_DEPSTR//@SLOT@/${slot}}"
-		done)
-	)
-	!opencl? ( <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${LLVM_USE_DEPS}] )
-	opencl? ( <sys-devel/clang-$((LLVM_MAX_SLOT + 1)):=[${LLVM_USE_DEPS}] )
-"
-RDEPEND="${RDEPEND}
-	llvm? ( ${LLVM_DEPSTR} )
-"
-unset LLVM_MIN_SLOT {LLVM,PER_SLOT}_DEPSTR
-
-DEPEND="${RDEPEND}
-	video_cards_d3d12? ( dev-util/directx-headers[${MULTILIB_USEDEP}] )
-	valgrind? ( dev-util/valgrind )
-	wayland? ( >=dev-libs/wayland-protocols-1.24 )
-	X? (
-		x11-libs/libXrandr[${MULTILIB_USEDEP}]
-		x11-base/xorg-proto
-	)
-"
-BDEPEND="
-	>=dev-util/meson-1.0.0
-	${PYTHON_DEPS}
-	opencl? (
-		>=virtual/rust-1.62.0
-		>=dev-util/bindgen-0.58.0
-	)
-	sys-devel/bison
-	sys-devel/flex
-	virtual/pkgconfig
-	$(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
-	vulkan? (
-		dev-util/glslang
-		video_cards_intel? (
-			amd64? (
-				$(python_gen_any_dep "dev-python/ply[\${PYTHON_USEDEP}]")
-			)
-		)
-	)
-	wayland? ( dev-util/wayland-scanner )
-"
-
-S="${WORKDIR}/${MY_P}"
-EGIT_CHECKOUT_DIR=${S}
-
-QA_WX_LOAD="
-x86? (
-	usr/lib/libglapi.so.0.0.0
-	usr/lib/libOSMesa.so.8.0.0
-	usr/lib/libGLX_mesa.so.0.0.0
-)"
-
-llvm_check_deps() {
-	if use opencl; then
-		has_version "sys-devel/clang:${LLVM_SLOT}[${LLVM_USE_DEPS}]" || return 1
-	fi
-	if use opencl || { use vulkan && use video_cards_intel; }; then
-		has_version "dev-util/spirv-llvm-translator:${LLVM_SLOT}" || return 1
-	fi
-	has_version "sys-devel/llvm:${LLVM_SLOT}[${LLVM_USE_DEPS}]"
-}
-
-PATCHES=(
-	# Temporary rusticl workaround: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7717#note_1832122
-	"${FILESDIR}/clang_resource_dir.patch"
-)
-
-pkg_pretend() {
-	if use vulkan; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_freedreno &&
-		   ! use video_cards_intel &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_v3d; then
-			ewarn "Ignoring USE=vulkan     since VIDEO_CARDS does not contain d3d12, freedreno, intel, radeonsi, or v3d"
-		fi
-	fi
-
-	if use vaapi; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_r600 &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_nouveau; then
-			ewarn "Ignoring USE=vaapi      since VIDEO_CARDS does not contain d3d12, r600, radeonsi, or nouveau"
-		fi
-	fi
-
-	if use vdpau; then
-		if ! use video_cards_d3d12 &&
-		   ! 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 d3d12, 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 llvm; then
-		use opencl     && ewarn "Ignoring USE=opencl     since USE does not contain llvm"
-	fi
-
-	if use osmesa && ! use llvm; then
-		ewarn "OSMesa will be slow without enabling USE=llvm"
-	fi
-}
-
-python_check_deps() {
-	python_has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]" || return 1
-	if use vulkan && use video_cards_intel && use amd64; then
-		python_has_version -b "dev-python/ply[${PYTHON_USEDEP}]" || return 1
-	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 video_cards_intel ||
-	   use video_cards_radeonsi; then
-		if kernel_is -ge 5 11 3; then
-			CONFIG_CHECK="~KCMP"
-		elif kernel_is -ge 5 11; then
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		elif kernel_is -ge 5 10 20; then
-			CONFIG_CHECK="~KCMP"
-		else
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		fi
-		linux-info_pkg_setup
-	fi
-
-	if use llvm; then
-		llvm_pkg_setup
-	fi
-	python-any-r1_pkg_setup
-}
-
-multilib_src_configure() {
-	local emesonargs=()
-
-	local platforms
-	use X && platforms+="x11"
-	use wayland && platforms+=",wayland"
-	emesonargs+=(-Dplatforms=${platforms#,})
-
-	if use video_cards_intel ||
-	   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_d3d12 ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_nouveau; then
-		emesonargs+=($(meson_feature vaapi gallium-va))
-		use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
-	else
-		emesonargs+=(-Dgallium-va=disabled)
-	fi
-
-	if use video_cards_d3d12; then
-		emesonargs+=($(meson_feature vaapi gallium-d3d12-video))
-	fi
-
-	if use video_cards_d3d12 ||
-	   use video_cards_r300 ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_nouveau; then
-		emesonargs+=($(meson_feature vdpau gallium-vdpau))
-	else
-		emesonargs+=(-Dgallium-vdpau=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_nouveau ||
-	   use video_cards_vmware; then
-		emesonargs+=($(meson_feature xa gallium-xa))
-	else
-		emesonargs+=(-Dgallium-xa=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_lima ||
-	   use video_cards_panfrost ||
-	   use video_cards_v3d ||
-	   use video_cards_vc4 ||
-	   use video_cards_vivante; then
-		gallium_enable -- kmsro
-	fi
-
-	gallium_enable -- swrast
-	gallium_enable video_cards_freedreno freedreno
-	gallium_enable video_cards_intel crocus i915 iris
-	gallium_enable video_cards_lima lima
-	gallium_enable video_cards_d3d12 d3d12
-	gallium_enable video_cards_nouveau nouveau
-	gallium_enable video_cards_panfrost panfrost
-	gallium_enable video_cards_v3d v3d
-	gallium_enable video_cards_vc4 vc4
-	gallium_enable video_cards_virgl virgl
-	gallium_enable video_cards_vivante etnaviv
-	gallium_enable video_cards_vmware svga
-	gallium_enable zink zink
-
-	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
-
-	if use llvm && use opencl; then
-		PKG_CONFIG_PATH="$(get_llvm_prefix)/$(get_libdir)/pkgconfig"
-		# See https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/docs/rusticl.rst
-		emesonargs+=(
-			$(meson_native_true gallium-rusticl)
-			-Drust_std=2021
-		)
-	fi
-
-	if use vulkan; then
-		vulkan_enable video_cards_freedreno freedreno
-		vulkan_enable video_cards_intel intel intel_hasvk
-		vulkan_enable video_cards_d3d12 microsoft-experimental
-		vulkan_enable video_cards_radeonsi amd
-		vulkan_enable video_cards_v3d broadcom
-	fi
-
-	driver_list() {
-		local drivers="$(sort -u <<< "${1// /$'\n'}")"
-		echo "${drivers//$'\n'/,}"
-	}
-
-	local vulkan_layers
-	use vulkan && vulkan_layers+="device-select"
-	use vulkan-overlay && vulkan_layers+=",overlay"
-	emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
-
-	if use vulkan && use video_cards_intel; then
-		PKG_CONFIG_PATH="$(get_llvm_prefix)/$(get_libdir)/pkgconfig"
-		emesonargs+=($(meson_feature llvm intel-clc))
-	fi
-
-	emesonargs+=(
-		$(meson_use test build-tests)
-		-Dglx=$(usex X dri disabled)
-		-Dshared-glapi=enabled
-		-Ddri3=enabled
-		-Degl=enabled
-		-Dgbm=enabled
-		-Dglvnd=true
-		$(meson_feature gles1)
-		$(meson_feature gles2)
-		$(meson_feature llvm)
-		$(meson_feature lm-sensors lmsensors)
-		$(meson_use osmesa)
-		$(meson_use selinux)
-		$(meson_feature unwind libunwind)
-		$(meson_feature zstd)
-		$(meson_use cpu_flags_x86_sse2 sse2)
-		-Dvalgrind=$(usex valgrind auto disabled)
-		-Dvideo-codecs=$(usex proprietary-codecs "h264dec,h264enc,h265dec,h265enc,vc1dec" "")
-		-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_test() {
-	meson_src_test -t 100
-}
-
-# $1 - VIDEO_CARDS flag (check skipped for "--")
-# other args - names of DRI drivers to enable
-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-23.1.2-r1.ebuild b/media-libs/mesa/mesa-23.1.2-r1.ebuild
deleted file mode 100644
index 0b34a1fa96ec..000000000000
--- a/media-libs/mesa/mesa-23.1.2-r1.ebuild
+++ /dev/null
@@ -1,449 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..12} )
-
-inherit llvm meson-multilib python-any-r1 linux-info
-
-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"
-	inherit git-r3
-else
-	SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-solaris"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-RESTRICT="!test? ( test )"
-
-RADEON_CARDS="r300 r600 radeon radeonsi"
-VIDEO_CARDS="${RADEON_CARDS} d3d12 freedreno intel lavapipe lima nouveau panfrost v3d vc4 virgl vivante vmware"
-for card in ${VIDEO_CARDS}; do
-	IUSE_VIDEO_CARDS+=" video_cards_${card}"
-done
-
-IUSE="${IUSE_VIDEO_CARDS}
-	cpu_flags_x86_sse2 d3d9 debug gles1 +gles2 +llvm
-	lm-sensors opencl osmesa +proprietary-codecs selinux
-	test unwind vaapi valgrind vdpau vulkan
-	vulkan-overlay wayland +X xa zink +zstd"
-
-REQUIRED_USE="
-	d3d9? (
-		|| (
-			video_cards_intel
-			video_cards_r300
-			video_cards_r600
-			video_cards_radeonsi
-			video_cards_nouveau
-			video_cards_vmware
-		)
-	)
-	vulkan? ( video_cards_radeonsi? ( llvm ) )
-	vulkan-overlay? ( vulkan )
-	video_cards_lavapipe? ( llvm vulkan )
-	video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_r300?   ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_radeonsi?   ( llvm )
-	vdpau? ( X )
-	xa? ( X )
-	zink? ( vulkan )
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.110"
-RDEPEND="
-	>=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
-	>=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.8[${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}]
-		)
-	)
-	lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
-	opencl? (
-		>=virtual/opencl-3
-		dev-libs/libclc[spirv(-)]
-		>=dev-util/spirv-tools-1.3.231.0
-		virtual/libelf:0=
-	)
-	vaapi? (
-		>=media-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
-	)
-	vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
-	vulkan? (
-		video_cards_intel? (
-			amd64? (
-				dev-libs/libclc[spirv(-)]
-				>=dev-util/spirv-tools-1.3.231.0
-			)
-		)
-	)
-	selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
-	wayland? ( >=dev-libs/wayland-1.18.0[${MULTILIB_USEDEP}] )
-	${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_intel?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
-	X? (
-		>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
-		>=x11-libs/libxshmfence-1.1[${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}]
-	)
-	zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
-	zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
-"
-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. Specify LLVM_MAX_SLOT (inclusive), e.g. 16.
-# 2. Specify LLVM_MIN_SLOT (inclusive), e.g. 15.
-LLVM_MAX_SLOT="16"
-LLVM_MIN_SLOT="15"
-LLVM_USE_DEPS="llvm_targets_AMDGPU(+),${MULTILIB_USEDEP}"
-PER_SLOT_DEPSTR="
-	(
-		!opencl? ( sys-devel/llvm:@SLOT@[${LLVM_USE_DEPS}] )
-		opencl? ( sys-devel/clang:@SLOT@[${LLVM_USE_DEPS}] )
-		opencl? ( dev-util/spirv-llvm-translator:@SLOT@ )
-		vulkan? ( video_cards_intel? ( dev-util/spirv-llvm-translator:@SLOT@ ) )
-	)
-"
-LLVM_DEPSTR="
-	|| (
-		$(for ((slot=LLVM_MAX_SLOT; slot>=LLVM_MIN_SLOT; slot--)); do
-			echo "${PER_SLOT_DEPSTR//@SLOT@/${slot}}"
-		done)
-	)
-	!opencl? ( <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${LLVM_USE_DEPS}] )
-	opencl? ( <sys-devel/clang-$((LLVM_MAX_SLOT + 1)):=[${LLVM_USE_DEPS}] )
-"
-RDEPEND="${RDEPEND}
-	llvm? ( ${LLVM_DEPSTR} )
-"
-unset LLVM_MIN_SLOT {LLVM,PER_SLOT}_DEPSTR
-
-DEPEND="${RDEPEND}
-	video_cards_d3d12? ( dev-util/directx-headers[${MULTILIB_USEDEP}] )
-	valgrind? ( dev-util/valgrind )
-	wayland? ( >=dev-libs/wayland-protocols-1.24 )
-	X? (
-		x11-libs/libXrandr[${MULTILIB_USEDEP}]
-		x11-base/xorg-proto
-	)
-"
-BDEPEND="
-	>=dev-util/meson-1.0.0
-	${PYTHON_DEPS}
-	opencl? (
-		>=virtual/rust-1.62.0
-		>=dev-util/bindgen-0.58.0
-	)
-	sys-devel/bison
-	sys-devel/flex
-	virtual/pkgconfig
-	$(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
-	vulkan? (
-		dev-util/glslang
-		video_cards_intel? (
-			amd64? (
-				$(python_gen_any_dep "dev-python/ply[\${PYTHON_USEDEP}]")
-			)
-		)
-	)
-	wayland? ( dev-util/wayland-scanner )
-"
-
-S="${WORKDIR}/${MY_P}"
-EGIT_CHECKOUT_DIR=${S}
-
-QA_WX_LOAD="
-x86? (
-	usr/lib/libglapi.so.0.0.0
-	usr/lib/libOSMesa.so.8.0.0
-	usr/lib/libGLX_mesa.so.0.0.0
-)"
-
-llvm_check_deps() {
-	if use opencl; then
-		has_version "sys-devel/clang:${LLVM_SLOT}[${LLVM_USE_DEPS}]" || return 1
-	fi
-	if use opencl || { use vulkan && use video_cards_intel; }; then
-		has_version "dev-util/spirv-llvm-translator:${LLVM_SLOT}" || return 1
-	fi
-	has_version "sys-devel/llvm:${LLVM_SLOT}[${LLVM_USE_DEPS}]"
-}
-
-PATCHES=(
-	# Temporary rusticl workaround: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7717#note_1832122
-	"${FILESDIR}/clang_resource_dir.patch"
-)
-
-pkg_pretend() {
-	if use vulkan; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_freedreno &&
-		   ! use video_cards_intel &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_v3d; then
-			ewarn "Ignoring USE=vulkan     since VIDEO_CARDS does not contain d3d12, freedreno, intel, radeonsi, or v3d"
-		fi
-	fi
-
-	if use vaapi; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_r600 &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_nouveau; then
-			ewarn "Ignoring USE=vaapi      since VIDEO_CARDS does not contain d3d12, r600, radeonsi, or nouveau"
-		fi
-	fi
-
-	if use vdpau; then
-		if ! use video_cards_d3d12 &&
-		   ! 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 d3d12, 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 llvm; then
-		use opencl     && ewarn "Ignoring USE=opencl     since USE does not contain llvm"
-	fi
-
-	if use osmesa && ! use llvm; then
-		ewarn "OSMesa will be slow without enabling USE=llvm"
-	fi
-}
-
-python_check_deps() {
-	python_has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]" || return 1
-	if use vulkan && use video_cards_intel && use amd64; then
-		python_has_version -b "dev-python/ply[${PYTHON_USEDEP}]" || return 1
-	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 video_cards_intel ||
-	   use video_cards_radeonsi; then
-		if kernel_is -ge 5 11 3; then
-			CONFIG_CHECK="~KCMP"
-		elif kernel_is -ge 5 11; then
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		elif kernel_is -ge 5 10 20; then
-			CONFIG_CHECK="~KCMP"
-		else
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		fi
-		linux-info_pkg_setup
-	fi
-
-	if use llvm; then
-		llvm_pkg_setup
-	fi
-	python-any-r1_pkg_setup
-}
-
-multilib_src_configure() {
-	local emesonargs=()
-
-	local platforms
-	use X && platforms+="x11"
-	use wayland && platforms+=",wayland"
-	emesonargs+=(-Dplatforms=${platforms#,})
-
-	if use video_cards_intel ||
-	   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_d3d12 ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_nouveau; then
-		emesonargs+=($(meson_feature vaapi gallium-va))
-		use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
-	else
-		emesonargs+=(-Dgallium-va=disabled)
-	fi
-
-	if use video_cards_d3d12; then
-		emesonargs+=($(meson_feature vaapi gallium-d3d12-video))
-	fi
-
-	if use video_cards_d3d12 ||
-	   use video_cards_r300 ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_nouveau; then
-		emesonargs+=($(meson_feature vdpau gallium-vdpau))
-	else
-		emesonargs+=(-Dgallium-vdpau=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_nouveau ||
-	   use video_cards_vmware; then
-		emesonargs+=($(meson_feature xa gallium-xa))
-	else
-		emesonargs+=(-Dgallium-xa=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_lima ||
-	   use video_cards_panfrost ||
-	   use video_cards_v3d ||
-	   use video_cards_vc4 ||
-	   use video_cards_vivante; then
-		gallium_enable -- kmsro
-	fi
-
-	gallium_enable -- swrast
-	gallium_enable video_cards_freedreno freedreno
-	gallium_enable video_cards_intel crocus i915 iris
-	gallium_enable video_cards_lima lima
-	gallium_enable video_cards_d3d12 d3d12
-	gallium_enable video_cards_nouveau nouveau
-	gallium_enable video_cards_panfrost panfrost
-	gallium_enable video_cards_v3d v3d
-	gallium_enable video_cards_vc4 vc4
-	gallium_enable video_cards_virgl virgl
-	gallium_enable video_cards_vivante etnaviv
-	gallium_enable video_cards_vmware svga
-	gallium_enable zink zink
-
-	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
-
-	if use llvm && use opencl; then
-		PKG_CONFIG_PATH="$(get_llvm_prefix)/$(get_libdir)/pkgconfig"
-		# See https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/docs/rusticl.rst
-		emesonargs+=(
-			$(meson_native_true gallium-rusticl)
-			-Drust_std=2021
-		)
-	fi
-
-	if use vulkan; then
-		vulkan_enable video_cards_lavapipe swrast
-		vulkan_enable video_cards_freedreno freedreno
-		vulkan_enable video_cards_intel intel intel_hasvk
-		vulkan_enable video_cards_d3d12 microsoft-experimental
-		vulkan_enable video_cards_radeonsi amd
-		vulkan_enable video_cards_v3d broadcom
-	fi
-
-	driver_list() {
-		local drivers="$(sort -u <<< "${1// /$'\n'}")"
-		echo "${drivers//$'\n'/,}"
-	}
-
-	local vulkan_layers
-	use vulkan && vulkan_layers+="device-select"
-	use vulkan-overlay && vulkan_layers+=",overlay"
-	emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
-
-	if use vulkan && use video_cards_intel; then
-		PKG_CONFIG_PATH="$(get_llvm_prefix)/$(get_libdir)/pkgconfig"
-		emesonargs+=($(meson_feature llvm intel-clc))
-	fi
-
-	emesonargs+=(
-		$(meson_use test build-tests)
-		-Dglx=$(usex X dri disabled)
-		-Dshared-glapi=enabled
-		-Ddri3=enabled
-		-Degl=enabled
-		-Dgbm=enabled
-		-Dglvnd=true
-		$(meson_feature gles1)
-		$(meson_feature gles2)
-		$(meson_feature llvm)
-		$(meson_feature lm-sensors lmsensors)
-		$(meson_use osmesa)
-		$(meson_use selinux)
-		$(meson_feature unwind libunwind)
-		$(meson_feature zstd)
-		$(meson_use cpu_flags_x86_sse2 sse2)
-		-Dvalgrind=$(usex valgrind auto disabled)
-		-Dvideo-codecs=$(usex proprietary-codecs "h264dec,h264enc,h265dec,h265enc,vc1dec" "")
-		-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_test() {
-	meson_src_test -t 100
-}
-
-# $1 - VIDEO_CARDS flag (check skipped for "--")
-# other args - names of DRI drivers to enable
-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-23.1.2.ebuild b/media-libs/mesa/mesa-23.1.2.ebuild
deleted file mode 100644
index f92b393b0f53..000000000000
--- a/media-libs/mesa/mesa-23.1.2.ebuild
+++ /dev/null
@@ -1,447 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..12} )
-
-inherit llvm meson-multilib python-any-r1 linux-info
-
-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"
-	inherit git-r3
-else
-	SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-solaris"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-RESTRICT="!test? ( test )"
-
-RADEON_CARDS="r300 r600 radeon radeonsi"
-VIDEO_CARDS="${RADEON_CARDS} d3d12 freedreno intel lima nouveau panfrost v3d vc4 virgl vivante vmware"
-for card in ${VIDEO_CARDS}; do
-	IUSE_VIDEO_CARDS+=" video_cards_${card}"
-done
-
-IUSE="${IUSE_VIDEO_CARDS}
-	cpu_flags_x86_sse2 d3d9 debug gles1 +gles2 +llvm
-	lm-sensors opencl osmesa +proprietary-codecs selinux
-	test unwind vaapi valgrind vdpau vulkan
-	vulkan-overlay wayland +X xa zink +zstd"
-
-REQUIRED_USE="
-	d3d9? (
-		|| (
-			video_cards_intel
-			video_cards_r300
-			video_cards_r600
-			video_cards_radeonsi
-			video_cards_nouveau
-			video_cards_vmware
-		)
-	)
-	vulkan? ( video_cards_radeonsi? ( llvm ) )
-	vulkan-overlay? ( vulkan )
-	video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_r300?   ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_radeonsi?   ( llvm )
-	vdpau? ( X )
-	xa? ( X )
-	zink? ( vulkan )
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.110"
-RDEPEND="
-	>=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
-	>=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.8[${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}]
-		)
-	)
-	lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
-	opencl? (
-		>=virtual/opencl-3
-		dev-libs/libclc[spirv(-)]
-		>=dev-util/spirv-tools-1.3.231.0
-		virtual/libelf:0=
-	)
-	vaapi? (
-		>=media-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
-	)
-	vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
-	vulkan? (
-		video_cards_intel? (
-			amd64? (
-				dev-libs/libclc[spirv(-)]
-				>=dev-util/spirv-tools-1.3.231.0
-			)
-		)
-	)
-	selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
-	wayland? ( >=dev-libs/wayland-1.18.0[${MULTILIB_USEDEP}] )
-	${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_intel?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
-	X? (
-		>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
-		>=x11-libs/libxshmfence-1.1[${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}]
-	)
-	zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
-	zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
-"
-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. Specify LLVM_MAX_SLOT (inclusive), e.g. 16.
-# 2. Specify LLVM_MIN_SLOT (inclusive), e.g. 15.
-LLVM_MAX_SLOT="16"
-LLVM_MIN_SLOT="15"
-LLVM_USE_DEPS="llvm_targets_AMDGPU(+),${MULTILIB_USEDEP}"
-PER_SLOT_DEPSTR="
-	(
-		!opencl? ( sys-devel/llvm:@SLOT@[${LLVM_USE_DEPS}] )
-		opencl? ( sys-devel/clang:@SLOT@[${LLVM_USE_DEPS}] )
-		opencl? ( dev-util/spirv-llvm-translator:@SLOT@ )
-		vulkan? ( video_cards_intel? ( dev-util/spirv-llvm-translator:@SLOT@ ) )
-	)
-"
-LLVM_DEPSTR="
-	|| (
-		$(for ((slot=LLVM_MAX_SLOT; slot>=LLVM_MIN_SLOT; slot--)); do
-			echo "${PER_SLOT_DEPSTR//@SLOT@/${slot}}"
-		done)
-	)
-	!opencl? ( <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${LLVM_USE_DEPS}] )
-	opencl? ( <sys-devel/clang-$((LLVM_MAX_SLOT + 1)):=[${LLVM_USE_DEPS}] )
-"
-RDEPEND="${RDEPEND}
-	llvm? ( ${LLVM_DEPSTR} )
-"
-unset LLVM_MIN_SLOT {LLVM,PER_SLOT}_DEPSTR
-
-DEPEND="${RDEPEND}
-	video_cards_d3d12? ( dev-util/directx-headers[${MULTILIB_USEDEP}] )
-	valgrind? ( dev-util/valgrind )
-	wayland? ( >=dev-libs/wayland-protocols-1.24 )
-	X? (
-		x11-libs/libXrandr[${MULTILIB_USEDEP}]
-		x11-base/xorg-proto
-	)
-"
-BDEPEND="
-	>=dev-util/meson-1.0.0
-	${PYTHON_DEPS}
-	opencl? (
-		>=virtual/rust-1.62.0
-		>=dev-util/bindgen-0.58.0
-	)
-	sys-devel/bison
-	sys-devel/flex
-	virtual/pkgconfig
-	$(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
-	vulkan? (
-		dev-util/glslang
-		video_cards_intel? (
-			amd64? (
-				$(python_gen_any_dep "dev-python/ply[\${PYTHON_USEDEP}]")
-			)
-		)
-	)
-	wayland? ( dev-util/wayland-scanner )
-"
-
-S="${WORKDIR}/${MY_P}"
-EGIT_CHECKOUT_DIR=${S}
-
-QA_WX_LOAD="
-x86? (
-	usr/lib/libglapi.so.0.0.0
-	usr/lib/libOSMesa.so.8.0.0
-	usr/lib/libGLX_mesa.so.0.0.0
-)"
-
-llvm_check_deps() {
-	if use opencl; then
-		has_version "sys-devel/clang:${LLVM_SLOT}[${LLVM_USE_DEPS}]" || return 1
-	fi
-	if use opencl || { use vulkan && use video_cards_intel; }; then
-		has_version "dev-util/spirv-llvm-translator:${LLVM_SLOT}" || return 1
-	fi
-	has_version "sys-devel/llvm:${LLVM_SLOT}[${LLVM_USE_DEPS}]"
-}
-
-PATCHES=(
-	# Temporary rusticl workaround: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7717#note_1832122
-	"${FILESDIR}/clang_resource_dir.patch"
-)
-
-pkg_pretend() {
-	if use vulkan; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_freedreno &&
-		   ! use video_cards_intel &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_v3d; then
-			ewarn "Ignoring USE=vulkan     since VIDEO_CARDS does not contain d3d12, freedreno, intel, radeonsi, or v3d"
-		fi
-	fi
-
-	if use vaapi; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_r600 &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_nouveau; then
-			ewarn "Ignoring USE=vaapi      since VIDEO_CARDS does not contain d3d12, r600, radeonsi, or nouveau"
-		fi
-	fi
-
-	if use vdpau; then
-		if ! use video_cards_d3d12 &&
-		   ! 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 d3d12, 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 llvm; then
-		use opencl     && ewarn "Ignoring USE=opencl     since USE does not contain llvm"
-	fi
-
-	if use osmesa && ! use llvm; then
-		ewarn "OSMesa will be slow without enabling USE=llvm"
-	fi
-}
-
-python_check_deps() {
-	python_has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]" || return 1
-	if use vulkan && use video_cards_intel && use amd64; then
-		python_has_version -b "dev-python/ply[${PYTHON_USEDEP}]" || return 1
-	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 video_cards_intel ||
-	   use video_cards_radeonsi; then
-		if kernel_is -ge 5 11 3; then
-			CONFIG_CHECK="~KCMP"
-		elif kernel_is -ge 5 11; then
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		elif kernel_is -ge 5 10 20; then
-			CONFIG_CHECK="~KCMP"
-		else
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		fi
-		linux-info_pkg_setup
-	fi
-
-	if use llvm; then
-		llvm_pkg_setup
-	fi
-	python-any-r1_pkg_setup
-}
-
-multilib_src_configure() {
-	local emesonargs=()
-
-	local platforms
-	use X && platforms+="x11"
-	use wayland && platforms+=",wayland"
-	emesonargs+=(-Dplatforms=${platforms#,})
-
-	if use video_cards_intel ||
-	   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_d3d12 ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_nouveau; then
-		emesonargs+=($(meson_feature vaapi gallium-va))
-		use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
-	else
-		emesonargs+=(-Dgallium-va=disabled)
-	fi
-
-	if use video_cards_d3d12; then
-		emesonargs+=($(meson_feature vaapi gallium-d3d12-video))
-	fi
-
-	if use video_cards_d3d12 ||
-	   use video_cards_r300 ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_nouveau; then
-		emesonargs+=($(meson_feature vdpau gallium-vdpau))
-	else
-		emesonargs+=(-Dgallium-vdpau=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_nouveau ||
-	   use video_cards_vmware; then
-		emesonargs+=($(meson_feature xa gallium-xa))
-	else
-		emesonargs+=(-Dgallium-xa=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_lima ||
-	   use video_cards_panfrost ||
-	   use video_cards_v3d ||
-	   use video_cards_vc4 ||
-	   use video_cards_vivante; then
-		gallium_enable -- kmsro
-	fi
-
-	gallium_enable -- swrast
-	gallium_enable video_cards_freedreno freedreno
-	gallium_enable video_cards_intel crocus i915 iris
-	gallium_enable video_cards_lima lima
-	gallium_enable video_cards_d3d12 d3d12
-	gallium_enable video_cards_nouveau nouveau
-	gallium_enable video_cards_panfrost panfrost
-	gallium_enable video_cards_v3d v3d
-	gallium_enable video_cards_vc4 vc4
-	gallium_enable video_cards_virgl virgl
-	gallium_enable video_cards_vivante etnaviv
-	gallium_enable video_cards_vmware svga
-	gallium_enable zink zink
-
-	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
-
-	if use llvm && use opencl; then
-		PKG_CONFIG_PATH="$(get_llvm_prefix)/$(get_libdir)/pkgconfig"
-		# See https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/docs/rusticl.rst
-		emesonargs+=(
-			$(meson_native_true gallium-rusticl)
-			-Drust_std=2021
-		)
-	fi
-
-	if use vulkan; then
-		vulkan_enable video_cards_freedreno freedreno
-		vulkan_enable video_cards_intel intel intel_hasvk
-		vulkan_enable video_cards_d3d12 microsoft-experimental
-		vulkan_enable video_cards_radeonsi amd
-		vulkan_enable video_cards_v3d broadcom
-	fi
-
-	driver_list() {
-		local drivers="$(sort -u <<< "${1// /$'\n'}")"
-		echo "${drivers//$'\n'/,}"
-	}
-
-	local vulkan_layers
-	use vulkan && vulkan_layers+="device-select"
-	use vulkan-overlay && vulkan_layers+=",overlay"
-	emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
-
-	if use vulkan && use video_cards_intel; then
-		PKG_CONFIG_PATH="$(get_llvm_prefix)/$(get_libdir)/pkgconfig"
-		emesonargs+=($(meson_feature llvm intel-clc))
-	fi
-
-	emesonargs+=(
-		$(meson_use test build-tests)
-		-Dglx=$(usex X dri disabled)
-		-Dshared-glapi=enabled
-		-Ddri3=enabled
-		-Degl=enabled
-		-Dgbm=enabled
-		-Dglvnd=true
-		$(meson_feature gles1)
-		$(meson_feature gles2)
-		$(meson_feature llvm)
-		$(meson_feature lm-sensors lmsensors)
-		$(meson_use osmesa)
-		$(meson_use selinux)
-		$(meson_feature unwind libunwind)
-		$(meson_feature zstd)
-		$(meson_use cpu_flags_x86_sse2 sse2)
-		-Dvalgrind=$(usex valgrind auto disabled)
-		-Dvideo-codecs=$(usex proprietary-codecs "h264dec,h264enc,h265dec,h265enc,vc1dec" "")
-		-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_test() {
-	meson_src_test -t 100
-}
-
-# $1 - VIDEO_CARDS flag (check skipped for "--")
-# other args - names of DRI drivers to enable
-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-23.1.3.ebuild b/media-libs/mesa/mesa-23.1.3.ebuild
deleted file mode 100644
index c42c875820a7..000000000000
--- a/media-libs/mesa/mesa-23.1.3.ebuild
+++ /dev/null
@@ -1,450 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..12} )
-
-inherit llvm meson-multilib python-any-r1 linux-info
-
-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"
-	inherit git-r3
-else
-	SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
-	KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-solaris"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-RESTRICT="!test? ( test )"
-
-RADEON_CARDS="r300 r600 radeon radeonsi"
-VIDEO_CARDS="${RADEON_CARDS} d3d12 freedreno intel lavapipe lima nouveau panfrost v3d vc4 virgl vivante vmware"
-for card in ${VIDEO_CARDS}; do
-	IUSE_VIDEO_CARDS+=" video_cards_${card}"
-done
-
-IUSE="${IUSE_VIDEO_CARDS}
-	cpu_flags_x86_sse2 d3d9 debug gles1 +gles2 +llvm
-	lm-sensors opencl osmesa +proprietary-codecs selinux
-	test unwind vaapi valgrind vdpau vulkan
-	vulkan-overlay wayland +X xa zink +zstd"
-
-REQUIRED_USE="
-	d3d9? (
-		|| (
-			video_cards_intel
-			video_cards_r300
-			video_cards_r600
-			video_cards_radeonsi
-			video_cards_nouveau
-			video_cards_vmware
-		)
-	)
-	vulkan? ( video_cards_radeonsi? ( llvm ) )
-	vulkan-overlay? ( vulkan )
-	video_cards_lavapipe? ( llvm vulkan )
-	video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_r300?   ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_radeonsi?   ( llvm )
-	vdpau? ( X )
-	xa? ( X )
-	zink? ( vulkan )
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.110"
-RDEPEND="
-	>=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
-	>=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.8[${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}]
-		)
-	)
-	lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
-	opencl? (
-		>=virtual/opencl-3
-		dev-libs/libclc[spirv(-)]
-		>=dev-util/spirv-tools-1.3.231.0
-		virtual/libelf:0=
-	)
-	vaapi? (
-		>=media-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
-	)
-	vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
-	vulkan? (
-		video_cards_intel? (
-			amd64? (
-				dev-libs/libclc[spirv(-)]
-				>=dev-util/spirv-tools-1.3.231.0
-			)
-		)
-	)
-	selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
-	wayland? ( >=dev-libs/wayland-1.18.0[${MULTILIB_USEDEP}] )
-	${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_intel?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
-	X? (
-		>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
-		>=x11-libs/libxshmfence-1.1[${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}]
-	)
-	zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
-	zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
-"
-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. Specify LLVM_MAX_SLOT (inclusive), e.g. 16.
-# 2. Specify LLVM_MIN_SLOT (inclusive), e.g. 15.
-LLVM_MAX_SLOT="16"
-LLVM_MIN_SLOT="15"
-LLVM_USE_DEPS="llvm_targets_AMDGPU(+),${MULTILIB_USEDEP}"
-PER_SLOT_DEPSTR="
-	(
-		!opencl? ( sys-devel/llvm:@SLOT@[${LLVM_USE_DEPS}] )
-		opencl? ( sys-devel/clang:@SLOT@[${LLVM_USE_DEPS}] )
-		opencl? ( dev-util/spirv-llvm-translator:@SLOT@ )
-		vulkan? ( video_cards_intel? ( amd64? ( dev-util/spirv-llvm-translator:@SLOT@ ) ) )
-	)
-"
-LLVM_DEPSTR="
-	|| (
-		$(for ((slot=LLVM_MAX_SLOT; slot>=LLVM_MIN_SLOT; slot--)); do
-			echo "${PER_SLOT_DEPSTR//@SLOT@/${slot}}"
-		done)
-	)
-	!opencl? ( <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${LLVM_USE_DEPS}] )
-	opencl? ( <sys-devel/clang-$((LLVM_MAX_SLOT + 1)):=[${LLVM_USE_DEPS}] )
-"
-RDEPEND="${RDEPEND}
-	llvm? ( ${LLVM_DEPSTR} )
-"
-unset LLVM_MIN_SLOT {LLVM,PER_SLOT}_DEPSTR
-
-DEPEND="${RDEPEND}
-	video_cards_d3d12? ( dev-util/directx-headers[${MULTILIB_USEDEP}] )
-	valgrind? ( dev-util/valgrind )
-	wayland? ( >=dev-libs/wayland-protocols-1.24 )
-	X? (
-		x11-libs/libXrandr[${MULTILIB_USEDEP}]
-		x11-base/xorg-proto
-	)
-"
-BDEPEND="
-	>=dev-util/meson-1.0.0
-	${PYTHON_DEPS}
-	opencl? (
-		>=virtual/rust-1.62.0
-		>=dev-util/bindgen-0.58.0
-	)
-	sys-devel/bison
-	sys-devel/flex
-	virtual/pkgconfig
-	$(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
-	vulkan? (
-		dev-util/glslang
-		video_cards_intel? (
-			amd64? (
-				$(python_gen_any_dep "dev-python/ply[\${PYTHON_USEDEP}]")
-			)
-		)
-	)
-	wayland? ( dev-util/wayland-scanner )
-"
-
-S="${WORKDIR}/${MY_P}"
-EGIT_CHECKOUT_DIR=${S}
-
-QA_WX_LOAD="
-x86? (
-	usr/lib/libglapi.so.0.0.0
-	usr/lib/libOSMesa.so.8.0.0
-	usr/lib/libGLX_mesa.so.0.0.0
-)"
-
-llvm_check_deps() {
-	if use opencl; then
-		has_version "sys-devel/clang:${LLVM_SLOT}[${LLVM_USE_DEPS}]" || return 1
-	fi
-	if use opencl || { use vulkan && use video_cards_intel && use amd64; }; then
-		has_version "dev-util/spirv-llvm-translator:${LLVM_SLOT}" || return 1
-	fi
-	has_version "sys-devel/llvm:${LLVM_SLOT}[${LLVM_USE_DEPS}]"
-}
-
-PATCHES=(
-	# Temporary rusticl workaround: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7717#note_1832122
-	"${FILESDIR}/clang_resource_dir.patch"
-)
-
-pkg_pretend() {
-	if use vulkan; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_freedreno &&
-		   ! use video_cards_intel &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_v3d; then
-			ewarn "Ignoring USE=vulkan     since VIDEO_CARDS does not contain d3d12, freedreno, intel, radeonsi, or v3d"
-		fi
-	fi
-
-	if use vaapi; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_r600 &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_nouveau; then
-			ewarn "Ignoring USE=vaapi      since VIDEO_CARDS does not contain d3d12, r600, radeonsi, or nouveau"
-		fi
-	fi
-
-	if use vdpau; then
-		if ! use video_cards_d3d12 &&
-		   ! 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 d3d12, 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 llvm; then
-		use opencl     && ewarn "Ignoring USE=opencl     since USE does not contain llvm"
-	fi
-
-	if use osmesa && ! use llvm; then
-		ewarn "OSMesa will be slow without enabling USE=llvm"
-	fi
-}
-
-python_check_deps() {
-	python_has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]" || return 1
-	if use vulkan && use video_cards_intel && use amd64; then
-		python_has_version -b "dev-python/ply[${PYTHON_USEDEP}]" || return 1
-	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 video_cards_intel ||
-	   use video_cards_radeonsi; then
-		if kernel_is -ge 5 11 3; then
-			CONFIG_CHECK="~KCMP"
-		elif kernel_is -ge 5 11; then
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		elif kernel_is -ge 5 10 20; then
-			CONFIG_CHECK="~KCMP"
-		else
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		fi
-		linux-info_pkg_setup
-	fi
-
-	if use llvm; then
-		llvm_pkg_setup
-	fi
-	python-any-r1_pkg_setup
-}
-
-multilib_src_configure() {
-	local emesonargs=()
-
-	local platforms
-	use X && platforms+="x11"
-	use wayland && platforms+=",wayland"
-	emesonargs+=(-Dplatforms=${platforms#,})
-
-	if use video_cards_intel ||
-	   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_d3d12 ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_nouveau; then
-		emesonargs+=($(meson_feature vaapi gallium-va))
-		use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
-	else
-		emesonargs+=(-Dgallium-va=disabled)
-	fi
-
-	if use video_cards_d3d12; then
-		emesonargs+=($(meson_feature vaapi gallium-d3d12-video))
-	fi
-
-	if use video_cards_d3d12 ||
-	   use video_cards_r300 ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_nouveau; then
-		emesonargs+=($(meson_feature vdpau gallium-vdpau))
-	else
-		emesonargs+=(-Dgallium-vdpau=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_nouveau ||
-	   use video_cards_vmware; then
-		emesonargs+=($(meson_feature xa gallium-xa))
-	else
-		emesonargs+=(-Dgallium-xa=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_lima ||
-	   use video_cards_panfrost ||
-	   use video_cards_v3d ||
-	   use video_cards_vc4 ||
-	   use video_cards_vivante; then
-		gallium_enable -- kmsro
-	fi
-
-	gallium_enable -- swrast
-	gallium_enable video_cards_freedreno freedreno
-	gallium_enable video_cards_intel crocus i915 iris
-	gallium_enable video_cards_lima lima
-	gallium_enable video_cards_d3d12 d3d12
-	gallium_enable video_cards_nouveau nouveau
-	gallium_enable video_cards_panfrost panfrost
-	gallium_enable video_cards_v3d v3d
-	gallium_enable video_cards_vc4 vc4
-	gallium_enable video_cards_virgl virgl
-	gallium_enable video_cards_vivante etnaviv
-	gallium_enable video_cards_vmware svga
-	gallium_enable zink zink
-
-	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
-
-	if use llvm && use opencl; then
-		PKG_CONFIG_PATH="$(get_llvm_prefix)/$(get_libdir)/pkgconfig"
-		# See https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/docs/rusticl.rst
-		emesonargs+=(
-			$(meson_native_true gallium-rusticl)
-			-Drust_std=2021
-		)
-	fi
-
-	if use vulkan; then
-		vulkan_enable video_cards_lavapipe swrast
-		vulkan_enable video_cards_freedreno freedreno
-		vulkan_enable video_cards_intel intel intel_hasvk
-		vulkan_enable video_cards_d3d12 microsoft-experimental
-		vulkan_enable video_cards_radeonsi amd
-		vulkan_enable video_cards_v3d broadcom
-	fi
-
-	driver_list() {
-		local drivers="$(sort -u <<< "${1// /$'\n'}")"
-		echo "${drivers//$'\n'/,}"
-	}
-
-	local vulkan_layers
-	use vulkan && vulkan_layers+="device-select"
-	use vulkan-overlay && vulkan_layers+=",overlay"
-	emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
-
-	if use vulkan && use video_cards_intel; then
-		PKG_CONFIG_PATH="$(get_llvm_prefix)/$(get_libdir)/pkgconfig"
-		emesonargs+=($(meson_feature llvm intel-clc))
-	fi
-
-	emesonargs+=(
-		$(meson_use test build-tests)
-		-Dglx=$(usex X dri disabled)
-		-Dshared-glapi=enabled
-		-Ddri3=enabled
-		-Degl=enabled
-		-Dexpat=enabled
-		-Dgbm=enabled
-		-Dglvnd=true
-		$(meson_feature gles1)
-		$(meson_feature gles2)
-		$(meson_feature llvm)
-		$(meson_feature lm-sensors lmsensors)
-		$(meson_use osmesa)
-		$(meson_use selinux)
-		$(meson_feature unwind libunwind)
-		$(meson_feature zstd)
-		$(meson_use cpu_flags_x86_sse2 sse2)
-		-Dvalgrind=$(usex valgrind auto disabled)
-		-Dvideo-codecs=$(usex proprietary-codecs "h264dec,h264enc,h265dec,h265enc,vc1dec" "")
-		-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_test() {
-	meson_src_test -t 100
-}
-
-# $1 - VIDEO_CARDS flag (check skipped for "--")
-# other args - names of DRI drivers to enable
-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-23.1.4.ebuild b/media-libs/mesa/mesa-23.1.4.ebuild
deleted file mode 100644
index c44daa0c39c2..000000000000
--- a/media-libs/mesa/mesa-23.1.4.ebuild
+++ /dev/null
@@ -1,450 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..12} )
-
-inherit llvm meson-multilib python-any-r1 linux-info
-
-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"
-	inherit git-r3
-else
-	SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-solaris"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-RESTRICT="!test? ( test )"
-
-RADEON_CARDS="r300 r600 radeon radeonsi"
-VIDEO_CARDS="${RADEON_CARDS} d3d12 freedreno intel lavapipe lima nouveau panfrost v3d vc4 virgl vivante vmware"
-for card in ${VIDEO_CARDS}; do
-	IUSE_VIDEO_CARDS+=" video_cards_${card}"
-done
-
-IUSE="${IUSE_VIDEO_CARDS}
-	cpu_flags_x86_sse2 d3d9 debug gles1 +gles2 +llvm
-	lm-sensors opencl osmesa +proprietary-codecs selinux
-	test unwind vaapi valgrind vdpau vulkan
-	vulkan-overlay wayland +X xa zink +zstd"
-
-REQUIRED_USE="
-	d3d9? (
-		|| (
-			video_cards_intel
-			video_cards_r300
-			video_cards_r600
-			video_cards_radeonsi
-			video_cards_nouveau
-			video_cards_vmware
-		)
-	)
-	vulkan? ( video_cards_radeonsi? ( llvm ) )
-	vulkan-overlay? ( vulkan )
-	video_cards_lavapipe? ( llvm vulkan )
-	video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_r300?   ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_radeonsi?   ( llvm )
-	vdpau? ( X )
-	xa? ( X )
-	zink? ( vulkan )
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.110"
-RDEPEND="
-	>=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
-	>=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.8[${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}]
-		)
-	)
-	lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
-	opencl? (
-		>=virtual/opencl-3
-		dev-libs/libclc[spirv(-)]
-		>=dev-util/spirv-tools-1.3.231.0
-		virtual/libelf:0=
-	)
-	vaapi? (
-		>=media-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
-	)
-	vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
-	vulkan? (
-		video_cards_intel? (
-			amd64? (
-				dev-libs/libclc[spirv(-)]
-				>=dev-util/spirv-tools-1.3.231.0
-			)
-		)
-	)
-	selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
-	wayland? ( >=dev-libs/wayland-1.18.0[${MULTILIB_USEDEP}] )
-	${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_intel?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
-	X? (
-		>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
-		>=x11-libs/libxshmfence-1.1[${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}]
-	)
-	zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
-	zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
-"
-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. Specify LLVM_MAX_SLOT (inclusive), e.g. 16.
-# 2. Specify LLVM_MIN_SLOT (inclusive), e.g. 15.
-LLVM_MAX_SLOT="16"
-LLVM_MIN_SLOT="15"
-LLVM_USE_DEPS="llvm_targets_AMDGPU(+),${MULTILIB_USEDEP}"
-PER_SLOT_DEPSTR="
-	(
-		!opencl? ( sys-devel/llvm:@SLOT@[${LLVM_USE_DEPS}] )
-		opencl? ( sys-devel/clang:@SLOT@[${LLVM_USE_DEPS}] )
-		opencl? ( dev-util/spirv-llvm-translator:@SLOT@ )
-		vulkan? ( video_cards_intel? ( amd64? ( dev-util/spirv-llvm-translator:@SLOT@ ) ) )
-	)
-"
-LLVM_DEPSTR="
-	|| (
-		$(for ((slot=LLVM_MAX_SLOT; slot>=LLVM_MIN_SLOT; slot--)); do
-			echo "${PER_SLOT_DEPSTR//@SLOT@/${slot}}"
-		done)
-	)
-	!opencl? ( <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${LLVM_USE_DEPS}] )
-	opencl? ( <sys-devel/clang-$((LLVM_MAX_SLOT + 1)):=[${LLVM_USE_DEPS}] )
-"
-RDEPEND="${RDEPEND}
-	llvm? ( ${LLVM_DEPSTR} )
-"
-unset LLVM_MIN_SLOT {LLVM,PER_SLOT}_DEPSTR
-
-DEPEND="${RDEPEND}
-	video_cards_d3d12? ( dev-util/directx-headers[${MULTILIB_USEDEP}] )
-	valgrind? ( dev-util/valgrind )
-	wayland? ( >=dev-libs/wayland-protocols-1.24 )
-	X? (
-		x11-libs/libXrandr[${MULTILIB_USEDEP}]
-		x11-base/xorg-proto
-	)
-"
-BDEPEND="
-	>=dev-util/meson-1.0.0
-	${PYTHON_DEPS}
-	opencl? (
-		>=virtual/rust-1.62.0
-		>=dev-util/bindgen-0.58.0
-	)
-	sys-devel/bison
-	sys-devel/flex
-	virtual/pkgconfig
-	$(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
-	vulkan? (
-		dev-util/glslang
-		video_cards_intel? (
-			amd64? (
-				$(python_gen_any_dep "dev-python/ply[\${PYTHON_USEDEP}]")
-			)
-		)
-	)
-	wayland? ( dev-util/wayland-scanner )
-"
-
-S="${WORKDIR}/${MY_P}"
-EGIT_CHECKOUT_DIR=${S}
-
-QA_WX_LOAD="
-x86? (
-	usr/lib/libglapi.so.0.0.0
-	usr/lib/libOSMesa.so.8.0.0
-	usr/lib/libGLX_mesa.so.0.0.0
-)"
-
-llvm_check_deps() {
-	if use opencl; then
-		has_version "sys-devel/clang:${LLVM_SLOT}[${LLVM_USE_DEPS}]" || return 1
-	fi
-	if use opencl || { use vulkan && use video_cards_intel && use amd64; }; then
-		has_version "dev-util/spirv-llvm-translator:${LLVM_SLOT}" || return 1
-	fi
-	has_version "sys-devel/llvm:${LLVM_SLOT}[${LLVM_USE_DEPS}]"
-}
-
-PATCHES=(
-	# Temporary rusticl workaround: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7717#note_1832122
-	"${FILESDIR}/clang_resource_dir.patch"
-)
-
-pkg_pretend() {
-	if use vulkan; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_freedreno &&
-		   ! use video_cards_intel &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_v3d; then
-			ewarn "Ignoring USE=vulkan     since VIDEO_CARDS does not contain d3d12, freedreno, intel, radeonsi, or v3d"
-		fi
-	fi
-
-	if use vaapi; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_r600 &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_nouveau; then
-			ewarn "Ignoring USE=vaapi      since VIDEO_CARDS does not contain d3d12, r600, radeonsi, or nouveau"
-		fi
-	fi
-
-	if use vdpau; then
-		if ! use video_cards_d3d12 &&
-		   ! 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 d3d12, 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 llvm; then
-		use opencl     && ewarn "Ignoring USE=opencl     since USE does not contain llvm"
-	fi
-
-	if use osmesa && ! use llvm; then
-		ewarn "OSMesa will be slow without enabling USE=llvm"
-	fi
-}
-
-python_check_deps() {
-	python_has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]" || return 1
-	if use vulkan && use video_cards_intel && use amd64; then
-		python_has_version -b "dev-python/ply[${PYTHON_USEDEP}]" || return 1
-	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 video_cards_intel ||
-	   use video_cards_radeonsi; then
-		if kernel_is -ge 5 11 3; then
-			CONFIG_CHECK="~KCMP"
-		elif kernel_is -ge 5 11; then
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		elif kernel_is -ge 5 10 20; then
-			CONFIG_CHECK="~KCMP"
-		else
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		fi
-		linux-info_pkg_setup
-	fi
-
-	if use llvm; then
-		llvm_pkg_setup
-	fi
-	python-any-r1_pkg_setup
-}
-
-multilib_src_configure() {
-	local emesonargs=()
-
-	local platforms
-	use X && platforms+="x11"
-	use wayland && platforms+=",wayland"
-	emesonargs+=(-Dplatforms=${platforms#,})
-
-	if use video_cards_intel ||
-	   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_d3d12 ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_nouveau; then
-		emesonargs+=($(meson_feature vaapi gallium-va))
-		use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
-	else
-		emesonargs+=(-Dgallium-va=disabled)
-	fi
-
-	if use video_cards_d3d12; then
-		emesonargs+=($(meson_feature vaapi gallium-d3d12-video))
-	fi
-
-	if use video_cards_d3d12 ||
-	   use video_cards_r300 ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_nouveau; then
-		emesonargs+=($(meson_feature vdpau gallium-vdpau))
-	else
-		emesonargs+=(-Dgallium-vdpau=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_nouveau ||
-	   use video_cards_vmware; then
-		emesonargs+=($(meson_feature xa gallium-xa))
-	else
-		emesonargs+=(-Dgallium-xa=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_lima ||
-	   use video_cards_panfrost ||
-	   use video_cards_v3d ||
-	   use video_cards_vc4 ||
-	   use video_cards_vivante; then
-		gallium_enable -- kmsro
-	fi
-
-	gallium_enable -- swrast
-	gallium_enable video_cards_freedreno freedreno
-	gallium_enable video_cards_intel crocus i915 iris
-	gallium_enable video_cards_lima lima
-	gallium_enable video_cards_d3d12 d3d12
-	gallium_enable video_cards_nouveau nouveau
-	gallium_enable video_cards_panfrost panfrost
-	gallium_enable video_cards_v3d v3d
-	gallium_enable video_cards_vc4 vc4
-	gallium_enable video_cards_virgl virgl
-	gallium_enable video_cards_vivante etnaviv
-	gallium_enable video_cards_vmware svga
-	gallium_enable zink zink
-
-	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
-
-	if use llvm && use opencl; then
-		PKG_CONFIG_PATH="$(get_llvm_prefix)/$(get_libdir)/pkgconfig"
-		# See https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/docs/rusticl.rst
-		emesonargs+=(
-			$(meson_native_true gallium-rusticl)
-			-Drust_std=2021
-		)
-	fi
-
-	if use vulkan; then
-		vulkan_enable video_cards_lavapipe swrast
-		vulkan_enable video_cards_freedreno freedreno
-		vulkan_enable video_cards_intel intel intel_hasvk
-		vulkan_enable video_cards_d3d12 microsoft-experimental
-		vulkan_enable video_cards_radeonsi amd
-		vulkan_enable video_cards_v3d broadcom
-	fi
-
-	driver_list() {
-		local drivers="$(sort -u <<< "${1// /$'\n'}")"
-		echo "${drivers//$'\n'/,}"
-	}
-
-	local vulkan_layers
-	use vulkan && vulkan_layers+="device-select"
-	use vulkan-overlay && vulkan_layers+=",overlay"
-	emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
-
-	if use vulkan && use video_cards_intel; then
-		PKG_CONFIG_PATH="$(get_llvm_prefix)/$(get_libdir)/pkgconfig"
-		emesonargs+=($(meson_feature llvm intel-clc))
-	fi
-
-	emesonargs+=(
-		$(meson_use test build-tests)
-		-Dglx=$(usex X dri disabled)
-		-Dshared-glapi=enabled
-		-Ddri3=enabled
-		-Degl=enabled
-		-Dexpat=enabled
-		-Dgbm=enabled
-		-Dglvnd=true
-		$(meson_feature gles1)
-		$(meson_feature gles2)
-		$(meson_feature llvm)
-		$(meson_feature lm-sensors lmsensors)
-		$(meson_use osmesa)
-		$(meson_use selinux)
-		$(meson_feature unwind libunwind)
-		$(meson_feature zstd)
-		$(meson_use cpu_flags_x86_sse2 sse2)
-		-Dvalgrind=$(usex valgrind auto disabled)
-		-Dvideo-codecs=$(usex proprietary-codecs "h264dec,h264enc,h265dec,h265enc,vc1dec" "")
-		-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_test() {
-	meson_src_test -t 100
-}
-
-# $1 - VIDEO_CARDS flag (check skipped for "--")
-# other args - names of DRI drivers to enable
-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-23.1.5.ebuild b/media-libs/mesa/mesa-23.1.5.ebuild
deleted file mode 100644
index c44daa0c39c2..000000000000
--- a/media-libs/mesa/mesa-23.1.5.ebuild
+++ /dev/null
@@ -1,450 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..12} )
-
-inherit llvm meson-multilib python-any-r1 linux-info
-
-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"
-	inherit git-r3
-else
-	SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-solaris"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-RESTRICT="!test? ( test )"
-
-RADEON_CARDS="r300 r600 radeon radeonsi"
-VIDEO_CARDS="${RADEON_CARDS} d3d12 freedreno intel lavapipe lima nouveau panfrost v3d vc4 virgl vivante vmware"
-for card in ${VIDEO_CARDS}; do
-	IUSE_VIDEO_CARDS+=" video_cards_${card}"
-done
-
-IUSE="${IUSE_VIDEO_CARDS}
-	cpu_flags_x86_sse2 d3d9 debug gles1 +gles2 +llvm
-	lm-sensors opencl osmesa +proprietary-codecs selinux
-	test unwind vaapi valgrind vdpau vulkan
-	vulkan-overlay wayland +X xa zink +zstd"
-
-REQUIRED_USE="
-	d3d9? (
-		|| (
-			video_cards_intel
-			video_cards_r300
-			video_cards_r600
-			video_cards_radeonsi
-			video_cards_nouveau
-			video_cards_vmware
-		)
-	)
-	vulkan? ( video_cards_radeonsi? ( llvm ) )
-	vulkan-overlay? ( vulkan )
-	video_cards_lavapipe? ( llvm vulkan )
-	video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_r300?   ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_radeonsi?   ( llvm )
-	vdpau? ( X )
-	xa? ( X )
-	zink? ( vulkan )
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.110"
-RDEPEND="
-	>=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
-	>=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.8[${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}]
-		)
-	)
-	lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
-	opencl? (
-		>=virtual/opencl-3
-		dev-libs/libclc[spirv(-)]
-		>=dev-util/spirv-tools-1.3.231.0
-		virtual/libelf:0=
-	)
-	vaapi? (
-		>=media-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
-	)
-	vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
-	vulkan? (
-		video_cards_intel? (
-			amd64? (
-				dev-libs/libclc[spirv(-)]
-				>=dev-util/spirv-tools-1.3.231.0
-			)
-		)
-	)
-	selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
-	wayland? ( >=dev-libs/wayland-1.18.0[${MULTILIB_USEDEP}] )
-	${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_intel?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
-	X? (
-		>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
-		>=x11-libs/libxshmfence-1.1[${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}]
-	)
-	zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
-	zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
-"
-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. Specify LLVM_MAX_SLOT (inclusive), e.g. 16.
-# 2. Specify LLVM_MIN_SLOT (inclusive), e.g. 15.
-LLVM_MAX_SLOT="16"
-LLVM_MIN_SLOT="15"
-LLVM_USE_DEPS="llvm_targets_AMDGPU(+),${MULTILIB_USEDEP}"
-PER_SLOT_DEPSTR="
-	(
-		!opencl? ( sys-devel/llvm:@SLOT@[${LLVM_USE_DEPS}] )
-		opencl? ( sys-devel/clang:@SLOT@[${LLVM_USE_DEPS}] )
-		opencl? ( dev-util/spirv-llvm-translator:@SLOT@ )
-		vulkan? ( video_cards_intel? ( amd64? ( dev-util/spirv-llvm-translator:@SLOT@ ) ) )
-	)
-"
-LLVM_DEPSTR="
-	|| (
-		$(for ((slot=LLVM_MAX_SLOT; slot>=LLVM_MIN_SLOT; slot--)); do
-			echo "${PER_SLOT_DEPSTR//@SLOT@/${slot}}"
-		done)
-	)
-	!opencl? ( <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${LLVM_USE_DEPS}] )
-	opencl? ( <sys-devel/clang-$((LLVM_MAX_SLOT + 1)):=[${LLVM_USE_DEPS}] )
-"
-RDEPEND="${RDEPEND}
-	llvm? ( ${LLVM_DEPSTR} )
-"
-unset LLVM_MIN_SLOT {LLVM,PER_SLOT}_DEPSTR
-
-DEPEND="${RDEPEND}
-	video_cards_d3d12? ( dev-util/directx-headers[${MULTILIB_USEDEP}] )
-	valgrind? ( dev-util/valgrind )
-	wayland? ( >=dev-libs/wayland-protocols-1.24 )
-	X? (
-		x11-libs/libXrandr[${MULTILIB_USEDEP}]
-		x11-base/xorg-proto
-	)
-"
-BDEPEND="
-	>=dev-util/meson-1.0.0
-	${PYTHON_DEPS}
-	opencl? (
-		>=virtual/rust-1.62.0
-		>=dev-util/bindgen-0.58.0
-	)
-	sys-devel/bison
-	sys-devel/flex
-	virtual/pkgconfig
-	$(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
-	vulkan? (
-		dev-util/glslang
-		video_cards_intel? (
-			amd64? (
-				$(python_gen_any_dep "dev-python/ply[\${PYTHON_USEDEP}]")
-			)
-		)
-	)
-	wayland? ( dev-util/wayland-scanner )
-"
-
-S="${WORKDIR}/${MY_P}"
-EGIT_CHECKOUT_DIR=${S}
-
-QA_WX_LOAD="
-x86? (
-	usr/lib/libglapi.so.0.0.0
-	usr/lib/libOSMesa.so.8.0.0
-	usr/lib/libGLX_mesa.so.0.0.0
-)"
-
-llvm_check_deps() {
-	if use opencl; then
-		has_version "sys-devel/clang:${LLVM_SLOT}[${LLVM_USE_DEPS}]" || return 1
-	fi
-	if use opencl || { use vulkan && use video_cards_intel && use amd64; }; then
-		has_version "dev-util/spirv-llvm-translator:${LLVM_SLOT}" || return 1
-	fi
-	has_version "sys-devel/llvm:${LLVM_SLOT}[${LLVM_USE_DEPS}]"
-}
-
-PATCHES=(
-	# Temporary rusticl workaround: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7717#note_1832122
-	"${FILESDIR}/clang_resource_dir.patch"
-)
-
-pkg_pretend() {
-	if use vulkan; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_freedreno &&
-		   ! use video_cards_intel &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_v3d; then
-			ewarn "Ignoring USE=vulkan     since VIDEO_CARDS does not contain d3d12, freedreno, intel, radeonsi, or v3d"
-		fi
-	fi
-
-	if use vaapi; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_r600 &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_nouveau; then
-			ewarn "Ignoring USE=vaapi      since VIDEO_CARDS does not contain d3d12, r600, radeonsi, or nouveau"
-		fi
-	fi
-
-	if use vdpau; then
-		if ! use video_cards_d3d12 &&
-		   ! 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 d3d12, 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 llvm; then
-		use opencl     && ewarn "Ignoring USE=opencl     since USE does not contain llvm"
-	fi
-
-	if use osmesa && ! use llvm; then
-		ewarn "OSMesa will be slow without enabling USE=llvm"
-	fi
-}
-
-python_check_deps() {
-	python_has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]" || return 1
-	if use vulkan && use video_cards_intel && use amd64; then
-		python_has_version -b "dev-python/ply[${PYTHON_USEDEP}]" || return 1
-	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 video_cards_intel ||
-	   use video_cards_radeonsi; then
-		if kernel_is -ge 5 11 3; then
-			CONFIG_CHECK="~KCMP"
-		elif kernel_is -ge 5 11; then
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		elif kernel_is -ge 5 10 20; then
-			CONFIG_CHECK="~KCMP"
-		else
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		fi
-		linux-info_pkg_setup
-	fi
-
-	if use llvm; then
-		llvm_pkg_setup
-	fi
-	python-any-r1_pkg_setup
-}
-
-multilib_src_configure() {
-	local emesonargs=()
-
-	local platforms
-	use X && platforms+="x11"
-	use wayland && platforms+=",wayland"
-	emesonargs+=(-Dplatforms=${platforms#,})
-
-	if use video_cards_intel ||
-	   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_d3d12 ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_nouveau; then
-		emesonargs+=($(meson_feature vaapi gallium-va))
-		use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
-	else
-		emesonargs+=(-Dgallium-va=disabled)
-	fi
-
-	if use video_cards_d3d12; then
-		emesonargs+=($(meson_feature vaapi gallium-d3d12-video))
-	fi
-
-	if use video_cards_d3d12 ||
-	   use video_cards_r300 ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_nouveau; then
-		emesonargs+=($(meson_feature vdpau gallium-vdpau))
-	else
-		emesonargs+=(-Dgallium-vdpau=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_nouveau ||
-	   use video_cards_vmware; then
-		emesonargs+=($(meson_feature xa gallium-xa))
-	else
-		emesonargs+=(-Dgallium-xa=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_lima ||
-	   use video_cards_panfrost ||
-	   use video_cards_v3d ||
-	   use video_cards_vc4 ||
-	   use video_cards_vivante; then
-		gallium_enable -- kmsro
-	fi
-
-	gallium_enable -- swrast
-	gallium_enable video_cards_freedreno freedreno
-	gallium_enable video_cards_intel crocus i915 iris
-	gallium_enable video_cards_lima lima
-	gallium_enable video_cards_d3d12 d3d12
-	gallium_enable video_cards_nouveau nouveau
-	gallium_enable video_cards_panfrost panfrost
-	gallium_enable video_cards_v3d v3d
-	gallium_enable video_cards_vc4 vc4
-	gallium_enable video_cards_virgl virgl
-	gallium_enable video_cards_vivante etnaviv
-	gallium_enable video_cards_vmware svga
-	gallium_enable zink zink
-
-	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
-
-	if use llvm && use opencl; then
-		PKG_CONFIG_PATH="$(get_llvm_prefix)/$(get_libdir)/pkgconfig"
-		# See https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/docs/rusticl.rst
-		emesonargs+=(
-			$(meson_native_true gallium-rusticl)
-			-Drust_std=2021
-		)
-	fi
-
-	if use vulkan; then
-		vulkan_enable video_cards_lavapipe swrast
-		vulkan_enable video_cards_freedreno freedreno
-		vulkan_enable video_cards_intel intel intel_hasvk
-		vulkan_enable video_cards_d3d12 microsoft-experimental
-		vulkan_enable video_cards_radeonsi amd
-		vulkan_enable video_cards_v3d broadcom
-	fi
-
-	driver_list() {
-		local drivers="$(sort -u <<< "${1// /$'\n'}")"
-		echo "${drivers//$'\n'/,}"
-	}
-
-	local vulkan_layers
-	use vulkan && vulkan_layers+="device-select"
-	use vulkan-overlay && vulkan_layers+=",overlay"
-	emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
-
-	if use vulkan && use video_cards_intel; then
-		PKG_CONFIG_PATH="$(get_llvm_prefix)/$(get_libdir)/pkgconfig"
-		emesonargs+=($(meson_feature llvm intel-clc))
-	fi
-
-	emesonargs+=(
-		$(meson_use test build-tests)
-		-Dglx=$(usex X dri disabled)
-		-Dshared-glapi=enabled
-		-Ddri3=enabled
-		-Degl=enabled
-		-Dexpat=enabled
-		-Dgbm=enabled
-		-Dglvnd=true
-		$(meson_feature gles1)
-		$(meson_feature gles2)
-		$(meson_feature llvm)
-		$(meson_feature lm-sensors lmsensors)
-		$(meson_use osmesa)
-		$(meson_use selinux)
-		$(meson_feature unwind libunwind)
-		$(meson_feature zstd)
-		$(meson_use cpu_flags_x86_sse2 sse2)
-		-Dvalgrind=$(usex valgrind auto disabled)
-		-Dvideo-codecs=$(usex proprietary-codecs "h264dec,h264enc,h265dec,h265enc,vc1dec" "")
-		-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_test() {
-	meson_src_test -t 100
-}
-
-# $1 - VIDEO_CARDS flag (check skipped for "--")
-# other args - names of DRI drivers to enable
-gallium_enable() {
-	if [[ $1 == -- ]] || use $1; then
-		shift
-		GALLIUM_DRIVERS+=("$@")
-	fi
-}
-
-vulkan_enable() {
-	if [[ $1 == -- ]] || use $1; then
-		shift
-		VULKAN_DRIVERS+=("$@")
-	fi
-}


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2024-01-11  4:41 Matt Turner
  0 siblings, 0 replies; 16+ messages in thread
From: Matt Turner @ 2024-01-11  4:41 UTC (permalink / raw
  To: gentoo-commits

commit:     93b9d9dc97403326a984a056615295a163e259fa
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 10 21:34:47 2024 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Thu Jan 11 04:41:51 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93b9d9dc

media-libs/mesa: Version bump to 23.3.3

Bug: https://bugs.gentoo.org/908079
Closes: https://bugs.gentoo.org/921297
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 media-libs/mesa/Manifest                           |   1 +
 media-libs/mesa/files/23.3.3-big-endian.patch      |  84 ++++
 ...3-symbols-check-Add-_GLOBAL_OFFSET_TABLE_.patch |  31 ++
 media-libs/mesa/mesa-23.3.3.ebuild                 | 450 +++++++++++++++++++++
 4 files changed, 566 insertions(+)

diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
index 8acb61a1b4aa..f5862d8b1b6d 100644
--- a/media-libs/mesa/Manifest
+++ b/media-libs/mesa/Manifest
@@ -5,3 +5,4 @@ DIST mesa-23.3.0-rc5.tar.xz 19227440 BLAKE2B 844eb3dacc6f579f1a7bff74fc20ec22021
 DIST mesa-23.3.0.tar.xz 19234688 BLAKE2B 1b87d15cbe1b4c761653b7042c46eac3036f08dfcf3a0a81aa7bf6c1c0c402b05f37ce8da9d88df72e1745d66a648c2b8c161b04bf558107f548f6d8167cc798 SHA512 3568b571974a2c6c0c3a4cc614c851729962e39926f0af906ba91604f9d43c0618db7df004cbec5d9e5dbade2d6bde818608c9aa1686183994d68ad3e6ac4521
 DIST mesa-23.3.1.tar.xz 19337988 BLAKE2B 73696281868e5eba6493cc34786a6c30eaf256bed2495444be9a1a5ebf1a0d4b8f00bcc3fb91ce9de3ac8ff23663e41cab17b8fe42b1048366c8e9b95aefa905 SHA512 0861fb5083e37439ad8cc0a0d8372a7c84d8665ea298dc784e2dd893162e20ae072f5ef0b860be88ecf74bc123714acbc1dec312e139b892ff40ef1887c5f4a5
 DIST mesa-23.3.2.tar.xz 19365140 BLAKE2B fc97e17dd7a139056190010325f1d57978ef8618ae87731f459daedc303223f3fbce660c2361dcd518d35c709357435366c75ebfd6366daa9f0dec99b534604f SHA512 634d2b67ade2121de3f19f2cccd4bf7ceb2ac391b9366587ed1c2412444e010de8ec14a25529fdec1f43f943096422eb23cefcb8a89d2f8b20286850188b65c3
+DIST mesa-23.3.3.tar.xz 19379484 BLAKE2B 6b57e99356abccf398c5fb84953fc1490ddf516dbeed1feca8d16344a04c1c15183325752717447a34a61dd4cdda897147e3194f869d8dbadfa5c45a0c95dab5 SHA512 bed23e8324b026edd5d2b16a381ec563cf2fa9be9c8fbe8d9fb907cab9d87eef91f493fb9d4e3973d4b679e271d2a85ce48af491585638ab97f087532fc63c30

diff --git a/media-libs/mesa/files/23.3.3-big-endian.patch b/media-libs/mesa/files/23.3.3-big-endian.patch
new file mode 100644
index 000000000000..6d20fcb77f5c
--- /dev/null
+++ b/media-libs/mesa/files/23.3.3-big-endian.patch
@@ -0,0 +1,84 @@
+From 5997cf7587ce56aedac9114c0db9b250f1b54461 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Tue, 9 Jan 2024 23:45:27 -0500
+Subject: [PATCH 1/2] nir: Fix cast
+
+We were wrongly telling `nir_const_value_as_uint()` that `iter` had
+`bit_size` bits, but in one case it is explicitly i64. This works on
+little endian platforms, but caused the nir_loop_unroll_test.fadd{,_rev}
+tests to fail on big endian platforms.
+
+Bug: https://bugs.gentoo.org/921297
+Fixes: 268ad47c111 ("nir/loop_analyze: Handle bit sizes correctly in calculate_iterations")
+Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
+Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26964>
+---
+ src/compiler/nir/nir_loop_analyze.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/compiler/nir/nir_loop_analyze.c b/src/compiler/nir/nir_loop_analyze.c
+index b55da00b962..2b2ebfdd60f 100644
+--- a/src/compiler/nir/nir_loop_analyze.c
++++ b/src/compiler/nir/nir_loop_analyze.c
+@@ -827,6 +827,7 @@ get_iteration(nir_op cond_op, nir_const_value initial, nir_const_value step,
+               unsigned execution_mode)
+ {
+    nir_const_value span, iter;
++   unsigned iter_bit_size = bit_size;
+ 
+    switch (invert_comparison_if_needed(cond_op, invert_cond)) {
+    case nir_op_ine:
+@@ -880,13 +881,14 @@ get_iteration(nir_op cond_op, nir_const_value initial, nir_const_value step,
+       iter = eval_const_binop(nir_op_fdiv, bit_size, span,
+                               step, execution_mode);
+       iter = eval_const_unop(nir_op_f2i64, bit_size, iter, execution_mode);
++      iter_bit_size = 64;
+       break;
+ 
+    default:
+       return -1;
+    }
+ 
+-   uint64_t iter_u64 = nir_const_value_as_uint(iter, bit_size);
++   uint64_t iter_u64 = nir_const_value_as_uint(iter, iter_bit_size);
+    return iter_u64 > INT_MAX ? -1 : (int)iter_u64;
+ }
+ 
+-- 
+2.41.0
+
+From 4ed0957ce75878f8a2ce769e933c5ea3a1aa2510 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Tue, 9 Jan 2024 23:47:56 -0500
+Subject: [PATCH 2/2] nir/tests: Reenable tests that failed on big-endian
+
+These tests were disabled due to the bug fixed in the previous commit.
+
+Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
+Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26964>
+---
+ src/compiler/nir/tests/loop_unroll_tests.cpp | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/src/compiler/nir/tests/loop_unroll_tests.cpp b/src/compiler/nir/tests/loop_unroll_tests.cpp
+index f9ffb1f7a1c..af9b8f87549 100644
+--- a/src/compiler/nir/tests/loop_unroll_tests.cpp
++++ b/src/compiler/nir/tests/loop_unroll_tests.cpp
+@@ -144,12 +144,10 @@ UNROLL_TEST_INSERT(iadd,     int,   0,     24,   4,
+                    ige,      iadd,  false, TRUE, 6, 0)
+ UNROLL_TEST_INSERT(iadd_rev, int,   0,     24,   4,
+                    ilt,      iadd,  true,  TRUE, 7, 0)
+-#ifndef __s390x__
+ UNROLL_TEST_INSERT(fadd,     float, 0.0,   24.0, 4.0,
+                    fge,      fadd,  false, TRUE, 6, 0)
+ UNROLL_TEST_INSERT(fadd_rev, float, 0.0,   24.0, 4.0,
+                    flt,      fadd,  true,  TRUE, 7, 0)
+-#endif
+ UNROLL_TEST_INSERT(imul,     int,   1,     81,   3,
+                    ige,      imul,  false, TRUE, 4, 0)
+ UNROLL_TEST_INSERT(imul_rev, int,   1,     81,   3,
+-- 
+2.41.0
+

diff --git a/media-libs/mesa/files/23.3.3-symbols-check-Add-_GLOBAL_OFFSET_TABLE_.patch b/media-libs/mesa/files/23.3.3-symbols-check-Add-_GLOBAL_OFFSET_TABLE_.patch
new file mode 100644
index 000000000000..4c57f93f9bd1
--- /dev/null
+++ b/media-libs/mesa/files/23.3.3-symbols-check-Add-_GLOBAL_OFFSET_TABLE_.patch
@@ -0,0 +1,31 @@
+From 0ab7ea56b2558d30400a7462a05014e758c9c9c1 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Wed, 10 Jan 2024 10:56:17 -0500
+Subject: [PATCH] symbols-check: Add _GLOBAL_OFFSET_TABLE_
+
+This is exported on hppa/parisc.
+
+See also: https://gitlab.freedesktop.org/glvnd/libglvnd/-/merge_requests/291
+
+Cc: mesa-stable
+Bug: https://bugs.gentoo.org/908079
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26978>
+---
+ bin/symbols-check.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/bin/symbols-check.py b/bin/symbols-check.py
+index 7daf603c5f9..2e014731728 100644
+--- a/bin/symbols-check.py
++++ b/bin/symbols-check.py
+@@ -7,6 +7,7 @@ import subprocess
+ 
+ # This list contains symbols that _might_ be exported for some platforms
+ PLATFORM_SYMBOLS = [
++    '_GLOBAL_OFFSET_TABLE_',
+     '__bss_end__',
+     '__bss_start__',
+     '__bss_start',
+-- 
+2.41.0
+

diff --git a/media-libs/mesa/mesa-23.3.3.ebuild b/media-libs/mesa/mesa-23.3.3.ebuild
new file mode 100644
index 000000000000..f79856c3076f
--- /dev/null
+++ b/media-libs/mesa/mesa-23.3.3.ebuild
@@ -0,0 +1,450 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit llvm meson-multilib python-any-r1 linux-info
+
+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"
+	inherit git-r3
+else
+	SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-solaris"
+fi
+
+LICENSE="MIT SGI-B-2.0"
+SLOT="0"
+RESTRICT="!test? ( test )"
+
+RADEON_CARDS="r300 r600 radeon radeonsi"
+VIDEO_CARDS="${RADEON_CARDS} d3d12 freedreno intel lavapipe lima nouveau panfrost v3d vc4 virgl vivante vmware"
+for card in ${VIDEO_CARDS}; do
+	IUSE_VIDEO_CARDS+=" video_cards_${card}"
+done
+
+IUSE="${IUSE_VIDEO_CARDS}
+	cpu_flags_x86_sse2 d3d9 debug gles1 +gles2 +llvm
+	lm-sensors opencl osmesa +proprietary-codecs selinux
+	test unwind vaapi valgrind vdpau vulkan
+	vulkan-overlay wayland +X xa zink +zstd"
+
+REQUIRED_USE="
+	d3d9? (
+		|| (
+			video_cards_intel
+			video_cards_r300
+			video_cards_r600
+			video_cards_radeonsi
+			video_cards_nouveau
+			video_cards_vmware
+		)
+	)
+	vulkan? ( video_cards_radeonsi? ( llvm ) )
+	vulkan-overlay? ( vulkan )
+	video_cards_lavapipe? ( llvm vulkan )
+	video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) )
+	video_cards_r300?   ( x86? ( llvm ) amd64? ( llvm ) )
+	video_cards_radeonsi?   ( llvm )
+	vdpau? ( X )
+	xa? ( X )
+	zink? ( vulkan )
+"
+
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.110"
+RDEPEND="
+	>=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
+	>=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
+	>=sys-libs/zlib-1.2.8[${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}]
+		)
+	)
+	lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
+	opencl? (
+		>=virtual/opencl-3
+		dev-libs/libclc[spirv(-)]
+		>=dev-util/spirv-tools-1.3.231.0
+		virtual/libelf:0=
+	)
+	vaapi? (
+		>=media-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
+	)
+	vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
+	selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
+	wayland? ( >=dev-libs/wayland-1.18.0[${MULTILIB_USEDEP}] )
+	${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_intel?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
+	X? (
+		>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+		>=x11-libs/libxshmfence-1.1[${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}]
+		x11-libs/xcb-util-keysyms[${MULTILIB_USEDEP}]
+	)
+	zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
+	zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
+"
+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. Specify LLVM_MAX_SLOT (inclusive), e.g. 17.
+# 2. Specify LLVM_MIN_SLOT (inclusive), e.g. 15.
+LLVM_MAX_SLOT="17"
+LLVM_MIN_SLOT="15"
+LLVM_USE_DEPS="llvm_targets_AMDGPU(+),${MULTILIB_USEDEP}"
+PER_SLOT_DEPSTR="
+	(
+		!opencl? ( sys-devel/llvm:@SLOT@[${LLVM_USE_DEPS}] )
+		opencl? ( sys-devel/clang:@SLOT@[${LLVM_USE_DEPS}] )
+		opencl? ( dev-util/spirv-llvm-translator:@SLOT@ )
+	)
+"
+LLVM_DEPSTR="
+	|| (
+		$(for ((slot=LLVM_MAX_SLOT; slot>=LLVM_MIN_SLOT; slot--)); do
+			echo "${PER_SLOT_DEPSTR//@SLOT@/${slot}}"
+		done)
+	)
+	!opencl? ( <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${LLVM_USE_DEPS}] )
+	opencl? ( <sys-devel/clang-$((LLVM_MAX_SLOT + 1)):=[${LLVM_USE_DEPS}] )
+"
+RDEPEND="${RDEPEND}
+	llvm? ( ${LLVM_DEPSTR} )
+"
+unset LLVM_MIN_SLOT {LLVM,PER_SLOT}_DEPSTR
+
+DEPEND="${RDEPEND}
+	video_cards_d3d12? ( >=dev-util/directx-headers-1.610.0[${MULTILIB_USEDEP}] )
+	valgrind? ( dev-util/valgrind )
+	wayland? ( >=dev-libs/wayland-protocols-1.30 )
+	X? (
+		x11-libs/libXrandr[${MULTILIB_USEDEP}]
+		x11-base/xorg-proto
+	)
+"
+BDEPEND="
+	${PYTHON_DEPS}
+	opencl? (
+		>=virtual/rust-1.62.0
+		>=dev-util/bindgen-0.58.0
+	)
+	app-alternatives/yacc
+	app-alternatives/lex
+	virtual/pkgconfig
+	$(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
+	vulkan? (
+		dev-util/glslang
+		llvm? (
+			video_cards_intel? (
+				amd64? (
+					$(python_gen_any_dep "dev-python/ply[\${PYTHON_USEDEP}]")
+					~dev-util/intel_clc-${PV}
+					dev-libs/libclc[spirv(-)]
+				)
+			)
+		)
+	)
+	wayland? ( dev-util/wayland-scanner )
+"
+
+S="${WORKDIR}/${MY_P}"
+EGIT_CHECKOUT_DIR=${S}
+
+QA_WX_LOAD="
+x86? (
+	usr/lib/libglapi.so.0.0.0
+	usr/lib/libOSMesa.so.8.0.0
+	usr/lib/libGLX_mesa.so.0.0.0
+)"
+
+PATCHES=(
+	"${FILESDIR}"/${PV}-symbols-check-Add-_GLOBAL_OFFSET_TABLE_.patch
+	"${FILESDIR}"/${PV}-big-endian.patch
+)
+
+llvm_check_deps() {
+	if use opencl; then
+		has_version "sys-devel/clang:${LLVM_SLOT}[${LLVM_USE_DEPS}]" || return 1
+		has_version "dev-util/spirv-llvm-translator:${LLVM_SLOT}" || return 1
+	fi
+	has_version "sys-devel/llvm:${LLVM_SLOT}[${LLVM_USE_DEPS}]"
+}
+
+pkg_pretend() {
+	if use vulkan; then
+		if ! use video_cards_d3d12 &&
+		   ! use video_cards_freedreno &&
+		   ! use video_cards_intel &&
+		   ! use video_cards_radeonsi &&
+		   ! use video_cards_v3d; then
+			ewarn "Ignoring USE=vulkan     since VIDEO_CARDS does not contain d3d12, freedreno, intel, radeonsi, or v3d"
+		fi
+	fi
+
+	if use vaapi; then
+		if ! use video_cards_d3d12 &&
+		   ! use video_cards_r600 &&
+		   ! use video_cards_radeonsi &&
+		   ! use video_cards_nouveau; then
+			ewarn "Ignoring USE=vaapi      since VIDEO_CARDS does not contain d3d12, r600, radeonsi, or nouveau"
+		fi
+	fi
+
+	if use vdpau; then
+		if ! use video_cards_d3d12 &&
+		   ! 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 d3d12, 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 llvm; then
+		use opencl     && ewarn "Ignoring USE=opencl     since USE does not contain llvm"
+	fi
+
+	if use osmesa && ! use llvm; then
+		ewarn "OSMesa will be slow without enabling USE=llvm"
+	fi
+}
+
+python_check_deps() {
+	python_has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]" || return 1
+	if use llvm && use vulkan && use video_cards_intel && use amd64; then
+		python_has_version -b "dev-python/ply[${PYTHON_USEDEP}]" || return 1
+	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 video_cards_intel ||
+	   use video_cards_radeonsi; then
+		if kernel_is -ge 5 11 3; then
+			CONFIG_CHECK="~KCMP"
+		elif kernel_is -ge 5 11; then
+			CONFIG_CHECK="~CHECKPOINT_RESTORE"
+		elif kernel_is -ge 5 10 20; then
+			CONFIG_CHECK="~KCMP"
+		else
+			CONFIG_CHECK="~CHECKPOINT_RESTORE"
+		fi
+		linux-info_pkg_setup
+	fi
+
+	if use llvm; then
+		llvm_pkg_setup
+	fi
+	python-any-r1_pkg_setup
+}
+
+src_prepare() {
+	default
+	sed -i -e "/^PLATFORM_SYMBOLS/a '__gentoo_check_ldflags__'," \
+		bin/symbols-check.py || die # bug #830728
+}
+
+multilib_src_configure() {
+	local emesonargs=()
+
+	local platforms
+	use X && platforms+="x11"
+	use wayland && platforms+=",wayland"
+	emesonargs+=(-Dplatforms=${platforms#,})
+
+	if use video_cards_intel ||
+	   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_d3d12 ||
+	   use video_cards_r600 ||
+	   use video_cards_radeonsi ||
+	   use video_cards_nouveau; then
+		emesonargs+=($(meson_feature vaapi gallium-va))
+		use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
+	else
+		emesonargs+=(-Dgallium-va=disabled)
+	fi
+
+	if use video_cards_d3d12; then
+		emesonargs+=($(meson_feature vaapi gallium-d3d12-video))
+	fi
+
+	if use video_cards_d3d12 ||
+	   use video_cards_r300 ||
+	   use video_cards_r600 ||
+	   use video_cards_radeonsi ||
+	   use video_cards_nouveau; then
+		emesonargs+=($(meson_feature vdpau gallium-vdpau))
+	else
+		emesonargs+=(-Dgallium-vdpau=disabled)
+	fi
+
+	if use video_cards_freedreno ||
+	   use video_cards_nouveau ||
+	   use video_cards_vmware; then
+		emesonargs+=($(meson_feature xa gallium-xa))
+	else
+		emesonargs+=(-Dgallium-xa=disabled)
+	fi
+
+	if use video_cards_freedreno ||
+	   use video_cards_lima ||
+	   use video_cards_panfrost ||
+	   use video_cards_v3d ||
+	   use video_cards_vc4 ||
+	   use video_cards_vivante; then
+		gallium_enable -- kmsro
+	fi
+
+	gallium_enable -- swrast
+	gallium_enable video_cards_freedreno freedreno
+	gallium_enable video_cards_intel crocus i915 iris
+	gallium_enable video_cards_lima lima
+	gallium_enable video_cards_d3d12 d3d12
+	gallium_enable video_cards_nouveau nouveau
+	gallium_enable video_cards_panfrost panfrost
+	gallium_enable video_cards_v3d v3d
+	gallium_enable video_cards_vc4 vc4
+	gallium_enable video_cards_virgl virgl
+	gallium_enable video_cards_vivante etnaviv
+	gallium_enable video_cards_vmware svga
+	gallium_enable zink zink
+
+	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
+
+	if use llvm && use opencl; then
+		PKG_CONFIG_PATH="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/$(get_libdir)/pkgconfig"
+		# See https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/docs/rusticl.rst
+		emesonargs+=(
+			$(meson_native_true gallium-rusticl)
+			-Drust_std=2021
+		)
+	fi
+
+	if use vulkan; then
+		vulkan_enable video_cards_lavapipe swrast
+		vulkan_enable video_cards_freedreno freedreno
+		vulkan_enable video_cards_intel intel intel_hasvk
+		vulkan_enable video_cards_d3d12 microsoft-experimental
+		vulkan_enable video_cards_radeonsi amd
+		vulkan_enable video_cards_v3d broadcom
+	fi
+
+	driver_list() {
+		local drivers="$(sort -u <<< "${1// /$'\n'}")"
+		echo "${drivers//$'\n'/,}"
+	}
+
+	local vulkan_layers
+	use vulkan && vulkan_layers+="device-select"
+	use vulkan-overlay && vulkan_layers+=",overlay"
+	emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
+
+	if use llvm && use vulkan && use video_cards_intel && use amd64; then
+		emesonargs+=(-Dintel-clc=system)
+	else
+		emesonargs+=(-Dintel-clc=disabled)
+	fi
+
+	emesonargs+=(
+		$(meson_use test build-tests)
+		-Dglx=$(usex X dri disabled)
+		-Dshared-glapi=enabled
+		-Ddri3=enabled
+		-Degl=enabled
+		-Dexpat=enabled
+		-Dgbm=enabled
+		-Dglvnd=true
+		$(meson_feature gles1)
+		$(meson_feature gles2)
+		$(meson_feature llvm)
+		$(meson_feature lm-sensors lmsensors)
+		$(meson_use osmesa)
+		$(meson_use selinux)
+		$(meson_feature unwind libunwind)
+		$(meson_feature zstd)
+		$(meson_use cpu_flags_x86_sse2 sse2)
+		-Dvalgrind=$(usex valgrind auto disabled)
+		-Dvideo-codecs=$(usex proprietary-codecs "h264dec,h264enc,h265dec,h265enc,vc1dec" "")
+		-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_test() {
+	meson_src_test -t 100
+}
+
+# $1 - VIDEO_CARDS flag (check skipped for "--")
+# other args - names of DRI drivers to enable
+gallium_enable() {
+	if [[ $1 == -- ]] || use $1; then
+		shift
+		GALLIUM_DRIVERS+=("$@")
+	fi
+}
+
+vulkan_enable() {
+	if [[ $1 == -- ]] || use $1; then
+		shift
+		VULKAN_DRIVERS+=("$@")
+	fi
+}


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/mesa/files/, media-libs/mesa/
@ 2024-09-18 17:45 Matt Turner
  0 siblings, 0 replies; 16+ messages in thread
From: Matt Turner @ 2024-09-18 17:45 UTC (permalink / raw
  To: gentoo-commits

commit:     68e1200521a1b4303e532f9d7d824b663a31b002
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 18 17:41:31 2024 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed Sep 18 17:45:33 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=68e12005

media-libs/mesa: Drop old versions

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 media-libs/mesa/Manifest                           |   9 -
 ...-vulkan_core.h-instead-of-vulkan.h-in-the.patch |  31 --
 media-libs/mesa/mesa-24.0.9.ebuild                 | 438 ------------------
 media-libs/mesa/mesa-24.1.3.ebuild                 | 494 ---------------------
 media-libs/mesa/mesa-24.1.4.ebuild                 | 494 ---------------------
 media-libs/mesa/mesa-24.1.5.ebuild                 | 494 ---------------------
 media-libs/mesa/mesa-24.1.6.ebuild                 | 494 ---------------------
 media-libs/mesa/mesa-24.2.0.ebuild                 | 490 --------------------
 media-libs/mesa/mesa-24.2.0_rc4.ebuild             | 490 --------------------
 media-libs/mesa/mesa-24.2.1.ebuild                 | 490 --------------------
 media-libs/mesa/mesa-24.2.2.ebuild                 | 490 --------------------
 media-libs/mesa/metadata.xml                       |   2 -
 12 files changed, 4416 deletions(-)

diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
index a9d414b4874c..fae3ee3c13a8 100644
--- a/media-libs/mesa/Manifest
+++ b/media-libs/mesa/Manifest
@@ -1,13 +1,4 @@
-DIST mesa-24.0.9.tar.xz 20197892 BLAKE2B 3c68e544898031fe76a57ea754f46ede5b105c259d13dd484eaa63fe51b7d52cf76a4084529b11a586c4d8d06f4cb32f993fd1ea4e6ccc4cbc91e78fe755743a SHA512 de2ee6c9df1fc106ee10befe0a76be1e9cfe83d65dbdb83bad6d8d7cfaa085232fb115293a1a790b37b50b1fe14bd58aafbcfe5a15e953b5901a7105d57569a5
-DIST mesa-24.1.3.tar.xz 29086488 BLAKE2B 2e8e4ee98f904aa02f304a6c3cbbb81d04802203e270e6b8ad2b7a62b334ac28f5e91687d7a92501f66b0043255a533d024537ff5ef3f2f03d986e46a7272eeb SHA512 db4071ac80747397023762d6e0355b001f4e942cdc706c67f8aced80e162058667c02a0dc0804a45afc2656cb65d8b16e17148bc03f0a1692067ec170f193c1a
-DIST mesa-24.1.4.tar.xz 29106920 BLAKE2B 2109fc604858a0927271d7b1edb76a24514acac6117e564c6999c99f068624964f5cf0b7d022cac5726e432353a32a5278b3aa00b64dd4118bb2f0b7123c3b41 SHA512 0293f1493685888e5d2f0e616645c937e5a9c348fcb654b050b7c42bfdade1518c508920e456cf8be0033dceab4570a916db87dbb454174e425d91e9c05d0748
-DIST mesa-24.1.5.tar.xz 29140156 BLAKE2B ea29b3b8b6f178dd21d7ee3042ea829755e398f8876dfac6c744de77c08d85abb2736add2141204e6d3343de46040f49d96e1ad455714880b4be46d7b36581f1 SHA512 5916cc38c4a17161b012310c473077177887c5fff1bc5cb1f6efdf5da44878c18c99fe0c62318d897798cd4edb0f7206a989198ba085c2d402d49cdd0ee25288
-DIST mesa-24.1.6.tar.xz 29172600 BLAKE2B 295634438e1a2ae64bd1c5b0309a253e72a4d95e559cabad72f94aa2b91e5b05179c69cce5e371b69707419399dae0bfe808cb16b2e9ee112277e18b8f0f31f9 SHA512 2df0c78126f34a9ab7ce4946ed9fcd58d828717ecfd93681d9e136e605e9a8e01428dd632c0125e06d805498ffd75250f0e617f47fbb7e6368e6c8a48f4c4dfc
 DIST mesa-24.1.7.tar.xz 29206724 BLAKE2B b3102fcf96c032d07826186c2d60dc93e5c17b26f725c20cf1e402d1cfbaaba9809bff7a04d3df0179d2ec8606bc9fb391761d17a148671b9270cf2aaca0324d SHA512 890f6387963bbb86a85305ea963cca326a3b3f8f8758ae2082fd62c52df77c2883a359341e91f36614fea59219394ef78f799a334080699a0bb71d984a68cb01
-DIST mesa-24.2.0-rc4.tar.xz 29324360 BLAKE2B da26f43fa3e940a406e4987ed311fd22fc7608d4e09fc6cfd6584fe8873b8c5fdbf51d5f32042c46a883739cd22204a3dde2a0a1d6283c3453bc635bfba24ed5 SHA512 5a0b9043e8c3222faeaad31f435f3ea440d670ffa5497340c5809666a857fa4c77288745d52372a2267e9f9be97fc04e0d20b81bc027c1b7a33176a3bfa6b3c6
-DIST mesa-24.2.0.tar.xz 29342732 BLAKE2B dfbd0e5b8de3db475f40a8313ee3013bb513d505541e056efd84aad50d5043414dd2c0b95e6c7336a1b4d29037274dae2fa1fdb9697187bf239a5adb54dd3721 SHA512 a585c788801b5a341d356e44d958b148e6e14f6b3d7224e99a92faa2f004bf0cfc90103c5fdc651afb22f805c6f9dc594f9f3f5ecebcea36f6305b3a6ccb9294
-DIST mesa-24.2.1.tar.xz 29431192 BLAKE2B f4ef9fd08bbf16551498a8edce1e19e594a0b85ee1f05f8f7c80fcf12ec7ac4cb5947b713791f5202201f8cfc48773507d869dbd239e6fc3dcf2c3a621892327 SHA512 3b77e5faec51b67583131123b0cc010b52325ea308e4075323102aa999d9c9fbb65b873eb537ed4f577b5a0811e7f096e7e101510cb50326ea5c439b4b468380
-DIST mesa-24.2.2.tar.xz 29441876 BLAKE2B 14b29989b056c3bc76cb64babef6e93dd31af37ea72674adaad3f7ef7373c004996e375941662b1c3bbacfd707a21e2e3631a116a841130edfa1bfe3450ae5ab SHA512 d9979f7a1ae7bfeb0658d1b6c9021b7d0043c3ca71db9deaa2fc8a3d4c07cd58497b9233737a31fb66ef711a369a859757a63fb86c2aadd859867f9a4eaf16a9
 DIST mesa-24.2.3.tar.xz 29465732 BLAKE2B 3c480bd9f5948ae4d66a833cfc059b1b872fca989296a070deaa46aeb72298eaca6a3fa9d13574859623cec4a6af978f44d2c9562b9757be2257364c27600be6 SHA512 7a1ace23568d1907b778a2859f97c8988a414ba74e02e1fb5af6f95f768e1b1a2dfdaf412b0d655678ed915d28273953fd1236ebcd87553a1880f1a7f3ea4d44
 DIST paste-1.0.14.crate 18157 BLAKE2B 35e8548611c51ee75f4d04926149e5e54870d7073d9b635d550a6fa0f85891f57f326bdbcff3dd8618cf40f8e08cf903ef87d9c034d5921d8b91e1db842cdd7c SHA512 3a793f0e5e773a7f7defc798a4c17ae9a40d715144632ea6cb0a8c785e14c4212046491df016bb9838281f8eaf327a79f01c1e2ac5f26785c028bc880faff9ee
 DIST proc-macro2-1.0.70.crate 44343 BLAKE2B fff0dec06b21e391783cc136790238acb783780eaedcf14875a350e7ceb46fdc100c8b9e3f09fb7f4c2196c25d4c6b61e574c0dad762d94533b628faab68cf5c SHA512 ae9366856853f7d96caf7a7581843d36bfc7843f8683897b19ffc666c03b0b1eff502ddb18ca4c1c1a239a368f03f6cc258b0e2795f64b61c6a31404462eec5f

diff --git a/media-libs/mesa/files/24.0.4-dzn-Include-vulkan_core.h-instead-of-vulkan.h-in-the.patch b/media-libs/mesa/files/24.0.4-dzn-Include-vulkan_core.h-instead-of-vulkan.h-in-the.patch
deleted file mode 100644
index 437954a0960d..000000000000
--- a/media-libs/mesa/files/24.0.4-dzn-Include-vulkan_core.h-instead-of-vulkan.h-in-the.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-https://bugs.gentoo.org/927636
-
-From 5957778c164bbe95411837f2fd80ad0001b6b7ec Mon Sep 17 00:00:00 2001
-From: Jesse Natalie <jenatali@microsoft.com>
-Date: Fri, 22 Mar 2024 09:15:23 -0700
-Subject: [PATCH] dzn: Include vulkan_core.h instead of vulkan.h in the device
- enum header
-
-Prevents pulling in X11 "None" define into the DXCore implementation,
-which conflicts with updated DXCore headers.
-
-Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10803
-Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28339>
----
- src/microsoft/vulkan/dzn_physical_device_enum.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/microsoft/vulkan/dzn_physical_device_enum.h b/src/microsoft/vulkan/dzn_physical_device_enum.h
-index 7ecc5d34630..4aec1c2b7c1 100644
---- a/src/microsoft/vulkan/dzn_physical_device_enum.h
-+++ b/src/microsoft/vulkan/dzn_physical_device_enum.h
-@@ -24,7 +24,7 @@
- #ifndef DZN_PHYSICAL_DEVICE_ENUM_H
- #define DZN_PHYSICAL_DEVICE_ENUM_H
- 
--#include <vulkan/vulkan.h>
-+#include <vulkan/vulkan_core.h>
- 
- #include <wsl/winadapter.h>
- 
--- 

diff --git a/media-libs/mesa/mesa-24.0.9.ebuild b/media-libs/mesa/mesa-24.0.9.ebuild
deleted file mode 100644
index 8862c9e68d83..000000000000
--- a/media-libs/mesa/mesa-24.0.9.ebuild
+++ /dev/null
@@ -1,438 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LLVM_COMPAT=( {15..17} )
-LLVM_OPTIONAL=1
-PYTHON_COMPAT=( python3_{10..12} )
-
-inherit flag-o-matic llvm-r1 meson-multilib python-any-r1 linux-info toolchain-funcs
-
-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"
-	inherit git-r3
-else
-	SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz"
-	KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-solaris"
-fi
-S="${WORKDIR}/${MY_P}"
-EGIT_CHECKOUT_DIR=${S}
-
-LICENSE="MIT SGI-B-2.0"
-SLOT="0"
-
-RADEON_CARDS="r300 r600 radeon radeonsi"
-VIDEO_CARDS="${RADEON_CARDS} d3d12 freedreno intel lavapipe lima nouveau panfrost v3d vc4 virgl vivante vmware"
-for card in ${VIDEO_CARDS}; do
-	IUSE_VIDEO_CARDS+=" video_cards_${card}"
-done
-
-IUSE="${IUSE_VIDEO_CARDS}
-	cpu_flags_x86_sse2 d3d9 debug gles1 +gles2 +llvm
-	lm-sensors opencl +opengl osmesa +proprietary-codecs selinux
-	test unwind vaapi valgrind vdpau vulkan
-	vulkan-overlay wayland +X xa zink +zstd"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="
-	d3d9? (
-		|| (
-			video_cards_intel
-			video_cards_r300
-			video_cards_r600
-			video_cards_radeonsi
-			video_cards_nouveau
-			video_cards_vmware
-		)
-	)
-	llvm? ( ${LLVM_REQUIRED_USE} )
-	vulkan-overlay? ( vulkan )
-	video_cards_lavapipe? ( llvm vulkan )
-	video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_r300?   ( x86? ( llvm ) amd64? ( llvm ) )
-	vdpau? ( X )
-	xa? ( X )
-	X? ( gles1? ( opengl ) gles2? ( opengl ) )
-	zink? ( vulkan || ( opengl gles1 gles2 ) )
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.119"
-RDEPEND="
-	>=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
-	>=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
-	unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
-	llvm? (
-		$(llvm_gen_dep "
-			sys-devel/llvm:\${LLVM_SLOT}[llvm_targets_AMDGPU(+),${MULTILIB_USEDEP}]
-			opencl? (
-				dev-util/spirv-llvm-translator:\${LLVM_SLOT}
-				sys-devel/clang:\${LLVM_SLOT}[llvm_targets_AMDGPU(+),${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? (
-		>=virtual/opencl-3
-		dev-libs/libclc[spirv(-)]
-		>=dev-util/spirv-tools-1.3.231.0
-		virtual/libelf:0=
-	)
-	vaapi? (
-		>=media-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
-	)
-	vdpau? ( >=x11-libs/libvdpau-1.4:=[${MULTILIB_USEDEP}] )
-	video_cards_radeonsi? ( virtual/libelf:0=[${MULTILIB_USEDEP}] )
-	selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
-	wayland? ( >=dev-libs/wayland-1.18.0[${MULTILIB_USEDEP}] )
-	${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_intel?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
-	X? (
-		>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
-		>=x11-libs/libxshmfence-1.1[${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}]
-		x11-libs/xcb-util-keysyms[${MULTILIB_USEDEP}]
-	)
-	zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
-	zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
-"
-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] )
-"
-
-DEPEND="${RDEPEND}
-	video_cards_d3d12? ( >=dev-util/directx-headers-1.611.0[${MULTILIB_USEDEP}] )
-	valgrind? ( dev-debug/valgrind )
-	wayland? ( >=dev-libs/wayland-protocols-1.30 )
-	X? (
-		x11-libs/libXrandr[${MULTILIB_USEDEP}]
-		x11-base/xorg-proto
-	)
-"
-BDEPEND="
-	${PYTHON_DEPS}
-	opencl? (
-		>=virtual/rust-1.62.0
-		>=dev-util/bindgen-0.58.0
-		>=dev-build/meson-1.3.1
-	)
-	app-alternatives/yacc
-	app-alternatives/lex
-	virtual/pkgconfig
-	$(python_gen_any_dep "
-		>=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]
-		dev-python/packaging[\${PYTHON_USEDEP}]
-	")
-	vulkan? (
-		dev-util/glslang
-		llvm? (
-			video_cards_intel? (
-				amd64? (
-					$(python_gen_any_dep "dev-python/ply[\${PYTHON_USEDEP}]")
-					~dev-util/intel_clc-${PV}
-					dev-libs/libclc[spirv(-)]
-				)
-			)
-		)
-	)
-	wayland? ( dev-util/wayland-scanner )
-"
-
-QA_WX_LOAD="
-x86? (
-	usr/lib/libglapi.so.0.0.0
-	usr/lib/libOSMesa.so.8.0.0
-	usr/lib/libGLX_mesa.so.0.0.0
-)"
-
-PATCHES=(
-	"${FILESDIR}"/24.0.4-dzn-Include-vulkan_core.h-instead-of-vulkan.h-in-the.patch
-)
-
-pkg_pretend() {
-	if use vulkan; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_freedreno &&
-		   ! use video_cards_intel &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_v3d; then
-			ewarn "Ignoring USE=vulkan     since VIDEO_CARDS does not contain d3d12, freedreno, intel, radeonsi, or v3d"
-		fi
-	fi
-
-	if use vaapi; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_r600 &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_nouveau; then
-			ewarn "Ignoring USE=vaapi      since VIDEO_CARDS does not contain d3d12, r600, radeonsi, or nouveau"
-		fi
-	fi
-
-	if use vdpau; then
-		if ! use video_cards_d3d12 &&
-		   ! 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 d3d12, 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 llvm; then
-		use opencl     && ewarn "Ignoring USE=opencl     since USE does not contain llvm"
-	fi
-
-	if use osmesa && ! use llvm; then
-		ewarn "OSMesa will be slow without enabling USE=llvm"
-	fi
-}
-
-python_check_deps() {
-	python_has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]" &&
-	python_has_version -b "dev-python/packaging[${PYTHON_USEDEP}]" || return 1
-	if use llvm && use vulkan && use video_cards_intel && use amd64; then
-		python_has_version -b "dev-python/ply[${PYTHON_USEDEP}]" || return 1
-	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 video_cards_intel ||
-	   use video_cards_radeonsi; then
-		if kernel_is -ge 5 11 3; then
-			CONFIG_CHECK="~KCMP"
-		elif kernel_is -ge 5 11; then
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		elif kernel_is -ge 5 10 20; then
-			CONFIG_CHECK="~KCMP"
-		else
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		fi
-		linux-info_pkg_setup
-	fi
-
-	use llvm && llvm-r1_pkg_setup
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	default
-	sed -i -e "/^PLATFORM_SYMBOLS/a '__gentoo_check_ldflags__'," \
-		bin/symbols-check.py || die # bug #830728
-}
-
-multilib_src_configure() {
-	local emesonargs=()
-
-	# bug #932591 and https://gitlab.freedesktop.org/mesa/mesa/-/issues/11140
-	tc-is-gcc && [[ $(gcc-major-version) -ge 14 ]] && filter-lto
-
-	local platforms
-	use X && platforms+="x11"
-	use wayland && platforms+=",wayland"
-	emesonargs+=(-Dplatforms=${platforms#,})
-
-	if use video_cards_intel ||
-	   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_d3d12 ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_nouveau; then
-		emesonargs+=($(meson_feature vaapi gallium-va))
-		use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
-	else
-		emesonargs+=(-Dgallium-va=disabled)
-	fi
-
-	if use video_cards_d3d12; then
-		emesonargs+=($(meson_feature vaapi gallium-d3d12-video))
-	fi
-
-	if use video_cards_d3d12 ||
-	   use video_cards_r300 ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_nouveau; then
-		emesonargs+=($(meson_feature vdpau gallium-vdpau))
-	else
-		emesonargs+=(-Dgallium-vdpau=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_nouveau ||
-	   use video_cards_vmware; then
-		emesonargs+=($(meson_feature xa gallium-xa))
-	else
-		emesonargs+=(-Dgallium-xa=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_lima ||
-	   use video_cards_panfrost ||
-	   use video_cards_v3d ||
-	   use video_cards_vc4 ||
-	   use video_cards_vivante; then
-		gallium_enable -- kmsro
-	fi
-
-	gallium_enable -- swrast
-	gallium_enable video_cards_freedreno freedreno
-	gallium_enable video_cards_intel crocus i915 iris
-	gallium_enable video_cards_lima lima
-	gallium_enable video_cards_d3d12 d3d12
-	gallium_enable video_cards_nouveau nouveau
-	gallium_enable video_cards_panfrost panfrost
-	gallium_enable video_cards_v3d v3d
-	gallium_enable video_cards_vc4 vc4
-	gallium_enable video_cards_virgl virgl
-	gallium_enable video_cards_vivante etnaviv
-	gallium_enable video_cards_vmware svga
-	gallium_enable zink zink
-
-	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
-
-	if use llvm && use opencl; then
-		PKG_CONFIG_PATH="$(get_llvm_prefix)/$(get_libdir)/pkgconfig"
-		# See https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/docs/rusticl.rst
-		emesonargs+=(
-			$(meson_native_true gallium-rusticl)
-			-Drust_std=2021
-		)
-	fi
-
-	if use vulkan; then
-		vulkan_enable video_cards_lavapipe swrast
-		vulkan_enable video_cards_freedreno freedreno
-		vulkan_enable video_cards_intel intel intel_hasvk
-		vulkan_enable video_cards_d3d12 microsoft-experimental
-		vulkan_enable video_cards_radeonsi amd
-		vulkan_enable video_cards_v3d broadcom
-	fi
-
-	driver_list() {
-		local drivers="$(sort -u <<< "${1// /$'\n'}")"
-		echo "${drivers//$'\n'/,}"
-	}
-
-	local vulkan_layers
-	use vulkan && vulkan_layers+="device-select"
-	use vulkan-overlay && vulkan_layers+=",overlay"
-	emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
-
-	if use llvm && use vulkan && use video_cards_intel && use amd64; then
-		emesonargs+=(-Dintel-clc=system)
-	else
-		emesonargs+=(-Dintel-clc=disabled)
-	fi
-
-	if use opengl || use gles1 || use gles2; then
-		emesonargs+=(
-			-Degl=enabled
-			-Dgbm=enabled
-			-Dglvnd=true
-		)
-	else
-		emesonargs+=(
-			-Degl=disabled
-			-Dgbm=disabled
-			-Dglvnd=false
-		)
-	fi
-
-	if use opengl && use X; then
-		emesonargs+=(-Dglx=dri)
-	else
-		emesonargs+=(-Dglx=disabled)
-	fi
-
-	emesonargs+=(
-		$(meson_use test build-tests)
-		-Dshared-glapi=enabled
-		-Ddri3=enabled
-		-Dexpat=enabled
-		$(meson_use opengl)
-		$(meson_feature gles1)
-		$(meson_feature gles2)
-		$(meson_feature llvm)
-		$(meson_feature lm-sensors lmsensors)
-		$(meson_use osmesa)
-		$(meson_use selinux)
-		$(meson_feature unwind libunwind)
-		$(meson_feature zstd)
-		$(meson_use cpu_flags_x86_sse2 sse2)
-		-Dvalgrind=$(usex valgrind auto disabled)
-		-Dvideo-codecs=$(usex proprietary-codecs "all" "all_free")
-		-Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
-		-Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
-		-Dbuildtype=$(usex debug debug plain)
-		-Db_ndebug=$(usex debug false true)
-	)
-	meson_src_configure
-}
-
-multilib_src_test() {
-	meson_src_test -t 100
-}
-
-# $1 - VIDEO_CARDS flag (check skipped for "--")
-# other args - names of DRI drivers to enable
-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-24.1.3.ebuild b/media-libs/mesa/mesa-24.1.3.ebuild
deleted file mode 100644
index 21a8ac3b80e2..000000000000
--- a/media-libs/mesa/mesa-24.1.3.ebuild
+++ /dev/null
@@ -1,494 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LLVM_COMPAT=( {15..18} )
-LLVM_OPTIONAL=1
-CARGO_OPTIONAL=1
-PYTHON_COMPAT=( python3_{10..12} )
-
-inherit flag-o-matic llvm-r1 meson-multilib python-any-r1 linux-info rust-toolchain toolchain-funcs
-
-MY_P="${P/_/-}"
-
-CRATES="
-	syn@2.0.39
-	proc-macro2@1.0.70
-	quote@1.0.33
-	unicode-ident@1.0.12
-	paste@1.0.14
-"
-
-inherit cargo
-
-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"
-	inherit git-r3
-else
-	SRC_URI="
-		https://archive.mesa3d.org/${MY_P}.tar.xz
-	"
-	KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-solaris"
-fi
-
-# This should be {CARGO_CRATE_URIS//.crate/.tar.gz} to correspond to the wrap files,
-# but there are "stale" distfiles on the mirrors with the wrong names.
-# export MESON_PACKAGE_CACHE_DIR="${DISTDIR}"
-SRC_URI+="
-	${CARGO_CRATE_URIS}
-"
-
-S="${WORKDIR}/${MY_P}"
-EGIT_CHECKOUT_DIR=${S}
-
-LICENSE="MIT SGI-B-2.0"
-SLOT="0"
-
-RADEON_CARDS="r300 r600 radeon radeonsi"
-VIDEO_CARDS="${RADEON_CARDS} d3d12 freedreno intel lavapipe lima nouveau nvk panfrost v3d vc4 virgl vivante vmware zink"
-for card in ${VIDEO_CARDS}; do
-	IUSE_VIDEO_CARDS+=" video_cards_${card}"
-done
-
-IUSE="${IUSE_VIDEO_CARDS}
-	cpu_flags_x86_sse2 d3d9 debug +llvm
-	lm-sensors opencl +opengl osmesa +proprietary-codecs selinux
-	test unwind vaapi valgrind vdpau vulkan
-	vulkan-overlay wayland +X xa +zstd"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="
-	d3d9? (
-		|| (
-			video_cards_freedreno
-			video_cards_intel
-			video_cards_nouveau
-			video_cards_panfrost
-			video_cards_r300
-			video_cards_r600
-			video_cards_radeonsi
-			video_cards_vmware
-			video_cards_zink
-		)
-	)
-	llvm? ( ${LLVM_REQUIRED_USE} )
-	vulkan-overlay? ( vulkan )
-	video_cards_lavapipe? ( llvm vulkan )
-	video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_r300?   ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_zink? ( vulkan opengl )
-	video_cards_nvk? ( vulkan video_cards_nouveau )
-	vdpau? ( X )
-	xa? ( X )
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.119"
-RDEPEND="
-	>=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
-	>=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.9[${MULTILIB_USEDEP}]
-	unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
-	llvm? (
-		$(llvm_gen_dep "
-			sys-devel/llvm:\${LLVM_SLOT}[llvm_targets_AMDGPU(+),${MULTILIB_USEDEP}]
-			opencl? (
-				dev-util/spirv-llvm-translator:\${LLVM_SLOT}
-				sys-devel/clang:\${LLVM_SLOT}[llvm_targets_AMDGPU(+),${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? (
-		>=virtual/opencl-3
-		dev-libs/libclc[spirv(-)]
-		>=dev-util/spirv-tools-1.3.231.0
-		virtual/libelf:0=
-	)
-	vaapi? (
-		>=media-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
-	)
-	vdpau? ( >=x11-libs/libvdpau-1.5:=[${MULTILIB_USEDEP}] )
-	video_cards_radeonsi? ( virtual/libelf:0=[${MULTILIB_USEDEP}] )
-	video_cards_zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
-	selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
-	wayland? ( >=dev-libs/wayland-1.18.0[${MULTILIB_USEDEP}] )
-	${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_intel?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
-	X? (
-		>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
-		>=x11-libs/libxshmfence-1.1[${MULTILIB_USEDEP}]
-		>=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
-		>=x11-libs/libXxf86vm-1.1.3[${MULTILIB_USEDEP}]
-		>=x11-libs/libxcb-1.17:=[${MULTILIB_USEDEP}]
-		x11-libs/libXfixes[${MULTILIB_USEDEP}]
-		x11-libs/xcb-util-keysyms[${MULTILIB_USEDEP}]
-	)
-	zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
-"
-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] )
-"
-
-DEPEND="${RDEPEND}
-	video_cards_d3d12? ( >=dev-util/directx-headers-1.613.0[${MULTILIB_USEDEP}] )
-	valgrind? ( dev-debug/valgrind )
-	wayland? ( >=dev-libs/wayland-protocols-1.34 )
-	X? (
-		x11-libs/libXrandr[${MULTILIB_USEDEP}]
-		x11-base/xorg-proto
-	)
-"
-BDEPEND="
-	${PYTHON_DEPS}
-	opencl? (
-		>=virtual/rust-1.62.0
-		>=dev-util/bindgen-0.58.0
-	)
-	>=dev-build/meson-1.4.1
-	app-alternatives/yacc
-	app-alternatives/lex
-	virtual/pkgconfig
-	$(python_gen_any_dep "
-		>=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]
-		dev-python/packaging[\${PYTHON_USEDEP}]
-	")
-	video_cards_intel? (
-		~dev-util/intel_clc-${PV}
-		dev-libs/libclc[spirv(-)]
-		$(python_gen_any_dep "dev-python/ply[\${PYTHON_USEDEP}]")
-	)
-	vulkan? (
-		dev-util/glslang
-		video_cards_nvk? (
-			>=dev-util/bindgen-0.68.1
-			>=dev-util/cbindgen-0.26.0
-			>=virtual/rust-1.74.1
-		)
-	)
-	wayland? ( dev-util/wayland-scanner )
-"
-
-QA_WX_LOAD="
-x86? (
-	usr/lib/libglapi.so.0.0.0
-	usr/lib/libOSMesa.so.8.0.0
-	usr/lib/libGLX_mesa.so.0.0.0
-)"
-
-src_unpack() {
-	if [[ ${PV} == 9999 ]]; then
-		git-r3_src_unpack
-	else
-		unpack ${MY_P}.tar.xz
-	fi
-
-	# We need this because we cannot tell meson to use DISTDIR yet
-	pushd "${DISTDIR}" >/dev/null || die
-	mkdir -p "${S}"/subprojects/packagecache || die
-	local i
-	for i in *.crate; do
-		ln -s "${PWD}/${i}" "${S}/subprojects/packagecache/${i/.crate/}.tar.gz" || die
-	done
-	popd >/dev/null || die
-}
-
-pkg_pretend() {
-	if use vulkan; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_freedreno &&
-		   ! use video_cards_intel &&
-		   ! use video_cards_lavapipe &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_nvk &&
-		   ! use video_cards_panfrost &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_v3d &&
-		   ! use video_cards_virgl; then
-			ewarn "Ignoring USE=vulkan     since VIDEO_CARDS does not contain d3d12, freedreno, intel, lavapipe, nouveau, nvk, panfrost, radeonsi, v3d, or virgl"
-		fi
-	fi
-
-	# VA
-	if use vaapi; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_r600 &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_virgl; then
-			ewarn "Ignoring USE=vaapi      since VIDEO_CARDS does not contain d3d12, nouveau, r600, radeonsi, or virgl"
-		fi
-	fi
-
-	if use vdpau; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_r600 &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_virgl; then
-			ewarn "Ignoring USE=vdpau      since VIDEO_CARDS does not contain d3d12, nouveau, r600, radeonsi, or virgl"
-		fi
-	fi
-
-	if use xa; then
-		if ! use video_cards_freedreno &&
-		   ! use video_cards_intel &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_vmware; then
-			ewarn "Ignoring USE=xa         since VIDEO_CARDS does not contain freedreno, intel, nouveau, or vmware"
-		fi
-	fi
-
-	if ! use llvm; then
-		use opencl     && ewarn "Ignoring USE=opencl     since USE does not contain llvm"
-	fi
-
-	if use osmesa && ! use llvm; then
-		ewarn "OSMesa will be slow without enabling USE=llvm"
-	fi
-}
-
-python_check_deps() {
-	python_has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]" &&
-	python_has_version -b "dev-python/packaging[${PYTHON_USEDEP}]" || return 1
-	if use llvm && use vulkan && use video_cards_intel && use amd64; then
-		python_has_version -b "dev-python/ply[${PYTHON_USEDEP}]" || return 1
-	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 video_cards_intel ||
-	   use video_cards_radeonsi; then
-		if kernel_is -ge 5 11 3; then
-			CONFIG_CHECK="~KCMP"
-		elif kernel_is -ge 5 11; then
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		elif kernel_is -ge 5 10 20; then
-			CONFIG_CHECK="~KCMP"
-		else
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		fi
-		linux-info_pkg_setup
-	fi
-
-	use llvm && llvm-r1_pkg_setup
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	default
-	sed -i -e "/^PLATFORM_SYMBOLS/a '__gentoo_check_ldflags__'," \
-		bin/symbols-check.py || die # bug #830728
-}
-
-multilib_src_configure() {
-	local emesonargs=()
-
-	# bug #932591 and https://gitlab.freedesktop.org/mesa/mesa/-/issues/11140
-	tc-is-gcc && [[ $(gcc-major-version) -ge 14 ]] && filter-lto
-
-	local platforms
-	use X && platforms+="x11"
-	use wayland && platforms+=",wayland"
-	emesonargs+=(-Dplatforms=${platforms#,})
-
-	if use video_cards_freedreno ||
-	   use video_cards_intel || # crocus i915 iris
-	   use video_cards_nouveau ||
-	   use video_cards_panfrost ||
-	   use video_cards_r300 ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_vmware || # swrast
-	   use video_cards_zink; then
-		emesonargs+=($(meson_use d3d9 gallium-nine))
-	else
-		emesonargs+=(-Dgallium-nine=false)
-	fi
-
-	if use video_cards_d3d12 ||
-	   use video_cards_nouveau ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_virgl; then
-		emesonargs+=($(meson_feature vaapi gallium-va))
-		use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
-	else
-		emesonargs+=(-Dgallium-va=disabled)
-	fi
-
-	if use video_cards_d3d12; then
-		emesonargs+=($(meson_feature vaapi gallium-d3d12-video))
-	fi
-
-	if use video_cards_d3d12 ||
-	   use video_cards_nouveau ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_virgl; then
-		emesonargs+=($(meson_feature vdpau gallium-vdpau))
-	else
-		emesonargs+=(-Dgallium-vdpau=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_intel ||
-	   use video_cards_nouveau ||
-	   use video_cards_vmware; then
-		emesonargs+=($(meson_feature xa gallium-xa))
-	else
-		emesonargs+=(-Dgallium-xa=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_lima ||
-	   use video_cards_panfrost ||
-	   use video_cards_v3d ||
-	   use video_cards_vc4 ||
-	   use video_cards_vivante; then
-		gallium_enable -- kmsro
-	fi
-
-	gallium_enable -- swrast
-	gallium_enable video_cards_d3d12 d3d12
-	gallium_enable video_cards_freedreno freedreno
-	gallium_enable video_cards_intel crocus i915 iris
-	gallium_enable video_cards_lima lima
-	gallium_enable video_cards_nouveau nouveau
-	gallium_enable video_cards_panfrost panfrost
-	gallium_enable video_cards_v3d v3d
-	gallium_enable video_cards_vc4 vc4
-	gallium_enable video_cards_virgl virgl
-	gallium_enable video_cards_vivante etnaviv
-	gallium_enable video_cards_vmware svga
-	gallium_enable video_cards_zink zink
-
-	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
-
-	if use llvm && use opencl; then
-		PKG_CONFIG_PATH="$(get_llvm_prefix)/$(get_libdir)/pkgconfig"
-		# See https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/docs/rusticl.rst
-		emesonargs+=(
-			$(meson_native_true gallium-rusticl)
-			-Drust_std=2021
-		)
-	fi
-
-	if use vulkan; then
-		vulkan_enable video_cards_d3d12 microsoft-experimental
-		vulkan_enable video_cards_freedreno freedreno
-		vulkan_enable video_cards_intel intel intel_hasvk
-		vulkan_enable video_cards_lavapipe swrast
-		vulkan_enable video_cards_panfrost panfrost
-		vulkan_enable video_cards_radeonsi amd
-		vulkan_enable video_cards_v3d broadcom
-		vulkan_enable video_cards_vc4 broadcom
-		vulkan_enable video_cards_virgl virtio
-		if use video_cards_nvk; then
-			vulkan_enable video_cards_nvk nouveau
-			if ! multilib_is_native_abi; then
-				echo -e "[binaries]\nrust = ['rustc', '--target=$(rust_abi $CBUILD)']" > "${T}/rust_fix.ini"
-				emesonargs+=(
-					--native-file "${T}"/rust_fix.ini
-				)
-			fi
-		fi
-	fi
-
-	driver_list() {
-		local drivers="$(sort -u <<< "${1// /$'\n'}")"
-		echo "${drivers//$'\n'/,}"
-	}
-
-	local vulkan_layers
-	use vulkan && vulkan_layers+="device-select"
-	use vulkan-overlay && vulkan_layers+=",overlay"
-	emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
-
-	if use opengl && use X; then
-		emesonargs+=(-Dglx=dri)
-	else
-		emesonargs+=(-Dglx=disabled)
-	fi
-
-	if [[ "${ABI}" == amd64 ]]; then
-		emesonargs+=($(meson_feature video_cards_intel intel-rt))
-	fi
-
-	use debug && EMESON_BUILDTYPE=debug
-
-	emesonargs+=(
-		$(meson_use test build-tests)
-		-Dshared-glapi=enabled
-		-Ddri3=enabled
-		-Dexpat=enabled
-		$(meson_use opengl)
-		$(meson_feature opengl gbm)
-		$(meson_feature opengl gles1)
-		$(meson_feature opengl gles2)
-		$(meson_feature opengl glvnd)
-		$(meson_feature opengl egl)
-		$(meson_feature llvm)
-		$(meson_feature lm-sensors lmsensors)
-		$(meson_use osmesa)
-		$(meson_use selinux)
-		$(meson_feature unwind libunwind)
-		$(meson_feature zstd)
-		$(meson_use cpu_flags_x86_sse2 sse2)
-		-Dintel-clc=$(usex video_cards_intel system auto)
-		-Dvalgrind=$(usex valgrind auto disabled)
-		-Dvideo-codecs=$(usex proprietary-codecs "all" "all_free")
-		-Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
-		-Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
-		-Db_ndebug=$(usex debug false true)
-	)
-	meson_src_configure
-
-	if ! multilib_is_native_abi && use video_cards_nvk; then
-		sed -i -E '{N; s/(rule rust_COMPILER_FOR_BUILD\n command = rustc) --target=[a-zA-Z0-9=:-]+ (.*) -C link-arg=-m[[:digit:]]+/\1 \2/g}' build.ninja || die
-	fi
-}
-
-multilib_src_test() {
-	meson_src_test -t 100
-}
-
-# $1 - VIDEO_CARDS flag (check skipped for "--")
-# other args - names of DRI drivers to enable
-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-24.1.4.ebuild b/media-libs/mesa/mesa-24.1.4.ebuild
deleted file mode 100644
index ecfc5c2c1b39..000000000000
--- a/media-libs/mesa/mesa-24.1.4.ebuild
+++ /dev/null
@@ -1,494 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LLVM_COMPAT=( {15..18} )
-LLVM_OPTIONAL=1
-CARGO_OPTIONAL=1
-PYTHON_COMPAT=( python3_{10..12} )
-
-inherit flag-o-matic llvm-r1 meson-multilib python-any-r1 linux-info rust-toolchain toolchain-funcs
-
-MY_P="${P/_/-}"
-
-CRATES="
-	syn@2.0.39
-	proc-macro2@1.0.70
-	quote@1.0.33
-	unicode-ident@1.0.12
-	paste@1.0.14
-"
-
-inherit cargo
-
-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"
-	inherit git-r3
-else
-	SRC_URI="
-		https://archive.mesa3d.org/${MY_P}.tar.xz
-	"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-solaris"
-fi
-
-# This should be {CARGO_CRATE_URIS//.crate/.tar.gz} to correspond to the wrap files,
-# but there are "stale" distfiles on the mirrors with the wrong names.
-# export MESON_PACKAGE_CACHE_DIR="${DISTDIR}"
-SRC_URI+="
-	${CARGO_CRATE_URIS}
-"
-
-S="${WORKDIR}/${MY_P}"
-EGIT_CHECKOUT_DIR=${S}
-
-LICENSE="MIT SGI-B-2.0"
-SLOT="0"
-
-RADEON_CARDS="r300 r600 radeon radeonsi"
-VIDEO_CARDS="${RADEON_CARDS} d3d12 freedreno intel lavapipe lima nouveau nvk panfrost v3d vc4 virgl vivante vmware zink"
-for card in ${VIDEO_CARDS}; do
-	IUSE_VIDEO_CARDS+=" video_cards_${card}"
-done
-
-IUSE="${IUSE_VIDEO_CARDS}
-	cpu_flags_x86_sse2 d3d9 debug +llvm
-	lm-sensors opencl +opengl osmesa +proprietary-codecs selinux
-	test unwind vaapi valgrind vdpau vulkan
-	vulkan-overlay wayland +X xa +zstd"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="
-	d3d9? (
-		|| (
-			video_cards_freedreno
-			video_cards_intel
-			video_cards_nouveau
-			video_cards_panfrost
-			video_cards_r300
-			video_cards_r600
-			video_cards_radeonsi
-			video_cards_vmware
-			video_cards_zink
-		)
-	)
-	llvm? ( ${LLVM_REQUIRED_USE} )
-	vulkan-overlay? ( vulkan )
-	video_cards_lavapipe? ( llvm vulkan )
-	video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_r300?   ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_zink? ( vulkan opengl )
-	video_cards_nvk? ( vulkan video_cards_nouveau )
-	vdpau? ( X )
-	xa? ( X )
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.119"
-RDEPEND="
-	>=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
-	>=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.9[${MULTILIB_USEDEP}]
-	unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
-	llvm? (
-		$(llvm_gen_dep "
-			sys-devel/llvm:\${LLVM_SLOT}[llvm_targets_AMDGPU(+),${MULTILIB_USEDEP}]
-			opencl? (
-				dev-util/spirv-llvm-translator:\${LLVM_SLOT}
-				sys-devel/clang:\${LLVM_SLOT}[llvm_targets_AMDGPU(+),${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? (
-		>=virtual/opencl-3
-		dev-libs/libclc[spirv(-)]
-		>=dev-util/spirv-tools-1.3.231.0
-		virtual/libelf:0=
-	)
-	vaapi? (
-		>=media-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
-	)
-	vdpau? ( >=x11-libs/libvdpau-1.5:=[${MULTILIB_USEDEP}] )
-	video_cards_radeonsi? ( virtual/libelf:0=[${MULTILIB_USEDEP}] )
-	video_cards_zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
-	selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
-	wayland? ( >=dev-libs/wayland-1.18.0[${MULTILIB_USEDEP}] )
-	${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_intel?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
-	X? (
-		>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
-		>=x11-libs/libxshmfence-1.1[${MULTILIB_USEDEP}]
-		>=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
-		>=x11-libs/libXxf86vm-1.1.3[${MULTILIB_USEDEP}]
-		>=x11-libs/libxcb-1.17:=[${MULTILIB_USEDEP}]
-		x11-libs/libXfixes[${MULTILIB_USEDEP}]
-		x11-libs/xcb-util-keysyms[${MULTILIB_USEDEP}]
-	)
-	zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
-"
-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] )
-"
-
-DEPEND="${RDEPEND}
-	video_cards_d3d12? ( >=dev-util/directx-headers-1.613.0[${MULTILIB_USEDEP}] )
-	valgrind? ( dev-debug/valgrind )
-	wayland? ( >=dev-libs/wayland-protocols-1.34 )
-	X? (
-		x11-libs/libXrandr[${MULTILIB_USEDEP}]
-		x11-base/xorg-proto
-	)
-"
-BDEPEND="
-	${PYTHON_DEPS}
-	opencl? (
-		>=virtual/rust-1.62.0
-		>=dev-util/bindgen-0.58.0
-	)
-	>=dev-build/meson-1.4.1
-	app-alternatives/yacc
-	app-alternatives/lex
-	virtual/pkgconfig
-	$(python_gen_any_dep "
-		>=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]
-		dev-python/packaging[\${PYTHON_USEDEP}]
-	")
-	video_cards_intel? (
-		~dev-util/intel_clc-${PV}
-		dev-libs/libclc[spirv(-)]
-		$(python_gen_any_dep "dev-python/ply[\${PYTHON_USEDEP}]")
-	)
-	vulkan? (
-		dev-util/glslang
-		video_cards_nvk? (
-			>=dev-util/bindgen-0.68.1
-			>=dev-util/cbindgen-0.26.0
-			>=virtual/rust-1.74.1
-		)
-	)
-	wayland? ( dev-util/wayland-scanner )
-"
-
-QA_WX_LOAD="
-x86? (
-	usr/lib/libglapi.so.0.0.0
-	usr/lib/libOSMesa.so.8.0.0
-	usr/lib/libGLX_mesa.so.0.0.0
-)"
-
-src_unpack() {
-	if [[ ${PV} == 9999 ]]; then
-		git-r3_src_unpack
-	else
-		unpack ${MY_P}.tar.xz
-	fi
-
-	# We need this because we cannot tell meson to use DISTDIR yet
-	pushd "${DISTDIR}" >/dev/null || die
-	mkdir -p "${S}"/subprojects/packagecache || die
-	local i
-	for i in *.crate; do
-		ln -s "${PWD}/${i}" "${S}/subprojects/packagecache/${i/.crate/}.tar.gz" || die
-	done
-	popd >/dev/null || die
-}
-
-pkg_pretend() {
-	if use vulkan; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_freedreno &&
-		   ! use video_cards_intel &&
-		   ! use video_cards_lavapipe &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_nvk &&
-		   ! use video_cards_panfrost &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_v3d &&
-		   ! use video_cards_virgl; then
-			ewarn "Ignoring USE=vulkan     since VIDEO_CARDS does not contain d3d12, freedreno, intel, lavapipe, nouveau, nvk, panfrost, radeonsi, v3d, or virgl"
-		fi
-	fi
-
-	# VA
-	if use vaapi; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_r600 &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_virgl; then
-			ewarn "Ignoring USE=vaapi      since VIDEO_CARDS does not contain d3d12, nouveau, r600, radeonsi, or virgl"
-		fi
-	fi
-
-	if use vdpau; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_r600 &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_virgl; then
-			ewarn "Ignoring USE=vdpau      since VIDEO_CARDS does not contain d3d12, nouveau, r600, radeonsi, or virgl"
-		fi
-	fi
-
-	if use xa; then
-		if ! use video_cards_freedreno &&
-		   ! use video_cards_intel &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_vmware; then
-			ewarn "Ignoring USE=xa         since VIDEO_CARDS does not contain freedreno, intel, nouveau, or vmware"
-		fi
-	fi
-
-	if ! use llvm; then
-		use opencl     && ewarn "Ignoring USE=opencl     since USE does not contain llvm"
-	fi
-
-	if use osmesa && ! use llvm; then
-		ewarn "OSMesa will be slow without enabling USE=llvm"
-	fi
-}
-
-python_check_deps() {
-	python_has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]" &&
-	python_has_version -b "dev-python/packaging[${PYTHON_USEDEP}]" || return 1
-	if use llvm && use vulkan && use video_cards_intel && use amd64; then
-		python_has_version -b "dev-python/ply[${PYTHON_USEDEP}]" || return 1
-	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 video_cards_intel ||
-	   use video_cards_radeonsi; then
-		if kernel_is -ge 5 11 3; then
-			CONFIG_CHECK="~KCMP"
-		elif kernel_is -ge 5 11; then
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		elif kernel_is -ge 5 10 20; then
-			CONFIG_CHECK="~KCMP"
-		else
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		fi
-		linux-info_pkg_setup
-	fi
-
-	use llvm && llvm-r1_pkg_setup
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	default
-	sed -i -e "/^PLATFORM_SYMBOLS/a '__gentoo_check_ldflags__'," \
-		bin/symbols-check.py || die # bug #830728
-}
-
-multilib_src_configure() {
-	local emesonargs=()
-
-	# bug #932591 and https://gitlab.freedesktop.org/mesa/mesa/-/issues/11140
-	tc-is-gcc && [[ $(gcc-major-version) -ge 14 ]] && filter-lto
-
-	local platforms
-	use X && platforms+="x11"
-	use wayland && platforms+=",wayland"
-	emesonargs+=(-Dplatforms=${platforms#,})
-
-	if use video_cards_freedreno ||
-	   use video_cards_intel || # crocus i915 iris
-	   use video_cards_nouveau ||
-	   use video_cards_panfrost ||
-	   use video_cards_r300 ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_vmware || # swrast
-	   use video_cards_zink; then
-		emesonargs+=($(meson_use d3d9 gallium-nine))
-	else
-		emesonargs+=(-Dgallium-nine=false)
-	fi
-
-	if use video_cards_d3d12 ||
-	   use video_cards_nouveau ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_virgl; then
-		emesonargs+=($(meson_feature vaapi gallium-va))
-		use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
-	else
-		emesonargs+=(-Dgallium-va=disabled)
-	fi
-
-	if use video_cards_d3d12; then
-		emesonargs+=($(meson_feature vaapi gallium-d3d12-video))
-	fi
-
-	if use video_cards_d3d12 ||
-	   use video_cards_nouveau ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_virgl; then
-		emesonargs+=($(meson_feature vdpau gallium-vdpau))
-	else
-		emesonargs+=(-Dgallium-vdpau=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_intel ||
-	   use video_cards_nouveau ||
-	   use video_cards_vmware; then
-		emesonargs+=($(meson_feature xa gallium-xa))
-	else
-		emesonargs+=(-Dgallium-xa=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_lima ||
-	   use video_cards_panfrost ||
-	   use video_cards_v3d ||
-	   use video_cards_vc4 ||
-	   use video_cards_vivante; then
-		gallium_enable -- kmsro
-	fi
-
-	gallium_enable -- swrast
-	gallium_enable video_cards_d3d12 d3d12
-	gallium_enable video_cards_freedreno freedreno
-	gallium_enable video_cards_intel crocus i915 iris
-	gallium_enable video_cards_lima lima
-	gallium_enable video_cards_nouveau nouveau
-	gallium_enable video_cards_panfrost panfrost
-	gallium_enable video_cards_v3d v3d
-	gallium_enable video_cards_vc4 vc4
-	gallium_enable video_cards_virgl virgl
-	gallium_enable video_cards_vivante etnaviv
-	gallium_enable video_cards_vmware svga
-	gallium_enable video_cards_zink zink
-
-	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
-
-	if use llvm && use opencl; then
-		PKG_CONFIG_PATH="$(get_llvm_prefix)/$(get_libdir)/pkgconfig"
-		# See https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/docs/rusticl.rst
-		emesonargs+=(
-			$(meson_native_true gallium-rusticl)
-			-Drust_std=2021
-		)
-	fi
-
-	if use vulkan; then
-		vulkan_enable video_cards_d3d12 microsoft-experimental
-		vulkan_enable video_cards_freedreno freedreno
-		vulkan_enable video_cards_intel intel intel_hasvk
-		vulkan_enable video_cards_lavapipe swrast
-		vulkan_enable video_cards_panfrost panfrost
-		vulkan_enable video_cards_radeonsi amd
-		vulkan_enable video_cards_v3d broadcom
-		vulkan_enable video_cards_vc4 broadcom
-		vulkan_enable video_cards_virgl virtio
-		if use video_cards_nvk; then
-			vulkan_enable video_cards_nvk nouveau
-			if ! multilib_is_native_abi; then
-				echo -e "[binaries]\nrust = ['rustc', '--target=$(rust_abi $CBUILD)']" > "${T}/rust_fix.ini"
-				emesonargs+=(
-					--native-file "${T}"/rust_fix.ini
-				)
-			fi
-		fi
-	fi
-
-	driver_list() {
-		local drivers="$(sort -u <<< "${1// /$'\n'}")"
-		echo "${drivers//$'\n'/,}"
-	}
-
-	local vulkan_layers
-	use vulkan && vulkan_layers+="device-select"
-	use vulkan-overlay && vulkan_layers+=",overlay"
-	emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
-
-	if use opengl && use X; then
-		emesonargs+=(-Dglx=dri)
-	else
-		emesonargs+=(-Dglx=disabled)
-	fi
-
-	if [[ "${ABI}" == amd64 ]]; then
-		emesonargs+=($(meson_feature video_cards_intel intel-rt))
-	fi
-
-	use debug && EMESON_BUILDTYPE=debug
-
-	emesonargs+=(
-		$(meson_use test build-tests)
-		-Dshared-glapi=enabled
-		-Ddri3=enabled
-		-Dexpat=enabled
-		$(meson_use opengl)
-		$(meson_feature opengl gbm)
-		$(meson_feature opengl gles1)
-		$(meson_feature opengl gles2)
-		$(meson_feature opengl glvnd)
-		$(meson_feature opengl egl)
-		$(meson_feature llvm)
-		$(meson_feature lm-sensors lmsensors)
-		$(meson_use osmesa)
-		$(meson_use selinux)
-		$(meson_feature unwind libunwind)
-		$(meson_feature zstd)
-		$(meson_use cpu_flags_x86_sse2 sse2)
-		-Dintel-clc=$(usex video_cards_intel system auto)
-		-Dvalgrind=$(usex valgrind auto disabled)
-		-Dvideo-codecs=$(usex proprietary-codecs "all" "all_free")
-		-Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
-		-Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
-		-Db_ndebug=$(usex debug false true)
-	)
-	meson_src_configure
-
-	if ! multilib_is_native_abi && use video_cards_nvk; then
-		sed -i -E '{N; s/(rule rust_COMPILER_FOR_BUILD\n command = rustc) --target=[a-zA-Z0-9=:-]+ (.*) -C link-arg=-m[[:digit:]]+/\1 \2/g}' build.ninja || die
-	fi
-}
-
-multilib_src_test() {
-	meson_src_test -t 100
-}
-
-# $1 - VIDEO_CARDS flag (check skipped for "--")
-# other args - names of DRI drivers to enable
-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-24.1.5.ebuild b/media-libs/mesa/mesa-24.1.5.ebuild
deleted file mode 100644
index ecfc5c2c1b39..000000000000
--- a/media-libs/mesa/mesa-24.1.5.ebuild
+++ /dev/null
@@ -1,494 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LLVM_COMPAT=( {15..18} )
-LLVM_OPTIONAL=1
-CARGO_OPTIONAL=1
-PYTHON_COMPAT=( python3_{10..12} )
-
-inherit flag-o-matic llvm-r1 meson-multilib python-any-r1 linux-info rust-toolchain toolchain-funcs
-
-MY_P="${P/_/-}"
-
-CRATES="
-	syn@2.0.39
-	proc-macro2@1.0.70
-	quote@1.0.33
-	unicode-ident@1.0.12
-	paste@1.0.14
-"
-
-inherit cargo
-
-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"
-	inherit git-r3
-else
-	SRC_URI="
-		https://archive.mesa3d.org/${MY_P}.tar.xz
-	"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-solaris"
-fi
-
-# This should be {CARGO_CRATE_URIS//.crate/.tar.gz} to correspond to the wrap files,
-# but there are "stale" distfiles on the mirrors with the wrong names.
-# export MESON_PACKAGE_CACHE_DIR="${DISTDIR}"
-SRC_URI+="
-	${CARGO_CRATE_URIS}
-"
-
-S="${WORKDIR}/${MY_P}"
-EGIT_CHECKOUT_DIR=${S}
-
-LICENSE="MIT SGI-B-2.0"
-SLOT="0"
-
-RADEON_CARDS="r300 r600 radeon radeonsi"
-VIDEO_CARDS="${RADEON_CARDS} d3d12 freedreno intel lavapipe lima nouveau nvk panfrost v3d vc4 virgl vivante vmware zink"
-for card in ${VIDEO_CARDS}; do
-	IUSE_VIDEO_CARDS+=" video_cards_${card}"
-done
-
-IUSE="${IUSE_VIDEO_CARDS}
-	cpu_flags_x86_sse2 d3d9 debug +llvm
-	lm-sensors opencl +opengl osmesa +proprietary-codecs selinux
-	test unwind vaapi valgrind vdpau vulkan
-	vulkan-overlay wayland +X xa +zstd"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="
-	d3d9? (
-		|| (
-			video_cards_freedreno
-			video_cards_intel
-			video_cards_nouveau
-			video_cards_panfrost
-			video_cards_r300
-			video_cards_r600
-			video_cards_radeonsi
-			video_cards_vmware
-			video_cards_zink
-		)
-	)
-	llvm? ( ${LLVM_REQUIRED_USE} )
-	vulkan-overlay? ( vulkan )
-	video_cards_lavapipe? ( llvm vulkan )
-	video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_r300?   ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_zink? ( vulkan opengl )
-	video_cards_nvk? ( vulkan video_cards_nouveau )
-	vdpau? ( X )
-	xa? ( X )
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.119"
-RDEPEND="
-	>=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
-	>=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.9[${MULTILIB_USEDEP}]
-	unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
-	llvm? (
-		$(llvm_gen_dep "
-			sys-devel/llvm:\${LLVM_SLOT}[llvm_targets_AMDGPU(+),${MULTILIB_USEDEP}]
-			opencl? (
-				dev-util/spirv-llvm-translator:\${LLVM_SLOT}
-				sys-devel/clang:\${LLVM_SLOT}[llvm_targets_AMDGPU(+),${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? (
-		>=virtual/opencl-3
-		dev-libs/libclc[spirv(-)]
-		>=dev-util/spirv-tools-1.3.231.0
-		virtual/libelf:0=
-	)
-	vaapi? (
-		>=media-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
-	)
-	vdpau? ( >=x11-libs/libvdpau-1.5:=[${MULTILIB_USEDEP}] )
-	video_cards_radeonsi? ( virtual/libelf:0=[${MULTILIB_USEDEP}] )
-	video_cards_zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
-	selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
-	wayland? ( >=dev-libs/wayland-1.18.0[${MULTILIB_USEDEP}] )
-	${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_intel?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
-	X? (
-		>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
-		>=x11-libs/libxshmfence-1.1[${MULTILIB_USEDEP}]
-		>=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
-		>=x11-libs/libXxf86vm-1.1.3[${MULTILIB_USEDEP}]
-		>=x11-libs/libxcb-1.17:=[${MULTILIB_USEDEP}]
-		x11-libs/libXfixes[${MULTILIB_USEDEP}]
-		x11-libs/xcb-util-keysyms[${MULTILIB_USEDEP}]
-	)
-	zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
-"
-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] )
-"
-
-DEPEND="${RDEPEND}
-	video_cards_d3d12? ( >=dev-util/directx-headers-1.613.0[${MULTILIB_USEDEP}] )
-	valgrind? ( dev-debug/valgrind )
-	wayland? ( >=dev-libs/wayland-protocols-1.34 )
-	X? (
-		x11-libs/libXrandr[${MULTILIB_USEDEP}]
-		x11-base/xorg-proto
-	)
-"
-BDEPEND="
-	${PYTHON_DEPS}
-	opencl? (
-		>=virtual/rust-1.62.0
-		>=dev-util/bindgen-0.58.0
-	)
-	>=dev-build/meson-1.4.1
-	app-alternatives/yacc
-	app-alternatives/lex
-	virtual/pkgconfig
-	$(python_gen_any_dep "
-		>=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]
-		dev-python/packaging[\${PYTHON_USEDEP}]
-	")
-	video_cards_intel? (
-		~dev-util/intel_clc-${PV}
-		dev-libs/libclc[spirv(-)]
-		$(python_gen_any_dep "dev-python/ply[\${PYTHON_USEDEP}]")
-	)
-	vulkan? (
-		dev-util/glslang
-		video_cards_nvk? (
-			>=dev-util/bindgen-0.68.1
-			>=dev-util/cbindgen-0.26.0
-			>=virtual/rust-1.74.1
-		)
-	)
-	wayland? ( dev-util/wayland-scanner )
-"
-
-QA_WX_LOAD="
-x86? (
-	usr/lib/libglapi.so.0.0.0
-	usr/lib/libOSMesa.so.8.0.0
-	usr/lib/libGLX_mesa.so.0.0.0
-)"
-
-src_unpack() {
-	if [[ ${PV} == 9999 ]]; then
-		git-r3_src_unpack
-	else
-		unpack ${MY_P}.tar.xz
-	fi
-
-	# We need this because we cannot tell meson to use DISTDIR yet
-	pushd "${DISTDIR}" >/dev/null || die
-	mkdir -p "${S}"/subprojects/packagecache || die
-	local i
-	for i in *.crate; do
-		ln -s "${PWD}/${i}" "${S}/subprojects/packagecache/${i/.crate/}.tar.gz" || die
-	done
-	popd >/dev/null || die
-}
-
-pkg_pretend() {
-	if use vulkan; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_freedreno &&
-		   ! use video_cards_intel &&
-		   ! use video_cards_lavapipe &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_nvk &&
-		   ! use video_cards_panfrost &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_v3d &&
-		   ! use video_cards_virgl; then
-			ewarn "Ignoring USE=vulkan     since VIDEO_CARDS does not contain d3d12, freedreno, intel, lavapipe, nouveau, nvk, panfrost, radeonsi, v3d, or virgl"
-		fi
-	fi
-
-	# VA
-	if use vaapi; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_r600 &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_virgl; then
-			ewarn "Ignoring USE=vaapi      since VIDEO_CARDS does not contain d3d12, nouveau, r600, radeonsi, or virgl"
-		fi
-	fi
-
-	if use vdpau; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_r600 &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_virgl; then
-			ewarn "Ignoring USE=vdpau      since VIDEO_CARDS does not contain d3d12, nouveau, r600, radeonsi, or virgl"
-		fi
-	fi
-
-	if use xa; then
-		if ! use video_cards_freedreno &&
-		   ! use video_cards_intel &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_vmware; then
-			ewarn "Ignoring USE=xa         since VIDEO_CARDS does not contain freedreno, intel, nouveau, or vmware"
-		fi
-	fi
-
-	if ! use llvm; then
-		use opencl     && ewarn "Ignoring USE=opencl     since USE does not contain llvm"
-	fi
-
-	if use osmesa && ! use llvm; then
-		ewarn "OSMesa will be slow without enabling USE=llvm"
-	fi
-}
-
-python_check_deps() {
-	python_has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]" &&
-	python_has_version -b "dev-python/packaging[${PYTHON_USEDEP}]" || return 1
-	if use llvm && use vulkan && use video_cards_intel && use amd64; then
-		python_has_version -b "dev-python/ply[${PYTHON_USEDEP}]" || return 1
-	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 video_cards_intel ||
-	   use video_cards_radeonsi; then
-		if kernel_is -ge 5 11 3; then
-			CONFIG_CHECK="~KCMP"
-		elif kernel_is -ge 5 11; then
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		elif kernel_is -ge 5 10 20; then
-			CONFIG_CHECK="~KCMP"
-		else
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		fi
-		linux-info_pkg_setup
-	fi
-
-	use llvm && llvm-r1_pkg_setup
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	default
-	sed -i -e "/^PLATFORM_SYMBOLS/a '__gentoo_check_ldflags__'," \
-		bin/symbols-check.py || die # bug #830728
-}
-
-multilib_src_configure() {
-	local emesonargs=()
-
-	# bug #932591 and https://gitlab.freedesktop.org/mesa/mesa/-/issues/11140
-	tc-is-gcc && [[ $(gcc-major-version) -ge 14 ]] && filter-lto
-
-	local platforms
-	use X && platforms+="x11"
-	use wayland && platforms+=",wayland"
-	emesonargs+=(-Dplatforms=${platforms#,})
-
-	if use video_cards_freedreno ||
-	   use video_cards_intel || # crocus i915 iris
-	   use video_cards_nouveau ||
-	   use video_cards_panfrost ||
-	   use video_cards_r300 ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_vmware || # swrast
-	   use video_cards_zink; then
-		emesonargs+=($(meson_use d3d9 gallium-nine))
-	else
-		emesonargs+=(-Dgallium-nine=false)
-	fi
-
-	if use video_cards_d3d12 ||
-	   use video_cards_nouveau ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_virgl; then
-		emesonargs+=($(meson_feature vaapi gallium-va))
-		use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
-	else
-		emesonargs+=(-Dgallium-va=disabled)
-	fi
-
-	if use video_cards_d3d12; then
-		emesonargs+=($(meson_feature vaapi gallium-d3d12-video))
-	fi
-
-	if use video_cards_d3d12 ||
-	   use video_cards_nouveau ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_virgl; then
-		emesonargs+=($(meson_feature vdpau gallium-vdpau))
-	else
-		emesonargs+=(-Dgallium-vdpau=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_intel ||
-	   use video_cards_nouveau ||
-	   use video_cards_vmware; then
-		emesonargs+=($(meson_feature xa gallium-xa))
-	else
-		emesonargs+=(-Dgallium-xa=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_lima ||
-	   use video_cards_panfrost ||
-	   use video_cards_v3d ||
-	   use video_cards_vc4 ||
-	   use video_cards_vivante; then
-		gallium_enable -- kmsro
-	fi
-
-	gallium_enable -- swrast
-	gallium_enable video_cards_d3d12 d3d12
-	gallium_enable video_cards_freedreno freedreno
-	gallium_enable video_cards_intel crocus i915 iris
-	gallium_enable video_cards_lima lima
-	gallium_enable video_cards_nouveau nouveau
-	gallium_enable video_cards_panfrost panfrost
-	gallium_enable video_cards_v3d v3d
-	gallium_enable video_cards_vc4 vc4
-	gallium_enable video_cards_virgl virgl
-	gallium_enable video_cards_vivante etnaviv
-	gallium_enable video_cards_vmware svga
-	gallium_enable video_cards_zink zink
-
-	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
-
-	if use llvm && use opencl; then
-		PKG_CONFIG_PATH="$(get_llvm_prefix)/$(get_libdir)/pkgconfig"
-		# See https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/docs/rusticl.rst
-		emesonargs+=(
-			$(meson_native_true gallium-rusticl)
-			-Drust_std=2021
-		)
-	fi
-
-	if use vulkan; then
-		vulkan_enable video_cards_d3d12 microsoft-experimental
-		vulkan_enable video_cards_freedreno freedreno
-		vulkan_enable video_cards_intel intel intel_hasvk
-		vulkan_enable video_cards_lavapipe swrast
-		vulkan_enable video_cards_panfrost panfrost
-		vulkan_enable video_cards_radeonsi amd
-		vulkan_enable video_cards_v3d broadcom
-		vulkan_enable video_cards_vc4 broadcom
-		vulkan_enable video_cards_virgl virtio
-		if use video_cards_nvk; then
-			vulkan_enable video_cards_nvk nouveau
-			if ! multilib_is_native_abi; then
-				echo -e "[binaries]\nrust = ['rustc', '--target=$(rust_abi $CBUILD)']" > "${T}/rust_fix.ini"
-				emesonargs+=(
-					--native-file "${T}"/rust_fix.ini
-				)
-			fi
-		fi
-	fi
-
-	driver_list() {
-		local drivers="$(sort -u <<< "${1// /$'\n'}")"
-		echo "${drivers//$'\n'/,}"
-	}
-
-	local vulkan_layers
-	use vulkan && vulkan_layers+="device-select"
-	use vulkan-overlay && vulkan_layers+=",overlay"
-	emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
-
-	if use opengl && use X; then
-		emesonargs+=(-Dglx=dri)
-	else
-		emesonargs+=(-Dglx=disabled)
-	fi
-
-	if [[ "${ABI}" == amd64 ]]; then
-		emesonargs+=($(meson_feature video_cards_intel intel-rt))
-	fi
-
-	use debug && EMESON_BUILDTYPE=debug
-
-	emesonargs+=(
-		$(meson_use test build-tests)
-		-Dshared-glapi=enabled
-		-Ddri3=enabled
-		-Dexpat=enabled
-		$(meson_use opengl)
-		$(meson_feature opengl gbm)
-		$(meson_feature opengl gles1)
-		$(meson_feature opengl gles2)
-		$(meson_feature opengl glvnd)
-		$(meson_feature opengl egl)
-		$(meson_feature llvm)
-		$(meson_feature lm-sensors lmsensors)
-		$(meson_use osmesa)
-		$(meson_use selinux)
-		$(meson_feature unwind libunwind)
-		$(meson_feature zstd)
-		$(meson_use cpu_flags_x86_sse2 sse2)
-		-Dintel-clc=$(usex video_cards_intel system auto)
-		-Dvalgrind=$(usex valgrind auto disabled)
-		-Dvideo-codecs=$(usex proprietary-codecs "all" "all_free")
-		-Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
-		-Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
-		-Db_ndebug=$(usex debug false true)
-	)
-	meson_src_configure
-
-	if ! multilib_is_native_abi && use video_cards_nvk; then
-		sed -i -E '{N; s/(rule rust_COMPILER_FOR_BUILD\n command = rustc) --target=[a-zA-Z0-9=:-]+ (.*) -C link-arg=-m[[:digit:]]+/\1 \2/g}' build.ninja || die
-	fi
-}
-
-multilib_src_test() {
-	meson_src_test -t 100
-}
-
-# $1 - VIDEO_CARDS flag (check skipped for "--")
-# other args - names of DRI drivers to enable
-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-24.1.6.ebuild b/media-libs/mesa/mesa-24.1.6.ebuild
deleted file mode 100644
index 1c30c12f9f74..000000000000
--- a/media-libs/mesa/mesa-24.1.6.ebuild
+++ /dev/null
@@ -1,494 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LLVM_COMPAT=( {15..18} )
-LLVM_OPTIONAL=1
-CARGO_OPTIONAL=1
-PYTHON_COMPAT=( python3_{10..12} )
-
-inherit flag-o-matic llvm-r1 meson-multilib python-any-r1 linux-info rust-toolchain toolchain-funcs
-
-MY_P="${P/_/-}"
-
-CRATES="
-	syn@2.0.39
-	proc-macro2@1.0.70
-	quote@1.0.33
-	unicode-ident@1.0.12
-	paste@1.0.14
-"
-
-inherit cargo
-
-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"
-	inherit git-r3
-else
-	SRC_URI="
-		https://archive.mesa3d.org/${MY_P}.tar.xz
-	"
-	KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-solaris"
-fi
-
-# This should be {CARGO_CRATE_URIS//.crate/.tar.gz} to correspond to the wrap files,
-# but there are "stale" distfiles on the mirrors with the wrong names.
-# export MESON_PACKAGE_CACHE_DIR="${DISTDIR}"
-SRC_URI+="
-	${CARGO_CRATE_URIS}
-"
-
-S="${WORKDIR}/${MY_P}"
-EGIT_CHECKOUT_DIR=${S}
-
-LICENSE="MIT SGI-B-2.0"
-SLOT="0"
-
-RADEON_CARDS="r300 r600 radeon radeonsi"
-VIDEO_CARDS="${RADEON_CARDS} d3d12 freedreno intel lavapipe lima nouveau nvk panfrost v3d vc4 virgl vivante vmware zink"
-for card in ${VIDEO_CARDS}; do
-	IUSE_VIDEO_CARDS+=" video_cards_${card}"
-done
-
-IUSE="${IUSE_VIDEO_CARDS}
-	cpu_flags_x86_sse2 d3d9 debug +llvm
-	lm-sensors opencl +opengl osmesa +proprietary-codecs selinux
-	test unwind vaapi valgrind vdpau vulkan
-	vulkan-overlay wayland +X xa +zstd"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="
-	d3d9? (
-		|| (
-			video_cards_freedreno
-			video_cards_intel
-			video_cards_nouveau
-			video_cards_panfrost
-			video_cards_r300
-			video_cards_r600
-			video_cards_radeonsi
-			video_cards_vmware
-			video_cards_zink
-		)
-	)
-	llvm? ( ${LLVM_REQUIRED_USE} )
-	vulkan-overlay? ( vulkan )
-	video_cards_lavapipe? ( llvm vulkan )
-	video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_r300?   ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_zink? ( vulkan opengl )
-	video_cards_nvk? ( vulkan video_cards_nouveau )
-	vdpau? ( X )
-	xa? ( X )
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.119"
-RDEPEND="
-	>=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
-	>=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.9[${MULTILIB_USEDEP}]
-	unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
-	llvm? (
-		$(llvm_gen_dep "
-			sys-devel/llvm:\${LLVM_SLOT}[llvm_targets_AMDGPU(+),${MULTILIB_USEDEP}]
-			opencl? (
-				dev-util/spirv-llvm-translator:\${LLVM_SLOT}
-				sys-devel/clang:\${LLVM_SLOT}[llvm_targets_AMDGPU(+),${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? (
-		>=virtual/opencl-3
-		dev-libs/libclc[spirv(-)]
-		>=dev-util/spirv-tools-1.3.231.0
-		virtual/libelf:0=
-	)
-	vaapi? (
-		>=media-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
-	)
-	vdpau? ( >=x11-libs/libvdpau-1.5:=[${MULTILIB_USEDEP}] )
-	video_cards_radeonsi? ( virtual/libelf:0=[${MULTILIB_USEDEP}] )
-	video_cards_zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
-	selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
-	wayland? ( >=dev-libs/wayland-1.18.0[${MULTILIB_USEDEP}] )
-	${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_intel?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
-	X? (
-		>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
-		>=x11-libs/libxshmfence-1.1[${MULTILIB_USEDEP}]
-		>=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
-		>=x11-libs/libXxf86vm-1.1.3[${MULTILIB_USEDEP}]
-		>=x11-libs/libxcb-1.17:=[${MULTILIB_USEDEP}]
-		x11-libs/libXfixes[${MULTILIB_USEDEP}]
-		x11-libs/xcb-util-keysyms[${MULTILIB_USEDEP}]
-	)
-	zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
-"
-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] )
-"
-
-DEPEND="${RDEPEND}
-	video_cards_d3d12? ( >=dev-util/directx-headers-1.613.0[${MULTILIB_USEDEP}] )
-	valgrind? ( dev-debug/valgrind )
-	wayland? ( >=dev-libs/wayland-protocols-1.34 )
-	X? (
-		x11-libs/libXrandr[${MULTILIB_USEDEP}]
-		x11-base/xorg-proto
-	)
-"
-BDEPEND="
-	${PYTHON_DEPS}
-	opencl? (
-		>=virtual/rust-1.62.0
-		>=dev-util/bindgen-0.58.0
-	)
-	>=dev-build/meson-1.4.1
-	app-alternatives/yacc
-	app-alternatives/lex
-	virtual/pkgconfig
-	$(python_gen_any_dep "
-		>=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]
-		dev-python/packaging[\${PYTHON_USEDEP}]
-	")
-	video_cards_intel? (
-		~dev-util/intel_clc-${PV}
-		dev-libs/libclc[spirv(-)]
-		$(python_gen_any_dep "dev-python/ply[\${PYTHON_USEDEP}]")
-	)
-	vulkan? (
-		dev-util/glslang
-		video_cards_nvk? (
-			>=dev-util/bindgen-0.68.1
-			>=dev-util/cbindgen-0.26.0
-			>=virtual/rust-1.74.1
-		)
-	)
-	wayland? ( dev-util/wayland-scanner )
-"
-
-QA_WX_LOAD="
-x86? (
-	usr/lib/libglapi.so.0.0.0
-	usr/lib/libOSMesa.so.8.0.0
-	usr/lib/libGLX_mesa.so.0.0.0
-)"
-
-src_unpack() {
-	if [[ ${PV} == 9999 ]]; then
-		git-r3_src_unpack
-	else
-		unpack ${MY_P}.tar.xz
-	fi
-
-	# We need this because we cannot tell meson to use DISTDIR yet
-	pushd "${DISTDIR}" >/dev/null || die
-	mkdir -p "${S}"/subprojects/packagecache || die
-	local i
-	for i in *.crate; do
-		ln -s "${PWD}/${i}" "${S}/subprojects/packagecache/${i/.crate/}.tar.gz" || die
-	done
-	popd >/dev/null || die
-}
-
-pkg_pretend() {
-	if use vulkan; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_freedreno &&
-		   ! use video_cards_intel &&
-		   ! use video_cards_lavapipe &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_nvk &&
-		   ! use video_cards_panfrost &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_v3d &&
-		   ! use video_cards_virgl; then
-			ewarn "Ignoring USE=vulkan     since VIDEO_CARDS does not contain d3d12, freedreno, intel, lavapipe, nouveau, nvk, panfrost, radeonsi, v3d, or virgl"
-		fi
-	fi
-
-	# VA
-	if use vaapi; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_r600 &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_virgl; then
-			ewarn "Ignoring USE=vaapi      since VIDEO_CARDS does not contain d3d12, nouveau, r600, radeonsi, or virgl"
-		fi
-	fi
-
-	if use vdpau; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_r600 &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_virgl; then
-			ewarn "Ignoring USE=vdpau      since VIDEO_CARDS does not contain d3d12, nouveau, r600, radeonsi, or virgl"
-		fi
-	fi
-
-	if use xa; then
-		if ! use video_cards_freedreno &&
-		   ! use video_cards_intel &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_vmware; then
-			ewarn "Ignoring USE=xa         since VIDEO_CARDS does not contain freedreno, intel, nouveau, or vmware"
-		fi
-	fi
-
-	if ! use llvm; then
-		use opencl     && ewarn "Ignoring USE=opencl     since USE does not contain llvm"
-	fi
-
-	if use osmesa && ! use llvm; then
-		ewarn "OSMesa will be slow without enabling USE=llvm"
-	fi
-}
-
-python_check_deps() {
-	python_has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]" &&
-	python_has_version -b "dev-python/packaging[${PYTHON_USEDEP}]" || return 1
-	if use llvm && use vulkan && use video_cards_intel && use amd64; then
-		python_has_version -b "dev-python/ply[${PYTHON_USEDEP}]" || return 1
-	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 video_cards_intel ||
-	   use video_cards_radeonsi; then
-		if kernel_is -ge 5 11 3; then
-			CONFIG_CHECK="~KCMP"
-		elif kernel_is -ge 5 11; then
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		elif kernel_is -ge 5 10 20; then
-			CONFIG_CHECK="~KCMP"
-		else
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		fi
-		linux-info_pkg_setup
-	fi
-
-	use llvm && llvm-r1_pkg_setup
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	default
-	sed -i -e "/^PLATFORM_SYMBOLS/a '__gentoo_check_ldflags__'," \
-		bin/symbols-check.py || die # bug #830728
-}
-
-multilib_src_configure() {
-	local emesonargs=()
-
-	# bug #932591 and https://gitlab.freedesktop.org/mesa/mesa/-/issues/11140
-	tc-is-gcc && [[ $(gcc-major-version) -ge 14 ]] && filter-lto
-
-	local platforms
-	use X && platforms+="x11"
-	use wayland && platforms+=",wayland"
-	emesonargs+=(-Dplatforms=${platforms#,})
-
-	if use video_cards_freedreno ||
-	   use video_cards_intel || # crocus i915 iris
-	   use video_cards_nouveau ||
-	   use video_cards_panfrost ||
-	   use video_cards_r300 ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_vmware || # swrast
-	   use video_cards_zink; then
-		emesonargs+=($(meson_use d3d9 gallium-nine))
-	else
-		emesonargs+=(-Dgallium-nine=false)
-	fi
-
-	if use video_cards_d3d12 ||
-	   use video_cards_nouveau ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_virgl; then
-		emesonargs+=($(meson_feature vaapi gallium-va))
-		use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
-	else
-		emesonargs+=(-Dgallium-va=disabled)
-	fi
-
-	if use video_cards_d3d12; then
-		emesonargs+=($(meson_feature vaapi gallium-d3d12-video))
-	fi
-
-	if use video_cards_d3d12 ||
-	   use video_cards_nouveau ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_virgl; then
-		emesonargs+=($(meson_feature vdpau gallium-vdpau))
-	else
-		emesonargs+=(-Dgallium-vdpau=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_intel ||
-	   use video_cards_nouveau ||
-	   use video_cards_vmware; then
-		emesonargs+=($(meson_feature xa gallium-xa))
-	else
-		emesonargs+=(-Dgallium-xa=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_lima ||
-	   use video_cards_panfrost ||
-	   use video_cards_v3d ||
-	   use video_cards_vc4 ||
-	   use video_cards_vivante; then
-		gallium_enable -- kmsro
-	fi
-
-	gallium_enable -- swrast
-	gallium_enable video_cards_d3d12 d3d12
-	gallium_enable video_cards_freedreno freedreno
-	gallium_enable video_cards_intel crocus i915 iris
-	gallium_enable video_cards_lima lima
-	gallium_enable video_cards_nouveau nouveau
-	gallium_enable video_cards_panfrost panfrost
-	gallium_enable video_cards_v3d v3d
-	gallium_enable video_cards_vc4 vc4
-	gallium_enable video_cards_virgl virgl
-	gallium_enable video_cards_vivante etnaviv
-	gallium_enable video_cards_vmware svga
-	gallium_enable video_cards_zink zink
-
-	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
-
-	if use llvm && use opencl; then
-		PKG_CONFIG_PATH="$(get_llvm_prefix)/$(get_libdir)/pkgconfig"
-		# See https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/docs/rusticl.rst
-		emesonargs+=(
-			$(meson_native_true gallium-rusticl)
-			-Drust_std=2021
-		)
-	fi
-
-	if use vulkan; then
-		vulkan_enable video_cards_d3d12 microsoft-experimental
-		vulkan_enable video_cards_freedreno freedreno
-		vulkan_enable video_cards_intel intel intel_hasvk
-		vulkan_enable video_cards_lavapipe swrast
-		vulkan_enable video_cards_panfrost panfrost
-		vulkan_enable video_cards_radeonsi amd
-		vulkan_enable video_cards_v3d broadcom
-		vulkan_enable video_cards_vc4 broadcom
-		vulkan_enable video_cards_virgl virtio
-		if use video_cards_nvk; then
-			vulkan_enable video_cards_nvk nouveau
-			if ! multilib_is_native_abi; then
-				echo -e "[binaries]\nrust = ['rustc', '--target=$(rust_abi $CBUILD)']" > "${T}/rust_fix.ini"
-				emesonargs+=(
-					--native-file "${T}"/rust_fix.ini
-				)
-			fi
-		fi
-	fi
-
-	driver_list() {
-		local drivers="$(sort -u <<< "${1// /$'\n'}")"
-		echo "${drivers//$'\n'/,}"
-	}
-
-	local vulkan_layers
-	use vulkan && vulkan_layers+="device-select"
-	use vulkan-overlay && vulkan_layers+=",overlay"
-	emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
-
-	if use opengl && use X; then
-		emesonargs+=(-Dglx=dri)
-	else
-		emesonargs+=(-Dglx=disabled)
-	fi
-
-	if [[ "${ABI}" == amd64 ]]; then
-		emesonargs+=($(meson_feature video_cards_intel intel-rt))
-	fi
-
-	use debug && EMESON_BUILDTYPE=debug
-
-	emesonargs+=(
-		$(meson_use test build-tests)
-		-Dshared-glapi=enabled
-		-Ddri3=enabled
-		-Dexpat=enabled
-		$(meson_use opengl)
-		$(meson_feature opengl gbm)
-		$(meson_feature opengl gles1)
-		$(meson_feature opengl gles2)
-		$(meson_feature opengl glvnd)
-		$(meson_feature opengl egl)
-		$(meson_feature llvm)
-		$(meson_feature lm-sensors lmsensors)
-		$(meson_use osmesa)
-		$(meson_use selinux)
-		$(meson_feature unwind libunwind)
-		$(meson_feature zstd)
-		$(meson_use cpu_flags_x86_sse2 sse2)
-		-Dintel-clc=$(usex video_cards_intel system auto)
-		-Dvalgrind=$(usex valgrind auto disabled)
-		-Dvideo-codecs=$(usex proprietary-codecs "all" "all_free")
-		-Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
-		-Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
-		-Db_ndebug=$(usex debug false true)
-	)
-	meson_src_configure
-
-	if ! multilib_is_native_abi && use video_cards_nvk; then
-		sed -i -E '{N; s/(rule rust_COMPILER_FOR_BUILD\n command = rustc) --target=[a-zA-Z0-9=:-]+ (.*) -C link-arg=-m[[:digit:]]+/\1 \2/g}' build.ninja || die
-	fi
-}
-
-multilib_src_test() {
-	meson_src_test -t 100
-}
-
-# $1 - VIDEO_CARDS flag (check skipped for "--")
-# other args - names of DRI drivers to enable
-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-24.2.0.ebuild b/media-libs/mesa/mesa-24.2.0.ebuild
deleted file mode 100644
index f6e781d20e57..000000000000
--- a/media-libs/mesa/mesa-24.2.0.ebuild
+++ /dev/null
@@ -1,490 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LLVM_COMPAT=( {15..18} )
-LLVM_OPTIONAL=1
-CARGO_OPTIONAL=1
-PYTHON_COMPAT=( python3_{10..13} )
-
-inherit flag-o-matic llvm-r1 meson-multilib python-any-r1 linux-info rust-toolchain toolchain-funcs
-
-MY_P="${P/_/-}"
-
-CRATES="
-	syn@2.0.68
-	proc-macro2@1.0.86
-	quote@1.0.33
-	unicode-ident@1.0.12
-	paste@1.0.14
-"
-
-inherit cargo
-
-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"
-	inherit git-r3
-else
-	SRC_URI="
-		https://archive.mesa3d.org/${MY_P}.tar.xz
-	"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-solaris"
-fi
-
-# This should be {CARGO_CRATE_URIS//.crate/.tar.gz} to correspond to the wrap files,
-# but there are "stale" distfiles on the mirrors with the wrong names.
-# export MESON_PACKAGE_CACHE_DIR="${DISTDIR}"
-SRC_URI+="
-	${CARGO_CRATE_URIS}
-"
-
-S="${WORKDIR}/${MY_P}"
-EGIT_CHECKOUT_DIR=${S}
-
-LICENSE="MIT SGI-B-2.0"
-SLOT="0"
-
-RADEON_CARDS="r300 r600 radeon radeonsi"
-VIDEO_CARDS="${RADEON_CARDS}
-	d3d12 freedreno intel lavapipe lima nouveau nvk panfrost v3d vc4 virgl
-	vivante vmware zink"
-for card in ${VIDEO_CARDS}; do
-	IUSE_VIDEO_CARDS+=" video_cards_${card}"
-done
-
-IUSE="${IUSE_VIDEO_CARDS}
-	cpu_flags_x86_sse2 d3d9 debug +llvm
-	lm-sensors opencl +opengl osmesa +proprietary-codecs selinux
-	test unwind vaapi valgrind vdpau vulkan
-	vulkan-overlay wayland +X xa +zstd"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="
-	d3d9? (
-		|| (
-			video_cards_freedreno
-			video_cards_intel
-			video_cards_nouveau
-			video_cards_panfrost
-			video_cards_r300
-			video_cards_r600
-			video_cards_radeonsi
-			video_cards_vmware
-			video_cards_zink
-		)
-	)
-	llvm? ( ${LLVM_REQUIRED_USE} )
-	vulkan-overlay? ( vulkan )
-	video_cards_lavapipe? ( llvm vulkan )
-	video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_r300?   ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_zink? ( vulkan opengl )
-	video_cards_nvk? ( vulkan video_cards_nouveau )
-	vdpau? ( X )
-	xa? ( X )
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.121"
-RDEPEND="
-	>=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
-	>=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.9[${MULTILIB_USEDEP}]
-	unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
-	llvm? (
-		$(llvm_gen_dep "
-			sys-devel/llvm:\${LLVM_SLOT}[llvm_targets_AMDGPU(+),${MULTILIB_USEDEP}]
-			opencl? (
-				dev-util/spirv-llvm-translator:\${LLVM_SLOT}
-				sys-devel/clang:\${LLVM_SLOT}[llvm_targets_AMDGPU(+),${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? (
-		>=virtual/opencl-3
-		dev-libs/libclc[spirv(-)]
-		>=dev-util/spirv-tools-1.3.231.0
-		virtual/libelf:0=
-	)
-	vaapi? (
-		>=media-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
-	)
-	vdpau? ( >=x11-libs/libvdpau-1.5:=[${MULTILIB_USEDEP}] )
-	video_cards_radeonsi? ( virtual/libelf:0=[${MULTILIB_USEDEP}] )
-	video_cards_zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
-	selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
-	wayland? ( >=dev-libs/wayland-1.18.0[${MULTILIB_USEDEP}] )
-	${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_intel?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
-	X? (
-		>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
-		>=x11-libs/libxshmfence-1.1[${MULTILIB_USEDEP}]
-		>=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
-		>=x11-libs/libXxf86vm-1.1.3[${MULTILIB_USEDEP}]
-		>=x11-libs/libxcb-1.17:=[${MULTILIB_USEDEP}]
-		x11-libs/libXfixes[${MULTILIB_USEDEP}]
-		x11-libs/xcb-util-keysyms[${MULTILIB_USEDEP}]
-	)
-	zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
-"
-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] )
-"
-
-DEPEND="${RDEPEND}
-	video_cards_d3d12? ( >=dev-util/directx-headers-1.613.0[${MULTILIB_USEDEP}] )
-	valgrind? ( dev-debug/valgrind )
-	wayland? ( >=dev-libs/wayland-protocols-1.34 )
-	X? (
-		x11-libs/libXrandr[${MULTILIB_USEDEP}]
-		x11-base/xorg-proto
-	)
-"
-BDEPEND="
-	${PYTHON_DEPS}
-	opencl? (
-		>=virtual/rust-1.62.0
-		>=dev-util/bindgen-0.58.0
-	)
-	>=dev-build/meson-1.4.1
-	app-alternatives/yacc
-	app-alternatives/lex
-	virtual/pkgconfig
-	$(python_gen_any_dep "
-		>=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]
-		dev-python/packaging[\${PYTHON_USEDEP}]
-		dev-python/pyyaml[\${PYTHON_USEDEP}]
-	")
-	video_cards_intel? (
-		~dev-util/intel_clc-${PV}
-		dev-libs/libclc[spirv(-)]
-		$(python_gen_any_dep "dev-python/ply[\${PYTHON_USEDEP}]")
-	)
-	vulkan? (
-		dev-util/glslang
-		video_cards_nvk? (
-			>=dev-util/bindgen-0.68.1
-			>=dev-util/cbindgen-0.26.0
-			>=virtual/rust-1.74.1
-		)
-	)
-	wayland? ( dev-util/wayland-scanner )
-"
-
-QA_WX_LOAD="
-x86? (
-	usr/lib/libglapi.so.0.0.0
-	usr/lib/libOSMesa.so.8.0.0
-	usr/lib/libGLX_mesa.so.0.0.0
-)"
-
-src_unpack() {
-	if [[ ${PV} == 9999 ]]; then
-		git-r3_src_unpack
-	else
-		unpack ${MY_P}.tar.xz
-	fi
-
-	# We need this because we cannot tell meson to use DISTDIR yet
-	pushd "${DISTDIR}" >/dev/null || die
-	mkdir -p "${S}"/subprojects/packagecache || die
-	local i
-	for i in *.crate; do
-		ln -s "${PWD}/${i}" "${S}/subprojects/packagecache/${i/.crate/}.tar.gz" || die
-	done
-	popd >/dev/null || die
-}
-
-pkg_pretend() {
-	if use vulkan; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_freedreno &&
-		   ! use video_cards_intel &&
-		   ! use video_cards_lavapipe &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_nvk &&
-		   ! use video_cards_panfrost &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_v3d &&
-		   ! use video_cards_virgl; then
-			ewarn "Ignoring USE=vulkan     since VIDEO_CARDS does not contain d3d12, freedreno, intel, lavapipe, nouveau, nvk, panfrost, radeonsi, v3d, or virgl"
-		fi
-	fi
-
-	# VA
-	if use vaapi; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_r600 &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_virgl; then
-			ewarn "Ignoring USE=vaapi      since VIDEO_CARDS does not contain d3d12, nouveau, r600, radeonsi, or virgl"
-		fi
-	fi
-
-	if use vdpau; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_r600 &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_virgl; then
-			ewarn "Ignoring USE=vdpau      since VIDEO_CARDS does not contain d3d12, nouveau, r600, radeonsi, or virgl"
-		fi
-	fi
-
-	if use xa; then
-		if ! use video_cards_freedreno &&
-		   ! use video_cards_intel &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_vmware; then
-			ewarn "Ignoring USE=xa         since VIDEO_CARDS does not contain freedreno, intel, nouveau, or vmware"
-		fi
-	fi
-
-	if ! use llvm; then
-		use opencl     && ewarn "Ignoring USE=opencl     since USE does not contain llvm"
-	fi
-
-	if use osmesa && ! use llvm; then
-		ewarn "OSMesa will be slow without enabling USE=llvm"
-	fi
-}
-
-python_check_deps() {
-	python_has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]" &&
-	python_has_version -b "dev-python/packaging[${PYTHON_USEDEP}]" &&
-	python_has_version -b "dev-python/pyyaml[${PYTHON_USEDEP}]" || return 1
-	if use llvm && use vulkan && use video_cards_intel && use amd64; then
-		python_has_version -b "dev-python/ply[${PYTHON_USEDEP}]" || return 1
-	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 video_cards_intel ||
-	   use video_cards_radeonsi; then
-		if kernel_is -ge 5 11 3; then
-			CONFIG_CHECK="~KCMP"
-		elif kernel_is -ge 5 11; then
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		elif kernel_is -ge 5 10 20; then
-			CONFIG_CHECK="~KCMP"
-		else
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		fi
-		linux-info_pkg_setup
-	fi
-
-	use llvm && llvm-r1_pkg_setup
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	default
-	sed -i -e "/^PLATFORM_SYMBOLS/a '__gentoo_check_ldflags__'," \
-		bin/symbols-check.py || die # bug #830728
-}
-
-multilib_src_configure() {
-	local emesonargs=()
-
-	# bug #932591 and https://gitlab.freedesktop.org/mesa/mesa/-/issues/11140
-	tc-is-gcc && [[ $(gcc-major-version) -ge 14 ]] && filter-lto
-
-	local platforms
-	use X && platforms+="x11"
-	use wayland && platforms+=",wayland"
-	emesonargs+=(-Dplatforms=${platforms#,})
-
-	if use video_cards_freedreno ||
-	   use video_cards_intel || # crocus i915 iris
-	   use video_cards_nouveau ||
-	   use video_cards_panfrost ||
-	   use video_cards_r300 ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_vmware || # svga
-	   use video_cards_zink; then
-		emesonargs+=($(meson_use d3d9 gallium-nine))
-	else
-		emesonargs+=(-Dgallium-nine=false)
-	fi
-
-	if use video_cards_d3d12 ||
-	   use video_cards_nouveau ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_virgl; then
-		emesonargs+=($(meson_feature vaapi gallium-va))
-		use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
-	else
-		emesonargs+=(-Dgallium-va=disabled)
-	fi
-
-	if use video_cards_d3d12; then
-		emesonargs+=($(meson_feature vaapi gallium-d3d12-video))
-	fi
-
-	if use video_cards_d3d12 ||
-	   use video_cards_nouveau ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_virgl; then
-		emesonargs+=($(meson_feature vdpau gallium-vdpau))
-	else
-		emesonargs+=(-Dgallium-vdpau=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_intel ||
-	   use video_cards_nouveau ||
-	   use video_cards_vmware; then
-		emesonargs+=($(meson_feature xa gallium-xa))
-	else
-		emesonargs+=(-Dgallium-xa=disabled)
-	fi
-
-	gallium_enable !llvm softpipe
-	gallium_enable llvm llvmpipe
-	gallium_enable video_cards_d3d12 d3d12
-	gallium_enable video_cards_freedreno freedreno
-	gallium_enable video_cards_intel crocus i915 iris
-	gallium_enable video_cards_lima lima
-	gallium_enable video_cards_nouveau nouveau
-	gallium_enable video_cards_panfrost panfrost
-	gallium_enable video_cards_v3d v3d
-	gallium_enable video_cards_vc4 vc4
-	gallium_enable video_cards_virgl virgl
-	gallium_enable video_cards_vivante etnaviv
-	gallium_enable video_cards_vmware svga
-	gallium_enable video_cards_zink zink
-
-	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
-
-	if use llvm && use opencl; then
-		PKG_CONFIG_PATH="$(get_llvm_prefix)/$(get_libdir)/pkgconfig"
-		# See https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/docs/rusticl.rst
-		emesonargs+=(
-			$(meson_native_true gallium-rusticl)
-			-Drust_std=2021
-		)
-	fi
-
-	if use vulkan; then
-		vulkan_enable video_cards_d3d12 microsoft-experimental
-		vulkan_enable video_cards_freedreno freedreno
-		vulkan_enable video_cards_intel intel intel_hasvk
-		vulkan_enable video_cards_lavapipe swrast
-		vulkan_enable video_cards_panfrost panfrost
-		vulkan_enable video_cards_radeonsi amd
-		vulkan_enable video_cards_v3d broadcom
-		vulkan_enable video_cards_vc4 broadcom
-		vulkan_enable video_cards_virgl virtio
-		if use video_cards_nvk; then
-			vulkan_enable video_cards_nvk nouveau
-			if ! multilib_is_native_abi; then
-				echo -e "[binaries]\nrust = ['rustc', '--target=$(rust_abi $CBUILD)']" > "${T}/rust_fix.ini"
-				emesonargs+=(
-					--native-file "${T}"/rust_fix.ini
-				)
-			fi
-		fi
-	fi
-
-	driver_list() {
-		local drivers="$(sort -u <<< "${1// /$'\n'}")"
-		echo "${drivers//$'\n'/,}"
-	}
-
-	local vulkan_layers
-	use vulkan && vulkan_layers+="device-select"
-	use vulkan-overlay && vulkan_layers+=",overlay"
-	emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
-
-	if use opengl && use X; then
-		emesonargs+=(-Dglx=dri)
-	else
-		emesonargs+=(-Dglx=disabled)
-	fi
-
-	if [[ "${ABI}" == amd64 ]]; then
-		emesonargs+=($(meson_feature video_cards_intel intel-rt))
-	fi
-
-	use debug && EMESON_BUILDTYPE=debug
-
-	emesonargs+=(
-		$(meson_use test build-tests)
-		-Dshared-glapi=enabled
-		-Ddri3=enabled
-		-Dexpat=enabled
-		$(meson_use opengl)
-		$(meson_feature opengl gbm)
-		$(meson_feature opengl gles1)
-		$(meson_feature opengl gles2)
-		$(meson_feature opengl glvnd)
-		$(meson_feature opengl egl)
-		$(meson_feature llvm)
-		$(meson_feature lm-sensors lmsensors)
-		$(meson_use osmesa)
-		$(meson_use selinux)
-		$(meson_feature unwind libunwind)
-		$(meson_feature zstd)
-		$(meson_use cpu_flags_x86_sse2 sse2)
-		-Dintel-clc=$(usex video_cards_intel system auto)
-		-Dvalgrind=$(usex valgrind auto disabled)
-		-Dvideo-codecs=$(usex proprietary-codecs "all" "all_free")
-		-Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
-		-Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
-		-Db_ndebug=$(usex debug false true)
-	)
-	meson_src_configure
-
-	if ! multilib_is_native_abi && use video_cards_nvk; then
-		sed -i -E '{N; s/(rule rust_COMPILER_FOR_BUILD\n command = rustc) --target=[a-zA-Z0-9=:-]+ (.*) -C link-arg=-m[[:digit:]]+/\1 \2/g}' build.ninja || die
-	fi
-}
-
-multilib_src_test() {
-	meson_src_test -t 100
-}
-
-# $1 - VIDEO_CARDS flag (check skipped for "--")
-# other args - names of DRI drivers to enable
-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-24.2.0_rc4.ebuild b/media-libs/mesa/mesa-24.2.0_rc4.ebuild
deleted file mode 100644
index 8e909b9f1bf8..000000000000
--- a/media-libs/mesa/mesa-24.2.0_rc4.ebuild
+++ /dev/null
@@ -1,490 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LLVM_COMPAT=( {15..18} )
-LLVM_OPTIONAL=1
-CARGO_OPTIONAL=1
-PYTHON_COMPAT=( python3_{10..12} )
-
-inherit flag-o-matic llvm-r1 meson-multilib python-any-r1 linux-info rust-toolchain toolchain-funcs
-
-MY_P="${P/_/-}"
-
-CRATES="
-	syn@2.0.39
-	proc-macro2@1.0.70
-	quote@1.0.33
-	unicode-ident@1.0.12
-	paste@1.0.14
-"
-
-inherit cargo
-
-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"
-	inherit git-r3
-else
-	SRC_URI="
-		https://archive.mesa3d.org/${MY_P}.tar.xz
-	"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-solaris"
-fi
-
-# This should be {CARGO_CRATE_URIS//.crate/.tar.gz} to correspond to the wrap files,
-# but there are "stale" distfiles on the mirrors with the wrong names.
-# export MESON_PACKAGE_CACHE_DIR="${DISTDIR}"
-SRC_URI+="
-	${CARGO_CRATE_URIS}
-"
-
-S="${WORKDIR}/${MY_P}"
-EGIT_CHECKOUT_DIR=${S}
-
-LICENSE="MIT SGI-B-2.0"
-SLOT="0"
-
-RADEON_CARDS="r300 r600 radeon radeonsi"
-VIDEO_CARDS="${RADEON_CARDS}
-	d3d12 freedreno intel lavapipe lima nouveau nvk panfrost v3d vc4 virgl
-	vivante vmware zink"
-for card in ${VIDEO_CARDS}; do
-	IUSE_VIDEO_CARDS+=" video_cards_${card}"
-done
-
-IUSE="${IUSE_VIDEO_CARDS}
-	cpu_flags_x86_sse2 d3d9 debug +llvm
-	lm-sensors opencl +opengl osmesa +proprietary-codecs selinux
-	test unwind vaapi valgrind vdpau vulkan
-	vulkan-overlay wayland +X xa +zstd"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="
-	d3d9? (
-		|| (
-			video_cards_freedreno
-			video_cards_intel
-			video_cards_nouveau
-			video_cards_panfrost
-			video_cards_r300
-			video_cards_r600
-			video_cards_radeonsi
-			video_cards_vmware
-			video_cards_zink
-		)
-	)
-	llvm? ( ${LLVM_REQUIRED_USE} )
-	vulkan-overlay? ( vulkan )
-	video_cards_lavapipe? ( llvm vulkan )
-	video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_r300?   ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_zink? ( vulkan opengl )
-	video_cards_nvk? ( vulkan video_cards_nouveau )
-	vdpau? ( X )
-	xa? ( X )
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.121"
-RDEPEND="
-	>=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
-	>=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.9[${MULTILIB_USEDEP}]
-	unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
-	llvm? (
-		$(llvm_gen_dep "
-			sys-devel/llvm:\${LLVM_SLOT}[llvm_targets_AMDGPU(+),${MULTILIB_USEDEP}]
-			opencl? (
-				dev-util/spirv-llvm-translator:\${LLVM_SLOT}
-				sys-devel/clang:\${LLVM_SLOT}[llvm_targets_AMDGPU(+),${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? (
-		>=virtual/opencl-3
-		dev-libs/libclc[spirv(-)]
-		>=dev-util/spirv-tools-1.3.231.0
-		virtual/libelf:0=
-	)
-	vaapi? (
-		>=media-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
-	)
-	vdpau? ( >=x11-libs/libvdpau-1.5:=[${MULTILIB_USEDEP}] )
-	video_cards_radeonsi? ( virtual/libelf:0=[${MULTILIB_USEDEP}] )
-	video_cards_zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
-	selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
-	wayland? ( >=dev-libs/wayland-1.18.0[${MULTILIB_USEDEP}] )
-	${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_intel?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
-	X? (
-		>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
-		>=x11-libs/libxshmfence-1.1[${MULTILIB_USEDEP}]
-		>=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
-		>=x11-libs/libXxf86vm-1.1.3[${MULTILIB_USEDEP}]
-		>=x11-libs/libxcb-1.17:=[${MULTILIB_USEDEP}]
-		x11-libs/libXfixes[${MULTILIB_USEDEP}]
-		x11-libs/xcb-util-keysyms[${MULTILIB_USEDEP}]
-	)
-	zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
-"
-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] )
-"
-
-DEPEND="${RDEPEND}
-	video_cards_d3d12? ( >=dev-util/directx-headers-1.613.0[${MULTILIB_USEDEP}] )
-	valgrind? ( dev-debug/valgrind )
-	wayland? ( >=dev-libs/wayland-protocols-1.34 )
-	X? (
-		x11-libs/libXrandr[${MULTILIB_USEDEP}]
-		x11-base/xorg-proto
-	)
-"
-BDEPEND="
-	${PYTHON_DEPS}
-	opencl? (
-		>=virtual/rust-1.62.0
-		>=dev-util/bindgen-0.58.0
-	)
-	>=dev-build/meson-1.4.1
-	app-alternatives/yacc
-	app-alternatives/lex
-	virtual/pkgconfig
-	$(python_gen_any_dep "
-		>=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]
-		dev-python/packaging[\${PYTHON_USEDEP}]
-		dev-python/pyyaml[\${PYTHON_USEDEP}]
-	")
-	video_cards_intel? (
-		~dev-util/intel_clc-${PV}
-		dev-libs/libclc[spirv(-)]
-		$(python_gen_any_dep "dev-python/ply[\${PYTHON_USEDEP}]")
-	)
-	vulkan? (
-		dev-util/glslang
-		video_cards_nvk? (
-			>=dev-util/bindgen-0.68.1
-			>=dev-util/cbindgen-0.26.0
-			>=virtual/rust-1.74.1
-		)
-	)
-	wayland? ( dev-util/wayland-scanner )
-"
-
-QA_WX_LOAD="
-x86? (
-	usr/lib/libglapi.so.0.0.0
-	usr/lib/libOSMesa.so.8.0.0
-	usr/lib/libGLX_mesa.so.0.0.0
-)"
-
-src_unpack() {
-	if [[ ${PV} == 9999 ]]; then
-		git-r3_src_unpack
-	else
-		unpack ${MY_P}.tar.xz
-	fi
-
-	# We need this because we cannot tell meson to use DISTDIR yet
-	pushd "${DISTDIR}" >/dev/null || die
-	mkdir -p "${S}"/subprojects/packagecache || die
-	local i
-	for i in *.crate; do
-		ln -s "${PWD}/${i}" "${S}/subprojects/packagecache/${i/.crate/}.tar.gz" || die
-	done
-	popd >/dev/null || die
-}
-
-pkg_pretend() {
-	if use vulkan; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_freedreno &&
-		   ! use video_cards_intel &&
-		   ! use video_cards_lavapipe &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_nvk &&
-		   ! use video_cards_panfrost &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_v3d &&
-		   ! use video_cards_virgl; then
-			ewarn "Ignoring USE=vulkan     since VIDEO_CARDS does not contain d3d12, freedreno, intel, lavapipe, nouveau, nvk, panfrost, radeonsi, v3d, or virgl"
-		fi
-	fi
-
-	# VA
-	if use vaapi; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_r600 &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_virgl; then
-			ewarn "Ignoring USE=vaapi      since VIDEO_CARDS does not contain d3d12, nouveau, r600, radeonsi, or virgl"
-		fi
-	fi
-
-	if use vdpau; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_r600 &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_virgl; then
-			ewarn "Ignoring USE=vdpau      since VIDEO_CARDS does not contain d3d12, nouveau, r600, radeonsi, or virgl"
-		fi
-	fi
-
-	if use xa; then
-		if ! use video_cards_freedreno &&
-		   ! use video_cards_intel &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_vmware; then
-			ewarn "Ignoring USE=xa         since VIDEO_CARDS does not contain freedreno, intel, nouveau, or vmware"
-		fi
-	fi
-
-	if ! use llvm; then
-		use opencl     && ewarn "Ignoring USE=opencl     since USE does not contain llvm"
-	fi
-
-	if use osmesa && ! use llvm; then
-		ewarn "OSMesa will be slow without enabling USE=llvm"
-	fi
-}
-
-python_check_deps() {
-	python_has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]" &&
-	python_has_version -b "dev-python/packaging[${PYTHON_USEDEP}]" &&
-	python_has_version -b "dev-python/pyyaml[${PYTHON_USEDEP}]" || return 1
-	if use llvm && use vulkan && use video_cards_intel && use amd64; then
-		python_has_version -b "dev-python/ply[${PYTHON_USEDEP}]" || return 1
-	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 video_cards_intel ||
-	   use video_cards_radeonsi; then
-		if kernel_is -ge 5 11 3; then
-			CONFIG_CHECK="~KCMP"
-		elif kernel_is -ge 5 11; then
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		elif kernel_is -ge 5 10 20; then
-			CONFIG_CHECK="~KCMP"
-		else
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		fi
-		linux-info_pkg_setup
-	fi
-
-	use llvm && llvm-r1_pkg_setup
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	default
-	sed -i -e "/^PLATFORM_SYMBOLS/a '__gentoo_check_ldflags__'," \
-		bin/symbols-check.py || die # bug #830728
-}
-
-multilib_src_configure() {
-	local emesonargs=()
-
-	# bug #932591 and https://gitlab.freedesktop.org/mesa/mesa/-/issues/11140
-	tc-is-gcc && [[ $(gcc-major-version) -ge 14 ]] && filter-lto
-
-	local platforms
-	use X && platforms+="x11"
-	use wayland && platforms+=",wayland"
-	emesonargs+=(-Dplatforms=${platforms#,})
-
-	if use video_cards_freedreno ||
-	   use video_cards_intel || # crocus i915 iris
-	   use video_cards_nouveau ||
-	   use video_cards_panfrost ||
-	   use video_cards_r300 ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_vmware || # svga
-	   use video_cards_zink; then
-		emesonargs+=($(meson_use d3d9 gallium-nine))
-	else
-		emesonargs+=(-Dgallium-nine=false)
-	fi
-
-	if use video_cards_d3d12 ||
-	   use video_cards_nouveau ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_virgl; then
-		emesonargs+=($(meson_feature vaapi gallium-va))
-		use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
-	else
-		emesonargs+=(-Dgallium-va=disabled)
-	fi
-
-	if use video_cards_d3d12; then
-		emesonargs+=($(meson_feature vaapi gallium-d3d12-video))
-	fi
-
-	if use video_cards_d3d12 ||
-	   use video_cards_nouveau ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_virgl; then
-		emesonargs+=($(meson_feature vdpau gallium-vdpau))
-	else
-		emesonargs+=(-Dgallium-vdpau=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_intel ||
-	   use video_cards_nouveau ||
-	   use video_cards_vmware; then
-		emesonargs+=($(meson_feature xa gallium-xa))
-	else
-		emesonargs+=(-Dgallium-xa=disabled)
-	fi
-
-	gallium_enable !llvm softpipe
-	gallium_enable llvm llvmpipe
-	gallium_enable video_cards_d3d12 d3d12
-	gallium_enable video_cards_freedreno freedreno
-	gallium_enable video_cards_intel crocus i915 iris
-	gallium_enable video_cards_lima lima
-	gallium_enable video_cards_nouveau nouveau
-	gallium_enable video_cards_panfrost panfrost
-	gallium_enable video_cards_v3d v3d
-	gallium_enable video_cards_vc4 vc4
-	gallium_enable video_cards_virgl virgl
-	gallium_enable video_cards_vivante etnaviv
-	gallium_enable video_cards_vmware svga
-	gallium_enable video_cards_zink zink
-
-	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
-
-	if use llvm && use opencl; then
-		PKG_CONFIG_PATH="$(get_llvm_prefix)/$(get_libdir)/pkgconfig"
-		# See https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/docs/rusticl.rst
-		emesonargs+=(
-			$(meson_native_true gallium-rusticl)
-			-Drust_std=2021
-		)
-	fi
-
-	if use vulkan; then
-		vulkan_enable video_cards_d3d12 microsoft-experimental
-		vulkan_enable video_cards_freedreno freedreno
-		vulkan_enable video_cards_intel intel intel_hasvk
-		vulkan_enable video_cards_lavapipe swrast
-		vulkan_enable video_cards_panfrost panfrost
-		vulkan_enable video_cards_radeonsi amd
-		vulkan_enable video_cards_v3d broadcom
-		vulkan_enable video_cards_vc4 broadcom
-		vulkan_enable video_cards_virgl virtio
-		if use video_cards_nvk; then
-			vulkan_enable video_cards_nvk nouveau
-			if ! multilib_is_native_abi; then
-				echo -e "[binaries]\nrust = ['rustc', '--target=$(rust_abi $CBUILD)']" > "${T}/rust_fix.ini"
-				emesonargs+=(
-					--native-file "${T}"/rust_fix.ini
-				)
-			fi
-		fi
-	fi
-
-	driver_list() {
-		local drivers="$(sort -u <<< "${1// /$'\n'}")"
-		echo "${drivers//$'\n'/,}"
-	}
-
-	local vulkan_layers
-	use vulkan && vulkan_layers+="device-select"
-	use vulkan-overlay && vulkan_layers+=",overlay"
-	emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
-
-	if use opengl && use X; then
-		emesonargs+=(-Dglx=dri)
-	else
-		emesonargs+=(-Dglx=disabled)
-	fi
-
-	if [[ "${ABI}" == amd64 ]]; then
-		emesonargs+=($(meson_feature video_cards_intel intel-rt))
-	fi
-
-	use debug && EMESON_BUILDTYPE=debug
-
-	emesonargs+=(
-		$(meson_use test build-tests)
-		-Dshared-glapi=enabled
-		-Ddri3=enabled
-		-Dexpat=enabled
-		$(meson_use opengl)
-		$(meson_feature opengl gbm)
-		$(meson_feature opengl gles1)
-		$(meson_feature opengl gles2)
-		$(meson_feature opengl glvnd)
-		$(meson_feature opengl egl)
-		$(meson_feature llvm)
-		$(meson_feature lm-sensors lmsensors)
-		$(meson_use osmesa)
-		$(meson_use selinux)
-		$(meson_feature unwind libunwind)
-		$(meson_feature zstd)
-		$(meson_use cpu_flags_x86_sse2 sse2)
-		-Dintel-clc=$(usex video_cards_intel system auto)
-		-Dvalgrind=$(usex valgrind auto disabled)
-		-Dvideo-codecs=$(usex proprietary-codecs "all" "all_free")
-		-Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
-		-Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
-		-Db_ndebug=$(usex debug false true)
-	)
-	meson_src_configure
-
-	if ! multilib_is_native_abi && use video_cards_nvk; then
-		sed -i -E '{N; s/(rule rust_COMPILER_FOR_BUILD\n command = rustc) --target=[a-zA-Z0-9=:-]+ (.*) -C link-arg=-m[[:digit:]]+/\1 \2/g}' build.ninja || die
-	fi
-}
-
-multilib_src_test() {
-	meson_src_test -t 100
-}
-
-# $1 - VIDEO_CARDS flag (check skipped for "--")
-# other args - names of DRI drivers to enable
-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-24.2.1.ebuild b/media-libs/mesa/mesa-24.2.1.ebuild
deleted file mode 100644
index f6e781d20e57..000000000000
--- a/media-libs/mesa/mesa-24.2.1.ebuild
+++ /dev/null
@@ -1,490 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LLVM_COMPAT=( {15..18} )
-LLVM_OPTIONAL=1
-CARGO_OPTIONAL=1
-PYTHON_COMPAT=( python3_{10..13} )
-
-inherit flag-o-matic llvm-r1 meson-multilib python-any-r1 linux-info rust-toolchain toolchain-funcs
-
-MY_P="${P/_/-}"
-
-CRATES="
-	syn@2.0.68
-	proc-macro2@1.0.86
-	quote@1.0.33
-	unicode-ident@1.0.12
-	paste@1.0.14
-"
-
-inherit cargo
-
-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"
-	inherit git-r3
-else
-	SRC_URI="
-		https://archive.mesa3d.org/${MY_P}.tar.xz
-	"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-solaris"
-fi
-
-# This should be {CARGO_CRATE_URIS//.crate/.tar.gz} to correspond to the wrap files,
-# but there are "stale" distfiles on the mirrors with the wrong names.
-# export MESON_PACKAGE_CACHE_DIR="${DISTDIR}"
-SRC_URI+="
-	${CARGO_CRATE_URIS}
-"
-
-S="${WORKDIR}/${MY_P}"
-EGIT_CHECKOUT_DIR=${S}
-
-LICENSE="MIT SGI-B-2.0"
-SLOT="0"
-
-RADEON_CARDS="r300 r600 radeon radeonsi"
-VIDEO_CARDS="${RADEON_CARDS}
-	d3d12 freedreno intel lavapipe lima nouveau nvk panfrost v3d vc4 virgl
-	vivante vmware zink"
-for card in ${VIDEO_CARDS}; do
-	IUSE_VIDEO_CARDS+=" video_cards_${card}"
-done
-
-IUSE="${IUSE_VIDEO_CARDS}
-	cpu_flags_x86_sse2 d3d9 debug +llvm
-	lm-sensors opencl +opengl osmesa +proprietary-codecs selinux
-	test unwind vaapi valgrind vdpau vulkan
-	vulkan-overlay wayland +X xa +zstd"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="
-	d3d9? (
-		|| (
-			video_cards_freedreno
-			video_cards_intel
-			video_cards_nouveau
-			video_cards_panfrost
-			video_cards_r300
-			video_cards_r600
-			video_cards_radeonsi
-			video_cards_vmware
-			video_cards_zink
-		)
-	)
-	llvm? ( ${LLVM_REQUIRED_USE} )
-	vulkan-overlay? ( vulkan )
-	video_cards_lavapipe? ( llvm vulkan )
-	video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_r300?   ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_zink? ( vulkan opengl )
-	video_cards_nvk? ( vulkan video_cards_nouveau )
-	vdpau? ( X )
-	xa? ( X )
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.121"
-RDEPEND="
-	>=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
-	>=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.9[${MULTILIB_USEDEP}]
-	unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
-	llvm? (
-		$(llvm_gen_dep "
-			sys-devel/llvm:\${LLVM_SLOT}[llvm_targets_AMDGPU(+),${MULTILIB_USEDEP}]
-			opencl? (
-				dev-util/spirv-llvm-translator:\${LLVM_SLOT}
-				sys-devel/clang:\${LLVM_SLOT}[llvm_targets_AMDGPU(+),${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? (
-		>=virtual/opencl-3
-		dev-libs/libclc[spirv(-)]
-		>=dev-util/spirv-tools-1.3.231.0
-		virtual/libelf:0=
-	)
-	vaapi? (
-		>=media-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
-	)
-	vdpau? ( >=x11-libs/libvdpau-1.5:=[${MULTILIB_USEDEP}] )
-	video_cards_radeonsi? ( virtual/libelf:0=[${MULTILIB_USEDEP}] )
-	video_cards_zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
-	selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
-	wayland? ( >=dev-libs/wayland-1.18.0[${MULTILIB_USEDEP}] )
-	${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_intel?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
-	X? (
-		>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
-		>=x11-libs/libxshmfence-1.1[${MULTILIB_USEDEP}]
-		>=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
-		>=x11-libs/libXxf86vm-1.1.3[${MULTILIB_USEDEP}]
-		>=x11-libs/libxcb-1.17:=[${MULTILIB_USEDEP}]
-		x11-libs/libXfixes[${MULTILIB_USEDEP}]
-		x11-libs/xcb-util-keysyms[${MULTILIB_USEDEP}]
-	)
-	zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
-"
-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] )
-"
-
-DEPEND="${RDEPEND}
-	video_cards_d3d12? ( >=dev-util/directx-headers-1.613.0[${MULTILIB_USEDEP}] )
-	valgrind? ( dev-debug/valgrind )
-	wayland? ( >=dev-libs/wayland-protocols-1.34 )
-	X? (
-		x11-libs/libXrandr[${MULTILIB_USEDEP}]
-		x11-base/xorg-proto
-	)
-"
-BDEPEND="
-	${PYTHON_DEPS}
-	opencl? (
-		>=virtual/rust-1.62.0
-		>=dev-util/bindgen-0.58.0
-	)
-	>=dev-build/meson-1.4.1
-	app-alternatives/yacc
-	app-alternatives/lex
-	virtual/pkgconfig
-	$(python_gen_any_dep "
-		>=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]
-		dev-python/packaging[\${PYTHON_USEDEP}]
-		dev-python/pyyaml[\${PYTHON_USEDEP}]
-	")
-	video_cards_intel? (
-		~dev-util/intel_clc-${PV}
-		dev-libs/libclc[spirv(-)]
-		$(python_gen_any_dep "dev-python/ply[\${PYTHON_USEDEP}]")
-	)
-	vulkan? (
-		dev-util/glslang
-		video_cards_nvk? (
-			>=dev-util/bindgen-0.68.1
-			>=dev-util/cbindgen-0.26.0
-			>=virtual/rust-1.74.1
-		)
-	)
-	wayland? ( dev-util/wayland-scanner )
-"
-
-QA_WX_LOAD="
-x86? (
-	usr/lib/libglapi.so.0.0.0
-	usr/lib/libOSMesa.so.8.0.0
-	usr/lib/libGLX_mesa.so.0.0.0
-)"
-
-src_unpack() {
-	if [[ ${PV} == 9999 ]]; then
-		git-r3_src_unpack
-	else
-		unpack ${MY_P}.tar.xz
-	fi
-
-	# We need this because we cannot tell meson to use DISTDIR yet
-	pushd "${DISTDIR}" >/dev/null || die
-	mkdir -p "${S}"/subprojects/packagecache || die
-	local i
-	for i in *.crate; do
-		ln -s "${PWD}/${i}" "${S}/subprojects/packagecache/${i/.crate/}.tar.gz" || die
-	done
-	popd >/dev/null || die
-}
-
-pkg_pretend() {
-	if use vulkan; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_freedreno &&
-		   ! use video_cards_intel &&
-		   ! use video_cards_lavapipe &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_nvk &&
-		   ! use video_cards_panfrost &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_v3d &&
-		   ! use video_cards_virgl; then
-			ewarn "Ignoring USE=vulkan     since VIDEO_CARDS does not contain d3d12, freedreno, intel, lavapipe, nouveau, nvk, panfrost, radeonsi, v3d, or virgl"
-		fi
-	fi
-
-	# VA
-	if use vaapi; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_r600 &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_virgl; then
-			ewarn "Ignoring USE=vaapi      since VIDEO_CARDS does not contain d3d12, nouveau, r600, radeonsi, or virgl"
-		fi
-	fi
-
-	if use vdpau; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_r600 &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_virgl; then
-			ewarn "Ignoring USE=vdpau      since VIDEO_CARDS does not contain d3d12, nouveau, r600, radeonsi, or virgl"
-		fi
-	fi
-
-	if use xa; then
-		if ! use video_cards_freedreno &&
-		   ! use video_cards_intel &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_vmware; then
-			ewarn "Ignoring USE=xa         since VIDEO_CARDS does not contain freedreno, intel, nouveau, or vmware"
-		fi
-	fi
-
-	if ! use llvm; then
-		use opencl     && ewarn "Ignoring USE=opencl     since USE does not contain llvm"
-	fi
-
-	if use osmesa && ! use llvm; then
-		ewarn "OSMesa will be slow without enabling USE=llvm"
-	fi
-}
-
-python_check_deps() {
-	python_has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]" &&
-	python_has_version -b "dev-python/packaging[${PYTHON_USEDEP}]" &&
-	python_has_version -b "dev-python/pyyaml[${PYTHON_USEDEP}]" || return 1
-	if use llvm && use vulkan && use video_cards_intel && use amd64; then
-		python_has_version -b "dev-python/ply[${PYTHON_USEDEP}]" || return 1
-	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 video_cards_intel ||
-	   use video_cards_radeonsi; then
-		if kernel_is -ge 5 11 3; then
-			CONFIG_CHECK="~KCMP"
-		elif kernel_is -ge 5 11; then
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		elif kernel_is -ge 5 10 20; then
-			CONFIG_CHECK="~KCMP"
-		else
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		fi
-		linux-info_pkg_setup
-	fi
-
-	use llvm && llvm-r1_pkg_setup
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	default
-	sed -i -e "/^PLATFORM_SYMBOLS/a '__gentoo_check_ldflags__'," \
-		bin/symbols-check.py || die # bug #830728
-}
-
-multilib_src_configure() {
-	local emesonargs=()
-
-	# bug #932591 and https://gitlab.freedesktop.org/mesa/mesa/-/issues/11140
-	tc-is-gcc && [[ $(gcc-major-version) -ge 14 ]] && filter-lto
-
-	local platforms
-	use X && platforms+="x11"
-	use wayland && platforms+=",wayland"
-	emesonargs+=(-Dplatforms=${platforms#,})
-
-	if use video_cards_freedreno ||
-	   use video_cards_intel || # crocus i915 iris
-	   use video_cards_nouveau ||
-	   use video_cards_panfrost ||
-	   use video_cards_r300 ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_vmware || # svga
-	   use video_cards_zink; then
-		emesonargs+=($(meson_use d3d9 gallium-nine))
-	else
-		emesonargs+=(-Dgallium-nine=false)
-	fi
-
-	if use video_cards_d3d12 ||
-	   use video_cards_nouveau ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_virgl; then
-		emesonargs+=($(meson_feature vaapi gallium-va))
-		use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
-	else
-		emesonargs+=(-Dgallium-va=disabled)
-	fi
-
-	if use video_cards_d3d12; then
-		emesonargs+=($(meson_feature vaapi gallium-d3d12-video))
-	fi
-
-	if use video_cards_d3d12 ||
-	   use video_cards_nouveau ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_virgl; then
-		emesonargs+=($(meson_feature vdpau gallium-vdpau))
-	else
-		emesonargs+=(-Dgallium-vdpau=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_intel ||
-	   use video_cards_nouveau ||
-	   use video_cards_vmware; then
-		emesonargs+=($(meson_feature xa gallium-xa))
-	else
-		emesonargs+=(-Dgallium-xa=disabled)
-	fi
-
-	gallium_enable !llvm softpipe
-	gallium_enable llvm llvmpipe
-	gallium_enable video_cards_d3d12 d3d12
-	gallium_enable video_cards_freedreno freedreno
-	gallium_enable video_cards_intel crocus i915 iris
-	gallium_enable video_cards_lima lima
-	gallium_enable video_cards_nouveau nouveau
-	gallium_enable video_cards_panfrost panfrost
-	gallium_enable video_cards_v3d v3d
-	gallium_enable video_cards_vc4 vc4
-	gallium_enable video_cards_virgl virgl
-	gallium_enable video_cards_vivante etnaviv
-	gallium_enable video_cards_vmware svga
-	gallium_enable video_cards_zink zink
-
-	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
-
-	if use llvm && use opencl; then
-		PKG_CONFIG_PATH="$(get_llvm_prefix)/$(get_libdir)/pkgconfig"
-		# See https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/docs/rusticl.rst
-		emesonargs+=(
-			$(meson_native_true gallium-rusticl)
-			-Drust_std=2021
-		)
-	fi
-
-	if use vulkan; then
-		vulkan_enable video_cards_d3d12 microsoft-experimental
-		vulkan_enable video_cards_freedreno freedreno
-		vulkan_enable video_cards_intel intel intel_hasvk
-		vulkan_enable video_cards_lavapipe swrast
-		vulkan_enable video_cards_panfrost panfrost
-		vulkan_enable video_cards_radeonsi amd
-		vulkan_enable video_cards_v3d broadcom
-		vulkan_enable video_cards_vc4 broadcom
-		vulkan_enable video_cards_virgl virtio
-		if use video_cards_nvk; then
-			vulkan_enable video_cards_nvk nouveau
-			if ! multilib_is_native_abi; then
-				echo -e "[binaries]\nrust = ['rustc', '--target=$(rust_abi $CBUILD)']" > "${T}/rust_fix.ini"
-				emesonargs+=(
-					--native-file "${T}"/rust_fix.ini
-				)
-			fi
-		fi
-	fi
-
-	driver_list() {
-		local drivers="$(sort -u <<< "${1// /$'\n'}")"
-		echo "${drivers//$'\n'/,}"
-	}
-
-	local vulkan_layers
-	use vulkan && vulkan_layers+="device-select"
-	use vulkan-overlay && vulkan_layers+=",overlay"
-	emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
-
-	if use opengl && use X; then
-		emesonargs+=(-Dglx=dri)
-	else
-		emesonargs+=(-Dglx=disabled)
-	fi
-
-	if [[ "${ABI}" == amd64 ]]; then
-		emesonargs+=($(meson_feature video_cards_intel intel-rt))
-	fi
-
-	use debug && EMESON_BUILDTYPE=debug
-
-	emesonargs+=(
-		$(meson_use test build-tests)
-		-Dshared-glapi=enabled
-		-Ddri3=enabled
-		-Dexpat=enabled
-		$(meson_use opengl)
-		$(meson_feature opengl gbm)
-		$(meson_feature opengl gles1)
-		$(meson_feature opengl gles2)
-		$(meson_feature opengl glvnd)
-		$(meson_feature opengl egl)
-		$(meson_feature llvm)
-		$(meson_feature lm-sensors lmsensors)
-		$(meson_use osmesa)
-		$(meson_use selinux)
-		$(meson_feature unwind libunwind)
-		$(meson_feature zstd)
-		$(meson_use cpu_flags_x86_sse2 sse2)
-		-Dintel-clc=$(usex video_cards_intel system auto)
-		-Dvalgrind=$(usex valgrind auto disabled)
-		-Dvideo-codecs=$(usex proprietary-codecs "all" "all_free")
-		-Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
-		-Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
-		-Db_ndebug=$(usex debug false true)
-	)
-	meson_src_configure
-
-	if ! multilib_is_native_abi && use video_cards_nvk; then
-		sed -i -E '{N; s/(rule rust_COMPILER_FOR_BUILD\n command = rustc) --target=[a-zA-Z0-9=:-]+ (.*) -C link-arg=-m[[:digit:]]+/\1 \2/g}' build.ninja || die
-	fi
-}
-
-multilib_src_test() {
-	meson_src_test -t 100
-}
-
-# $1 - VIDEO_CARDS flag (check skipped for "--")
-# other args - names of DRI drivers to enable
-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-24.2.2.ebuild b/media-libs/mesa/mesa-24.2.2.ebuild
deleted file mode 100644
index f6e781d20e57..000000000000
--- a/media-libs/mesa/mesa-24.2.2.ebuild
+++ /dev/null
@@ -1,490 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LLVM_COMPAT=( {15..18} )
-LLVM_OPTIONAL=1
-CARGO_OPTIONAL=1
-PYTHON_COMPAT=( python3_{10..13} )
-
-inherit flag-o-matic llvm-r1 meson-multilib python-any-r1 linux-info rust-toolchain toolchain-funcs
-
-MY_P="${P/_/-}"
-
-CRATES="
-	syn@2.0.68
-	proc-macro2@1.0.86
-	quote@1.0.33
-	unicode-ident@1.0.12
-	paste@1.0.14
-"
-
-inherit cargo
-
-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"
-	inherit git-r3
-else
-	SRC_URI="
-		https://archive.mesa3d.org/${MY_P}.tar.xz
-	"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-solaris"
-fi
-
-# This should be {CARGO_CRATE_URIS//.crate/.tar.gz} to correspond to the wrap files,
-# but there are "stale" distfiles on the mirrors with the wrong names.
-# export MESON_PACKAGE_CACHE_DIR="${DISTDIR}"
-SRC_URI+="
-	${CARGO_CRATE_URIS}
-"
-
-S="${WORKDIR}/${MY_P}"
-EGIT_CHECKOUT_DIR=${S}
-
-LICENSE="MIT SGI-B-2.0"
-SLOT="0"
-
-RADEON_CARDS="r300 r600 radeon radeonsi"
-VIDEO_CARDS="${RADEON_CARDS}
-	d3d12 freedreno intel lavapipe lima nouveau nvk panfrost v3d vc4 virgl
-	vivante vmware zink"
-for card in ${VIDEO_CARDS}; do
-	IUSE_VIDEO_CARDS+=" video_cards_${card}"
-done
-
-IUSE="${IUSE_VIDEO_CARDS}
-	cpu_flags_x86_sse2 d3d9 debug +llvm
-	lm-sensors opencl +opengl osmesa +proprietary-codecs selinux
-	test unwind vaapi valgrind vdpau vulkan
-	vulkan-overlay wayland +X xa +zstd"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="
-	d3d9? (
-		|| (
-			video_cards_freedreno
-			video_cards_intel
-			video_cards_nouveau
-			video_cards_panfrost
-			video_cards_r300
-			video_cards_r600
-			video_cards_radeonsi
-			video_cards_vmware
-			video_cards_zink
-		)
-	)
-	llvm? ( ${LLVM_REQUIRED_USE} )
-	vulkan-overlay? ( vulkan )
-	video_cards_lavapipe? ( llvm vulkan )
-	video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_r300?   ( x86? ( llvm ) amd64? ( llvm ) )
-	video_cards_zink? ( vulkan opengl )
-	video_cards_nvk? ( vulkan video_cards_nouveau )
-	vdpau? ( X )
-	xa? ( X )
-"
-
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.121"
-RDEPEND="
-	>=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
-	>=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
-	>=sys-libs/zlib-1.2.9[${MULTILIB_USEDEP}]
-	unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
-	llvm? (
-		$(llvm_gen_dep "
-			sys-devel/llvm:\${LLVM_SLOT}[llvm_targets_AMDGPU(+),${MULTILIB_USEDEP}]
-			opencl? (
-				dev-util/spirv-llvm-translator:\${LLVM_SLOT}
-				sys-devel/clang:\${LLVM_SLOT}[llvm_targets_AMDGPU(+),${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? (
-		>=virtual/opencl-3
-		dev-libs/libclc[spirv(-)]
-		>=dev-util/spirv-tools-1.3.231.0
-		virtual/libelf:0=
-	)
-	vaapi? (
-		>=media-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
-	)
-	vdpau? ( >=x11-libs/libvdpau-1.5:=[${MULTILIB_USEDEP}] )
-	video_cards_radeonsi? ( virtual/libelf:0=[${MULTILIB_USEDEP}] )
-	video_cards_zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
-	selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
-	wayland? ( >=dev-libs/wayland-1.18.0[${MULTILIB_USEDEP}] )
-	${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_intel?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
-	X? (
-		>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
-		>=x11-libs/libxshmfence-1.1[${MULTILIB_USEDEP}]
-		>=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
-		>=x11-libs/libXxf86vm-1.1.3[${MULTILIB_USEDEP}]
-		>=x11-libs/libxcb-1.17:=[${MULTILIB_USEDEP}]
-		x11-libs/libXfixes[${MULTILIB_USEDEP}]
-		x11-libs/xcb-util-keysyms[${MULTILIB_USEDEP}]
-	)
-	zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
-"
-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] )
-"
-
-DEPEND="${RDEPEND}
-	video_cards_d3d12? ( >=dev-util/directx-headers-1.613.0[${MULTILIB_USEDEP}] )
-	valgrind? ( dev-debug/valgrind )
-	wayland? ( >=dev-libs/wayland-protocols-1.34 )
-	X? (
-		x11-libs/libXrandr[${MULTILIB_USEDEP}]
-		x11-base/xorg-proto
-	)
-"
-BDEPEND="
-	${PYTHON_DEPS}
-	opencl? (
-		>=virtual/rust-1.62.0
-		>=dev-util/bindgen-0.58.0
-	)
-	>=dev-build/meson-1.4.1
-	app-alternatives/yacc
-	app-alternatives/lex
-	virtual/pkgconfig
-	$(python_gen_any_dep "
-		>=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]
-		dev-python/packaging[\${PYTHON_USEDEP}]
-		dev-python/pyyaml[\${PYTHON_USEDEP}]
-	")
-	video_cards_intel? (
-		~dev-util/intel_clc-${PV}
-		dev-libs/libclc[spirv(-)]
-		$(python_gen_any_dep "dev-python/ply[\${PYTHON_USEDEP}]")
-	)
-	vulkan? (
-		dev-util/glslang
-		video_cards_nvk? (
-			>=dev-util/bindgen-0.68.1
-			>=dev-util/cbindgen-0.26.0
-			>=virtual/rust-1.74.1
-		)
-	)
-	wayland? ( dev-util/wayland-scanner )
-"
-
-QA_WX_LOAD="
-x86? (
-	usr/lib/libglapi.so.0.0.0
-	usr/lib/libOSMesa.so.8.0.0
-	usr/lib/libGLX_mesa.so.0.0.0
-)"
-
-src_unpack() {
-	if [[ ${PV} == 9999 ]]; then
-		git-r3_src_unpack
-	else
-		unpack ${MY_P}.tar.xz
-	fi
-
-	# We need this because we cannot tell meson to use DISTDIR yet
-	pushd "${DISTDIR}" >/dev/null || die
-	mkdir -p "${S}"/subprojects/packagecache || die
-	local i
-	for i in *.crate; do
-		ln -s "${PWD}/${i}" "${S}/subprojects/packagecache/${i/.crate/}.tar.gz" || die
-	done
-	popd >/dev/null || die
-}
-
-pkg_pretend() {
-	if use vulkan; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_freedreno &&
-		   ! use video_cards_intel &&
-		   ! use video_cards_lavapipe &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_nvk &&
-		   ! use video_cards_panfrost &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_v3d &&
-		   ! use video_cards_virgl; then
-			ewarn "Ignoring USE=vulkan     since VIDEO_CARDS does not contain d3d12, freedreno, intel, lavapipe, nouveau, nvk, panfrost, radeonsi, v3d, or virgl"
-		fi
-	fi
-
-	# VA
-	if use vaapi; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_r600 &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_virgl; then
-			ewarn "Ignoring USE=vaapi      since VIDEO_CARDS does not contain d3d12, nouveau, r600, radeonsi, or virgl"
-		fi
-	fi
-
-	if use vdpau; then
-		if ! use video_cards_d3d12 &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_r600 &&
-		   ! use video_cards_radeonsi &&
-		   ! use video_cards_virgl; then
-			ewarn "Ignoring USE=vdpau      since VIDEO_CARDS does not contain d3d12, nouveau, r600, radeonsi, or virgl"
-		fi
-	fi
-
-	if use xa; then
-		if ! use video_cards_freedreno &&
-		   ! use video_cards_intel &&
-		   ! use video_cards_nouveau &&
-		   ! use video_cards_vmware; then
-			ewarn "Ignoring USE=xa         since VIDEO_CARDS does not contain freedreno, intel, nouveau, or vmware"
-		fi
-	fi
-
-	if ! use llvm; then
-		use opencl     && ewarn "Ignoring USE=opencl     since USE does not contain llvm"
-	fi
-
-	if use osmesa && ! use llvm; then
-		ewarn "OSMesa will be slow without enabling USE=llvm"
-	fi
-}
-
-python_check_deps() {
-	python_has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]" &&
-	python_has_version -b "dev-python/packaging[${PYTHON_USEDEP}]" &&
-	python_has_version -b "dev-python/pyyaml[${PYTHON_USEDEP}]" || return 1
-	if use llvm && use vulkan && use video_cards_intel && use amd64; then
-		python_has_version -b "dev-python/ply[${PYTHON_USEDEP}]" || return 1
-	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 video_cards_intel ||
-	   use video_cards_radeonsi; then
-		if kernel_is -ge 5 11 3; then
-			CONFIG_CHECK="~KCMP"
-		elif kernel_is -ge 5 11; then
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		elif kernel_is -ge 5 10 20; then
-			CONFIG_CHECK="~KCMP"
-		else
-			CONFIG_CHECK="~CHECKPOINT_RESTORE"
-		fi
-		linux-info_pkg_setup
-	fi
-
-	use llvm && llvm-r1_pkg_setup
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	default
-	sed -i -e "/^PLATFORM_SYMBOLS/a '__gentoo_check_ldflags__'," \
-		bin/symbols-check.py || die # bug #830728
-}
-
-multilib_src_configure() {
-	local emesonargs=()
-
-	# bug #932591 and https://gitlab.freedesktop.org/mesa/mesa/-/issues/11140
-	tc-is-gcc && [[ $(gcc-major-version) -ge 14 ]] && filter-lto
-
-	local platforms
-	use X && platforms+="x11"
-	use wayland && platforms+=",wayland"
-	emesonargs+=(-Dplatforms=${platforms#,})
-
-	if use video_cards_freedreno ||
-	   use video_cards_intel || # crocus i915 iris
-	   use video_cards_nouveau ||
-	   use video_cards_panfrost ||
-	   use video_cards_r300 ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_vmware || # svga
-	   use video_cards_zink; then
-		emesonargs+=($(meson_use d3d9 gallium-nine))
-	else
-		emesonargs+=(-Dgallium-nine=false)
-	fi
-
-	if use video_cards_d3d12 ||
-	   use video_cards_nouveau ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_virgl; then
-		emesonargs+=($(meson_feature vaapi gallium-va))
-		use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
-	else
-		emesonargs+=(-Dgallium-va=disabled)
-	fi
-
-	if use video_cards_d3d12; then
-		emesonargs+=($(meson_feature vaapi gallium-d3d12-video))
-	fi
-
-	if use video_cards_d3d12 ||
-	   use video_cards_nouveau ||
-	   use video_cards_r600 ||
-	   use video_cards_radeonsi ||
-	   use video_cards_virgl; then
-		emesonargs+=($(meson_feature vdpau gallium-vdpau))
-	else
-		emesonargs+=(-Dgallium-vdpau=disabled)
-	fi
-
-	if use video_cards_freedreno ||
-	   use video_cards_intel ||
-	   use video_cards_nouveau ||
-	   use video_cards_vmware; then
-		emesonargs+=($(meson_feature xa gallium-xa))
-	else
-		emesonargs+=(-Dgallium-xa=disabled)
-	fi
-
-	gallium_enable !llvm softpipe
-	gallium_enable llvm llvmpipe
-	gallium_enable video_cards_d3d12 d3d12
-	gallium_enable video_cards_freedreno freedreno
-	gallium_enable video_cards_intel crocus i915 iris
-	gallium_enable video_cards_lima lima
-	gallium_enable video_cards_nouveau nouveau
-	gallium_enable video_cards_panfrost panfrost
-	gallium_enable video_cards_v3d v3d
-	gallium_enable video_cards_vc4 vc4
-	gallium_enable video_cards_virgl virgl
-	gallium_enable video_cards_vivante etnaviv
-	gallium_enable video_cards_vmware svga
-	gallium_enable video_cards_zink zink
-
-	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
-
-	if use llvm && use opencl; then
-		PKG_CONFIG_PATH="$(get_llvm_prefix)/$(get_libdir)/pkgconfig"
-		# See https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/docs/rusticl.rst
-		emesonargs+=(
-			$(meson_native_true gallium-rusticl)
-			-Drust_std=2021
-		)
-	fi
-
-	if use vulkan; then
-		vulkan_enable video_cards_d3d12 microsoft-experimental
-		vulkan_enable video_cards_freedreno freedreno
-		vulkan_enable video_cards_intel intel intel_hasvk
-		vulkan_enable video_cards_lavapipe swrast
-		vulkan_enable video_cards_panfrost panfrost
-		vulkan_enable video_cards_radeonsi amd
-		vulkan_enable video_cards_v3d broadcom
-		vulkan_enable video_cards_vc4 broadcom
-		vulkan_enable video_cards_virgl virtio
-		if use video_cards_nvk; then
-			vulkan_enable video_cards_nvk nouveau
-			if ! multilib_is_native_abi; then
-				echo -e "[binaries]\nrust = ['rustc', '--target=$(rust_abi $CBUILD)']" > "${T}/rust_fix.ini"
-				emesonargs+=(
-					--native-file "${T}"/rust_fix.ini
-				)
-			fi
-		fi
-	fi
-
-	driver_list() {
-		local drivers="$(sort -u <<< "${1// /$'\n'}")"
-		echo "${drivers//$'\n'/,}"
-	}
-
-	local vulkan_layers
-	use vulkan && vulkan_layers+="device-select"
-	use vulkan-overlay && vulkan_layers+=",overlay"
-	emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
-
-	if use opengl && use X; then
-		emesonargs+=(-Dglx=dri)
-	else
-		emesonargs+=(-Dglx=disabled)
-	fi
-
-	if [[ "${ABI}" == amd64 ]]; then
-		emesonargs+=($(meson_feature video_cards_intel intel-rt))
-	fi
-
-	use debug && EMESON_BUILDTYPE=debug
-
-	emesonargs+=(
-		$(meson_use test build-tests)
-		-Dshared-glapi=enabled
-		-Ddri3=enabled
-		-Dexpat=enabled
-		$(meson_use opengl)
-		$(meson_feature opengl gbm)
-		$(meson_feature opengl gles1)
-		$(meson_feature opengl gles2)
-		$(meson_feature opengl glvnd)
-		$(meson_feature opengl egl)
-		$(meson_feature llvm)
-		$(meson_feature lm-sensors lmsensors)
-		$(meson_use osmesa)
-		$(meson_use selinux)
-		$(meson_feature unwind libunwind)
-		$(meson_feature zstd)
-		$(meson_use cpu_flags_x86_sse2 sse2)
-		-Dintel-clc=$(usex video_cards_intel system auto)
-		-Dvalgrind=$(usex valgrind auto disabled)
-		-Dvideo-codecs=$(usex proprietary-codecs "all" "all_free")
-		-Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
-		-Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
-		-Db_ndebug=$(usex debug false true)
-	)
-	meson_src_configure
-
-	if ! multilib_is_native_abi && use video_cards_nvk; then
-		sed -i -E '{N; s/(rule rust_COMPILER_FOR_BUILD\n command = rustc) --target=[a-zA-Z0-9=:-]+ (.*) -C link-arg=-m[[:digit:]]+/\1 \2/g}' build.ninja || die
-	fi
-}
-
-multilib_src_test() {
-	meson_src_test -t 100
-}
-
-# $1 - VIDEO_CARDS flag (check skipped for "--")
-# other args - names of DRI drivers to enable
-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 459ad451374c..7751dc5a1a80 100644
--- a/media-libs/mesa/metadata.xml
+++ b/media-libs/mesa/metadata.xml
@@ -7,7 +7,6 @@
   </maintainer>
   <use>
     <flag name="d3d9">Enable Direct 3D9 API through Nine state tracker. Can be used together with patched wine.</flag>
-    <flag name="gles1">Enable GLESv1 support.</flag>
     <flag name="llvm">Enable LLVM backend for Gallium3D.</flag>
     <flag name="lm-sensors">Enable Gallium HUD lm-sensors support.</flag>
     <flag name="opencl">Enable the Rusticl Gallium OpenCL state tracker.</flag>
@@ -17,7 +16,6 @@
     <flag name="vulkan-overlay">Build vulkan-overlay-layer which displays Frames Per Second and other statistics</flag>
     <flag name="wayland">Enable support for <pkg>dev-libs/wayland</pkg></flag>
     <flag name="xa">Enable the XA (X Acceleration) API for Gallium3D.</flag>
-    <flag name="zink">Enable the Zink OpenGL-over-Vulkan Gallium driver</flag>
   </use>
   <upstream>
     <remote-id type="cpe">cpe:/a:mesa3d:mesa</remote-id>


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2024-09-18 17:45 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-11 19:04 [gentoo-commits] repo/gentoo:master commit in: media-libs/mesa/files/, media-libs/mesa/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2024-09-18 17:45 Matt Turner
2024-01-11  4:41 Matt Turner
2023-08-16 22:07 Matt Turner
2023-04-27  6:20 Sam James
2021-11-18  7:48 Matt Turner
2021-09-22 21:22 Matt Turner
2020-04-13 16:32 Matt Turner
2018-11-29  5:17 Matt Turner
2017-03-20 19:01 Matt Turner
2017-03-16 20:37 Matt Turner
2017-03-03  0:03 Matt Turner
2016-11-15 14:32 Michał Górny
2016-08-01  4:34 Mike Frysinger
2016-04-21  4:46 Matt Turner
2016-02-22 17:53 Matt Turner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox