[FFmpeg-devel] [PATCH] build: add global extralibs to pkg-config file generation

James Almer jamrial at gmail.com
Sat Oct 14 19:55:14 EEST 2017


Dependencies like libm and pthreads are now global again, so handle
that while generating our pkg-config files.

Signed-off-by: James Almer <jamrial at gmail.com>
---
The pkg-config file generation nonetheless needs some more thought.
Much like how we're dealing with external libs not properly listing
all their dependencies for static builds, it's likely we're also
doing something wrong in that regard.

 configure                     | 1 +
 ffbuild/pkgconfig_generate.sh | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 09f8ed305b..56e9b906f8 100755
--- a/configure
+++ b/configure
@@ -7158,6 +7158,7 @@ rpath=$(enabled rpath && echo "-Wl,-rpath,\${libdir}")
 source_path=${source_path}
 LIBPREF=${LIBPREF}
 LIBSUF=${LIBSUF}
+extralibs="$extralibs"
 extralibs_avutil="$avutil_extralibs"
 extralibs_avcodec="$avcodec_extralibs"
 extralibs_avformat="$avformat_extralibs"
diff --git a/ffbuild/pkgconfig_generate.sh b/ffbuild/pkgconfig_generate.sh
index e5de6716d2..ed1cbb3635 100755
--- a/ffbuild/pkgconfig_generate.sh
+++ b/ffbuild/pkgconfig_generate.sh
@@ -12,7 +12,7 @@ shortname=$1
 name=lib${shortname}
 fullname=${name}${build_suffix}
 comment=$2
-libs=$(eval echo \$extralibs_${shortname})
+libs=$(eval echo \$extralibs_${shortname} \$extralibs)
 deps=$(eval echo \$${shortname}_deps)
 
 for dep in $deps; do
-- 
2.14.2



More information about the ffmpeg-devel mailing list