From 3afdaa3b2fdc3c1fd114c9e5392066d520a01948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1igo=20Mart=C3=ADnez?= Date: Tue, 23 Jan 2018 12:21:21 +0100 Subject: [PATCH] build: Make network mandatory on every linux In a recent commit[0], bluetooth, network and wacom panels were made mandatory on every linux except on S390 systems. However, the network panel should also be mandatory on S390 systems running linux. This changes the conditions to build bluetooh, network and wacom panels. https://bugzilla.gnome.org/show_bug.cgi?id=792641 [0] https://git.gnome.org/browse/gnome-control-center/commit/?id=a2b20a65c --- meson.build | 41 ++++++++++++++++++++-------------------- panels/meson.build | 7 +++++-- panels/power/meson.build | 8 ++++++-- shell/meson.build | 2 +- 4 files changed, 32 insertions(+), 26 deletions(-) diff --git a/meson.build b/meson.build index 3543e6364..b22a414a8 100644 --- a/meson.build +++ b/meson.build @@ -20,7 +20,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') +host_is_linux_not_s390 = host_is_linux and not host_machine.cpu().contains('s390') cc = meson.get_compiler('c') @@ -178,15 +178,7 @@ 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') - +if host_is_linux # network manager network_manager_deps = [ dependency('libnm', version: '>= 1.2.0'), @@ -197,6 +189,15 @@ if enable_linux 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', host_is_linux, + description: 'Define to 1 to build the Network panel') +config_h.set('HAVE_NETWORK_MANAGER', host_is_linux, + description: 'Define to 1 if NetworkManager is available') + +if host_is_linux_not_s390 + # gnome-bluetooth + gnome_bluetooth_dep = dependency('gnome-bluetooth-1.0', version: '>= 3.18.2') # Wacom assert(clutter_gtk_dep.found(), 'clutter-gtk library is required for wacom support, but is not available.') @@ -206,18 +207,16 @@ if enable_linux dependency('clutter-1.0', version: '>= 1.11.3'), dependency('libwacom', version: '>= 0.7') ] +else + message('Bluetooth and Wacom panels will not be built (no USB support on this platform)') endif -config_h.set('BUILD_BLUETOOTH', enable_linux, +config_h.set('BUILD_BLUETOOTH', host_is_linux_not_s390, description: 'Define to 1 to build the Bluetooth panel') -config_h.set('HAVE_BLUETOOTH', enable_linux, +config_h.set('HAVE_BLUETOOTH', host_is_linux_not_s390, 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, +config_h.set('BUILD_WACOM', host_is_linux_not_s390, description: 'Define to 1 to build the Wacom panel') -config_h.set('HAVE_WACOM', enable_linux, +config_h.set('HAVE_WACOM', host_is_linux_not_s390, description: 'Define to 1 if Wacom is supportted') # Check for info panel @@ -269,11 +268,11 @@ meson.add_install_script( ) output = meson.project_name() + ' was configured with the following options:\n' -output += '** gnome-bluetooth (Bluetooth panel): ' + enable_linux.to_string() + '\n' +output += '** gnome-bluetooth (Bluetooth panel): ' + host_is_linux_not_s390.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_linux.to_string() + '\n' -output += '** wacom (Wacom tablet panel): ' + enable_linux.to_string() + '\n' +output += '** NetworkManager (Network panel): ' + host_is_linux.to_string() + '\n' +output += '** wacom (Wacom tablet panel): ' + host_is_linux_not_s390.to_string() + '\n' output += '** Wayland: ' + enable_wayland.to_string() + '\n' output += '** gnome-session libexecdir: ' + gnome_session_libexecdir + '\n' output += 'End options' diff --git a/panels/meson.build b/panels/meson.build index 048980927..d671c4775 100644 --- a/panels/meson.build +++ b/panels/meson.build @@ -21,10 +21,13 @@ panels = [ 'user-accounts' ] -if enable_linux +if host_is_linux + panels += ['network'] +endif + +if host_is_linux_not_s390 panels += [ 'bluetooth', - 'network', 'wacom' ] endif diff --git a/panels/power/meson.build b/panels/power/meson.build index 25695ca47..9a27e93bd 100644 --- a/panels/power/meson.build +++ b/panels/power/meson.build @@ -36,8 +36,12 @@ deps = common_deps + [ cflags += '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir) -if enable_linux - deps += network_manager_deps + [gnome_bluetooth_dep] +if host_is_linux + deps += network_manager_deps +endif + +if host_is_linux_not_s390 + deps += gnome_bluetooth_dep endif panels_libs += static_library( diff --git a/shell/meson.build b/shell/meson.build index 10340a65b..ac67fa236 100644 --- a/shell/meson.build +++ b/shell/meson.build @@ -87,7 +87,7 @@ if enable_cheese shell_deps += cheese_deps endif -if enable_linux +if host_is_linux_not_s390 shell_deps += wacom_deps endif