Commit 382d306d authored by Emil Velikov's avatar Emil Velikov Committed by Uli Schlachter

Move internal/private dependencies to Requires.private

Program using the xcb sub-modules has indirect compile and runtime
dependency of core xcb. To ensure this out we currently list xcb in
the Requires field of the pkg-config files. While this provides all
the required dependencies for successful compilation this causes
over-linking and hides potential linking miss-use against the xcb modules.

By moving to Requires.private we retain the compilation and runtime
compatibility and avoids any runtime problems.

Cc: Keith Packard <keithp@keithp.com>
Cc: Alan Coopersmith <alan.coopersmith@oracle.com>
References: http://people.freedesktop.org/~dbn/pkg-config-guide.html#faq
References: https://wiki.mageia.org/en/Overlinking_issues_in_packaging
References: http://err.no/personal/blog/2008/Mar/25Signed-off-by: Emil Velikov's avatarEmil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Julien Cristau's avatarJulien Cristau <jcristau@debian.org>
Signed-off-by: Uli Schlachter's avatarUli Schlachter <psychon@znc.in>
parent b0e6c2de
......@@ -23,7 +23,7 @@ for inc in src/*.h; do
included=`grep '# *include' $inc |
sed -e 's/[^<"]*[<"]//' -e 's/[>"]//' |
grep -v 'xcb.h\|xproto.h'`
requires=`grep '^Requires:' $pcin`
requires=`grep '^Requires.private:' $pcin`
missing=""
for i in $included; do
ibase=`basename $i .h`
......@@ -58,7 +58,7 @@ for inc in src/*.h; do
*)
if [ "$fix" = "y" ]; then
echo $package adding dependency on $missing
sed -i '/^Requires:/s/$/ '"$missing"'/' $pcin
sed -i '/^Requires.private:/s/$/ '"$missing"'/' $pcin
else
echo $package missing $missing
status=1
......
......@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB Composite
Description: XCB Composite Extension
Version: @PACKAGE_VERSION@
Requires: xcb xcb-xfixes
Requires.private: xcb xcb-xfixes
Libs: -L${libdir} -lxcb-composite
Cflags: -I${includedir}
......@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB Damage
Description: XCB Damage Extension
Version: @PACKAGE_VERSION@
Requires: xcb xcb-xfixes
Requires.private: xcb xcb-xfixes
Libs: -L${libdir} -lxcb-damage
Cflags: -I${includedir}
......@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB DPMS
Description: XCB DPMS Extension
Version: @PACKAGE_VERSION@
Requires: xcb
Requires.private: xcb
Libs: -L${libdir} -lxcb-dpms
Cflags: -I${includedir}
......@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB DRI2
Description: XCB DRI2 Extension
Version: @PACKAGE_VERSION@
Requires: xcb
Requires.private: xcb
Libs: -L${libdir} -lxcb-dri2
Cflags: -I${includedir}
......@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB DRI3
Description: XCB DRI3 Extension
Version: @PACKAGE_VERSION@
Requires: xcb
Requires.private: xcb
Libs: -L${libdir} -lxcb-dri3
Cflags: -I${includedir}
......@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB GLX
Description: XCB GLX Extension
Version: @PACKAGE_VERSION@
Requires: xcb
Requires.private: xcb
Libs: -L${libdir} -lxcb-glx
Cflags: -I${includedir}
......@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB Present
Description: XCB Present Extension
Version: @PACKAGE_VERSION@
Requires: xcb xcb-randr xcb-xfixes xcb-sync
Requires.private: xcb xcb-randr xcb-xfixes xcb-sync
Libs: -L${libdir} -lxcb-present
Cflags: -I${includedir}
......@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB RandR
Description: XCB RandR Extension
Version: @PACKAGE_VERSION@
Requires: xcb xcb-render
Requires.private: xcb xcb-render
Libs: -L${libdir} -lxcb-randr
Cflags: -I${includedir}
......@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB Record
Description: XCB Record Extension
Version: @PACKAGE_VERSION@
Requires: xcb
Requires.private: xcb
Libs: -L${libdir} -lxcb-record
Cflags: -I${includedir}
......@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB Render
Description: XCB Render Extension
Version: @PACKAGE_VERSION@
Requires: xcb
Requires.private: xcb
Libs: -L${libdir} -lxcb-render
Cflags: -I${includedir}
......@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB Res
Description: XCB X-Resource Extension
Version: @PACKAGE_VERSION@
Requires: xcb
Requires.private: xcb
Libs: -L${libdir} -lxcb-res
Cflags: -I${includedir}
......@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB Screensaver
Description: XCB Screensaver Extension
Version: @PACKAGE_VERSION@
Requires: xcb
Requires.private: xcb
Libs: -L${libdir} -lxcb-screensaver
Cflags: -I${includedir}
......@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB Shape
Description: XCB Shape Extension
Version: @PACKAGE_VERSION@
Requires: xcb
Requires.private: xcb
Libs: -L${libdir} -lxcb-shape
Cflags: -I${includedir}
......@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB Shm
Description: XCB Shm Extension
Version: @PACKAGE_VERSION@
Requires: xcb
Requires.private: xcb
Libs: -L${libdir} -lxcb-shm
Cflags: -I${includedir}
......@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB Sync
Description: XCB Sync Extension
Version: @PACKAGE_VERSION@
Requires: xcb
Requires.private: xcb
Libs: -L${libdir} -lxcb-sync
Cflags: -I${includedir}
......@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB Xevie
Description: XCB Xevie Extension
Version: @PACKAGE_VERSION@
Requires: xcb
Requires.private: xcb
Libs: -L${libdir} -lxcb-xevie
Cflags: -I${includedir}
......@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB XFree86-DRI
Description: XCB XFree86-DRI Extension
Version: @PACKAGE_VERSION@
Requires: xcb
Requires.private: xcb
Libs: -L${libdir} -lxcb-xf86dri
Cflags: -I${includedir}
......@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB XFixes
Description: XCB XFixes Extension
Version: @PACKAGE_VERSION@
Requires: xcb xcb-render xcb-shape
Requires.private: xcb xcb-render xcb-shape
Libs: -L${libdir} -lxcb-xfixes
Cflags: -I${includedir}
......@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB Xinerama
Description: XCB Xinerama Extension
Version: @PACKAGE_VERSION@
Requires: xcb
Requires.private: xcb
Libs: -L${libdir} -lxcb-xinerama
Cflags: -I${includedir}
......@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB XInput
Description: XCB XInput Extension (EXPERIMENTAL)
Version: @PACKAGE_VERSION@
Requires: xcb xcb-xfixes
Requires.private: xcb xcb-xfixes
Libs: -L${libdir} -lxcb-xinput
Cflags: -I${includedir}
......@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB XKB
Description: XCB Keyboard Extension (EXPERIMENTAL)
Version: @PACKAGE_VERSION@
Requires: xcb
Requires.private: xcb
Libs: -L${libdir} -lxcb-xkb
Cflags: -I${includedir}
......@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB Xprint
Description: XCB Xprint Extension
Version: @PACKAGE_VERSION@
Requires: xcb
Requires.private: xcb
Libs: -L${libdir} -lxcb-xprint
Cflags: -I${includedir}
......@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB SELinux
Description: XCB SELinux Extension
Version: @PACKAGE_VERSION@
Requires: xcb
Requires.private: xcb
Libs: -L${libdir} -lxcb-xselinux
Cflags: -I${includedir}
......@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB XTEST
Description: XCB XTEST Extension
Version: @PACKAGE_VERSION@
Requires: xcb
Requires.private: xcb
Libs: -L${libdir} -lxcb-xtest
Cflags: -I${includedir}
......@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB Xv
Description: XCB Xv Extension
Version: @PACKAGE_VERSION@
Requires: xcb xcb-shm
Requires.private: xcb xcb-shm
Libs: -L${libdir} -lxcb-xv
Cflags: -I${includedir}
......@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB XvMC
Description: XCB XvMC Extension
Version: @PACKAGE_VERSION@
Requires: xcb xcb-xv
Requires.private: xcb xcb-xv
Libs: -L${libdir} -lxcb-xvmc
Cflags: -I${includedir}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment