diff --git a/srcpkgs/glycin-loaders/template b/srcpkgs/glycin-loaders/template new file mode 100644 index 00000000000..7d923e12f3c --- /dev/null +++ b/srcpkgs/glycin-loaders/template @@ -0,0 +1,27 @@ +# Template file for 'glycin-loaders' +pkgname=glycin-loaders +version=1.0.0 +revision=1 +build_style=meson +build_helper=rust +configure_args="-Dtest_skip_install=true" +hostmakedepends="cargo clang17 gettext pkg-config" +makedepends="gtk4-devel libheif-devel libjxl-devel libseccomp-devel rust-std" +short_desc="Sandboxed and extendable image decoding" +maintainer="chrysos349 " +license="MPL-2.0" +homepage="https://gitlab.gnome.org/sophie-h/glycin" +changelog="https://gitlab.gnome.org/sophie-h/glycin/-/raw/main/NEWS" +distfiles="${GNOME_SITE}/glycin-loaders/${version%.*}/${pkgname}-${version}.tar.xz" +checksum=cd2a3979259fee56cbd882a4d890437684bf1926e65afeafcb904ca9d17ae282 +make_check=no # needs to be installed to run tests + +post_patch() { + if [ "$CROSS_BUILD" ]; then + vsed -i loaders/meson.build \ + -e "s%rust_target /%'${RUST_TARGET}' / &%" + fi + # loaders/meson.build tries to call git to get hash for debug builds. + # Disable as it is useless for tarball builds. + ln -sf /bin/false ${XBPS_WRAPPERDIR}/git +}