sed -i -e "s:#!/usr/bin/bash:#!$(command -v bash):" src/tests/x11-test.sh || die
}
src_configure(){
# TODO: Replicate debug vs release meson build type behaviour under our buildtype=plain
localemesonargs=(
-Dopengl=true
#opengl_libname
#gles2_libname
$(meson_use wayland gles2)
-Degl=true
-Dglx=true
$(meson_use wayland)
$(meson_use systemd)
$(meson_use wayland native_backend)
$(meson_use screencast remote_desktop)
-Dlibgnome_desktop=true
$(meson_use udev)
-Dudev_dir=$(get_udevdir)
$(meson_use input_devices_wacom libwacom)
-Dsound_player=true
-Dpango_ft2=true
-Dstartup_notification=true
-Dsm=true
$(meson_use introspection)
$(meson_use doc docs)
$(meson_use test cogl_tests)
$(meson_use wayland core_tests)# core tests require wayland; overall -Dtests option is honored on top, so no extra conditional needed
-Dnative_tests=false
$(meson_use test clutter_tests)
$(meson_use test tests)
-Dkvm_tests=false
-Dtty_tests=false
$(meson_use sysprof profiler)
-Dinstalled_tests=false
#verbose # Let upstream choose default for verbose mode
#xwayland_path
# TODO: relies on default settings, but in Gentoo we might have some more packages we want to give Xgrab access (mostly virtual managers and remote desktops)
#xwayland_grab_default_access_rules
)
if use wayland && use video_cards_nvidia;then
emesonargs+=(
-Degl_device=true
-Dwayland_eglstream=true
)
else
emesonargs+=(
-Degl_device=false
-Dwayland_eglstream=false
)
fi
meson_src_configure
}
src_test(){
gnome2_environment_reset # Avoid dconf that looks at XDG_DATA_DIRS, which can sandbox fail if flatpak is installed