There is a new pull request by q66 against master on the void-packages repository https://github.com/void-ppc/void-packages xbps-libc https://github.com/void-linux/void-packages/pull/13356 xbps-src: add XBPS_LIBC/XBPS_TARGET_LIBC This can be used in template checks to remove the clunky case statements and pattern matching, as well as simplify normal ifs. For example: ``` if [ "${XBPS_TARGET_MACHINE%-musl}" = "${XBPS_TARGET_MACHINE}" ]; then ... glibc specific ... fi ``` or ``` case "$XBPS_TARGET_MACHINE" in *-musl) ;; *) ... glibc specific ... esac ``` becomes a simple: ``` if [ "${XBPS_TARGET_LIBC}" = "glibc" ]; then ... glibc specific ... fi ``` I've noticed these are common enough of patterns in our stuff to make this worthwhile. The implementation should be sound, I checked and there aren't any `uname` values with a dash in them. A patch file from https://github.com/void-linux/void-packages/pull/13356.patch is attached