[vlc-commits] [Git][videolan/vlc][master] contrib: librist: patch meson.build for libcjson
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Fri Apr 29 10:39:01 UTC 2022
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
b4cd6a8b by Alexandre Janniaux at 2022-04-29T09:37:35+00:00
contrib: librist: patch meson.build for libcjson
Debian is using cJSON from github.com/DaveGamble/cJSON, as well as
archlinux and homebrew, which is shipping a libcjson.pc file. Only
ubuntu is using a different version not including the .pc file.
Homebrew is also shipping a libcjson.pc file, and without this, it would
generate a pc file like that:
prefix=/foo/bar/vlc/contrib/x86_64-apple-darwin21
libdir=${prefix}/lib
includedir=${prefix}/include
Name: librist
Description: Reliable Internet Stream Transport (RIST)
Version: 0.2.4
Libs: -L${libdir} -lrist /usr/local/Cellar/cjson/1.7.15/lib/libcjson.1.7.15.dylib
Cflags: -I${includedir} -I/usr/local/Cellar/cjson/1.7.15/include
Which won't be valid, especially for a standalone build with the
macosx/build.sh script.
It was leading to undefined references to cJSON symbols when it's
installed from homebrew.
Backport from upstream 809390b3b75a259a704079d0fb4d8f1b5f7fa956.
Refs #26860
- - - - -
2 changed files:
- + contrib/src/librist/librist-fix-libcjson-meson.patch
- contrib/src/librist/rules.mak
Changes:
=====================================
contrib/src/librist/librist-fix-libcjson-meson.patch
=====================================
@@ -0,0 +1,13 @@
+diff --git a/meson.build b/meson.build
+index a77780667dfb07d700d39c6c3353c0ba4906b178..0ed820152476e0caed3ba6d203ba236083fb8438 100755
+--- a/meson.build
++++ b/meson.build
+@@ -156,7 +156,7 @@ endif
+
+ #On ubuntu cjson does not come with pkgconfig files, hence the extended checking.
+ if not builtin_cjson
+- cjson_lib = dependency('cJSON', required: false)
++ cjson_lib = dependency('libcjson', required: false)
+ if not cjson_lib.found()
+ cjson_lib = cc.find_library('cjson', required: required_library, has_headers: ['cjson/cJSON.h'])
+ if not cjson_lib.found()
=====================================
contrib/src/librist/rules.mak
=====================================
@@ -20,6 +20,7 @@ $(TARBALLS)/librist-$(LIBRIST_VERSION).tar.gz:
librist: librist-$(LIBRIST_VERSION).tar.gz .sum-librist
$(UNPACK)
+ $(APPLY) $(SRC)/librist/librist-fix-libcjson-meson.patch
$(MOVE)
.librist: librist crossfile.meson
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/b4cd6a8bd807c8b7e0e43c22770cc43dd18e6315
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/b4cd6a8bd807c8b7e0e43c22770cc43dd18e6315
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list