From f9ecbd07dd0100e2251a1523a961f8677da0d400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= Date: Sat, 6 Aug 2016 17:14:33 +0300 Subject: [PATCH] contrib: x265: fix static linking with pkg-config (fixes #16389) --- contrib/src/x265/rules.mak | 3 +++ contrib/src/x265/x265-pkg-libs.patch | 10 ++++++++++ 2 files changed, 13 insertions(+) create mode 100644 contrib/src/x265/x265-pkg-libs.patch diff --git a/contrib/src/x265/rules.mak b/contrib/src/x265/rules.mak index fd2f1756a9..ccaec4fd98 100644 --- a/contrib/src/x265/rules.mak +++ b/contrib/src/x265/rules.mak @@ -28,6 +28,9 @@ x265: x265-$(X265_VERSION).tar.bz2 .sum-x265 $(BZCAT) "$<" | (cd $@-$(X265_VERSION) && tar xv --strip-components=1) $(APPLY) $(SRC)/x265/x265-ldl-linking.patch $(call pkg_static,"source/x265.pc.in") +ifndef HAVE_WIN32 + $(APPLY) $(SRC)/x265/x265-pkg-libs.patch +endif $(MOVE) .x265: x265 toolchain.cmake diff --git a/contrib/src/x265/x265-pkg-libs.patch b/contrib/src/x265/x265-pkg-libs.patch new file mode 100644 index 0000000000..d0f85209e1 --- /dev/null +++ b/contrib/src/x265/x265-pkg-libs.patch @@ -0,0 +1,10 @@ +diff -Nru x265.orig/source/x265.pc.in x265/source/x265.pc.in +--- x265.orig/source/x265.pc.in 2016-08-06 17:04:25.925985965 +0300 ++++ x265/source/x265.pc.in 2016-08-06 17:07:06.548987568 +0300 +@@ -7,5 +7,5 @@ + Description: H.265/HEVC video encoder + Version: @X265_LATEST_TAG@ + Cflags: -I${includedir} +-Libs: -L${libdir} -lx265 @PRIVATE_LIBS@ ++Libs: -L${libdir} -lx265 @PRIVATE_LIBS@ -ldl -lpthread + Requires: -- GitLab