Commit 7b40d6e8 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont Committed by Jean-Baptiste Kempf

contrib: helper to merge Libs and Libs.private in pkg-config files

pkg-config is unable to autodetect whether a package is linked
statically or not. This helper just moves Libs.private into Libs
manually in case only a static library is built. Most if not all of
contribs are built that way.
(cherry picked from commit 3ce29fe10e2e9813452abbbd1a0aaaea07a57411)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 23b55adc
...@@ -268,6 +268,7 @@ UNPACK = $(RM) -R $@ \ ...@@ -268,6 +268,7 @@ UNPACK = $(RM) -R $@ \
$(foreach f,$(filter %.zip,$^), && unzip $(f)) $(foreach f,$(filter %.zip,$^), && unzip $(f))
UNPACK_DIR = $(basename $(basename $(notdir $<))) UNPACK_DIR = $(basename $(basename $(notdir $<)))
APPLY = (cd $(UNPACK_DIR) && patch -p1) < APPLY = (cd $(UNPACK_DIR) && patch -p1) <
pkg_static = (cd $(UNPACK_DIR) && ../../src/pkg-static.sh $(1))
MOVE = mv $(UNPACK_DIR) $@ && touch $@ MOVE = mv $(UNPACK_DIR) $@ && touch $@
AUTOMAKE_DATA_DIRS=$(abspath $(dir $(shell which automake))/../share/automake*) AUTOMAKE_DATA_DIRS=$(abspath $(dir $(shell which automake))/../share/automake*)
......
#! /bin/sh
# Copyright (C) 2012 Rémi Denis-Courmont
# This file is distributed under the same license as the vlc package.
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
exit 1
fi
exec <"$1" >"$1.tmp" || exit $?
PUBLIC=""
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"
else
echo "$LINE"
fi
done
echo "Libs: $PUBLIC $PRIVATE"
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