# Template file for 'glycin' pkgname=glycin version=2.0.7 revision=1 build_style=meson build_helper="rust gir" configure_args="-Dtest_skip_install=true" hostmakedepends="cargo clang19 gettext pkg-config vala" makedepends="gtk4-devel libheif-devel libjxl-devel librsvg-devel libseccomp-devel rust-std" depends="glycin-loaders>=${version}_${revision}" short_desc="Sandboxed and extendable image decoding" maintainer="chrysos349 " license="MPL-2.0" homepage="https://gitlab.gnome.org/GNOME/glycin" changelog="https://gitlab.gnome.org/GNOME/glycin/-/raw/1.2/NEWS" #changelog="https://gitlab.gnome.org/GNOME/glycin/-/raw/main/NEWS" distfiles="${GNOME_SITE}/glycin/${version%.*}/glycin-${version}.tar.xz" checksum=c416ac29b6d3ecdc67b90c15537ba1293ceb7af96fa101cae67b7d1d37e50ab0 make_check=no # needs to be installed to run tests if [ "$CROSS_BUILD" ]; then XBPS_CROSS_RUSTFLAGS+=" -L$XBPS_BUILDDIR/${pkgname}-${version}/build/libglycin" fi post_patch() { if [ "$CROSS_BUILD" ]; then vsed -i meson.build \ -e "s|rust_target =|rust_target = '${RUST_TARGET}' / |" fi # Fix CARGO_HOME path so it is shared across masterdirs vsed -i meson.build \ -e "s|cargo_home =.*|cargo_home = '${CARGO_HOME}'|g" # 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 } do_install() { meson install -C build --destdir $DESTDIR --no-rebuild } glycin-devel_package() { depends="glycin>=${version}_${revision}" short_desc+=" - development files" pkg_install() { vmove usr/include/glycin-2 vmove usr/lib/pkgconfig/glycin-2.pc vmove usr/lib/libglycin-2.so vmove usr/share/gir-1.0/Gly-2.gir vmove usr/share/vala/vapi/glycin-2.* } } glycin-gtk4_package() { depends="glycin>=${version}_${revision}" short_desc+=" - GTK4 integration" pkg_install() { vmove "usr/lib/libglycin-gtk4-2.so.*" vmove usr/lib/girepository-1.0/GlyGtk4-2.typelib } } glycin-gtk4-devel_package() { depends="glycin-gtk4>=${version}_${revision}" short_desc+=" - GTK4 development files" pkg_install() { vmove usr/include/glycin-gtk4-2 vmove usr/lib/pkgconfig/glycin-gtk4-2.pc vmove usr/lib/libglycin-gtk4-2.so vmove usr/share/gir-1.0/GlyGtk4-2.gir vmove usr/share/vala/vapi/glycin-gtk4-2.* } } glycin-loaders_package() { short_desc+=" - image loading backends" pkg_install() { vmove usr/libexec/glycin-loaders vmove usr/share/glycin-loaders } }