summaryrefslogtreecommitdiffstats
path: root/contrib/libvpx
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2018-06-03 14:19:46 -0700
committerGitHub <[email protected]>2018-06-03 14:19:46 -0700
commitcc1d825afa463480d54f28f2c1fad4929f97446c (patch)
tree5ac8e7feaf52f5c9db7938f215fb44e8110f3249 /contrib/libvpx
parent86ad9b9acde85a8c25d1ccea76ef3b25295be4e0 (diff)
libvpx: fix vpx.pc pkg-config file for static builds (#1385)
The generated vpx.pc file results in undefined symbols during ffmpeg's configure tests. libpthread is not getting added to the link line as required. The vpx.pc file needs to include -lpthread in the Libs instead of Libs.private when generating only a static library. Fixes https://github.com/HandBrake/HandBrake/issues/1383
Diffstat (limited to 'contrib/libvpx')
-rw-r--r--contrib/libvpx/A00-static-pkg-config.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/contrib/libvpx/A00-static-pkg-config.patch b/contrib/libvpx/A00-static-pkg-config.patch
new file mode 100644
index 000000000..3e0d1bc00
--- /dev/null
+++ b/contrib/libvpx/A00-static-pkg-config.patch
@@ -0,0 +1,26 @@
+diff -ur libvpx-1.7.0.orig/libs.mk libvpx-1.7.0/libs.mk
+--- libvpx-1.7.0.orig/libs.mk 2018-01-24 14:25:44.000000000 -0800
++++ libvpx-1.7.0/libs.mk 2018-06-02 10:14:26.024150541 -0700
+@@ -333,12 +333,22 @@
+ $(qexec)echo 'Version: $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH)' >> $@
+ $(qexec)echo 'Requires:' >> $@
+ $(qexec)echo 'Conflicts:' >> $@
++ifneq ($(CONFIG_SHARED),yes)
++ifeq ($(HAVE_PTHREAD_H),yes)
++ $(qexec)echo 'Libs: -L$${libdir} -lvpx -lm -lpthread' >> $@
++ $(qexec)echo 'Libs.private:' >> $@
++else
+ $(qexec)echo 'Libs: -L$${libdir} -lvpx -lm' >> $@
++ $(qexec)echo 'Libs.private:' >> $@
++endif
++else
++ $(qexec)echo 'Libs: -L$${libdir} -lvpx' >> $@
+ ifeq ($(HAVE_PTHREAD_H),yes)
+ $(qexec)echo 'Libs.private: -lm -lpthread' >> $@
+ else
+ $(qexec)echo 'Libs.private: -lm' >> $@
+ endif
++endif
+ $(qexec)echo 'Cflags: -I$${includedir}' >> $@
+ INSTALL-LIBS-yes += $(LIBSUBDIR)/pkgconfig/vpx.pc
+ INSTALL_MAPS += $(LIBSUBDIR)/pkgconfig/%.pc %.pc