On Thu, Jul 09, 2020 at 05:27:46PM +0100, s...@debian.org wrote: > Workaround: instead of > > ----8<---- > ifneq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) > EXTRA_CMAKE_ARGUMENTS += -DENABLE_GTKDOC=OFF > else > EXTRA_CMAKE_ARGUMENTS += -DENABLE_GTKDOC=ON > endif > ----8<---- > > webkit2gtk could use something like > > ----8<---- > binaries := $(shell dh_listpackages) > > ifneq (,$(filter %-doc,$(binaries))) > EXTRA_CMAKE_ARGUMENTS += -DENABLE_GTKDOC=OFF > else > EXTRA_CMAKE_ARGUMENTS += -DENABLE_GTKDOC=ON > endif > ----8<----
Ok, I actually wanted to something like that for a while already but I wasn't familiar with dh_listpackages, that sounds like a solution. Thanks! What happens however if the user sets DEB_BUILD_OPTIONS=nodoc ? It sounds like we would still want to have an additional 'else' branch to check that value. > together with > > ----8<---- > Package: libwebkit2gtk-4.0-doc > Build-Profiles: <!nodoc> > ----8<---- Ok, with 'nodoc' set we are already generating an empty -doc package so this would work anyway without this, but it makes sense to have it. > and you might be able to move gtk-doc-tools from Build-Depends > to Build-Depends-Indep (usually you can for Meson, but not for > Autotools because it's needed at dh_autoreconf time; I don't know > which category CMake falls into). I'll look into that. Berto