Closed issue by yopito on void-packages repository https://github.com/void-linux/void-packages/issues/20878 Description: ### System * xuname: Void 5.4.31_1 x86_64-musl GenuineIntel uptodate rrnFF * package: packaging shiboken2 update to 5.14.2 (WIP) ### Expected behavior want to use cmake with sources of a subdir of $wkrsrc via `-S` cmake flag: ``` [...] wrksrc="${_pkgname}" build_style=cmake configure_args=" ... -S sources/shiboken2" [...] ``` ### Actual behavior `-S ` has no effect. ### Additional details xbps-src append "`../`" to cmake arguments unconditionally. Resulting command is something like `cmake (args) -S sources/shiboken2 ../` So cmake uses sources of ${wrksrc}/build/.. instead of ${wrksrc}/sources/shiboken2/ Implied by `common/build-style/cmake.sh` on sed expression L63: ``` 60 # Override flags: https://gitlab.kitware.com/cmake/cmake/issues/19590 61 CFLAGS="${CFLAGS/ -pipe / }" CXXFLAGS="${CXXFLAGS/ -pipe / }" \ 62 cmake ${cmake_args} ${configure_args} $(echo ${cmake_builddir}|sed \ 63 -e 's|[^/]$|/|' -e 's|[^/]*||g' -e 's|/|../|g') 64 ``` ### Workaround My current workaround: adding subdir to $wrksrc: ``` wrksrc="${_pkgname}/sources/shiboken2" build_style=cmake configure_args=" ... " # removed " -S sources/shiboken2 " [...] ``` ... that makes xlint nervous: ``` srcpkgs/shiboken2/template:7: wrksrc should be a top-level directory ```