File: 06-export-architecture-cmake.diff

package info (click to toggle)
mumble 1.5.735-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 89,984 kB
  • sloc: cpp: 556,921; ansic: 81,664; python: 3,606; sh: 659; makefile: 506; asm: 371; cs: 306; sql: 228; javascript: 143; perl: 80; xml: 13
file content (57 lines) | stat: -rw-r--r-- 1,734 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Description: Avoid building the 'link' plugin on armel
Author: Christopher Knadle <Chris.Knadle@coredump.us>
Forwarded: not-needed
Last-Updated: 2025-01-18

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,3 +1,4 @@
+
 # Copyright 2020-2023 The Mumble Developers. All rights reserved.
 # Use of this source code is governed by a BSD-style license
 # that can be found in the LICENSE file at the root of the
@@ -177,6 +178,17 @@
 	message(STATUS "Disabling the overlay on ARM macOS")
 endif()
 
+# Use Debian's dpkg-architecture to get the specific CPU architecture
+# This will be used later in plugins/CMakeLists.txt to avoid building
+# the "link" plugin for armel which is casuing the build to fail there
+execute_process(COMMAND
+  dpkg-architecture
+    -qDEB_HOST_ARCH
+  OUTPUT_VARIABLE
+    CMAKE_DEB_HOST_ARCH
+  OUTPUT_STRIP_TRAILING_WHITESPACE
+)
+
 if(overlay)
 	if(WIN32)
 		add_subdirectory(overlay)
--- a/plugins/CMakeLists.txt
+++ b/plugins/CMakeLists.txt
@@ -1,4 +1,3 @@
-# Copyright 2020-2023 The Mumble Developers. All rights reserved.
 # Use of this source code is governed by a BSD-style license
 # that can be found in the LICENSE file at the root of the
 # Mumble source tree or at <https://www.mumble.info/LICENSE>.
@@ -13,10 +12,15 @@
 
 set(AVAILABLE_PLUGINS "")
 
-# Plugins available on all platforms
-list(APPEND AVAILABLE_PLUGINS
-	"link"
-)
+# Avoid building 'link' plugin on armel which causes the build to fail
+if(${CMAKE_DEB_HOST_ARCH} MATCHES "armel")
+	message(STATUS "Avoid building link plugin on armel")
+else()
+	# Plugins available on all platforms
+	list(APPEND AVAILABLE_PLUGINS
+		"link"
+	)
+endif()
 
 if(${CMAKE_BUILD_TYPE} MATCHES Debug)
 	message("Including TestPlugin in debug mode")