[gjs: 5/7] build: Stop linking with GTK3
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 5/7] build: Stop linking with GTK3
- Date: Sat, 17 Aug 2019 01:21:16 +0000 (UTC)
commit 6f495c74cc8e9f3f9b5374b0d11d9b522773c342
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Aug 13 00:49:47 2019 +0200
build: Stop linking with GTK3
The build-time dependency is no longer required, so all it does now is
occupying the linker more than necessary and - more importantly - making
it impossible to use GTK4.
https://gitlab.gnome.org/GNOME/gjs/issues/99
.gitlab-ci.yml | 2 +-
Makefile.am | 9 ---------
configure.ac | 17 ++++-------------
win32/config-msvc.mak | 21 ---------------------
4 files changed, 5 insertions(+), 44 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index df57ecfa..77db39c9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -183,7 +183,7 @@ no_graphics:
variables:
TASK_ID: "fedora-x86_64-gcc-default-without_gtk-check"
TEST: "check"
- BUILD_OPTS: "--without-cairo --without-gtk"
+ BUILD_OPTS: "--without-cairo --without-gtk-tests"
SCRIPTCHECK: "yes"
except:
- schedules
diff --git a/Makefile.am b/Makefile.am
index dfb36dd4..d5367f96 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -76,11 +76,6 @@ libgjs_la_LIBADD = \
$(READLINE_LIBS) \
$(NULL)
-if ENABLE_GTK
-libgjs_la_CPPFLAGS += $(GJS_GTK_CFLAGS)
-libgjs_la_LIBADD += $(GJS_GTK_LIBS)
-endif
-
# Please see gjs-srcs.mk for brief expanations
# of the layout of the sources due to historical
# reasons
@@ -134,10 +129,6 @@ GjsPrivate_1_0_gir_SCANNERFLAGS = \
$(WARN_SCANNERFLAGS) \
$(NULL)
-if ENABLE_GTK
-GjsPrivate_1_0_gir_INCLUDES += Gtk-3.0
-endif
-
INTROSPECTION_GIRS += GjsPrivate-1.0.gir
if ENABLE_DTRACE
diff --git a/configure.ac b/configure.ac
index bbf2b067..73f5491a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,7 +70,6 @@ gjs_base_packages="$GOBJECT_REQUIREMENT gio-2.0"
common_packages="gthread-2.0 gio-2.0 >= glib_required_version mozjs-60"
gjs_packages="gobject-introspection-1.0 libffi $common_packages"
gjs_cairo_packages="cairo cairo-gobject $common_packages"
-gjs_gtk_packages="gtk+-3.0 >= 3.20"
gjs_sysprof_packages="sysprof-capture-3 >= 3.33.2"
AX_PKG_CHECK_MODULES([GJS], [$GOBJECT_REQUIREMENT], [$gjs_packages])
@@ -136,17 +135,9 @@ AS_IF([test x$have_cairo = xyes], [
[AC_MSG_ERROR([Cairo requested but not found])])])
# Optional GTK+ dep (enabled by default)
-AC_ARG_WITH(gtk,
- [AS_HELP_STRING([--without-gtk], [Don't build GTK-related code])])
-AS_IF([test "x$with_gtk" != "xno"],
- [AX_PKG_CHECK_MODULES([GJS_GTK], [], [$gjs_gtk_packages],
- [have_gtk=yes], [have_gtk=no])],
- [have_gtk=no])
-AM_CONDITIONAL(ENABLE_GTK, test x$have_gtk = xyes)
-AS_IF([test x$have_gtk = xyes], [
- AC_DEFINE([ENABLE_GTK],[1],[Define if you want to build with GTK+ support])
-], [AS_IF([test "x$with_gtk" = "xyes"],
- [AC_MSG_ERROR([GTK requested but not found])])])
+AC_ARG_WITH(gtk-tests,
+ [AS_HELP_STRING([--without-gtk-tests], [Skip tests that need a display connection])])
+AM_CONDITIONAL(ENABLE_GTK, [test "x$with_gtk_tests" != "xno"])
AC_ARG_ENABLE([profiler],
[AS_HELP_STRING([--disable-profiler], [Don't build profiler])],
@@ -410,11 +401,11 @@ AC_MSG_RESULT([
GJS_LIBS: ${GJS_LIBS}
cairo: ${have_cairo}
- GTK+: ${have_gtk}
readline: ${ac_cv_header_readline_readline_h}
dtrace: ${enable_dtrace:-no}
systemtap: ${enable_systemtap:-no}
Profiler: ${enable_profiler}
+ Run GTK tests: ${with_gtk_tests}
Run tests under: ${TEST_MSG}
Code coverage: ${enable_code_coverage}
])
diff --git a/win32/config-msvc.mak b/win32/config-msvc.mak
index 3572c9b6..a7aeb7e0 100644
--- a/win32/config-msvc.mak
+++ b/win32/config-msvc.mak
@@ -30,15 +30,6 @@ LIBGJS_BASE_DEP_LIBS = \
# For Cairo support
CAIRO_LIBS = cairo-gobject.lib cairo.lib
-# For GTK+ support
-GTK_INCLUDES = \
- /I$(PREFIX)\include\gtk-3.0 \
- /I$(PREFIX)\include\gdk-pixbuf-2.0 \
- /I$(PREFIX)\include\pango-1.0 \
- /I$(PREFIX)\include\atk-1.0
-
-GTK_LIBS = gtk-3.0.lib gdk-3.0.lib
-
# Please do not change anything beneath this line unless maintaining the NMake Makefiles
# Bare minimum features and sources built into GJS on Windows
@@ -86,19 +77,7 @@ LIBGJS_DEP_LIBS = $(CAIRO_LIBS) $(LIBGJS_DEP_LIBS)
!endif
INTROSPECTION_INCLUDE_PACKAGES = --include=Gio-2.0 --include=GObject-2.0
-
-# Enable GTK+
-!if "$(NO_GTK)" != "1"
-GJS_DEFINES = $(GJS_DEFINES) /DENABLE_GTK
-LIBGJS_PRIVATE_SOURCES = $(LIBGJS_PRIVATE_SOURCES)
-
-GJS_INTROSPECTION_CHECK_PACKAGE = gtk+-3.0
-INTROSPECTION_INCLUDE_PACKAGES = $(INTROSPECTION_INCLUDE_PACKAGES) --include=Gtk-3.0
-LIBGJS_DEP_INCLUDES = $(GTK_INCLUDES) $(LIBGJS_DEP_INCLUDES)
-LIBGJS_DEP_LIBS = $(GTK_LIBS) $(LIBGJS_DEP_LIBS)
-!else
GJS_INTROSPECTION_CHECK_PACKAGE = gio-2.0
-!endif
LIBGJS_SOURCES = $(gjs_srcs) $(LIBGJS_PRIVATE_SOURCES)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]