Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ExeBy/exe_root.../usr/lib/rpm
File: pkgconfigdeps.sh
#!/bin/bash
[0] Fix | Delete
[1] Fix | Delete
pkgconfig=/usr/bin/pkg-config
[2] Fix | Delete
test -x $pkgconfig || {
[3] Fix | Delete
cat > /dev/null
[4] Fix | Delete
exit 0
[5] Fix | Delete
}
[6] Fix | Delete
[7] Fix | Delete
[ $# -ge 1 ] || {
[8] Fix | Delete
cat > /dev/null
[9] Fix | Delete
exit 0
[10] Fix | Delete
}
[11] Fix | Delete
[12] Fix | Delete
$pkgconfig --atleast-pkgconfig-version="0.24" || {
[13] Fix | Delete
cat > /dev/null
[14] Fix | Delete
exit 0
[15] Fix | Delete
}
[16] Fix | Delete
[17] Fix | Delete
# Under pkgconf, disables dependency resolver
[18] Fix | Delete
export PKG_CONFIG_MAXIMUM_TRAVERSE_DEPTH=1
[19] Fix | Delete
[20] Fix | Delete
case $1 in
[21] Fix | Delete
-P|--provides)
[22] Fix | Delete
while read filename ; do
[23] Fix | Delete
case "${filename}" in
[24] Fix | Delete
*.pc)
[25] Fix | Delete
# Query the dependencies of the package.
[26] Fix | Delete
DIR="`dirname ${filename}`"
[27] Fix | Delete
export PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig"
[28] Fix | Delete
$pkgconfig --print-provides "$filename" 2> /dev/null | while read n r v ; do
[29] Fix | Delete
[ -n "$n" ] || continue
[30] Fix | Delete
# We have a dependency. Make a note that we need the pkgconfig
[31] Fix | Delete
# tool for this package.
[32] Fix | Delete
echo -n "pkgconfig($n) "
[33] Fix | Delete
[ -n "$r" ] && [ -n "$v" ] && echo -n "$r" "$v"
[34] Fix | Delete
echo
[35] Fix | Delete
done
[36] Fix | Delete
;;
[37] Fix | Delete
esac
[38] Fix | Delete
done
[39] Fix | Delete
;;
[40] Fix | Delete
-R|--requires)
[41] Fix | Delete
while read filename ; do
[42] Fix | Delete
case "${filename}" in
[43] Fix | Delete
*.pc)
[44] Fix | Delete
i="`expr $i + 1`"
[45] Fix | Delete
[ $i -eq 1 ] && echo "$pkgconfig"
[46] Fix | Delete
DIR="`dirname ${filename}`"
[47] Fix | Delete
export PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig"
[48] Fix | Delete
$pkgconfig --print-requires --print-requires-private "$filename" 2> /dev/null | while read n r v ; do
[49] Fix | Delete
[ -n "$n" ] || continue
[50] Fix | Delete
echo -n "pkgconfig($n) "
[51] Fix | Delete
[ -n "$r" ] && [ -n "$v" ] && echo -n "$r" "$v"
[52] Fix | Delete
echo
[53] Fix | Delete
done
[54] Fix | Delete
esac
[55] Fix | Delete
done
[56] Fix | Delete
;;
[57] Fix | Delete
esac
[58] Fix | Delete
exit 0
[59] Fix | Delete
[60] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function