From 8a34f3659371680ca523aecfd9098c28f0f809eb Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Sun, 25 Dec 2016 18:25:41 +0100 Subject: [PATCH] build: Add version numbers to "Requires" entries in pkg-config files The (required) version numbers disappeared after edb4348732. --- avbuild/pkgconfig_generate.sh | 10 +++++++++- configure | 20 ++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/avbuild/pkgconfig_generate.sh b/avbuild/pkgconfig_generate.sh index 33e188f5ea..c7bc65254d 100755 --- a/avbuild/pkgconfig_generate.sh +++ b/avbuild/pkgconfig_generate.sh @@ -12,7 +12,15 @@ shortname=$1 name=lib${shortname} comment=$2 libs=$(eval echo \$extralibs_${shortname}) -requires=$(eval echo \$requires_${shortname}) +deps=$(eval echo \$${shortname}_deps) + +for dep in $deps; do + depname=lib${dep} + . ${depname}/${depname}.version + depversion=$(eval echo \$${depname}_VERSION) + requires="$requires ${depname} >= ${depversion}, " +done + requires=${requires%, } version=$(grep ${name}_VERSION= $name/${name}.version | cut -d= -f2) diff --git a/configure b/configure index 8e402383d8..09674aad4d 100755 --- a/configure +++ b/configure @@ -5396,11 +5396,7 @@ print_enabled_components libavformat/protocol_list.c URLProtocol url_protocols $ test -n "$WARNINGS" && printf "\n$WARNINGS" -# build pkg-config files - -lib_version(){ - eval printf "\"lib${1} >= \$LIB$(toupper ${1})_VERSION, \"" -} +# Settings for pkg-config files cat > avbuild/config.sh <> avbuild/config.sh +done