[vlc-commits] pkg-static.sh: also merge Requires.private with Requires
Rafaël Carré
git at videolan.org
Sat Sep 6 18:29:01 CEST 2014
vlc | branch: master | Rafaël Carré <funman at videolan.org> | Sat Sep 6 18:09:21 2014 +0200| [d2c6b81287fc01b5afea049a87b9280f5cb59522] | committer: Rafaël Carré
pkg-static.sh: also merge Requires.private with Requires
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d2c6b81287fc01b5afea049a87b9280f5cb59522
---
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