Bug 1278282 - update of the moz.build files to remove gtk2 references r=lsalzman
authorSylvestre Ledru <sledru@mozilla.com>
Wed, 10 Jan 2018 10:04:59 +0100
changeset 398758 0054a15e3c89
parent 398757 ef1b83a2f4f4
child 398759 07457a9823d3
push id33232
push usernerli@mozilla.com
push date2018-01-11 21:53 +0000
treeherdermozilla-central@185d2695bf96 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslsalzman
bugs1278282
milestone59.0a1
Bug 1278282 - update of the moz.build files to remove gtk2 references r=lsalzman MozReview-Commit-ID: FO1wEHzOkuN
browser/base/moz.build
browser/components/preferences/in-content/moz.build
browser/components/preferences/moz.build
browser/themes/moz.build
dom/geolocation/moz.build
dom/ipc/moz.build
dom/moz.build
dom/plugins/test/moz.build
dom/plugins/test/testplugin/testplugin.mozbuild
dom/system/moz.build
dom/xbl/builtin/moz.build
gfx/2d/moz.build
gfx/skia/generate_mozbuild.py
gfx/skia/moz.build
gfx/thebes/moz.build
gfx/webrender_bindings/moz.build
toolkit/modules/moz.build
toolkit/moz.build
toolkit/moz.configure
toolkit/mozapps/installer/upload-files.mk
toolkit/themes/moz.build
uriloader/exthandler/moz.build
widget/headless/moz.build
widget/moz.build
xpcom/glue/standalone/moz.build
--- a/browser/base/moz.build
+++ b/browser/base/moz.build
@@ -49,18 +49,18 @@ BROWSER_CHROME_MANIFESTS += [
     'content/test/webrtc/browser.ini',
 ]
 
 DEFINES['MOZ_APP_VERSION'] = CONFIG['MOZ_APP_VERSION']
 DEFINES['MOZ_APP_VERSION_DISPLAY'] = CONFIG['MOZ_APP_VERSION_DISPLAY']
 
 DEFINES['APP_LICENSE_BLOCK'] = '%s/content/overrides/app-license.html' % SRCDIR
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk2', 'gtk3', 'cocoa'):
+if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk3', 'cocoa'):
     DEFINES['CONTEXT_COPY_IMAGE_CONTENTS'] = 1
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'cocoa', 'gtk3'):
     DEFINES['CAN_DRAW_IN_TITLEBAR'] = 1
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk2', 'gtk3'):
+if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk3'):
     DEFINES['MENUBAR_CAN_AUTOHIDE'] = 1
 
 JAR_MANIFESTS += ['jar.mn']
--- a/browser/components/preferences/in-content/moz.build
+++ b/browser/components/preferences/in-content/moz.build
@@ -2,12 +2,12 @@
 # vim: set filetype=python:
 # 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/.
 
 for var in ('MOZ_APP_NAME', 'MOZ_MACBUNDLE_NAME'):
     DEFINES[var] = CONFIG[var]
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk2', 'gtk3', 'cocoa'):
+if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk3', 'cocoa'):
     DEFINES['HAVE_SHELL_SERVICE'] = 1
 
 JAR_MANIFESTS += ['jar.mn']
--- a/browser/components/preferences/moz.build
+++ b/browser/components/preferences/moz.build
@@ -10,17 +10,17 @@ DIRS += [
 
 BROWSER_CHROME_MANIFESTS += [
     'in-content/tests/browser.ini'
 ]
 
 for var in ('MOZ_APP_NAME', 'MOZ_MACBUNDLE_NAME'):
     DEFINES[var] = CONFIG[var]
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk2', 'gtk3', 'cocoa'):
+if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk3', 'cocoa'):
     DEFINES['HAVE_SHELL_SERVICE'] = 1
 
 JAR_MANIFESTS += ['jar.mn']
 
 EXTRA_JS_MODULES += [
     'SiteDataManager.jsm'
 ]
 
--- a/browser/themes/moz.build
+++ b/browser/themes/moz.build
@@ -6,17 +6,17 @@
 
 with Files("**"):
     BUG_COMPONENT = ("Firefox", "Theme")
 
 toolkit = CONFIG['MOZ_WIDGET_TOOLKIT']
 
 if toolkit == 'cocoa':
     DIRS += ['osx']
-elif toolkit in ('gtk2', 'gtk3'):
+elif toolkit == 'gtk3':
     DIRS += ['linux']
 else:
     DIRS += ['windows']
 
 with Files('osx/**'):
     SCHEDULES.exclusive = ['macosx']
 
 with Files('linux/**'):
--- a/dom/geolocation/moz.build
+++ b/dom/geolocation/moz.build
@@ -36,14 +36,14 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'andr
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     LOCAL_INCLUDES += [
         '/dom/system/mac',
     ]
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
     LOCAL_INCLUDES += [
         '/dom/system/windows',
     ]
-elif CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'):
+elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3':
     if CONFIG['MOZ_GPSD']:
         LOCAL_INCLUDES += [
             '/dom/system/linux',
         ]
         DEFINES['MOZ_GPSD'] = True
--- a/dom/ipc/moz.build
+++ b/dom/ipc/moz.build
@@ -155,17 +155,17 @@ if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_
 
 if CONFIG['OS_ARCH'] != 'WINNT':
     LOCAL_INCLUDES += [
         '/modules/libjar',
     ]
 
 DEFINES['BIN_SUFFIX'] = '"%s"' % CONFIG['BIN_SUFFIX']
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2'):
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
     DEFINES['MOZ_ENABLE_FREETYPE'] = True
 
 if CONFIG['MOZ_TOOLKIT_SEARCH']:
     DEFINES['MOZ_TOOLKIT_SEARCH'] = True
 
 JAR_MANIFESTS += ['jar.mn']
 
 BROWSER_CHROME_MANIFESTS += ['tests/browser.ini']
--- a/dom/moz.build
+++ b/dom/moz.build
@@ -119,11 +119,11 @@ if CONFIG['MOZ_SECUREELEMENT']:
 
 DIRS += ['presentation']
 
 TEST_DIRS += [
     'tests',
     'imptests',
 ]
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'cocoa', 'windows'):
+if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk3', 'cocoa', 'windows'):
     TEST_DIRS += ['plugins/test']
 
--- a/dom/plugins/test/moz.build
+++ b/dom/plugins/test/moz.build
@@ -3,13 +3,13 @@
 # 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/.
 
 DIRS += ['testplugin', 'testaddon']
 
 XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'cocoa', 'windows'):
+if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk3', 'cocoa', 'windows'):
     MOCHITEST_MANIFESTS += ['mochitest/mochitest.ini']
     MOCHITEST_CHROME_MANIFESTS += ['mochitest/chrome.ini']
     BROWSER_CHROME_MANIFESTS += ['mochitest/browser.ini']
 
--- a/dom/plugins/test/testplugin/testplugin.mozbuild
+++ b/dom/plugins/test/testplugin/testplugin.mozbuild
@@ -13,17 +13,17 @@ UNIFIED_SOURCES += [
     '%s/nptest_name.cpp' % relative_path,
 ]
 
 toolkit = CONFIG['MOZ_WIDGET_TOOLKIT']
 if toolkit == 'cocoa':
     UNIFIED_SOURCES += [
         'nptest_macosx.mm'
     ]
-elif toolkit in ('gtk2', 'gtk3'):
+elif toolkit == 'gtk3':
     UNIFIED_SOURCES += [
         'nptest_gtk2.cpp',
     ]
 elif toolkit == 'windows':
     UNIFIED_SOURCES += [
         'nptest_windows.cpp',
     ]
     OS_LIBS += [
@@ -42,17 +42,17 @@ NO_PGO = True
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
     RCFILE  = 'nptest.rc'
     RESFILE = 'nptest.res'
     DEFFILE = SRCDIR + '/nptest.def'
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa' and '64' in CONFIG['OS_TEST']:
     OS_LIBS += ['-framework Carbon']
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'):
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3':
     CXXFLAGS += CONFIG['MOZ_GTK2_CFLAGS']
     CFLAGS += CONFIG['MOZ_GTK2_CFLAGS']
     OS_LIBS += CONFIG['MOZ_GTK2_LIBS']
     OS_LIBS += CONFIG['XLDFLAGS']
     OS_LIBS += CONFIG['XLIBS']
     OS_LIBS += CONFIG['XEXT_LIBS']
 
 if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
--- a/dom/system/moz.build
+++ b/dom/system/moz.build
@@ -41,17 +41,17 @@ with Files("tests/*1197901*"):
 toolkit = CONFIG['MOZ_WIDGET_TOOLKIT']
 
 if toolkit == 'windows':
     DIRS += ['windows']
 elif toolkit == 'cocoa':
     DIRS += ['mac']
 elif toolkit == 'android':
     DIRS += ['android']
-elif toolkit in ('gtk2', 'gtk3'):
+elif toolkit == 'gtk3':
     DIRS += ['linux']
 
 XPIDL_SOURCES += [
     'nsIOSFileConstantsService.idl',
 ]
 
 XPIDL_MODULE = 'dom_system'
 
--- a/dom/xbl/builtin/moz.build
+++ b/dom/xbl/builtin/moz.build
@@ -5,13 +5,13 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     DIRS += ['win']
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     DIRS += ['mac']
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
     DIRS += ['android']
-elif CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'):
+elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3':
     DIRS += ['unix']
 else:
     DIRS += ['emacs']
 
--- a/gfx/2d/moz.build
+++ b/gfx/2d/moz.build
@@ -94,25 +94,25 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wi
     ]
     DEFINES['WIN32'] = True
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'windows':
     SOURCES += [
         'JobScheduler_posix.cpp',
     ]
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3'):
+if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk3'):
     EXPORTS.mozilla.gfx += [
         'UnscaledFontFreeType.h',
     ]
     SOURCES += [
         'UnscaledFontFreeType.cpp',
     ]
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'):
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3':
     SOURCES += [
         'NativeFontResourceFontconfig.cpp',
         'ScaledFontFontconfig.cpp',
     ]
 
 if CONFIG['MOZ_ENABLE_SKIA']:
     SOURCES += [
         'ConvolutionFilter.cpp',
@@ -223,22 +223,22 @@ if CONFIG['CPU_ARCH'] == 'arm' and CONFI
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 for var in ('USE_CAIRO', 'MOZ2D_HAS_MOZ_CAIRO'):
     DEFINES[var] = True
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3'):
+if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk3'):
     DEFINES['MOZ_ENABLE_FREETYPE'] = True
 
 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3'):
+if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk3'):
     CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
 
 LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
 
 if CONFIG['MOZ_ENABLE_SKIA']:
     LOCAL_INCLUDES += [
         '/gfx/skia/skia/include/private',
         '/gfx/skia/skia/src/core',
--- a/gfx/skia/generate_mozbuild.py
+++ b/gfx/skia/generate_mozbuild.py
@@ -132,21 +132,21 @@ if CONFIG['CC_TYPE'] == 'gcc':
 if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
     CXXFLAGS += [
         '-Wno-implicit-fallthrough',
         '-Wno-inconsistent-missing-override',
         '-Wno-macro-redefined',
         '-Wno-unused-private-field',
     ]
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android'):
+if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk3', 'android'):
     CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
     CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'):
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3':
     CXXFLAGS += CONFIG['MOZ_PANGO_CFLAGS']
 
 if CONFIG['MOZ_ENABLE_SKIA_PDF_SFNTLY']:
     LOCAL_INCLUDES += CONFIG['SFNTLY_INCLUDES']
 """
 
 import json
 
@@ -432,17 +432,17 @@ def write_mozbuild(sources):
   write_sources(f, sources['gpu'], 4)
 
   f.write("if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':\n")
   write_sources(f, sources['android'], 4)
 
   f.write("if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('cocoa', 'uikit'):\n")
   write_sources(f, sources['mac'], 4)
 
-  f.write("if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'):\n")
+  f.write("if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3':\n")
   write_sources(f, sources['linux'], 4)
 
   f.write("if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':\n")
   f.write("    if CONFIG['CC_TYPE'] != 'gcc':\n")
   write_list(f, "SOURCES", sources['no-mingw'], 8)
   # Windows-specific files don't get unification because of nasty headers.
   # Luckily there are not many files in this.
   write_list(f, "SOURCES", sources['win'], 4)
--- a/gfx/skia/moz.build
+++ b/gfx/skia/moz.build
@@ -578,17 +578,17 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('coc
         'skia/src/ports/SkOSLibrary_posix.cpp',
         'skia/src/ports/SkTLS_pthread.cpp',
         'skia/src/utils/SkThreadUtils_pthread.cpp',
     ]
     SOURCES += [
         'skia/src/jumper/SkJumper_generated.S',
         'skia/src/ports/SkFontHost_mac.cpp',
     ]
-if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'):
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3':
     UNIFIED_SOURCES += [
         'skia/src/ports/SkDebug_stdio.cpp',
         'skia/src/ports/SkOSFile_posix.cpp',
         'skia/src/ports/SkOSLibrary_posix.cpp',
         'skia/src/ports/SkTLS_pthread.cpp',
         'skia/src/utils/SkThreadUtils_pthread.cpp',
     ]
     SOURCES += [
@@ -777,17 +777,17 @@ if CONFIG['CC_TYPE'] == 'gcc':
 if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
     CXXFLAGS += [
         '-Wno-implicit-fallthrough',
         '-Wno-inconsistent-missing-override',
         '-Wno-macro-redefined',
         '-Wno-unused-private-field',
     ]
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android'):
+if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk3', 'android'):
     CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
     CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'):
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3':
     CXXFLAGS += CONFIG['MOZ_PANGO_CFLAGS']
 
 if CONFIG['MOZ_ENABLE_SKIA_PDF_SFNTLY']:
     LOCAL_INCLUDES += CONFIG['SFNTLY_INCLUDES']
--- a/gfx/thebes/moz.build
+++ b/gfx/thebes/moz.build
@@ -247,33 +247,33 @@ include('/ipc/chromium/chromium-config.m
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '/dom/base',
     '/dom/workers',
     '/dom/xml',
 ]
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3'):
+if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk3'):
     DEFINES['MOZ_ENABLE_FREETYPE'] = True
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
     for var in ('MOZ_ENABLE_D3D10_LAYER',):
         if CONFIG[var]:
             DEFINES[var] = True
 
 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 CXXFLAGS += CONFIG['TK_CFLAGS']
 CFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 CFLAGS += CONFIG['TK_CFLAGS']
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android'):
     CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'):
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3':
     CXXFLAGS += CONFIG['MOZ_PANGO_CFLAGS']
 
 LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
 
 DEFINES['GRAPHITE2_STATIC'] = True
 
 if CONFIG['CC_TYPE'] == 'clang':
     # Suppress warnings from Skia header files.
--- a/gfx/webrender_bindings/moz.build
+++ b/gfx/webrender_bindings/moz.build
@@ -44,15 +44,15 @@ if CONFIG['MOZ_ENABLE_D3D10_LAYER']:
     DEFINES['MOZ_ENABLE_D3D10_LAYER'] = True
     EXPORTS.mozilla.webrender += [
         'RenderD3D11TextureHostOGL.h',
     ]
     UNIFIED_SOURCES += [
         'RenderD3D11TextureHostOGL.cpp',
     ]
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3'):
+if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk3'):
     CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
     CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
--- a/toolkit/modules/moz.build
+++ b/toolkit/modules/moz.build
@@ -260,20 +260,20 @@ EXTRA_JS_MODULES.sessionstore += [
     'sessionstore/PrivacyLevel.jsm',
     'sessionstore/SessionHistory.jsm',
     'sessionstore/Utils.jsm',
 ]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'cocoa', 'gtk3'):
     DEFINES['CAN_DRAW_IN_TITLEBAR'] = 1
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk2', 'gtk3'):
+if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk3'):
     DEFINES['MENUBAR_CAN_AUTOHIDE'] = 1
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk2', 'gtk3', 'cocoa'):
+if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk3', 'cocoa'):
     DEFINES['HAVE_SHELL_SERVICE'] = 1
 
 EXTRA_PP_JS_MODULES += [
     'AppConstants.jsm',
 ]
 
 if 'Android' != CONFIG['OS_TARGET']:
     EXTRA_JS_MODULES += [
--- a/toolkit/moz.build
+++ b/toolkit/moz.build
@@ -30,17 +30,17 @@ if CONFIG['MOZ_MAINTENANCE_SERVICE'] or 
 
 if CONFIG['MOZ_MAINTENANCE_SERVICE']:
     DIRS += [
         'components/maintenanceservice'
     ]
 
 DIRS += ['xre']
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'):
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3':
     DIRS += ['system/unixproxy']
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     DIRS += ['system/osxproxy']
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
     DIRS += ['system/windowsproxy']
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
     DIRS += ['system/androidproxy']
 
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -141,52 +141,48 @@ def toolkit(value, target, _):
     return platform_choices[0]
 
 @depends(toolkit)
 def wayland(toolkit):
     return toolkit == 'cairo-gtk3-wayland'
 
 @depends(toolkit)
 def toolkit(toolkit):
-    if toolkit == 'cairo-gtk2-x11':
-        widget_toolkit = 'gtk2'
-    elif toolkit == 'cairo-gtk3-wayland' :
+    if toolkit == 'cairo-gtk3-wayland':
         widget_toolkit = 'gtk3'
     else:
         widget_toolkit = toolkit.replace('cairo-', '')
     return widget_toolkit
 
 set_config('MOZ_WIDGET_TOOLKIT', toolkit)
 add_old_configure_assignment('MOZ_WIDGET_TOOLKIT', toolkit)
 
 @depends(toolkit)
 def toolkit_gtk(toolkit):
-    if toolkit == 'gtk2':
-        return '2'
-    elif toolkit == 'gtk3':
+    if toolkit == 'gtk3':
         return '3'
 
 set_define('MOZ_WIDGET_GTK', toolkit_gtk)
 
 @depends(toolkit)
 def toolkit_define(toolkit):
-    if toolkit not in ('gtk2', 'gtk3', 'windows'):
+    if toolkit not in ('gtk3', 'windows'):
         return 'MOZ_WIDGET_%s' % toolkit.upper()
 
 set_define(toolkit_define, True)
 
 
 option('--without-x', env='WITHOUT_X', help='Disable X11 support')
 
 @depends('--without-x', toolkit)
 def x11(value, toolkit):
     if not value:
         die('--without-x is not supported')
 
-    x11_toolkits = ('gtk2', 'gtk3')
+    x11_toolkits = ('gtk3',)
     if value and value.origin != 'default' and toolkit not in x11_toolkits:
         die('--with-x is only valid with --enable-default-toolkit={%s}',
             ','.join(x11_toolkits))
 
     return True if value and toolkit in x11_toolkits else None
 
 set_config('MOZ_ENABLE_XREMOTE', x11)
 set_define('MOZ_ENABLE_XREMOTE', x11)
@@ -235,17 +231,17 @@ def gl_provider_define(provider):
 
 set_define(gl_provider_define, True)
 
 
 # PDF printing
 # ==============================================================
 @depends(toolkit)
 def pdf_printing(toolkit):
-    if toolkit in ('windows', 'gtk2', 'gtk3', 'android'):
+    if toolkit in ('windows', 'gtk3', 'android'):
         return True
 
 @depends(pdf_printing)
 def pdf_surface_feature(pdf_printing):
     if pdf_printing:
         return '#define CAIRO_HAS_PDF_SURFACE 1'
     else:
         # CONFIGURE_SUBST_FILES need explicit empty values.
@@ -257,32 +253,32 @@ set_config('PDF_SURFACE_FEATURE', pdf_su
 
 # Event loop instrumentation
 # ==============================================================
 option(env='MOZ_INSTRUMENT_EVENT_LOOP',
        help='Force-enable event loop instrumentation')
 
 @depends('MOZ_INSTRUMENT_EVENT_LOOP', toolkit)
 def instrument_event_loop(value, toolkit):
-    if value or (toolkit in ('windows', 'gtk2', 'gtk3', 'cocoa', 'android') and
+    if value or (toolkit in ('windows', 'gtk3', 'cocoa', 'android') and
                  value.origin == 'default'):
         return True
 
 set_config('MOZ_INSTRUMENT_EVENT_LOOP', instrument_event_loop)
 set_define('MOZ_INSTRUMENT_EVENT_LOOP', instrument_event_loop)
 
 
 # Fontconfig Freetype
 # ==============================================================
 option(env='USE_FC_FREETYPE',
        help='Force-enable the use of fontconfig freetype')
 
 @depends('USE_FC_FREETYPE', toolkit)
 def fc_freetype(value, toolkit):
-    if value or (toolkit in ('gtk2', 'gtk3') and
+    if value or (toolkit == 'gtk3' and
                  value.origin == 'default'):
         return True
 
 add_old_configure_assignment('USE_FC_FREETYPE', fc_freetype)
 
 # Pango
 # ==============================================================
 pkg_check_modules('MOZ_PANGO',
@@ -869,17 +865,17 @@ def printing(value):
 set_config('NS_PRINTING', printing)
 set_define('NS_PRINTING', printing)
 set_define('NS_PRINT_PREVIEW', printing)
 
 # Speech-dispatcher support
 # ==============================================================
 @depends(toolkit)
 def no_speechd_on_non_gtk(toolkit):
-    if toolkit not in ('gtk2', 'gtk3'):
+    if toolkit != 'gtk3':
         return False
 
 imply_option('--enable-synth-speechd', no_speechd_on_non_gtk,
              reason='--enable-default-toolkit')
 
 option('--disable-synth-speechd', help='Disable speech-dispatcher support')
 
 set_config('MOZ_SYNTH_SPEECHD',
--- a/toolkit/mozapps/installer/upload-files.mk
+++ b/toolkit/mozapps/installer/upload-files.mk
@@ -7,17 +7,17 @@ ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 MOZ_PKG_FORMAT  = DMG
 else
 ifeq (,$(filter-out WINNT, $(OS_ARCH)))
 MOZ_PKG_FORMAT  = ZIP
 else
 ifeq (,$(filter-out SunOS, $(OS_ARCH)))
    MOZ_PKG_FORMAT  = BZ2
 else
-   ifeq (,$(filter-out gtk2 gtk3 qt, $(MOZ_WIDGET_TOOLKIT)))
+   ifeq (,$(filter-out gtk3 qt, $(MOZ_WIDGET_TOOLKIT)))
       MOZ_PKG_FORMAT  = BZ2
    else
       ifeq (android,$(MOZ_WIDGET_TOOLKIT))
           MOZ_PKG_FORMAT = APK
       else
           MOZ_PKG_FORMAT = TGZ
       endif
    endif
--- a/toolkit/themes/moz.build
+++ b/toolkit/themes/moz.build
@@ -15,17 +15,17 @@
 #                         non-mac (toolkit/themes/shared/non-mac)
 # mobile                  native UIs that do not use XUL for UI
 
 toolkit = CONFIG['MOZ_WIDGET_TOOLKIT']
 app = CONFIG['MOZ_BUILD_APP']
 
 if toolkit == 'cocoa':
     DIRS += ['osx']
-elif toolkit in ('gtk2', 'gtk3'):
+elif toolkit == 'gtk3':
     DIRS += ['linux']
 elif app == 'mobile/android':
     DIRS += ['mobile']
 else:
     DIRS += ['windows']
 
 with Files('**'):
     BUG_COMPONENT = ('Toolkit', 'Themes')
--- a/uriloader/exthandler/moz.build
+++ b/uriloader/exthandler/moz.build
@@ -130,11 +130,11 @@ LOCAL_INCLUDES += [
     '/netwerk/base',
     '/netwerk/protocol/http',
 ]
 
 if CONFIG['MOZ_ENABLE_DBUS']:
     CXXFLAGS += CONFIG['TK_CFLAGS']
     CXXFLAGS += CONFIG['MOZ_DBUS_CFLAGS']
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'):
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3':
     CXXFLAGS += CONFIG['TK_CFLAGS']
     CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']
--- a/widget/headless/moz.build
+++ b/widget/headless/moz.build
@@ -10,18 +10,17 @@ with Files("**"):
 DIRS += ['tests']
 
 LOCAL_INCLUDES += [
     '/widget',
     '/widget/headless',
 ]
 
 widget_dir = CONFIG['MOZ_WIDGET_TOOLKIT']
-if widget_dir in ('gtk3', 'gtk2'):
-    # gtk3 shares includes with gtk2
+if widget_dir == 'gtk3':
     widget_dir = 'gtk'
 
 LOCAL_INCLUDES += [
     '/widget/%s' % widget_dir,
 ]
 
 UNIFIED_SOURCES += [
     'HeadlessClipboard.cpp',
--- a/widget/moz.build
+++ b/widget/moz.build
@@ -254,23 +254,23 @@ if toolkit == 'windows':
         'PluginWidgetProxy.cpp',
     ]
 
 if toolkit in ('cocoa', 'windows'):
     UNIFIED_SOURCES += [
         'nsBaseClipboard.cpp',
     ]
 
-if toolkit in {'gtk2', 'gtk3', 'cocoa', 'windows',
+if toolkit in {'gtk3', 'cocoa', 'windows',
                'android', 'uikit'}:
     UNIFIED_SOURCES += [
         'nsBaseFilePicker.cpp',
     ]
 
-if toolkit in ('gtk2', 'gtk3', 'windows', 'cocoa', 'android'):
+if toolkit in ('gtk3', 'windows', 'cocoa', 'android'):
     UNIFIED_SOURCES += [
         'nsNativeTheme.cpp',
     ]
 if toolkit == 'gtk3':
     XPIDL_SOURCES += [
         'nsIApplicationChooser.idl',
     ]
 
@@ -306,18 +306,17 @@ elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT
 else:
     IPDL_SOURCES = [
         'headless/HeadlessWidgetTypes.ipdlh',
         'PCompositorWidget.ipdl',
         'PlatformWidgetTypes.ipdlh',
     ]
 
 widget_dir = toolkit
-if widget_dir in ('gtk3', 'gtk2'):
-    # gtk3 shares includes with gtk2
+if widget_dir == 'gtk3':
     widget_dir = 'gtk'
 
 LOCAL_INCLUDES += [
     '/widget/%s' % widget_dir,
 ]
 FINAL_LIBRARY = 'xul'
 
 if CONFIG['MOZ_ENABLE_D3D10_LAYER']:
--- a/xpcom/glue/standalone/moz.build
+++ b/xpcom/glue/standalone/moz.build
@@ -29,10 +29,10 @@ LOCAL_INCLUDES += [
 # Don't use STL wrappers here (i.e. wrapped <new>); they require mozalloc
 DisableStlWrapping()
 
 # Force to build a static library only
 NO_EXPAND_LIBS = True
 
 DIST_INSTALL = True
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'):
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3':
     CXXFLAGS += CONFIG['GLIB_CFLAGS']