Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/mumble/, media-sound/mumble/files/
Date: Tue, 01 Mar 2022 09:12:50
Message-Id: 1646125959.afb1ec34cf10f931617592db03d8d096e4b703e2.polynomial-c@gentoo
1 commit: afb1ec34cf10f931617592db03d8d096e4b703e2
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Tue Mar 1 09:11:34 2022 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Tue Mar 1 09:12:39 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=afb1ec34
7
8 media-sound/mumble: Apply forthcoming upstream solution for system_json
9
10 Bug: https://bugs.gentoo.org/834030
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 .../mumble/files/mumble-9999-system_json.patch | 58 +++++++++++++++++++---
14 media-sound/mumble/mumble-9999.ebuild | 1 +
15 2 files changed, 51 insertions(+), 8 deletions(-)
16
17 diff --git a/media-sound/mumble/files/mumble-9999-system_json.patch b/media-sound/mumble/files/mumble-9999-system_json.patch
18 index 2be7553d50ef..bb04dc0a01e0 100644
19 --- a/media-sound/mumble/files/mumble-9999-system_json.patch
20 +++ b/media-sound/mumble/files/mumble-9999-system_json.patch
21 @@ -1,18 +1,60 @@
22 +From a239ccf62369880a0b08faf01021e7961ec1cc5a Mon Sep 17 00:00:00 2001
23 +From: Robert Adam <dev@×××××××××××.de>
24 +Date: Fri, 25 Feb 2022 18:37:51 +0100
25 +Subject: [PATCH] BUILD(client): Add option to use system JSON lib
26 +
27 +This commit introduces an option that toggles between using a bundled
28 +version of nlohmann_json (default) and looking for a version installed
29 +on the system instead.
30 +
31 +Fixes #5584
32 +---
33 + docs/dev/build-instructions/cmake_options.md | 5 +++++
34 + src/mumble/CMakeLists.txt | 11 ++++++++---
35 + 2 files changed, 13 insertions(+), 3 deletions(-)
36 +
37 +diff --git a/docs/dev/build-instructions/cmake_options.md b/docs/dev/build-instructions/cmake_options.md
38 +index 2a02b200b7..b395251069 100644
39 +--- a/docs/dev/build-instructions/cmake_options.md
40 ++++ b/docs/dev/build-instructions/cmake_options.md
41 +@@ -34,6 +34,11 @@ Bundle Qt's translations as well
42 + Build the included version of CELT instead of looking for one on the system.
43 + (Default: ON)
44 +
45 ++### bundled-json
46 ++
47 ++Build the included version of nlohmann_json instead of looking for one on the system
48 ++(Default: ON)
49 ++
50 + ### bundled-opus
51 +
52 + Build the included version of Opus instead of looking for one on the system.
53 diff --git a/src/mumble/CMakeLists.txt b/src/mumble/CMakeLists.txt
54 -index bb8df1671..51f83850e 100644
55 +index bb8df16714..5f1c14ba97 100644
56 --- a/src/mumble/CMakeLists.txt
57 +++ b/src/mumble/CMakeLists.txt
58 -@@ -472,12 +472,7 @@ else()
59 +@@ -27,6 +27,7 @@ option(bundled-celt "Build the included version of CELT instead of looking for o
60 + option(bundled-speex "Build the included version of Speex instead of looking for one on the system." ON)
61 + option(rnnoise "Use RNNoise for machine learning noise reduction." ON)
62 + option(bundled-rnnoise "Build the included version of RNNoise instead of looking for one on the system." ${rnnoise})
63 ++option(bundled-json "Build the included version of nlohmann_json instead of looking for one on the system" ON)
64 +
65 + option(manual-plugin "Include the built-in \"manual\" positional audio plugin." ON)
66 +
67 +@@ -472,9 +473,13 @@ else()
68 endif()
69
70
71 -set(JSON_BuildTests OFF CACHE INTERNAL "")
72 -set(JSON_ImplicitConversions OFF CACHE INTERNAL "")
73 -add_subdirectory("${3RDPARTY_DIR}/nlohmann_json/" "${CMAKE_CURRENT_BINARY_DIR}/nlohmann_json/")
74 --
75 --target_link_libraries(mumble_client_object_lib PUBLIC nlohmann_json::nlohmann_json)
76 --
77 -+find_pkg("nlohmann_json" REQUIRED)
78 - find_pkg("SndFile;LibSndFile;sndfile" REQUIRED)
79 ++if(bundled-json)
80 ++ set(JSON_BuildTests OFF CACHE INTERNAL "")
81 ++ set(JSON_ImplicitConversions OFF CACHE INTERNAL "")
82 ++ add_subdirectory("${3RDPARTY_DIR}/nlohmann_json/" "${CMAKE_CURRENT_BINARY_DIR}/nlohmann_json/")
83 ++else()
84 ++ find_pkg("nlohmann_json" REQUIRED)
85 ++endif()
86 +
87 + target_link_libraries(mumble_client_object_lib PUBLIC nlohmann_json::nlohmann_json)
88
89 - # Check if sndfile version supports opus
90
91 diff --git a/media-sound/mumble/mumble-9999.ebuild b/media-sound/mumble/mumble-9999.ebuild
92 index a5cfa6d410b7..abee2e9d032d 100644
93 --- a/media-sound/mumble/mumble-9999.ebuild
94 +++ b/media-sound/mumble/mumble-9999.ebuild
95 @@ -84,6 +84,7 @@ src_configure() {
96 local mycmakeargs=(
97 -Dalsa="$(usex alsa)"
98 -Dbundled-celt="ON"
99 + -Dbundled-json="OFF"
100 -Dbundled-opus="OFF"
101 -Dbundled-speex="OFF"
102 -Ddbus="$(usex dbus)"