[vlc-commits] pkg-static.sh: also merge Requires.private with Requires
Rafaël Carré
git at videolan.org
Fri Sep 12 09:12:05 CEST 2014
vlc/vlc-2.2 | branch: master | Rafaël Carré <funman at videolan.org> | Sat Sep 6 18:09:21 2014 +0200| [49c4c7aa59b1764b0abaf2a1a87c276dff04071d] | committer: Jean-Baptiste Kempf
pkg-static.sh: also merge Requires.private with Requires
(cherry picked from commit d2c6b81287fc01b5afea049a87b9280f5cb59522)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=49c4c7aa59b1764b0abaf2a1a87c276dff04071d
---
contrib/src/pkg-static.sh | 29 +++++++++++++++++++----------
1 file changed, 19 insertions(+), 10 deletions(-)
diff --git a/contrib/src/pkg-static.sh b/contrib/src/pkg-static.sh
index 25c2af7..59cbd78 100755
--- a/contrib/src/pkg-static.sh
+++ b/contrib/src/pkg-static.sh
@@ -4,26 +4,35 @@
if test -z "$1" || test -n "$2"; then
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
fi
exec <"$1" >"$1.tmp" || exit $?
-PUBLIC=""
-PRIVATE=""
+LIBS_PUBLIC=""
+LIBS_PRIVATE=""
+REQUIRES_PUBLIC=""
+REQUIRES_PRIVATE=""
while read LINE; do
- pub="${LINE#Libs:}"
- priv="${LINE#Libs.private:}"
- if test "$pub" != "$LINE"; then
- PUBLIC="$pub"
- elif test "$priv" != "$LINE"; then
- PRIVATE="$priv"
+ lpub="${LINE#Libs:}"
+ lpriv="${LINE#Libs.private:}"
+ rpub="${LINE#Requires:}"
+ rpriv="${LINE#Requires.private:}"
+ if test "$lpub" != "$LINE"; then
+ 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
echo "$LINE"
fi
done
-echo "Libs: $PUBLIC $PRIVATE"
+echo "Libs: $LIBS_PUBLIC $LIBS_PRIVATE"
+echo "Requires: $REQUIRES_PUBLIC $REQUIRES_PRIVATE"
mv -f -- "$1.tmp" "$1"
More information about the vlc-commits
mailing list