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 ...@@ -23,7 +23,7 @@ for inc in src/*.h; do
included=`grep '# *include' $inc | included=`grep '# *include' $inc |
sed -e 's/[^<"]*[<"]//' -e 's/[>"]//' | sed -e 's/[^<"]*[<"]//' -e 's/[>"]//' |
grep -v 'xcb.h\|xproto.h'` grep -v 'xcb.h\|xproto.h'`
requires=`grep '^Requires:' $pcin` requires=`grep '^Requires.private:' $pcin`
missing="" missing=""
for i in $included; do for i in $included; do
ibase=`basename $i .h` ibase=`basename $i .h`
...@@ -58,7 +58,7 @@ for inc in src/*.h; do ...@@ -58,7 +58,7 @@ for inc in src/*.h; do
*) *)
if [ "$fix" = "y" ]; then if [ "$fix" = "y" ]; then
echo $package adding dependency on $missing echo $package adding dependency on $missing
sed -i '/^Requires:/s/$/ '"$missing"'/' $pcin sed -i '/^Requires.private:/s/$/ '"$missing"'/' $pcin
else else
echo $package missing $missing echo $package missing $missing
status=1 status=1
......
...@@ -6,6 +6,6 @@ includedir=@includedir@ ...@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB Composite Name: XCB Composite
Description: XCB Composite Extension Description: XCB Composite Extension
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Requires: xcb xcb-xfixes Requires.private: xcb xcb-xfixes
Libs: -L${libdir} -lxcb-composite Libs: -L${libdir} -lxcb-composite
Cflags: -I${includedir} Cflags: -I${includedir}
...@@ -6,6 +6,6 @@ includedir=@includedir@ ...@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB Damage Name: XCB Damage
Description: XCB Damage Extension Description: XCB Damage Extension
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Requires: xcb xcb-xfixes Requires.private: xcb xcb-xfixes
Libs: -L${libdir} -lxcb-damage Libs: -L${libdir} -lxcb-damage
Cflags: -I${includedir} Cflags: -I${includedir}
...@@ -6,6 +6,6 @@ includedir=@includedir@ ...@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB DPMS Name: XCB DPMS
Description: XCB DPMS Extension Description: XCB DPMS Extension
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Requires: xcb Requires.private: xcb
Libs: -L${libdir} -lxcb-dpms Libs: -L${libdir} -lxcb-dpms
Cflags: -I${includedir} Cflags: -I${includedir}
...@@ -6,6 +6,6 @@ includedir=@includedir@ ...@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB DRI2 Name: XCB DRI2
Description: XCB DRI2 Extension Description: XCB DRI2 Extension
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Requires: xcb Requires.private: xcb
Libs: -L${libdir} -lxcb-dri2 Libs: -L${libdir} -lxcb-dri2
Cflags: -I${includedir} Cflags: -I${includedir}
...@@ -6,6 +6,6 @@ includedir=@includedir@ ...@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB DRI3 Name: XCB DRI3
Description: XCB DRI3 Extension Description: XCB DRI3 Extension
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Requires: xcb Requires.private: xcb
Libs: -L${libdir} -lxcb-dri3 Libs: -L${libdir} -lxcb-dri3
Cflags: -I${includedir} Cflags: -I${includedir}
...@@ -6,6 +6,6 @@ includedir=@includedir@ ...@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB GLX Name: XCB GLX
Description: XCB GLX Extension Description: XCB GLX Extension
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Requires: xcb Requires.private: xcb
Libs: -L${libdir} -lxcb-glx Libs: -L${libdir} -lxcb-glx
Cflags: -I${includedir} Cflags: -I${includedir}
...@@ -6,6 +6,6 @@ includedir=@includedir@ ...@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB Present Name: XCB Present
Description: XCB Present Extension Description: XCB Present Extension
Version: @PACKAGE_VERSION@ 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 Libs: -L${libdir} -lxcb-present
Cflags: -I${includedir} Cflags: -I${includedir}
...@@ -6,6 +6,6 @@ includedir=@includedir@ ...@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB RandR Name: XCB RandR
Description: XCB RandR Extension Description: XCB RandR Extension
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Requires: xcb xcb-render Requires.private: xcb xcb-render
Libs: -L${libdir} -lxcb-randr Libs: -L${libdir} -lxcb-randr
Cflags: -I${includedir} Cflags: -I${includedir}
...@@ -6,6 +6,6 @@ includedir=@includedir@ ...@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB Record Name: XCB Record
Description: XCB Record Extension Description: XCB Record Extension
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Requires: xcb Requires.private: xcb
Libs: -L${libdir} -lxcb-record Libs: -L${libdir} -lxcb-record
Cflags: -I${includedir} Cflags: -I${includedir}
...@@ -6,6 +6,6 @@ includedir=@includedir@ ...@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB Render Name: XCB Render
Description: XCB Render Extension Description: XCB Render Extension
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Requires: xcb Requires.private: xcb
Libs: -L${libdir} -lxcb-render Libs: -L${libdir} -lxcb-render
Cflags: -I${includedir} Cflags: -I${includedir}
...@@ -6,6 +6,6 @@ includedir=@includedir@ ...@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB Res Name: XCB Res
Description: XCB X-Resource Extension Description: XCB X-Resource Extension
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Requires: xcb Requires.private: xcb
Libs: -L${libdir} -lxcb-res Libs: -L${libdir} -lxcb-res
Cflags: -I${includedir} Cflags: -I${includedir}
...@@ -6,6 +6,6 @@ includedir=@includedir@ ...@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB Screensaver Name: XCB Screensaver
Description: XCB Screensaver Extension Description: XCB Screensaver Extension
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Requires: xcb Requires.private: xcb
Libs: -L${libdir} -lxcb-screensaver Libs: -L${libdir} -lxcb-screensaver
Cflags: -I${includedir} Cflags: -I${includedir}
...@@ -6,6 +6,6 @@ includedir=@includedir@ ...@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB Shape Name: XCB Shape
Description: XCB Shape Extension Description: XCB Shape Extension
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Requires: xcb Requires.private: xcb
Libs: -L${libdir} -lxcb-shape Libs: -L${libdir} -lxcb-shape
Cflags: -I${includedir} Cflags: -I${includedir}
...@@ -6,6 +6,6 @@ includedir=@includedir@ ...@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB Shm Name: XCB Shm
Description: XCB Shm Extension Description: XCB Shm Extension
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Requires: xcb Requires.private: xcb
Libs: -L${libdir} -lxcb-shm Libs: -L${libdir} -lxcb-shm
Cflags: -I${includedir} Cflags: -I${includedir}
...@@ -6,6 +6,6 @@ includedir=@includedir@ ...@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB Sync Name: XCB Sync
Description: XCB Sync Extension Description: XCB Sync Extension
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Requires: xcb Requires.private: xcb
Libs: -L${libdir} -lxcb-sync Libs: -L${libdir} -lxcb-sync
Cflags: -I${includedir} Cflags: -I${includedir}
...@@ -6,6 +6,6 @@ includedir=@includedir@ ...@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB Xevie Name: XCB Xevie
Description: XCB Xevie Extension Description: XCB Xevie Extension
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Requires: xcb Requires.private: xcb
Libs: -L${libdir} -lxcb-xevie Libs: -L${libdir} -lxcb-xevie
Cflags: -I${includedir} Cflags: -I${includedir}
...@@ -6,6 +6,6 @@ includedir=@includedir@ ...@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB XFree86-DRI Name: XCB XFree86-DRI
Description: XCB XFree86-DRI Extension Description: XCB XFree86-DRI Extension
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Requires: xcb Requires.private: xcb
Libs: -L${libdir} -lxcb-xf86dri Libs: -L${libdir} -lxcb-xf86dri
Cflags: -I${includedir} Cflags: -I${includedir}
...@@ -6,6 +6,6 @@ includedir=@includedir@ ...@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB XFixes Name: XCB XFixes
Description: XCB XFixes Extension Description: XCB XFixes Extension
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Requires: xcb xcb-render xcb-shape Requires.private: xcb xcb-render xcb-shape
Libs: -L${libdir} -lxcb-xfixes Libs: -L${libdir} -lxcb-xfixes
Cflags: -I${includedir} Cflags: -I${includedir}
...@@ -6,6 +6,6 @@ includedir=@includedir@ ...@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB Xinerama Name: XCB Xinerama
Description: XCB Xinerama Extension Description: XCB Xinerama Extension
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Requires: xcb Requires.private: xcb
Libs: -L${libdir} -lxcb-xinerama Libs: -L${libdir} -lxcb-xinerama
Cflags: -I${includedir} Cflags: -I${includedir}
...@@ -6,6 +6,6 @@ includedir=@includedir@ ...@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB XInput Name: XCB XInput
Description: XCB XInput Extension (EXPERIMENTAL) Description: XCB XInput Extension (EXPERIMENTAL)
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Requires: xcb xcb-xfixes Requires.private: xcb xcb-xfixes
Libs: -L${libdir} -lxcb-xinput Libs: -L${libdir} -lxcb-xinput
Cflags: -I${includedir} Cflags: -I${includedir}
...@@ -6,6 +6,6 @@ includedir=@includedir@ ...@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB XKB Name: XCB XKB
Description: XCB Keyboard Extension (EXPERIMENTAL) Description: XCB Keyboard Extension (EXPERIMENTAL)
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Requires: xcb Requires.private: xcb
Libs: -L${libdir} -lxcb-xkb Libs: -L${libdir} -lxcb-xkb
Cflags: -I${includedir} Cflags: -I${includedir}
...@@ -6,6 +6,6 @@ includedir=@includedir@ ...@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB Xprint Name: XCB Xprint
Description: XCB Xprint Extension Description: XCB Xprint Extension
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Requires: xcb Requires.private: xcb
Libs: -L${libdir} -lxcb-xprint Libs: -L${libdir} -lxcb-xprint
Cflags: -I${includedir} Cflags: -I${includedir}
...@@ -6,6 +6,6 @@ includedir=@includedir@ ...@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB SELinux Name: XCB SELinux
Description: XCB SELinux Extension Description: XCB SELinux Extension
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Requires: xcb Requires.private: xcb
Libs: -L${libdir} -lxcb-xselinux Libs: -L${libdir} -lxcb-xselinux
Cflags: -I${includedir} Cflags: -I${includedir}
...@@ -6,6 +6,6 @@ includedir=@includedir@ ...@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB XTEST Name: XCB XTEST
Description: XCB XTEST Extension Description: XCB XTEST Extension
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Requires: xcb Requires.private: xcb
Libs: -L${libdir} -lxcb-xtest Libs: -L${libdir} -lxcb-xtest
Cflags: -I${includedir} Cflags: -I${includedir}
...@@ -6,6 +6,6 @@ includedir=@includedir@ ...@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB Xv Name: XCB Xv
Description: XCB Xv Extension Description: XCB Xv Extension
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Requires: xcb xcb-shm Requires.private: xcb xcb-shm
Libs: -L${libdir} -lxcb-xv Libs: -L${libdir} -lxcb-xv
Cflags: -I${includedir} Cflags: -I${includedir}
...@@ -6,6 +6,6 @@ includedir=@includedir@ ...@@ -6,6 +6,6 @@ includedir=@includedir@
Name: XCB XvMC Name: XCB XvMC
Description: XCB XvMC Extension Description: XCB XvMC Extension
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Requires: xcb xcb-xv Requires.private: xcb xcb-xv
Libs: -L${libdir} -lxcb-xvmc Libs: -L${libdir} -lxcb-xvmc
Cflags: -I${includedir} 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