You are not logged in.
Hello,
is there a way to adapt my build options (to -DFEATURE= for cmake) to the optdepends that are installed?
I am not really sure if doing something like `pacman -Qs petsc` and evaluating the return code inside the PKGBUILD is a good idea.
Thanks!
Offline
If the optdepends are required at compile-time, they should also be included in makedepends array. Don't try to make dynamic PKGBUILDs, that will only lead to confusion. If you want to leave comments for end users explaining how they can modify the PKGBUILD to enable or disable certain features, that's fine, but the PKGBUILD you upload to the AUR* should Just Work and produce a standard package.
*I am assuming this is why you are asking
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Online
While I agree with the above, there is precedent for doing otherwise. Have a look at the mpv-git PKGBUILD.
However, note that once the compile flag has been added, those dependencies are no longer optional. And in most cases, without the compile flag, they are also not option - just not needed. Dynamically determined dependencies are not the same as optional depdendencies.
The mpv-git PKGBUILD dynamically determines build flags and dependencies (not optional dependencies).
Last edited by Trilby (2018-08-01 15:07:05)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline