1 # vim: set ts=4 sw=4 et ft=bash :
3 # This hook execute the following tasks:
4 # - warn if packages uses private Qt API but makedepends doesn't have
7 # This hook only really target qt6-base-private-devel, a lot of packages
8 # linked with Qt6::CorePrivate and Qt6::GuiPrivate, yet don't need its
13 find ${PKGDESTDIR} -type f |
16 _lf
=${_fn#${PKGDESTDIR}}
17 if [ "${skiprdeps/${_lf}/}" != "${skiprdeps}" ]; then
20 read -n4 _elf
< "$_fn"
21 if [ "$_elf" = $
'\177ELF' ]; then
24 /required from /{s/.*required from \(.*\):/\1/;h;}
25 /Qt_[0-9]*_PRIVATE_API/{g;p;}
34 local _list _shlib _version _md _v _ok
36 if [ -n "$noverifyrdeps" ]; then
40 _list
=$
(get_qt_private
)
41 for _shlib
in $_list; do
42 msg_normal
"${pkgver}: requires PRIVATE_API from $_shlib\n"
44 _version
=$
(printf '%s\n' $_list |
46 s/^libQt([0-9]*)3D.*/\1/
47 s/^libQt([0-9]*).*/\1/
48 ' |
grep -v '^5$' |
uniq
50 for _v
in $_version; do
52 for _md
in ${makedepends}; do
54 # Anything will works, because they're updated together
55 qt
${_v}-*-private-devel)
61 if [ -z "$_ok" ]; then
62 msg_warn
"${pkgver}: using Qt${_v}_PRIVATE_API but doesn't use qt${_v}-*-private-devel\n"