|
Packit Service |
8d0719 |
project(
|
|
Packit Service |
8d0719 |
'glib-networking', 'c',
|
|
Packit Service |
8d0719 |
version: '2.56.1',
|
|
Packit Service |
8d0719 |
license: 'LGPL2.1+',
|
|
Packit Service |
8d0719 |
meson_version: '>= 0.43.0',
|
|
Packit Service |
8d0719 |
default_options: ['c_std=c11']
|
|
Packit Service |
8d0719 |
)
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
prefix = get_option('prefix')
|
|
Packit Service |
8d0719 |
datadir = join_paths(prefix, get_option('datadir'))
|
|
Packit Service |
8d0719 |
libdir = join_paths(prefix, get_option('libdir'))
|
|
Packit Service |
8d0719 |
libexecdir = join_paths(prefix, get_option('libexecdir'))
|
|
Packit Service |
8d0719 |
localedir = join_paths(prefix, get_option('localedir'))
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
installed_tests_metadir = join_paths(datadir, 'installed-tests', meson.project_name())
|
|
Packit Service |
8d0719 |
installed_tests_execdir = join_paths(libexecdir, 'installed-tests', meson.project_name())
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
cc = meson.get_compiler('c')
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
config_h = configuration_data()
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
config_h.set_quoted('GETTEXT_PACKAGE', meson.project_name())
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
# compiler flags
|
|
Packit Service |
8d0719 |
common_flags = [
|
|
Packit Service |
8d0719 |
'-DHAVE_CONFIG_H',
|
|
Packit Service |
8d0719 |
'-DG_LOG_DOMAIN="GLib-Net"',
|
|
Packit Service |
8d0719 |
'-DLOCALE_DIR="@0@"'.format(localedir),
|
|
Packit Service |
8d0719 |
'-DG_DISABLE_DEPRECATED',
|
|
Packit Service |
8d0719 |
'-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_56'
|
|
Packit Service |
8d0719 |
]
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
add_project_arguments(common_flags, language: 'c')
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
symbol_map = join_paths(meson.current_source_dir(), meson.project_name() + '.map')
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
module_ldflags = []
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
if host_machine.system().contains('linux')
|
|
Packit Service |
8d0719 |
test_ldflag = '-Wl,--version-script,' + symbol_map
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
module_ldflags += cc.get_supported_arguments(test_ldflag)
|
|
Packit Service |
8d0719 |
endif
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
# *** Check GLib GIO ***
|
|
Packit Service |
8d0719 |
glib_dep = dependency('glib-2.0', version: '>= 2.55.1')
|
|
Packit Service |
8d0719 |
gio_dep = dependency('gio-2.0')
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
gio_module_dir = gio_dep.get_pkgconfig_variable('giomoduledir',
|
|
Packit Service |
8d0719 |
define_variable: ['libdir', libdir])
|
|
Packit Service |
8d0719 |
assert(gio_module_dir != '', 'GIO_MODULE_DIR is missing from gio-2.0.pc')
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
# *** Checks for LibProxy ***
|
|
Packit Service |
8d0719 |
enable_libproxy_support = get_option('libproxy_support')
|
|
Packit Service |
8d0719 |
if enable_libproxy_support
|
|
Packit Service |
8d0719 |
libproxy_dep = dependency('libproxy-1.0', version: '>= 0.3.1', required: true)
|
|
Packit Service |
8d0719 |
endif
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
# *** Checks for GNOME ***
|
|
Packit Service |
8d0719 |
enable_gnome_proxy_support = get_option('gnome_proxy_support')
|
|
Packit Service |
8d0719 |
if enable_gnome_proxy_support
|
|
Packit Service |
8d0719 |
gsettings_desktop_schemas_dep = dependency('gsettings-desktop-schemas', required: true)
|
|
Packit Service |
8d0719 |
endif
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
# *** Checks for GnuTLS ***
|
|
Packit Service |
8d0719 |
gnutls_dep = dependency('gnutls', version: '>= 3.3.5', required: true)
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
msg = 'location of system Certificate Authority list: '
|
|
Packit Service |
8d0719 |
res = run_command(join_paths(meson.source_root(), 'find-ca-certificates'), get_option('ca_certificates_path'))
|
|
Packit Service |
8d0719 |
assert(res.returncode() == 0, msg + ' could not find any CA certificate store. Use -Dca_certificates_path=PATH to set')
|
|
Packit Service |
8d0719 |
ca_certificates_path = res.stdout().strip()
|
|
Packit Service |
8d0719 |
message(msg + ca_certificates_path)
|
|
Packit Service |
8d0719 |
config_h.set_quoted('GTLS_SYSTEM_CA_FILE', ca_certificates_path, description: 'The system CA list')
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
# *** Checks for p11-kit ***
|
|
Packit Service |
8d0719 |
enable_pkcs11_support = get_option('pkcs11_support')
|
|
Packit Service |
8d0719 |
if enable_pkcs11_support
|
|
Packit Service |
8d0719 |
pkcs11_dep = dependency('p11-kit-1', version: '>= 0.20', required: true)
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
config_h.set('HAVE_PKCS11', enable_pkcs11_support,
|
|
Packit Service |
8d0719 |
description: 'Building with PKCS#11 support')
|
|
Packit Service |
8d0719 |
endif
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
configure_file(
|
|
Packit Service |
8d0719 |
output: 'config.h',
|
|
Packit Service |
8d0719 |
configuration: config_h
|
|
Packit Service |
8d0719 |
)
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
gnome = import('gnome')
|
|
Packit Service |
8d0719 |
i18n = import('i18n')
|
|
Packit Service |
8d0719 |
pkg = import('pkgconfig')
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
po_dir = join_paths(meson.source_root(), 'po')
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
top_inc = include_directories('.')
|
|
Packit Service |
8d0719 |
tls_inc = include_directories('tls')
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
subdir('po')
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
enable_installed_tests = get_option('installed_tests')
|
|
Packit Service |
8d0719 |
test_template = files('template.test.in')
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
if enable_libproxy_support or enable_gnome_proxy_support
|
|
Packit Service |
8d0719 |
proxy_test_programs = []
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
if enable_libproxy_support
|
|
Packit Service |
8d0719 |
subdir('proxy/libproxy')
|
|
Packit Service |
8d0719 |
endif
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
if enable_gnome_proxy_support
|
|
Packit Service |
8d0719 |
subdir('proxy/gnome')
|
|
Packit Service |
8d0719 |
endif
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
subdir('proxy/tests')
|
|
Packit Service |
8d0719 |
endif
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
if enable_pkcs11_support
|
|
Packit Service |
8d0719 |
subdir('tls/pkcs11')
|
|
Packit Service |
8d0719 |
endif
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
subdir('tls/gnutls')
|
|
Packit Service |
8d0719 |
subdir('tls/tests')
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
meson.add_install_script('meson_post_install.py', gio_module_dir)
|
|
Packit Service |
8d0719 |
|
|
Packit Service |
8d0719 |
output = '\n\n libproxy support: ' + enable_libproxy_support.to_string() + '\n'
|
|
Packit Service |
8d0719 |
output += ' GNOME proxy support: ' + enable_gnome_proxy_support.to_string() + '\n'
|
|
Packit Service |
8d0719 |
output += ' PKCS#11 support: ' + enable_pkcs11_support.to_string() + '\n'
|
|
Packit Service |
8d0719 |
output += ' TLS CA file: ' + ca_certificates_path + '\n'
|
|
Packit Service |
8d0719 |
message(output)
|