Created attachment 905104 [details] build.log in xz currently qtbase (dev-qt/qtbase-6.7.3-r1) forces the inclusion of cups. I don't have a printer and I don't use cups anywhere in my system so I changed the ebuild to not include it if I use "-cups". I have been using the system for a while and I see no issues from doing it. The relevant config stage looks like so: checking for... -- Could NOT find Cups (missing: CUPS_LIBRARIES CUPS_INCLUDE_DIR) ... Build options: ... -- The following OPTIONAL packages have not been found: ... * Cups ... Qt PrintSupport: CUPS ................................... no ... Can we make cups optional?
I don't understand what you mean by forcing inclusion. The USE flag exists and can be disabled.
If you're referring to qtprintsupport, that doesn't need CUPS, and it's unconditionally included as noted at https://wiki.gentoo.org/wiki/Project:Qt/Qt6_migration_notes#From_qtbase (not accidental).
If you're confused by how it "looks" for cups, it's just that packages often look for things unconditionally but then won't use it as long as it's disabled. With USE=-cups, it passes -DQT_FEATURE_cups=OFF to explicitly disable it (or at least the original ebuild does, you removed it and turned it into automagic if it finds it). (as for QtPrintSupport itself, it's tiny/harmless and has no extra dependencies assuming USE=-cups, several packages still need to link with it even if not going to print anything)