New comment by icp1994 on void-packages repository https://github.com/void-linux/void-packages/pull/46082#issuecomment-1722403396 Comment: A bit tangential, this template uses the `cargo` build style instead of the `meson` one and recommends checking all `meson.build` files during each update. I think this is probably not the ideal approach so I had these changes when I updated it locally a few months ago. ```patch diff --git a/srcpkgs/helvum/template b/srcpkgs/helvum/template index 1f3c89a66..071033ee1 100644 --- a/srcpkgs/helvum/template +++ b/srcpkgs/helvum/template @@ -2,10 +2,12 @@ pkgname=helvum version=0.4.0 revision=1 -build_style=cargo -hostmakedepends="pkg-config clang libclang" -makedepends="gtk4-devel pipewire-devel glib-devel" +build_style=meson +build_helper="rust" +hostmakedepends="pkg-config clang libclang cargo desktop-file-utils gtk4-update-icon-cache" +makedepends="gtk4-devel pipewire-devel glib-devel rust-std" depends="pipewire" +checkdepends="desktop-file-utils appstream-glib" short_desc="GTK patchbay for pipewire" maintainer="0x5c " license="GPL-3.0-only" @@ -13,17 +15,9 @@ homepage="https://gitlab.freedesktop.org/pipewire/helvum" distfiles="https://gitlab.freedesktop.org/pipewire/helvum/-/archive/${version}/helvum-${version}.tar.gz" checksum=e93afa788d3e50bae489db888ecf0d79e5735b8f4f8b29fe4174540b0872b622 -post_install() { - # Normally, meson would do this, but it's simpler to use the cargo build style and do this manually - # This also avoids the need for makedeps/build steps that are made unnecessary by xbps' hooks - # On update, all meson.build files should be checked for changes - _app_id='org.pipewire.Helvum' - vinstall data/icons/$_app_id.svg 644 usr/share/icons/hicolor/scalable/apps/ - vinstall data/icons/$_app_id-symbolic.svg 644 usr/share/icons/hicolor/symbolic/apps/ - - vsed -i data/$_app_id.desktop.in -e "s/@icon@/$_app_id/" - vinstall data/$_app_id.desktop.in 644 usr/share/applications/ $_app_id.desktop - - vsed -i data/$_app_id.metainfo.xml.in -e "s/@app-id@/$_app_id/" - vinstall data/$_app_id.metainfo.xml.in 644 usr/share/metainfo/ $_app_id.metainfo.xml +post_patch() { + if [ "$CROSS_BUILD" ]; then + vsed -i src/meson.build \ + -e "s%rust_target /%'${RUST_TARGET}' / rust_target /%" + fi } ```