Use Arch-specific toolchains and presets for cmake based packages
💡
Idea proposal Checks
NOTE: The below check boxes must be checked before the accompanying idea will be considered.
-
I have checked that the idea is not directly tied to a specific project For example: "Show label icons in the package overview web page" must be a feature request in the ArchWeb repository -
I have carefully checked this idea is not already covered by any open or closed ideas. -
I understand that I hold no copyright claims and that this idea can be adapted and used by Arch Linux in any arbitrary shape or form.
Summary
Make use of cmake toolchains and presets to allow modification of e.g. Release
build type via distribution flags.
Motivation
Plenty of upstreams disallow using the None
build type and e.g. only provide other build types like Release
.
These come at the disadvantage that they usually don't allow using our distribution flags (however, this is desirable), while build type None
sometimes drags in debug symbols by default (see e.g. https://gitlab.archlinux.org/archlinux/packaging/packages/supercollider/-/blob/8e6ea25999161fdc1fd69675ca8431595aa77175/PKGBUILD#L87-88).
Specification
Using cmake in a more uniform way in packaging would allow us to make use of default build types (such as Release
) while retaining our distribution flags.
For this to happen we need to investigate writing presets and how to provide our own toolchain with it.
Afterwards, we should add those files to a custom package which gets pulled in by the base-devel
meta-package, so that the files are made available during build time.
Eventually, the cmake packaging guidelines need adapting to reflect this and explain how to use the preset files when building packages.