Bug 1344038 - Move the gio protocol handler under netwerk/protocol. r?karlt
Historically, we had support for some GNOME VFS protocols through the
gnomevfs library, and this was under extension. This may not have been
built by default when it was introduced, but GNOME upstream moved those
things into Gtk itself, and we then got support for the new Gio-based
protocol, similar to what we had through the gnomevfs library.
Time passes, and we switched off the gnomevfs library entirely, and
enabled the Gio-based protocol handlers by default. We then removed
everything related to the gnomevfs library.
Fast forward to now, and disabling Gio support in Firefox just doesn't
make sense, and leaving the gio protocol handler as an extension doesn't
make sense either.
As it is a protocol handler, its natural place is under
netwerk/protocol, which is where we're moving it here.
The netwerk/protocol subdirectories being handled automatically, we
don't need to add the moved directory in any DIRS variable.
--- a/browser/confvars.sh
+++ b/browser/confvars.sh
@@ -33,17 +33,16 @@ if test "$NIGHTLY_BUILD"; then
MOZ_RUST_URLPARSE=1
fi
# Enable building ./signmar and running libmar signature tests
MOZ_ENABLE_SIGNMAR=1
MOZ_APP_VERSION=$FIREFOX_VERSION
MOZ_APP_VERSION_DISPLAY=$FIREFOX_VERSION_DISPLAY
-MOZ_EXTENSIONS_DEFAULT=" gio"
# MOZ_APP_DISPLAYNAME will be set by branding/configure.sh
# MOZ_BRANDING_DIRECTORY is the default branding directory used when none is
# specified. It should never point to the "official" branding directory.
# For mozilla-beta, mozilla-release, or mozilla-central repositories, use
# "unofficial" branding.
# For the mozilla-aurora repository, use "aurora".
MOZ_BRANDING_DIRECTORY=browser/branding/unofficial
MOZ_OFFICIAL_BRANDING_DIRECTORY=browser/branding/official
--- a/embedding/ios/confvars.sh
+++ b/embedding/ios/confvars.sh
@@ -2,9 +2,8 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
MOZ_APP_NAME=geckoembed
MOZ_APP_DISPLAYNAME=GeckoEmbed
MOZ_UPDATER=
MOZ_APP_VERSION=$MOZILLA_VERSION
-MOZ_EXTENSIONS_DEFAULT=" gio"
rename from extensions/gio/moz.build
rename to netwerk/protocol/gio/moz.build
rename from extensions/gio/nsGIOProtocolHandler.cpp
rename to netwerk/protocol/gio/nsGIOProtocolHandler.cpp
--- a/old-configure.in
+++ b/old-configure.in
@@ -3566,30 +3566,16 @@ MOZ_ARG_ENABLE_STRING(extensions,
option=`echo $option | sed 's/^-//'`
MOZ_EXTENSIONS=`echo "$MOZ_EXTENSIONS" | sed "s/ ${option}//"`
else
MOZ_EXTENSIONS="$MOZ_EXTENSIONS $option"
fi
done],
MOZ_EXTENSIONS="$MOZ_EXTENSIONS_DEFAULT")
-if test -z "$MOZ_ENABLE_GIO" -a `echo "$MOZ_EXTENSIONS" | grep -c gio` -ne 0; then
- # Suppress warning on non-X11 platforms
- if test -n "$MOZ_X11"; then
- AC_MSG_WARN([Removing gio from MOZ_EXTENSIONS due to --disable-gio.])
- fi
- MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|gio||'`
-fi
-
-if test `echo "$MOZ_EXTENSIONS" | grep -c gio` -ne 0; then
- MOZ_GIO_COMPONENT=1
- MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|gio||'`
-fi
-AC_SUBST(MOZ_GIO_COMPONENT)
-
dnl Ensure every extension exists, to avoid mostly-inscrutable error messages
dnl when trying to build a nonexistent extension.
for extension in $MOZ_EXTENSIONS; do
if test ! -d "${srcdir}/extensions/${extension}"; then
AC_MSG_ERROR([Unrecognized extension provided to --enable-extensions: ${extension}.])
fi
done
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -116,18 +116,18 @@ set_config('L10NBASEDIR', l10n_base)
# config.guess, which we want to avoid. Even better, we could actually set
# `choices` depending on the target, but that doesn't pan out for the same
# reason.
option('--enable-default-toolkit', nargs=1,
choices=('cairo-windows', 'cairo-gtk3', 'cairo-cocoa', 'cairo-uikit',
'cairo-android', 'cairo-gonk'),
help='Select default toolkit')
-@depends('--enable-default-toolkit', target)
-def toolkit(value, target):
+@depends('--enable-default-toolkit', target, '--help')
+def toolkit(value, target, _):
# Define possible choices for each platform. The default is the first one
# listed when there are several.
os = target.os
if target.os == 'WINNT':
platform_choices = ('cairo-windows',)
elif target.os == 'OSX':
platform_choices = ('cairo-cocoa',)
elif target.os == 'iOS':
@@ -808,23 +808,24 @@ option('--enable-ipdl-tests', help='Enab
set_config('MOZ_IPDL_TESTS',
depends_if('--enable-ipdl-tests')(lambda _: True))
include('nss.configure')
# Network protocol support
# ==============================================================
-@depends(check_build_environment, '--help')
+@depends(check_build_environment, toolkit_gtk, '--help')
@imports('os')
@imports(_from='__builtin__', _import='sorted')
-def all_necko_protocols(build_env, _):
+def all_necko_protocols(build_env, toolkit_gtk, _):
basedir = os.path.join(build_env.topsrcdir, 'netwerk', 'protocol')
return tuple(sorted(p for p in os.listdir(basedir)
- if os.path.isdir(os.path.join(basedir, p))))
+ if (os.path.isdir(os.path.join(basedir, p)) and
+ (p != 'gio' or toolkit_gtk))))
default_necko_protocols = all_necko_protocols
@deprecated_option('--enable-necko-protocols', nargs='*')
def necko_protocols(protocols):
return protocols
@depends(necko_protocols, default_necko_protocols)
--- a/toolkit/toolkit.mozbuild
+++ b/toolkit/toolkit.mozbuild
@@ -134,19 +134,16 @@ if CONFIG['MOZ_PREF_EXTENSIONS']:
DIRS += [
'/devtools',
'/services',
'/startupcache',
'/js/ductwork/debugger',
'/other-licenses/snappy',
]
-if CONFIG['MOZ_GIO_COMPONENT']:
- DIRS += ['/extensions/gio']
-
if CONFIG['MOZ_RUST']:
DIRS += [
'/toolkit/library/gtest/rust',
'/toolkit/library/rust',
]
DIRS += [
'/toolkit/library/StaticXULComponentsEnd',