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
This commit is contained in:
Iñigo Martínez 2018-01-23 12:21:21 +01:00 committed by Georges Basile Stavracas Neto
parent 17c6563e69
commit 3afdaa3b2f
4 changed files with 32 additions and 26 deletions

View file

@ -20,7 +20,7 @@ control_center_icondir = join_paths(control_center_datadir, 'icons')
control_center_gettext = meson.project_name() + '-2.0' control_center_gettext = meson.project_name() + '-2.0'
host_is_linux = host_machine.system().contains('linux') 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') cc = meson.get_compiler('c')
@ -178,15 +178,7 @@ endif
config_h.set('HAVE_WAYLAND', enable_wayland, config_h.set('HAVE_WAYLAND', enable_wayland,
description: 'Define to 1 if Wayland is enabled') description: 'Define to 1 if Wayland is enabled')
if host_is_s390 if host_is_linux
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
network_manager_deps = [ network_manager_deps = [
dependency('libnm', version: '>= 1.2.0'), dependency('libnm', version: '>= 1.2.0'),
@ -197,6 +189,15 @@ if enable_linux
network_manager_dep = dependency('NetworkManager') network_manager_dep = dependency('NetworkManager')
nm_vpn_config_dir = join_paths(network_manager_dep.get_pkgconfig_variable('configdir'), 'VPN') 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') 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 # Wacom
assert(clutter_gtk_dep.found(), 'clutter-gtk library is required for wacom support, but is not available.') 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('clutter-1.0', version: '>= 1.11.3'),
dependency('libwacom', version: '>= 0.7') dependency('libwacom', version: '>= 0.7')
] ]
else
message('Bluetooth and Wacom panels will not be built (no USB support on this platform)')
endif 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') 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') description: 'Define to 1 if bluetooth support is available')
config_h.set('BUILD_NETWORK', enable_linux, config_h.set('BUILD_WACOM', host_is_linux_not_s390,
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') 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') description: 'Define to 1 if Wacom is supportted')
# Check for info panel # Check for info panel
@ -269,11 +268,11 @@ meson.add_install_script(
) )
output = meson.project_name() + ' was configured with the following options:\n' 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 += '** Cheese (Users panel webcam support): ' + enable_cheese.to_string() + '\n'
output += '** IBus (Region panel IBus support): ' + enable_ibus.to_string() + '\n' output += '** IBus (Region panel IBus support): ' + enable_ibus.to_string() + '\n'
output += '** NetworkManager (Network panel): ' + enable_linux.to_string() + '\n' output += '** NetworkManager (Network panel): ' + host_is_linux.to_string() + '\n'
output += '** wacom (Wacom tablet panel): ' + enable_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 += '** Wayland: ' + enable_wayland.to_string() + '\n'
output += '** gnome-session libexecdir: ' + gnome_session_libexecdir + '\n' output += '** gnome-session libexecdir: ' + gnome_session_libexecdir + '\n'
output += 'End options' output += 'End options'

View file

@ -21,10 +21,13 @@ panels = [
'user-accounts' 'user-accounts'
] ]
if enable_linux if host_is_linux
panels += ['network']
endif
if host_is_linux_not_s390
panels += [ panels += [
'bluetooth', 'bluetooth',
'network',
'wacom' 'wacom'
] ]
endif endif

View file

@ -36,8 +36,12 @@ deps = common_deps + [
cflags += '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir) cflags += '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
if enable_linux if host_is_linux
deps += network_manager_deps + [gnome_bluetooth_dep] deps += network_manager_deps
endif
if host_is_linux_not_s390
deps += gnome_bluetooth_dep
endif endif
panels_libs += static_library( panels_libs += static_library(

View file

@ -87,7 +87,7 @@ if enable_cheese
shell_deps += cheese_deps shell_deps += cheese_deps
endif endif
if enable_linux if host_is_linux_not_s390
shell_deps += wacom_deps shell_deps += wacom_deps
endif endif