contrib: schroedinger: remove obsolete patches
[vlc/gmpfix.git] / contrib / src / pkg-static.sh
blob25c2af754a6f648493d52fb40cf62eda5131bdb1
1 #! /bin/sh
2 # Copyright (C) 2012 RĂ©mi Denis-Courmont
3 # This file is distributed under the same license as the vlc package.
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
11 exec <"$1" >"$1.tmp" || exit $?
13 PUBLIC=""
14 PRIVATE=""
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"
26 done
27 echo "Libs: $PUBLIC $PRIVATE"
29 mv -f -- "$1.tmp" "$1"