Commit 49c4c7aa authored by Rafaël Carré's avatar Rafaël Carré Committed by Jean-Baptiste Kempf

pkg-static.sh: also merge Requires.private with Requires

(cherry picked from commit d2c6b81287fc01b5afea049a87b9280f5cb59522)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 180ba5de
...@@ -4,26 +4,35 @@ ...@@ -4,26 +4,35 @@
if test -z "$1" || test -n "$2"; then if test -z "$1" || test -n "$2"; then
echo "Usage: $0 <file.pc>" >&2 echo "Usage: $0 <file.pc>" >&2
echo "Merges the pkg-config Libs.private stanza into Libs stanza." >&2 echo "Merges the pkg-config {Requires/Libs}.private stanza into {Requires/Libs} stanzas." >&2
exit 1 exit 1
fi fi
exec <"$1" >"$1.tmp" || exit $? exec <"$1" >"$1.tmp" || exit $?
PUBLIC="" LIBS_PUBLIC=""
PRIVATE="" LIBS_PRIVATE=""
REQUIRES_PUBLIC=""
REQUIRES_PRIVATE=""
while read LINE; do while read LINE; do
pub="${LINE#Libs:}" lpub="${LINE#Libs:}"
priv="${LINE#Libs.private:}" lpriv="${LINE#Libs.private:}"
if test "$pub" != "$LINE"; then rpub="${LINE#Requires:}"
PUBLIC="$pub" rpriv="${LINE#Requires.private:}"
elif test "$priv" != "$LINE"; then if test "$lpub" != "$LINE"; then
PRIVATE="$priv" LIBS_PUBLIC="$lpub"
elif test "$lpriv" != "$LINE"; then
LIBS_PRIVATE="$lpriv"
elif test "$rpub" != "$LINE"; then
REQUIRES_PUBLIC="$rpub"
elif test "$rpriv" != "$LINE"; then
REQUIRES_PRIVATE="$rpriv"
else else
echo "$LINE" echo "$LINE"
fi fi
done done
echo "Libs: $PUBLIC $PRIVATE" echo "Libs: $LIBS_PUBLIC $LIBS_PRIVATE"
echo "Requires: $REQUIRES_PUBLIC $REQUIRES_PRIVATE"
mv -f -- "$1.tmp" "$1" mv -f -- "$1.tmp" "$1"
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