summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gentoo.org>2023-09-25 11:44:29 -0400
committerMatt Turner <mattst88@gentoo.org>2023-09-25 11:48:04 -0400
commit5473d9621bc0ebef81881a22385e0d8aa4c75695 (patch)
tree53e43557c6e394a05346e94fe37731c7788989a2
parentmedia-libs/waffle: Version bump to 1.7.3 (diff)
downloadgentoo-5473d9621bc0ebef81881a22385e0d8aa4c75695.tar.gz
gentoo-5473d9621bc0ebef81881a22385e0d8aa4c75695.tar.bz2
gentoo-5473d9621bc0ebef81881a22385e0d8aa4c75695.zip
media-libs/waffle: Drop unneeded USE flags
And make an attempt at wiring up tests. Unfortunately the gbm tests can't work under sandbox, and I've seen some sporadic failures from the other gl_basic tests as well, so I'll leave this restricted. Signed-off-by: Matt Turner <mattst88@gentoo.org>
-rw-r--r--media-libs/waffle/waffle-9999.ebuild39
1 files changed, 31 insertions, 8 deletions
diff --git a/media-libs/waffle/waffle-9999.ebuild b/media-libs/waffle/waffle-9999.ebuild
index 70895cc711f7..23baef47c53e 100644
--- a/media-libs/waffle/waffle-9999.ebuild
+++ b/media-libs/waffle/waffle-9999.ebuild
@@ -11,23 +11,23 @@ else
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
S="${WORKDIR}"/${PN}-v${PV}
fi
-inherit meson-multilib multilib ${GIT_ECLASS}
+inherit meson-multilib multilib virtualx ${GIT_ECLASS}
DESCRIPTION="Library that allows selection of GL API and of window system at runtime"
HOMEPAGE="https://gitlab.freedesktop.org/mesa/waffle"
LICENSE="BSD-2"
SLOT="0"
-IUSE="doc +egl +gbm wayland X"
-RESTRICT="test" # gl_basic tests don't work when run from portage
+IUSE="doc test wayland X"
+RESTRICT="!test? ( test ) test" # gl_basic tests don't work when run under sandbox
RDEPEND="
- >=media-libs/mesa-9.1.6[egl(+)?,gbm(+)?,${MULTILIB_USEDEP}]
+ >=media-libs/mesa-23[${MULTILIB_USEDEP}]
+ >=virtual/libudev-208:=[${MULTILIB_USEDEP}]
X? (
>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
>=x11-libs/libxcb-1.9.1[${MULTILIB_USEDEP}]
)
- gbm? ( >=virtual/libudev-208:=[${MULTILIB_USEDEP}] )
wayland? ( >=dev-libs/wayland-1.10[${MULTILIB_USEDEP}] )
"
DEPEND="${RDEPEND}
@@ -38,6 +38,9 @@ BDEPEND="
dev-libs/libxslt
dev-util/wayland-scanner
"
+# test? (
+# wayland? ( dev-libs/weston[headless] )
+# )
MULTILIB_CHOST_TOOLS=(
/usr/bin/wflinfo$(get_exeext)
@@ -48,14 +51,34 @@ multilib_src_configure() {
$(meson_feature X glx)
$(meson_feature wayland)
$(meson_feature X x11_egl)
- $(meson_feature gbm)
- $(meson_feature egl surfaceless_egl)
+ -Dgbm=enabled
+ -Dsurfaceless_egl=enabled
+
+ $(meson_use test build-tests)
$(meson_native_true build-manpages)
- -Dbuild-tests=false
+ -Dbuild-htmldocs=false
+ -Dbuild-examples=false
)
meson_src_configure
}
+multilib_src_test() {
+ if use wayland; then
+ export XDG_RUNTIME_DIR="$(mktemp -p $(pwd) -d xdg-runtime-XXXXXX)"
+
+ weston --backend=headless-backend.so --socket=wayland-6 --idle-time=0 &
+ compositor=$!
+ export WAYLAND_DISPLAY=wayland-6
+ fi
+
+ export MESA_SHADER_CACHE_DISABLE=true
+ virtx meson_src_test
+
+ if use wayland; then
+ kill ${compositor}
+ fi
+}
+
multilib_src_install() {
meson_src_install
}