[Libreoffice-commits] core.git: configure.ac sysui/CustomTarget_share.mk

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Tue Aug 6 09:14:40 UTC 2019


 configure.ac                |   14 +++++++++++++-
 sysui/CustomTarget_share.mk |    4 ++--
 2 files changed, 15 insertions(+), 3 deletions(-)

New commits:
commit b40018763538abc6ca5419ef433a5a1754100885
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Aug 5 13:52:50 2019 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue Aug 6 11:13:48 2019 +0200

    Introduce explicit --enable-introspection
    
    4b4c7e76e6c2ea0d47a42a5107352d3ad7341fbf "Only build LOKDocView-0.1.gir when
    necessary" had erroneously assumed that LOKDocView-0.1.{gir,typelib} need to be
    built when PKGFORMAT contains "deb" or "rpm".  But instead, they need to be
    built only for some 3rd-party Linux distro builds, never for TDF builds.
    
    Make that explicit with a new --enable-introspection, which those 3rd-party
    Linux distros will now have to specify (probably along with other fixes to where
    they pick up those LOKDocView-0.1.{gir,typelib} files after
    634844354ee6ed884128086a80c3ee32c889d8c9 "sysui: fix rpm errors in
    freedesktop-menus (4.14.1)" had moved them around).
    
    That way, builds that broke after 634844354ee6ed884128086a80c3ee32c889d8c9
    "sysui: fix rpm errors in freedesktop-menus (4.14.1)" (like my ASan+UBSan one
    that 4b4c7e76e6c2ea0d47a42a5107352d3ad7341fbf "Only build LOKDocView-0.1.gir
    when necessary" had tried to fix) can be fixed with an (implicit)
    --disable-introspection.
    
    This commit contains a revert of 4b4c7e76e6c2ea0d47a42a5107352d3ad7341fbf "Only
    build LOKDocView-0.1.gir when necessary", which it supersedes.
    
    Change-Id: Idb618e3353da7d68a2e552b0f290775c02327733
    Reviewed-on: https://gerrit.libreoffice.org/76997
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/configure.ac b/configure.ac
index 96f776280732..11474b80a891 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1228,6 +1228,11 @@ libo_FUZZ_ARG_ENABLE(gtk3,
         [Determines whether to use Gtk+ 3.0 vclplug on platforms where Gtk+ 3.0 is available.]),
 ,test "${enable_gtk3+set}" = set || enable_gtk3=yes)
 
+AC_ARG_ENABLE(introspection,
+    AS_HELP_STRING([--enable-introspection],
+        [Generate files for GObject introspection.  Requires --enable-gtk3.  (Typically used by
+         Linux distributions.)]))
+
 AC_ARG_ENABLE(split-app-modules,
     AS_HELP_STRING([--enable-split-app-modules],
         [Split file lists for app modules, e.g. base, calc.
@@ -10431,7 +10436,6 @@ if test "x$enable_gtk3" = "xyes"; then
     if test "x$ENABLE_GTK3" = "xTRUE"; then
         AC_DEFINE(ENABLE_GTK3)
         R="gtk3"
-        GOBJECT_INTROSPECTION_CHECK(INTROSPECTION_REQUIRED_VERSION)
     else
         AC_MSG_ERROR([gtk3 or dependent libraries of the correct versions, not found])
     fi
@@ -10450,6 +10454,14 @@ AC_SUBST(GTK3_LIBS)
 AC_SUBST(GTK3_CFLAGS)
 AC_SUBST(ENABLE_GTK3)
 
+if test "$enable_introspection" = yes; then
+    if test "$ENABLE_GTK3" = TRUE; then
+        GOBJECT_INTROSPECTION_REQUIRE(INTROSPECTION_REQUIRED_VERSION)
+    else
+        AC_MSG_ERROR([--enable-introspection requires --enable-gtk3])
+    fi
+fi
+
 ENABLE_GTK=""
 if test "x$enable_gtk" = "xyes"; then
     if test "$with_system_cairo" = no; then
diff --git a/sysui/CustomTarget_share.mk b/sysui/CustomTarget_share.mk
index 9afe6da42a45..231aa4ff930d 100644
--- a/sysui/CustomTarget_share.mk
+++ b/sysui/CustomTarget_share.mk
@@ -127,9 +127,9 @@ $(eval $(call gb_CustomTarget_register_targets,sysui/share,\
 		$(product)/openoffice.keys \
 		$(product)/openoffice.sh \
 		$(product)/create_tree.sh \
-		$(if $(filter deb rpm,$(PKGFORMAT)),$(if $(INTROSPECTION_SCANNER),\
+		$(if $(INTROSPECTION_SCANNER),\
 			$(product)/LOKDocView-0.1.gir \
-			$(product)/LOKDocView-0.1.typelib)) \
+			$(product)/LOKDocView-0.1.typelib) \
 		$(product)/launcherlist) \
 ))
 


More information about the Libreoffice-commits mailing list