shithub: openh264

Download patch

ref: 93621d6d9ab510424c6f76045f4debddb8787b3c
parent: a24bac34bd292f88c41c0d3428033fb4ed72e4c4
author: Martin Storsjö <martin@martin.st>
date: Fri Jan 2 16:54:21 EST 2015

Include -lstdc++ under Libs.private in the pkg-config file

This allows linking statically to the library, by passing --static
to pkg-config.

--- a/Makefile
+++ b/Makefile
@@ -28,6 +28,7 @@
 GMP_API_BRANCH=Firefox36
 CCASFLAGS=$(CFLAGS)
 VERSION=1.3
+STATIC_LDFLAGS=-lstdc++
 
 ifeq (,$(wildcard $(SRC_PATH)gmp-api))
 HAVE_GMP_API=No
@@ -220,7 +221,7 @@
 endif
 
 $(PROJECT_NAME).pc: $(PROJECT_NAME).pc.in
-	@sed -e 's;@prefix@;$(PREFIX);' -e 's;@VERSION@;$(VERSION);' < $(PROJECT_NAME).pc.in > $@
+	@sed -e 's;@prefix@;$(PREFIX);' -e 's;@VERSION@;$(VERSION);' -e 's;@LIBS_PRIVATE@;$(STATIC_LDFLAGS);' < $(PROJECT_NAME).pc.in > $@
 
 install-headers:
 	mkdir -p $(PREFIX)/include/wels
--- a/build/msvc-common.mk
+++ b/build/msvc-common.mk
@@ -41,3 +41,4 @@
 SHARED=-LD
 EXTRA_LIBRARY=$(PROJECT_NAME)_dll.lib
 SHLDFLAGS=-link -def:openh264.def -implib:$(EXTRA_LIBRARY)
+STATIC_LDFLAGS=
--- a/openh264.pc.in
+++ b/openh264.pc.in
@@ -6,4 +6,5 @@
 Description: OpenH264 is a codec library which supports H.264 encoding and decoding. It is suitable for use in real time applications such as WebRTC.
 Version: @VERSION@
 Libs: -L${libdir} -lopenh264
+Libs.private: @LIBS_PRIVATE@
 Cflags: -I${includedir}