#19503: xorg-libX11, xrender: some build dependencies should be lib dependencies -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: jeremyhu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: xorg-libX11, xrender -------------------------------------+-------------------------------------- Comment(by ryandesign@…): I cannot run `pkg-config --modversion gtk+-2.0` unless xorg-xproto, xorg- renderproto and xorg-kbproto are installed. This means I cannot build any port that depends on gtk2 unless those other ports are installed. gtk2's gtk+-2.0.pc doesn't itself mention these requirements. But some other pkgconfig files do. So it feels to me like the responsibility of those ports to declare dependencies on the proto ports their pc files say they require. For example: {{{ $ grep ' xproto' /mp/lib/pkgconfig/*.pc /mp/lib/pkgconfig/ice.pc:Requires: xproto /mp/lib/pkgconfig/libfs.pc:Requires: xproto fontsproto /mp/lib/pkgconfig/sm.pc:Requires: ice xproto /mp/lib/pkgconfig/x11.pc:Requires: xproto kbproto /mp/lib/pkgconfig/xau.pc:Requires: xproto /mp/lib/pkgconfig/xaw6.pc:Requires: xproto xt xmu /mp/lib/pkgconfig/xaw7.pc:Requires: xproto xt xmu /mp/lib/pkgconfig/xcomposite.pc:Requires: xproto compositeproto >= 0.4 xfixes /mp/lib/pkgconfig/xcursor.pc:Requires: xproto /mp/lib/pkgconfig/xdamage.pc:Requires: xproto damageproto >= 1.1 xfixes /mp/lib/pkgconfig/xdmcp.pc:Requires: xproto /mp/lib/pkgconfig/xevie.pc:Requires: xproto /mp/lib/pkgconfig/xfixes.pc:Requires: xproto fixesproto >= 4.0 /mp/lib/pkgconfig/xfont.pc:Requires: xproto fontsproto /mp/lib/pkgconfig/xft.pc:Requires: xproto, xrender, fontconfig, freetype2 /mp/lib/pkgconfig/xmu.pc:Requires: xproto x11 xt /mp/lib/pkgconfig/xmuu.pc:Requires: xproto x11 /mp/lib/pkgconfig/xrandr.pc:Requires: xproto randrproto >= 1.3 /mp/lib/pkgconfig/xrender.pc:Requires: xproto renderproto >= 0.9 x11 /mp/lib/pkgconfig/xres.pc:Requires: xproto /mp/lib/pkgconfig/xt.pc:Requires: xproto x11 sm /mp/lib/pkgconfig/xv.pc:Requires: xproto videoproto /mp/lib/pkgconfig/xvmc.pc:Requires: xproto videoproto xv }}} Beginning with the first, ice.pc: {{{ $ port provides /mp/lib/pkgconfig/ice.pc /mp/lib/pkgconfig/ice.pc is provided by: xorg-libice $ port deps xorg-libice xorg-libice has build dependencies on: pkgconfig xorg-xproto xorg-xtrans }}} So the ice.pc file that xorg-libice installs says it requires "xproto", provided by the xorg-xproto port. Ports that depend on xorg-libice will probably use pkg-config to find out how to link with libice. This pkg- config call will fail unless xorg-xproto is installed. Therefore, xorg- libice must declare a lib dependency on xorg-xproto, to indicate that it may not be uninstalled after a build. It is not reasonable that every port that wants to use xorg-libice should be required to know what other proto ports xorg-libice requires and to declare dependencies on them. What if a new version of xorg-libice requires another proto port? It's not reasonable to have to update all ports that use xorg-libice to also list that dependency. This is what the dependency engine is for -- handling this for us by declaring dependencies at the source. "depends_build foo" means foo is required to build this software. "depends_run foo" means foo is required to run this software. I feel that running pkg-config against a .pc file installed by this port is included in the definition of running this software. "depends_lib foo" is equivalent to "depends_build foo\ndepends_run foo". -- Ticket URL: <http://trac.macports.org/ticket/19503#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS