]> git.sesse.net Git - vlc/blob - contrib/src/pkg-static.sh
vdpau: check decoder profile support (refs #8400)
[vlc] / contrib / src / pkg-static.sh
1 #! /bin/sh
2 # Copyright (C) 2012 RĂ©mi Denis-Courmont
3 # This file is distributed under the same license as the vlc package.
4
5 if test -z "$1" || test -n "$2"; then
6         echo "Usage: $0 <file.pc>" >&2
7         echo "Merges the pkg-config Libs.private stanza into Libs stanza." >&2
8         exit 1
9 fi
10
11 exec <"$1" >"$1.tmp" || exit $?
12
13 PUBLIC=""
14 PRIVATE=""
15
16 while read LINE; do
17         pub="${LINE#Libs:}"
18         priv="${LINE#Libs.private:}"
19         if test "$pub" != "$LINE"; then
20                 PUBLIC="$pub"
21         elif test "$priv" != "$LINE"; then
22                 PRIVATE="$priv"
23         else
24                 echo "$LINE"
25         fi
26 done
27 echo "Libs: $PUBLIC $PRIVATE"
28
29 mv -f -- "$1.tmp" "$1"