I checked "https://gitlab.gnome.org/GNOME/gegl" repository, and verified that x11-base/xorg-proto package is not necessary to build any available versions (0.4.44, 0.4.42, 0.4.40). Reproducible: Always Steps to Reproduce: 1. Open /var/db/repos/gentoo/media-libs/gegl/gegl-*.ebuild file with text editor Actual Results: It have line that says, ``` DEPEND="${RDEPEND} x11-base/xorg-proto" ``` Expected Results: It shouldn't depend on x11-base/xorg-proto package. Here's how I verified it. ``` user /dev/shm/gegl $ find -name "meson.build" | xargs grep proto ./meson.build: '-Wmissing-prototypes', ./tests/xml/meson.build: protocol: 'tap', ./tests/simple/meson.build: protocol: 'tap', ./tests/operations/meson.build: protocol: 'tap', user /dev/shm/gegl $ grep -R "#include <X11" /* No Output */ user /dev/shm/gegl $ grep -R "#include <GL" /* No Output */ ``` I also successfully built all versions in my machine which doesn't have x11-base/xorg-proto installed. ``` user /dev/shm/gegl $ meson setup .build && ninja -C .build /* Successfully built without any errors. */ user $ qlist -Iv x11-base/xorg-proto /* No Output */ ```
meson.build:351:12: ERROR: Dependency lookup for cairo with method 'pkgconfig' failed: Could not generate cargs for cairo: Package xproto was not found in the pkg-config search path. Perhaps you should add the directory containing `xproto.pc' to the PKG_CONFIG_PATH environment variable Package 'xproto', required by 'x11', not found Package 'kbproto', required by 'x11', not found Package 'xextproto', required by 'xext', not found Package 'xproto', required by 'xrender', not found Package 'renderproto', required by 'xrender', not found Package 'xproto', required by 'x11', not found Package 'kbproto', required by 'x11', not found Package 'xproto', required by 'xau', not found Package 'xproto', required by 'xdmcp', not found Package 'xproto', required by 'xau', not found Package 'xproto', required by 'xdmcp', not found Package 'xproto', required by 'xau', not found Package 'xproto', required by 'xdmcp', not found
To clarify, given we don't have a way to express build time dependencies of revdeps, packages end up needing to add these themselves. In this case (at least) cairo and pango both need it to be used, and allowing xorg-proto to be missing would result in that failure. So the dependency is needed.
Oh, I think cairo is depending on X11 only when cairo have X useflag. I have cairo built without X useflag, and here is it's pkgconfig file. ``` prefix=/usr includedir=${prefix}/include libdir=${prefix}/lib64 Name: cairo Description: Multi-platform 2D graphics library Version: 1.17.8 Requires.private: zlib, libpng, fontconfig >= 2.2.95, freetype2 >= 9.7.3, pixman-1 >= 0.36.0 Libs: -L${libdir} -lcairo Libs.private: -lm -ldl Cflags: -I${includedir}/cairo ``` Then I don't know what's good way to express: media-libs/gegl should depend on xorg-proto only if cairo have X useflag, through ebuild syntax. Maybe you can add X useflag on gegl package, but that feels like overkill.
If there's no simple way of doing that, I think it's completely fine to just leave it as now. Then this bug can be marked as resolved I guess.
Yeah the ideal would be the reverse build deps I was talking about, e.g. cairo could tell revdeps only to pull xorg-proto when it was built with USE=X. At least xorg-proto is not a very invasive package even on a wayland-only system (just bit of headers, no libraries).
Thanks for quick response! I'll mark this as resolved.