[vlc-devel] [PATCH] contrib: srt: Patch to add '-lc++' to private linking flags for apple

Konstantin Pavlov thresh at videolan.org
Fri Dec 8 21:27:57 CET 2017


It's also needed on Debian at least.

On Fri, Dec 08, 2017 at 07:58:47PM +0100, david.fuhrmann at gmail.com wrote:
> From: David Fuhrmann <dfuhrmann at videolan.org>
> 
> This library needs to add the standard c++ library in the linking
> flags inside the pc file, to allow linking with a non-C++ module
> (like we have in VLC).
> ---
>  contrib/src/srt/add-stdcpplib.patch | 13 +++++++++++++
>  contrib/src/srt/rules.mak           |  1 +
>  2 files changed, 14 insertions(+)
>  create mode 100644 contrib/src/srt/add-stdcpplib.patch
> 
> diff --git a/contrib/src/srt/add-stdcpplib.patch b/contrib/src/srt/add-stdcpplib.patch
> new file mode 100644
> index 0000000..e7d6ac8
> --- /dev/null
> +++ b/contrib/src/srt/add-stdcpplib.patch
> @@ -0,0 +1,13 @@
> +--- a/CMakeLists.txt	2017-12-08 19:41:43.000000000 +0100
> ++++ b/CMakeLists.txt	2017-12-08 19:43:30.000000000 +0100
> +@@ -433,6 +433,10 @@
> + endif()
> + endif()
> + 
> ++if ( APPLE )
> ++	set (SRT_LIBS_PRIVATE ${SRT_LIBS_PRIVATE} -lc++)
> ++endif()
> ++
> + join_arguments(SRT_LIBS_PRIVATE ${SRT_LIBS_PRIVATE})
> + 
> + # haisrt.pc left temporarily for backward compatibility. To be removed in future!
> diff --git a/contrib/src/srt/rules.mak b/contrib/src/srt/rules.mak
> index b263bff..1cad857 100644
> --- a/contrib/src/srt/rules.mak
> +++ b/contrib/src/srt/rules.mak
> @@ -24,6 +24,7 @@ $(TARBALLS)/srt-$(SRT_VERSION).tar.gz:
>  srt: srt-$(SRT_VERSION).tar.gz .sum-srt
>  	$(UNPACK)
>  	$(APPLY) $(SRC)/srt/fix-pc.patch
> +	$(APPLY) $(SRC)/srt/add-stdcpplib.patch
>  	$(call pkg_static,"scripts/haisrt.pc.in")
>  	mv srt-$(SRT_VERSION) $@ && touch $@
>  
> -- 
> 2.9.3 (Apple Git-75)
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel

-- 
VideoLAN, Vice President
www.videolan.org
+7 926 165 45 31
@cryothresh


More information about the vlc-devel mailing list