Skip to content

Commit

Permalink
Backed out changeset 3ec9f9951ffe (bug 1377445) for bustage due to mi…
Browse files Browse the repository at this point in the history
…ssing file. CLOSED TREE
  • Loading branch information
ncsoregi committed Apr 8, 2021
1 parent a8d75d5 commit 23d206b
Show file tree
Hide file tree
Showing 10 changed files with 68 additions and 2 deletions.
6 changes: 6 additions & 0 deletions old-configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ GLIB_VERSION=2.42
GLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_42
GLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_42
CAIRO_VERSION=1.10
GTK2_VERSION=2.18.0
GTK3_VERSION=3.14.0
GDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_14
W32API_VERSION=3.14
Expand Down Expand Up @@ -1587,6 +1588,11 @@ if test "$COMPILE_ENVIRONMENT"; then
if test "$MOZ_ENABLE_GTK"; then
AC_DEFINE_UNQUOTED(GLIB_VERSION_MIN_REQUIRED,$GLIB_VERSION_MIN_REQUIRED)
AC_DEFINE_UNQUOTED(GLIB_VERSION_MAX_ALLOWED,$GLIB_VERSION_MAX_ALLOWED)

if test "$MOZ_X11"; then
PKG_CHECK_MODULES(MOZ_GTK2, gtk+-2.0 >= $GTK2_VERSION gtk+-unix-print-2.0 glib-2.0 >= $GLIB_VERSION gobject-2.0 gio-unix-2.0 gdk-x11-2.0)
MOZ_GTK2_CFLAGS="-I${_topsrcdir}/widget/gtk/compat $MOZ_GTK2_CFLAGS"
fi
fi
fi # COMPILE_ENVIRONMENT

Expand Down
1 change: 1 addition & 0 deletions python/mozboot/mozboot/archlinux.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class ArchlinuxBootstrapper(LinuxBootstrapper, BaseBootstrapper):
BROWSER_PACKAGES = [
"alsa-lib",
"dbus-glib",
"gtk2",
"gtk3",
"libevent",
"libvpx",
Expand Down
1 change: 1 addition & 0 deletions python/mozboot/mozboot/centosfedora.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def __init__(self, distro, version, dist_id, **kwargs):
"alsa-lib-devel",
"dbus-glib-devel",
"glibc-static",
"gtk2-devel", # It is optional in Fedora 20's GNOME Software
# Development group.
"libstdc++-static",
"libXt-devel",
Expand Down
1 change: 1 addition & 0 deletions python/mozboot/mozboot/debian.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class DebianBootstrapper(LinuxBootstrapper, BaseBootstrapper):
"libdbus-glib-1-dev",
"libdrm-dev",
"libgtk-3-dev",
"libgtk2.0-dev",
"libpulse-dev",
"libx11-xcb-dev",
"libxt-dev",
Expand Down
1 change: 1 addition & 0 deletions python/mozboot/mozboot/freebsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def __init__(self, version, flavor, **kwargs):

self.browser_packages = [
"dbus-glib",
"gtk2",
"gtk3",
"libXt",
"mesa-dri", # depends on llvm*
Expand Down
1 change: 1 addition & 0 deletions python/mozboot/mozboot/opensuse.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class OpenSUSEBootstrapper(LinuxBootstrapper, BaseBootstrapper):
"libXt-devel",
"libproxy-devel",
"libuuid-devel",
"gtk2-devel",
"clang-devel",
"patterns-gnome-devel_gnome",
]
Expand Down
40 changes: 40 additions & 0 deletions widget/gtk/mozgtk/gtk2/moz.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# 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/.

SOURCES += [
"../mozgtk.c",
]

DEFINES["GTK3_SYMBOLS"] = True

SharedLibrary("mozgtk2")

SHARED_LIBRARY_NAME = "mozgtk"

FINAL_TARGET = "dist/bin/gtk2"

# If LDFLAGS contains -Wl,--as-needed or if it's the default for the toolchain,
# we need to add -Wl,--no-as-needed before the gtk libraries, otherwise the
# linker will drop those dependencies because no symbols are used from them.
# But those dependencies need to be kept for things to work properly.
# Ideally, we'd only add -Wl,--no-as-needed if necessary, but it's just simpler
# to add it unconditionally. This library is also simple enough that forcing
# -Wl,--as-needed after the gtk libraries is not going to make a significant
# difference.
if CONFIG["GCC_USE_GNU_LD"]:
no_as_needed = ["-Wl,--no-as-needed"]
as_needed = ["-Wl,--as-needed"]
else:
no_as_needed = []
as_needed = []

OS_LIBS += [f for f in CONFIG["MOZ_GTK2_LIBS"] if f.startswith("-L")]
OS_LIBS += no_as_needed
OS_LIBS += [
"gtk-x11-2.0",
"gdk-x11-2.0",
]
OS_LIBS += as_needed
2 changes: 1 addition & 1 deletion widget/gtk/mozgtk/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# 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 += ["stub", "gtk3"]
DIRS += ["stub", "gtk2", "gtk3"]
15 changes: 15 additions & 0 deletions widget/gtk/mozgtk/mozgtk.c
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,21 @@ STUB(gtk_color_chooser_get_rgba)
STUB(gtk_color_chooser_set_use_alpha)
#endif

#ifdef GTK2_SYMBOLS
STUB(gdk_drawable_get_screen)
STUB(gdk_rgb_get_colormap)
STUB(gdk_rgb_get_visual)
STUB(gdk_window_lookup)
STUB(gdk_window_set_back_pixmap)
STUB(gdk_x11_colormap_foreign_new)
STUB(gdk_x11_colormap_get_xcolormap)
STUB(gdk_x11_drawable_get_xdisplay)
STUB(gdk_x11_drawable_get_xid)
STUB(gdk_x11_window_get_drawable_impl)
STUB(gdkx_visual_get)
STUB(gtk_object_get_type)
#endif

#ifndef GTK3_SYMBOLS
// Only define the following workaround when using GTK3, which we detect
// by checking if GTK3 stubs are not provided.
Expand Down
2 changes: 1 addition & 1 deletion widget/gtk/mozgtk/stub/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SOURCES += [
"../mozgtk.c",
]

for var in ("COMMON_SYMBOLS", "GTK3_SYMBOLS"):
for var in ("COMMON_SYMBOLS", "GTK2_SYMBOLS", "GTK3_SYMBOLS"):
DEFINES[var] = True

SharedLibrary("mozgtk_stub")
Expand Down

0 comments on commit 23d206b

Please sign in to comment.