commit: e82c4ddd57cd0270ab0e8c6d190da89402251d84
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 18 19:07:52 2024 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Aug 18 19:08:31 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e82c4ddd
media-libs/glycin-loaders: Enable testing
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
.../glycin-loaders/glycin-loaders-1.1_beta.ebuild | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/media-libs/glycin-loaders/glycin-loaders-1.1_beta.ebuild
b/media-libs/glycin-loaders/glycin-loaders-1.1_beta.ebuild
index ed37a9ca5e08..349d971f98c1 100644
--- a/media-libs/glycin-loaders/glycin-loaders-1.1_beta.ebuild
+++ b/media-libs/glycin-loaders/glycin-loaders-1.1_beta.ebuild
@@ -23,8 +23,7 @@ LICENSE+="
SLOT="0"
KEYWORDS="~amd64"
IUSE="heif jpegxl svg test"
-# TODO: figure out how to make tests work from inside the ebuild
-RESTRICT="test"
+RESTRICT="!test? ( test )"
RDEPEND="
>=dev-libs/glib-2.60:2
@@ -32,7 +31,7 @@ RDEPEND="
heif? ( >=media-libs/libheif-1.17.0:= )
jpegxl? ( >=media-libs/libjxl-0.10.0:= )
svg? (
- >=gnome-base/librsvg-2.52.0
+ >=gnome-base/librsvg-2.52.0:2
>=x11-libs/cairo-1.17.0
)
"
@@ -48,6 +47,13 @@ ECARGO_VENDOR=${S}/vendor
QA_FLAGS_IGNORED="usr/libexec/glycin-loaders/.*"
+src_prepare() {
+ default
+
+ # https://gitlab.gnome.org/sophie-h/glycin/-/issues/81
+ sed -i -e '\|/fonts|d' tests/tests.rs || die
+}
+
src_configure() {
local formats=(
$(usev heif glycin-heif)
@@ -67,3 +73,10 @@ src_configure() {
meson_src_configure
ln -s "${CARGO_HOME}" "${BUILD_DIR}/cargo-home" || die
}
+
+src_test() {
+ # tests write to /proc/*/uid_map
+ # apparently, "addpredict /" in Portage breaks it
+ local -x SANDBOX_ON=0
+ meson_src_test
+}