summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIñigo Martínez <inigomartinez@gmail.com>2018-01-18 16:17:08 +0100
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2018-01-22 23:06:45 -0200
commita2b20a65cb8519abaac891b1a060f6f4a1c0d422 (patch)
tree956a540eb75db32b8ea2cc0cd85ddd6ce5f3cc3c
parent503ffb540a7aa1658db3f1d5888376c2f7476f59 (diff)
downloadgnome-control-center-a2b20a65cb8519abaac891b1a060f6f4a1c0d422.tar.gz
build: Make bluetooth, network and wacom mandatory on linux
The bluetooh, network and wacom panels should not be optional on linux, except on s390 systems which lack USB support. It should also not be built at all on other systems. This patch makes these panels mandatory on linux. https://bugzilla.gnome.org/show_bug.cgi?id=792641
-rw-r--r--meson.build78
-rw-r--r--meson_options.txt5
-rw-r--r--panels/meson.build16
-rw-r--r--panels/power/meson.build8
-rw-r--r--shell/meson.build2
5 files changed, 47 insertions, 62 deletions
diff --git a/meson.build b/meson.build
index f47ec3477..cd3e9c0db 100644
--- a/meson.build
+++ b/meson.build
@@ -19,6 +19,7 @@ control_center_icondir = join_paths(control_center_datadir, 'icons')
control_center_gettext = meson.project_name() + '-2.0'
+host_is_linux = host_machine.system().contains('linux')
host_is_s390 = host_machine.cpu().contains('s390')
cc = meson.get_compiler('c')
@@ -144,18 +145,6 @@ foreach header: check_headers
assert(cc.has_header(header[1], args: cups_cflags), 'CUPS headers not found: ' + header[1])
endforeach
-# Check for gnome-bluetooth
-enable_bluetooth = get_option('bluetooth')
-if enable_bluetooth
- assert(not host_is_s390, 'Bluetooth panel will not be built (no USB support on this platform). Use -Dbluetooth=false to build without it.')
-
- gnome_bluetooth_dep = dependency('gnome-bluetooth-1.0', version: '>= 3.18.2')
-endif
-config_h.set('BUILD_BLUETOOTH', enable_bluetooth,
- description: 'Define to 1 to build the Bluetooth panel')
-config_h.set('HAVE_BLUETOOTH', enable_bluetooth,
- description: 'Define to 1 if bluetooth support is available')
-
# Optional dependency for the user accounts panel
enable_cheese = get_option('cheese')
if enable_cheese
@@ -178,9 +167,27 @@ endif
config_h.set('HAVE_IBUS', enable_ibus,
description: 'Defined if IBus support is enabled')
-# network manager
-enable_network_manager = get_option('network_manager')
-if enable_network_manager
+# wayland
+enable_wayland = get_option('wayland')
+if enable_wayland
+ wayland_deps = [
+ dependency('gdk-wayland-3.0'),
+ dependency('gudev-1.0')
+ ]
+endif
+config_h.set('HAVE_WAYLAND', enable_wayland,
+ description: 'Define to 1 if Wayland is enabled')
+
+if host_is_s390
+ message('Bluetooth, Network and Wacom panels will not be built (no USB support on this platform)')
+endif
+
+enable_linux = host_is_linux and not host_is_s390
+if enable_linux
+ # gnome-bluetooth
+ gnome_bluetooth_dep = dependency('gnome-bluetooth-1.0', version: '>= 3.18.2')
+
+ # network manager
network_manager_deps = [
dependency('libnm', version: '>= 1.2.0'),
dependency('libnma', version: '>= 1.2.0'),
@@ -190,17 +197,9 @@ if enable_network_manager
network_manager_dep = dependency('NetworkManager')
nm_vpn_config_dir = join_paths(network_manager_dep.get_pkgconfig_variable('configdir'), 'VPN')
nm_vpn_module_dir = network_manager_dep.get_pkgconfig_variable('plugindir')
-endif
-config_h.set('BUILD_NETWORK', enable_network_manager,
- description: 'Define to 1 to build the Network panel')
-config_h.set('HAVE_NETWORK_MANAGER', enable_network_manager,
- description: 'Define to 1 if NetworkManager is available')
-# Wacom
-enable_wacom = get_option('wacom')
-if enable_wacom
- assert(not host_is_s390, 'Wacom panel will not be built (no USB support on this platform). Use -Dwacom=false to build without it.')
- assert(clutter_gtk_dep.found(), 'wacom support requested, but clutter-gtk library is not available. Use -Dwacom=false to build without it.')
+ # Wacom
+ assert(clutter_gtk_dep.found(), 'clutter-gtk library is required for wacom support, but is not available.')
wacom_deps = [
clutter_gtk_dep,
@@ -208,22 +207,19 @@ if enable_wacom
dependency('libwacom', version: '>= 0.7')
]
endif
-config_h.set('BUILD_WACOM', enable_wacom,
+config_h.set('BUILD_BLUETOOTH', enable_linux,
+ description: 'Define to 1 to build the Bluetooth panel')
+config_h.set('HAVE_BLUETOOTH', enable_linux,
+ description: 'Define to 1 if bluetooth support is available')
+config_h.set('BUILD_NETWORK', enable_linux,
+ description: 'Define to 1 to build the Network panel')
+config_h.set('HAVE_NETWORK_MANAGER', enable_linux,
+ description: 'Define to 1 if NetworkManager is available')
+config_h.set('BUILD_WACOM', enable_linux,
description: 'Define to 1 to build the Wacom panel')
-config_h.set('HAVE_WACOM', enable_wacom,
+config_h.set('HAVE_WACOM', enable_linux,
description: 'Define to 1 if Wacom is supportted')
-# wayland
-enable_wayland = get_option('wayland')
-if enable_wayland
- wayland_deps = [
- dependency('gdk-wayland-3.0'),
- dependency('gudev-1.0')
- ]
-endif
-config_h.set('HAVE_WAYLAND', enable_wayland,
- description: 'Define to 1 if Wayland is enabled')
-
# Check for info panel
gnome_session_libexecdir = get_option('gnome_session_libexecdir')
if gnome_session_libexecdir == ''
@@ -272,11 +268,11 @@ meson.add_install_script(
)
output = meson.project_name() + ' was configured with the following options:\n'
-output += '** gnome-bluetooth (Bluetooth panel): ' + enable_bluetooth.to_string() + '\n'
+output += '** gnome-bluetooth (Bluetooth panel): ' + enable_linux.to_string() + '\n'
output += '** Cheese (Users panel webcam support): ' + enable_cheese.to_string() + '\n'
output += '** IBus (Region panel IBus support): ' + enable_ibus.to_string() + '\n'
-output += '** NetworkManager (Network panel): ' + enable_network_manager.to_string() + '\n'
-output += '** wacom (Wacom tablet panel): ' + enable_wacom.to_string() + '\n'
+output += '** NetworkManager (Network panel): ' + enable_linux.to_string() + '\n'
+output += '** wacom (Wacom tablet panel): ' + enable_linux.to_string() + '\n'
output += '** Wayland: ' + enable_wayland.to_string() + '\n'
output += '** gnome-session libexecdir: ' + gnome_session_libexecdir + '\n'
output += 'End options'
diff --git a/meson_options.txt b/meson_options.txt
index 9cd9d8895..7498af4d6 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,8 +1,5 @@
-option('bluetooth', type: 'boolean', value: true, description: 'build with Bluetooth support')
option('cheese', type: 'boolean', value: true, description: 'build with cheese webcam support')
option('documentation', type: 'boolean', value: false, description: 'build documentation')
option('gnome_session_libexecdir', type: 'string', value: '', description: 'Directory for gnome-session\'s libexecdir')
option('ibus', type: 'boolean', value: true, description: 'build with IBus support')
-option('network_manager', type: 'boolean', value: true, description: 'build with NetworkManager support')
-option('wacom', type: 'boolean', value: true, description: 'build with Wacom support')
-option('wayland', type: 'boolean', value: true, description: 'build with Wayland support') \ No newline at end of file
+option('wayland', type: 'boolean', value: true, description: 'build with Wayland support')
diff --git a/panels/meson.build b/panels/meson.build
index d02714733..048980927 100644
--- a/panels/meson.build
+++ b/panels/meson.build
@@ -21,16 +21,12 @@ panels = [
'user-accounts'
]
-if enable_bluetooth
- panels += 'bluetooth'
-endif
-
-if enable_network_manager
- panels += 'network'
-endif
-
-if enable_wacom
- panels += 'wacom'
+if enable_linux
+ panels += [
+ 'bluetooth',
+ 'network',
+ 'wacom'
+ ]
endif
panels_list = []
diff --git a/panels/power/meson.build b/panels/power/meson.build
index 4262fa937..da9b6d178 100644
--- a/panels/power/meson.build
+++ b/panels/power/meson.build
@@ -35,12 +35,8 @@ deps = common_deps + [
cflags += '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
-if enable_bluetooth
- deps += gnome_bluetooth_dep
-endif
-
-if enable_network_manager
- deps += network_manager_deps
+if enable_linux
+ deps += network_manager_deps + [gnome_bluetooth_dep]
endif
panels_libs += static_library(
diff --git a/shell/meson.build b/shell/meson.build
index 91dee5b1f..70ca2afbd 100644
--- a/shell/meson.build
+++ b/shell/meson.build
@@ -86,7 +86,7 @@ if enable_cheese
shell_deps += cheese_deps
endif
-if enable_wacom
+if enable_linux
shell_deps += wacom_deps
endif