diff --git a/media-libs/glycin-loaders/Manifest b/media-libs/glycin-loaders/Manifest index dfe6424a5bdd1..f5b9e885291c7 100644 --- a/media-libs/glycin-loaders/Manifest +++ b/media-libs/glycin-loaders/Manifest @@ -5,4 +5,6 @@ DIST glycin-2.0.4-crates.tar.xz 27560948 BLAKE2B d8e6a482f9cb4f644c8b3a84fee4e06 DIST glycin-2.0.4.tar.bz2 150642 BLAKE2B 27c40f30d52fa9a7dd6580547816a70e9453e164bd78721ae8f4bdc9c2e49c49813f4204679d87591d5f6a2ed4c6d79cfc577e3b41fffcc49f3fa1ca643f68e8 SHA512 4a47e3d4a3d1401373572fc0068af91a1720da88f7f12571f7f3c891c976b29b314138ef840c233270c7b2abcbd007ee59b76e5cbc8a1373d95df7e57cd902b5 DIST glycin-2.0.5-crates.tar.xz 27561200 BLAKE2B 6a333ef0d046972682acc3dc3211687894112d621d98cda67eab7b5dd6b370282abe0c8b30d37f1c21afc59d3c43ebc1b02405aeac0286870c323573dc16631c SHA512 9ac910493bd9359ea98fbecf37964c810073cecabc0e2c33b98d79eb4ef3186305c7fb94d054196cf697d4717836625a39dcd0e8bd6f4f0a3752439c64d9e030 DIST glycin-2.0.5.tar.bz2 151345 BLAKE2B 2a534907a460f6b1c9622135d92879d73b5549d6e1dde0daa98635f9c7561216f4d610e743ada1de4364117e26dc84bae7ee94697108cb7af391ad6de81a3dfe SHA512 9a049e5a48eb8c5a3a9d76c706e3521f1e1c5cf6cdc650eef0e4e9a12134d9dee0aecf368b24dac278352c590376fb077f10fc64fa78d9beed2c910c7b082ec0 +DIST glycin-2.0.6-crates.tar.xz 27561200 BLAKE2B 6a333ef0d046972682acc3dc3211687894112d621d98cda67eab7b5dd6b370282abe0c8b30d37f1c21afc59d3c43ebc1b02405aeac0286870c323573dc16631c SHA512 9ac910493bd9359ea98fbecf37964c810073cecabc0e2c33b98d79eb4ef3186305c7fb94d054196cf697d4717836625a39dcd0e8bd6f4f0a3752439c64d9e030 +DIST glycin-2.0.6.tar.bz2 151430 BLAKE2B 483d4e2615bf5949362a318eaddfc62740e4d71605f3e3969f9d486b7d266a4f05b4f31a3f9653d721231a5d7928e2d4894aa25d370aff0f4f4c392502955984 SHA512 e48b6398be424075c27e6c6857491364de8cc1b1efd3269654f493115b56bdc98a6ec11e718d4aa64c02c80257e1561b717245ac60e7eac1c6ffc49edbbc9292 DIST glycin-test-images-b148bcf70847d6f126a8e83e27e1c59d2e474adf.tar.bz2 8260055 BLAKE2B 5e1f802283e4b7212b7498ef9093bd5ad7a2bb66f8585aacff0a73d9a15b9fe7467bc06508cc0c910285d8a158287ed0c62fe793d78e8355613dd50f0e2e00c3 SHA512 0839108bcc60927b83f7cc821a6834781712d4e0489af30a3a0b1578da48c35b371e312cf11d39aefd9e3a2e051f005ee6eabda1beaa718d4ff77960def4aa71 diff --git a/media-libs/glycin-loaders/glycin-loaders-2.0.6.ebuild b/media-libs/glycin-loaders/glycin-loaders-2.0.6.ebuild new file mode 100644 index 0000000000000..1e775dabc2295 --- /dev/null +++ b/media-libs/glycin-loaders/glycin-loaders-2.0.6.ebuild @@ -0,0 +1,111 @@ +# Copyright 2024-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CRATES=" +" +RUST_MIN_VER=1.85.0 + +inherit cargo meson + +MY_PV=${PV/_/.} +MY_P=glycin-${MY_PV} +TEST_IMAGE_COMMIT=b148bcf70847d6f126a8e83e27e1c59d2e474adf + +DESCRIPTION="Loaders for glycin clients (glycin crate or libglycin)" +HOMEPAGE="https://gitlab.gnome.org/GNOME/glycin/" +# upstream release tarballs are useless, as upstream is deliberately +# stripping glycin crate from them +SRC_URI=" + https://gitlab.gnome.org/GNOME/glycin/-/archive/${MY_PV}/${MY_P}.tar.bz2 + https://github.com/gentoo-crate-dist/glycin/releases/download/${MY_PV}/${MY_P}-crates.tar.xz + test? ( + https://gitlab.gnome.org/sophie-h/test-images/-/archive/${TEST_IMAGE_COMMIT}/test-images-${TEST_IMAGE_COMMIT}.tar.bz2 + -> glycin-test-images-${TEST_IMAGE_COMMIT}.tar.bz2 + ) +" +S=${WORKDIR}/${MY_P} + +LICENSE="|| ( LGPL-2.1+ MPL-2.0 )" +# 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 ~arm64" +IUSE="heif jpeg2k jpegxl svg test" +REQUIRED_USE="test? ( heif jpegxl )" +RESTRICT="!test? ( test )" + +RDEPEND=" + !>=media-libs/glycin-loaders-2:0 + >=dev-libs/glib-2.68.0:2 + >=sys-libs/libseccomp-2.5.0 + heif? ( >=media-libs/libheif-1.17.0:= ) + jpegxl? ( >=media-libs/libjxl-0.11.0:= ) + svg? ( + >=gnome-base/librsvg-2.52.0:2 + >=x11-libs/cairo-1.17.0 + ) +" +DEPEND=" + ${RDEPEND} + test? ( + >=gui-libs/gtk-4.16.0:4 + >=media-libs/lcms-2.14:2 + ) +" +BDEPEND=" + test? ( + sys-apps/bubblewrap + sys-apps/dbus + ) +" + +QA_FLAGS_IGNORED="usr/libexec/glycin-loaders/.*" + +src_unpack() { + cargo_src_unpack + + if use test; then + mv "test-images-${TEST_IMAGE_COMMIT}"/* \ + "${S}/tests/test-images/" || die + fi +} + +src_configure() { + local formats=( + $(usev heif glycin-heif) + $(usev jpeg2k glycin-jpeg2000) + $(usev jpegxl glycin-jxl) + $(usev svg glycin-svg) + glycin-image-rs + ) + local formats_s=${formats[*]} + local emesonargs=( + -Dprofile=$(usex debug dev release) + -Dglycin-loaders=true + -Dloaders="${formats_s// /,}" + -Dtests=$(usex test true false) + -Dlibglycin=false + -Dlibglycin-gtk4=false + -Dglycin-thumbnailer=false + + # TODO: figure out why it fails + # https://gitlab.gnome.org/GNOME/glycin/-/issues/167 + -Dtest_skip_ext=heic + ) + + 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 +}