media-libs/virglrenderer: add 1.2.0

* Missing mesa dependency for egl backends, make glx backends optional
  behind X use flag to possibly avoid libX11.
* Unrestrict tests and run a small subset of them atleast.
* Add mesa dependency for the egl platform that is built unconditionally

Bug: https://bugs.gentoo.org/931099
Signed-off-by: Alfred Wingate <parona@protonmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/43782
Closes: https://github.com/gentoo/gentoo/pull/43782
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Alfred Wingate
2025-09-14 18:07:42 +01:00
committed by Sam James
parent 36f41359a6
commit 08fc4c8ffa
3 changed files with 96 additions and 5 deletions
+1
View File
@@ -1,2 +1,3 @@
DIST virglrenderer-1.0.1.tar.gz 980054 BLAKE2B 59295d4c6d92079fe2e2d6c8d7e170052e3a8c2d26db661575d582b847f06cd0b3b6299a07e0bec0fd85192eca19a9d48c607679c4d0f6e9fc6ece7336efceee SHA512 9f3b29f06c6359ac385c199fa186e004b2d32fbb50e9ad01ffd16aaf076ac6d6bf93cf5c938ad76505c80cda8b644342a9f6703e493860ee962d67f413966714
DIST virglrenderer-virglrenderer-1.1.1.tar.bz2 837534 BLAKE2B c1d00f69c8d3f44c56c87889190a85ef517f324a5446ae2f60d2b64bca00a3e34b65cd2705aae7fe8721185c89e6baaa250cfe4749d5673c29a127f491c4da90 SHA512 1f1483867574ce46fac7d2b562f71df5ee3d41493467adac2ac831605bc6946878c66f07492f1edda36d54896a814673dd314eaa63fb62f8f322da8122404712
DIST virglrenderer-virglrenderer-1.2.0.tar.bz2 867768 BLAKE2B 6ec20242a0e018ebb4ae32daa5b6cd4f143516b1fcce8c1b750f510bf593bc4d628c8d3cf10593dc9fa53985bba4ffd3841f3b762108eac1b0e1313c9449ffc4 SHA512 ca1efc19b4d551117940dec746621a5eeb0995c5086a56c03c6510c4209b9e01db9d3f6f477621720ad9055e10f8e89281038a2f77519b79ab220326aa89bc14
@@ -0,0 +1,78 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{11..14} )
inherit meson python-any-r1
if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI="https://anongit.freedesktop.org/git/virglrenderer.git"
inherit git-r3
else
MY_P="${PN}-${P}"
SRC_URI="https://gitlab.freedesktop.org/virgl/${PN}/-/archive/${P}/${MY_P}.tar.bz2"
S="${WORKDIR}/${MY_P}"
KEYWORDS="~amd64 ~arm64 ~loong ~riscv ~x86"
fi
DESCRIPTION="Library used implement a virtual 3D GPU used by qemu"
HOMEPAGE="https://virgil3d.github.io/"
LICENSE="MIT"
SLOT="0"
IUSE="static-libs test venus vaapi video_cards_amdgpu video_cards_asahi video_cards_freedreno X"
RESTRICT="!test? ( test )"
RDEPEND="
>=x11-libs/libdrm-2.4.121
media-libs/libepoxy[X?]
media-libs/mesa
venus? ( media-libs/vulkan-loader )
vaapi? ( media-libs/libva:= )
X? ( x11-libs/libX11 )
"
DEPEND="
${RDEPEND}
sys-kernel/linux-headers
"
BDEPEND="
${PYTHON_DEPS}
$(python_gen_any_dep "
dev-python/pyyaml[\${PYTHON_USEDEP}]
")
"
python_check_deps() {
python_has_version -b "dev-python/pyyaml[${PYTHON_USEDEP}]" || return 1
}
src_configure() {
local -a gpus=()
use video_cards_amdgpu && gpus+=( amdgpu-experimental )
use video_cards_asahi && gpus+=( asahi )
use video_cards_freedreno && gpus+=( msm )
# Build egl unconditionally. Tests and vaapi require it.
local -a platforms=( egl )
use X && platforms+=( glx )
local emesonargs=(
-Ddefault_library=$(usex static-libs both shared)
-Ddrm-renderers=$(IFS=,; echo "${gpus[*]}")
-Dplatforms=$(IFS=,; echo "${platforms[*]}")
-Dvulkan-dload=false
$(meson_use test tests)
$(meson_use venus)
$(meson_use vaapi video)
)
meson_src_configure
}
src_test() {
# Most of the testsuite cannot run in our sandboxed environment, just don't
# deal with it for now. Instead lets run a subset of tests atleast.
meson_src_test test_virgl_gbm_resources test_fuzzer_formats
}
@@ -22,16 +22,16 @@ HOMEPAGE="https://virgil3d.github.io/"
LICENSE="MIT"
SLOT="0"
IUSE="static-libs test venus vaapi video_cards_amdgpu video_cards_asahi video_cards_freedreno"
# Most of the testsuite cannot run in our sandboxed environment, just don't
# deal with it for now.
RESTRICT="!test? ( test ) test"
IUSE="static-libs test venus vaapi video_cards_amdgpu video_cards_asahi video_cards_freedreno X"
RESTRICT="!test? ( test )"
RDEPEND="
>=x11-libs/libdrm-2.4.121
media-libs/libepoxy
media-libs/libepoxy[X?]
media-libs/mesa
venus? ( media-libs/vulkan-loader )
vaapi? ( media-libs/libva:= )
X? ( x11-libs/libX11 )
"
DEPEND="
${RDEPEND}
@@ -54,9 +54,15 @@ src_configure() {
use video_cards_asahi && gpus+=( asahi )
use video_cards_freedreno && gpus+=( msm )
# Build egl unconditionally. Tests and vaapi require it.
local -a platforms=( egl )
use X && platforms+=( glx )
local emesonargs=(
-Ddefault_library=$(usex static-libs both shared)
-Ddrm-renderers=$(IFS=,; echo "${gpus[*]}")
-Dplatforms=$(IFS=,; echo "${platforms[*]}")
-Dvulkan-dload=false
$(meson_use test tests)
$(meson_use venus)
$(meson_use vaapi video)
@@ -64,3 +70,9 @@ src_configure() {
meson_src_configure
}
src_test() {
# Most of the testsuite cannot run in our sandboxed environment, just don't
# deal with it for now. Instead lets run a subset of tests atleast.
meson_src_test test_virgl_gbm_resources test_fuzzer_formats
}