Christopher Rogers, commit:
xorg-kbproto: Fixed depends but making it only xorg-utils-macros. It builds without xorg-xproto and xorg-libxkbfile-dev so its not needed.
You're right. And now I can't define, why I added xorg-libxkbfile-dev to depends. Maybe, because I change many sub-depends on the way.
But you're not right when you say " It builds without *** so its not needed."
Please, separate DEPENDS and BUILD_DEPENDS.
BUILD_DEPENDS is a tools to build package (shell, Python, C compiler, PHP, etc.) plus headers (where defined references to some functions contained in the DEPENDS).
So, please, correct me in next sentences. My methods to find depends and build depends:
Build depends. Xorg maintainers used autotools. First, we can just run ./configure with empty BUILD_DEPENDS and read output — what we need to write to BUILD_DEPENDS. Second, we can analise ./configure script to check what it want. Third, we can analise ./configure.ac (I guess, Xorg maintainers use small configure.ac, then they use autotools to generate ./configure before source packaging). Ok, package builds. Now we can shrink long list of build depends.
Reading configure.ac for "xorg-libxkbfile" (see graph abowe) we found build depends: xorg-macros 1.8 or later; x11; kbproto. Translate pc-names to package names: xorg-util-macros, xorg-libX11-dev, xorg-kbproto. Shrinking leaves only xorg-libX11-dev.
Now I need to define DEPENDS. Now I just use my tool:
cook xorg-libxkbfile --cdeps
glibc-base
libxcb
xorg-libX11
xorg-libXau
xorg-libXdmcp
It just uses ldd and find where (in which packages) it can found needed libs. Shrink this list: just xorg-libX11.
Now build *-dev package. It contains /usr/include/headers; /usr/lib/pkgconfig/file.pc; /usr/lib/file.la.
1. Headers files. Optional step. Check *.h files for includes:
/usr/include/XKMformat.h:
#include <X11/extensions/XKB.h>
#include <X11/extensions/XKBproto.h>
#include <X11/extensions/XKM.h>
Found files using pkgs.slitaz.org or custom tool.
First line: xorg-kbproto
Second line: xorg-kbproto
Third line: xorg-libxkbfile-dev (package itself).
So, depends for dev-package on this step is: xorg-kbproto.
2. *.pc file:
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/includeName: xkbfile
Description: The xkbfile Library
Version: 1.0.8
Requires: kbproto
Requires.private: x11
Cflags: -I${includedir}
Libs: -L${libdir} -lxkbfile
Lines begin with "Requires": kbproto, x11.
So, depends for dev-package on this step is: xorg-kbproto and xorg-libX11-dev.
3. /usr/lib/libxkbfile.la:
# Libraries that this one depends upon.
dependency_libs=' /usr/lib/libX11.la /usr/lib/libxcb.la /usr/lib/libXau.la /usr/lib/libXdmcp.la -ldl'
Find files: xorg-libX11-dev, libxcb-dev, xorg-libXau-dev, xorg-libXdmcp-dev.
4. Summarize three steps above: xorg-kbproto xorg-libX11-dev libxcb-dev xorg-libXau-dev xorg-libXdmcp-dev. Shrink: just xorg-libX11-dev.
So, depends for xorg-libxkbfile-dev is "xorg-libxkbfile xorg-libX11-dev".