# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # GNOME 51 mirror ahead of ::gentoo; drop each tag below when ::gentoo reaches this version # BENTOO-DIVERGENCE: DEPEND - 2.2.1 meson tree no longer uses lcms2 # BENTOO-DIVERGENCE: RDEPEND - 2.2.1 meson tree no longer uses lcms2 # BENTOO-DIVERGENCE: PATCHES - pkgconfig-thumbnailer patch merged upstream (applies in reverse) EAPI=8 CRATES=" glycin@4.0.0 glycin-common@2.0.0 glycin-utils@5.0.1 " # These should be in the gentoo crate dist CRATES+=" libglycin-gtk4-rebind@0.2.0 libglycin-gtk4-rebind-sys@0.2.0 libglycin-rebind@0.2.0 libglycin-rebind-sys@0.2.0 " RUST_MIN_VER="1.93" inherit cargo gnome.org meson vala DESCRIPTION="Sandboxed and extendable image loading library" HOMEPAGE="https://gnome.pages.gitlab.gnome.org/glycin" SRC_URI+=" https://github.com/gentoo-crate-dist/glycin/releases/download/${PV}/${P}-crates.tar.xz ${CARGO_CRATE_URIS}" # Dependent crate licenses LICENSE+=" Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD GPL-3+ IJG ISC LGPL-3+ MIT Unicode-3.0 || ( LGPL-2.1+ MPL-2.0 ) " SLOT="2" KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86" IUSE="gtk gtk-doc +introspection vala test" REQUIRED_USE=" gtk? ( introspection ) gtk-doc? ( introspection ) vala? ( introspection ) " RESTRICT="!test? ( test )" DEPEND=" >=dev-libs/glib-2.60:2 >=sys-libs/libseccomp-2.5.0 >=media-libs/fontconfig-2.13.0:1.0 media-libs/glycin-loaders:2 introspection? ( >=dev-libs/gobject-introspection-1.82.0-r2:= ) gtk? ( >=gui-libs/gtk-4.16.0:4 ) " RDEPEND="${DEPEND} sys-apps/bubblewrap " BDEPEND=" gtk-doc? ( dev-util/gi-docgen ) vala? ( $(vala_depend) ) virtual/pkgconfig " QA_FLAGS_IGNORED=" usr/bin/${PN}-thumbnailer usr/lib.*/libglycin-2.so.0 usr/lib.*/libglycin-gtk4-2.so.0 " src_prepare() { default use vala && vala_setup } src_configure() { local emesonargs=( -Dlibglycin=true $(meson_use vala vapi) -Dglycin-loaders=false $(meson_use introspection) -Dglycin-thumbnailer=true $(meson_use gtk libglycin-gtk4) $(meson_use gtk-doc capi_docs) -Dtests=$(usex test true false) # required if glycin-loaders is installed seperately -Dtest_skip_install=true ) meson_src_configure ln -s "${CARGO_HOME}" "${BUILD_DIR}/cargo-home" || die } src_install() { meson_src_install if use gtk-doc; then mkdir -p "${ED}"/usr/share/gtk-doc/html/ || die mv "${ED}"/usr/share/doc/libglycin-2 "${ED}"/usr/share/gtk-doc/html/ || die if use gtk; then mv "${ED}"/usr/share/doc/libglycin-gtk4-2 "${ED}"/usr/share/gtk-doc/html/ || die fi fi }