New comment by Duncaen on void-packages repository https://github.com/void-linux/void-packages/pull/44206#issuecomment-1572644590 Comment: Some time ago I tested a setup like arch has in its main repo that creates an `nginx-src` sub-package that the modules would `hostmakedepends` on and copy the source and configure scripts form `/usr/src/nginx` into their build dir. At that time I tried to patch the configure scripts to not require the fake configure run on host and static files for the cross targets, but never really finished it. [openembedded is using a similar patch](https://github.com/openembedded/meta-openembedded/blob/master/meta-webserver/recipes-httpd/nginx/files/nginx-cross.patch) but requiring to specify the values as configure arguments which is a bit annoying because you'll have to copy all of this to each module. Maybe we could use the openembedded patch but extend it a bit by setting the defaults based on i.e. --target for all the added flags for the architectures we support. With the patched configure script with defaults for all our targets the module templates would become a bit simpler, but probably still require some extra patching because they follow nginx and are not really cross build compatible.