summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Catanzaro <mcatanzaro@redhat.com>2022-08-15 12:27:55 -0500
committerMarge Bot <marge-bot@gnome.org>2022-10-12 19:43:06 +0000
commit4cbc05cf75f2d49d8ec1d8c0942c819351361f0d (patch)
treea5a4c19fa9cf3ee6999fd419d672bb804c97ec8e
parent2595bf00dec7b4ebb3866d82dbc285066e430886 (diff)
downloadglib-networking-4cbc05cf75f2d49d8ec1d8c0942c819351361f0d.tar.gz
Remove auto features
I tried to be too clever here and enabled environment proxy support by default whenever libproxy is disabled. This strategy fails because all distros enable auto features: https://gitlab.gnome.org/GNOME/glib-networking/-/merge_requests/217#note_1529568 The solution is to enable libproxy by default, and disable environment proxy by default. This leaves only two remaining auto features: GnuTLS, which is almost always wanted, and GNOME proxy, which is also almost always wanted. Just pick the right defaults. If you don't want these enabled, pass the flag to disable them. Simple Part-of: <https://gitlab.gnome.org/GNOME/glib-networking/-/merge_requests/220>
-rw-r--r--.gitlab-ci/test-msvc.bat2
-rw-r--r--meson.build4
-rw-r--r--meson_options.txt8
-rw-r--r--proxy/meson.build2
4 files changed, 6 insertions, 10 deletions
diff --git a/.gitlab-ci/test-msvc.bat b/.gitlab-ci/test-msvc.bat
index 9239280..4889518 100644
--- a/.gitlab-ci/test-msvc.bat
+++ b/.gitlab-ci/test-msvc.bat
@@ -28,7 +28,7 @@ set PKG_CONFIG_PATH=%DEPS_DIR%\lib\pkgconfig
:: FIXME: make warnings fatal
:: FIXME: Environment proxy ought to work on Windows: https://gitlab.gnome.org/GNOME/glib-networking/-/issues/185
pip3 install --upgrade --user meson==0.60.0 || goto :error
-meson build -Dgnutls=disabled -Dopenssl=enabled -Denvironment_proxy=disabled -Ddebug_logs=true || goto :error
+meson build -Dgnutls=disabled -Dopenssl=enabled -Dlibproxy=disabled -Denvironment_proxy=disabled -Dgnome_proxy=disabled -Ddebug_logs=true || goto :error
ninja -C build || goto :error
meson test -C build --timeout-multiplier=10 || goto :error
diff --git a/meson.build b/meson.build
index 0070052..2a31738 100644
--- a/meson.build
+++ b/meson.build
@@ -80,10 +80,6 @@ assert(gio_module_dir != '', 'GIO_MODULE_DIR is missing from gio-2.0.pc')
# *** Checks for LibProxy ***
libproxy_dep = dependency('libproxy-1.0', version: '>= 0.4.16', required: get_option('libproxy'))
-# *** Checks for environment proxy ***
-environment_proxy_option = get_option('environment_proxy')
-environment_proxy_enabled = environment_proxy_option.enabled() or (environment_proxy_option.auto() and not libproxy_dep.found())
-
# *** Checks for GNOME ***
gsettings_desktop_schemas_dep = dependency('gsettings-desktop-schemas', required: get_option('gnome_proxy'))
diff --git a/meson_options.txt b/meson_options.txt
index c566ccd..7f244aa 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -4,11 +4,11 @@
#
# The environment variable proxy backend is intended for use if you are building
# without libproxy.
-option('gnutls', type: 'feature', value: 'auto', description: 'support for GnuTLS networking configration')
+option('gnutls', type: 'feature', value: 'enabled', description: 'support for GnuTLS networking configration')
option('openssl', type: 'feature', value: 'disabled', description: 'support for OpenSSL networking configration')
-option('environment_proxy', type: 'feature', value: 'auto', description: 'support for environment variable proxy configuration')
-option('libproxy', type: 'feature', value: 'auto', description: 'support for libproxy proxy configration')
-option('gnome_proxy', type: 'feature', value: 'auto', description: 'support for GNOME desktop proxy configuration')
+option('environment_proxy', type: 'feature', value: 'disabled', description: 'support for environment variable proxy configuration')
+option('libproxy', type: 'feature', value: 'enabled', description: 'support for libproxy proxy configration')
+option('gnome_proxy', type: 'feature', value: 'enabled', description: 'support for GNOME desktop proxy configuration')
option('installed_tests', type: 'boolean', value: false, description: 'enable installed tests')
option('debug_logs', type: 'boolean', value: false, description: 'enable debug log messages (slow)')
diff --git a/proxy/meson.build b/proxy/meson.build
index 266cea4..5bdaf7d 100644
--- a/proxy/meson.build
+++ b/proxy/meson.build
@@ -6,7 +6,7 @@ if gsettings_desktop_schemas_dep.found()
subdir('gnome')
endif
-if environment_proxy_enabled
+if get_option('environment_proxy').enabled()
subdir('environment')
endif