From 0eb9f1fcfb2a438ecd85ad7e526f0ec3d01e2da6 Mon Sep 17 00:00:00 2001 From: Curtis Gedak Date: Tue, 30 Jan 2018 16:14:02 -0700 Subject: [PATCH] Reduce dependency on scrollkeeper (#743318) Scrollkeeper and the associated OMF catalog files are used by the GNOME 2 version of yelp to display the GParted help manual. To see how this works try the following command: yelp ghelp:gparted GNOME version 3 and higher yelp do not require scrollkeeper or the OMF catalog files to properly display the GParted help manual. And in fact GNOME 3 deprecated the GNOME 2 method of building and installing GNOME help documents altogether; including use of GNOME_DOC_INIT autoconf macro, the gnome-doc-utils package and use of scrollkeeper. [GNOME 3] GNOME Goal: Port To New Documentation Infrastructure https://wiki.gnome.org/Initiatives/GnomeGoals/NewDocumentationInfrastructure Further, the next release of Debian, Debian 10 (Buster), will be removing the scrollkeeper / rarian package. rarian: Don't release with Buster https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=885657 GParted is still a GNOME 2 app using GNOME 2 documentation build system using autoconf GNOME_DOC_INIT macro. [GNOME 2] Migrating your documentation to gnome-doc-utils https://wiki.gnome.org/Projects/GnomeDocUtils/MigrationHowTo This is needed to build GParted documentation on still supported GNOME 2 distributions RHEL / CentOS 6. So avoid requiring deprecated scrollkeeper on GNOME 3 by automatically disabling scrollkeeper database updates when the scrollkeeper-update command is not available. Executable | Configure option used | Use scrollkeeper scrollkeeper-update | on command line | when building help exists? | | for GParted? --------------------+------------------------+------------------- Yes | | Yes Yes | --enable-scrollkeeper | Yes Yes | --disable-scrollkeeper | No | | No | | No Note that because GParted is still using the GNOME 2 documentation build system it still builds and installs OMF files. It is just that they are not required with GNOME 3 yelp and this commit automatically disables updating the scrollkeeper database when the scrollkeeper-update command is not available. Bug 743318 - configure script missing check for scrollkeeper dependency --- README | 12 ++++++++---- configure.ac | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/README b/README index d3398b1f..dd7e3ed7 100644 --- a/README +++ b/README @@ -102,8 +102,8 @@ b. Building from Source On Fedora, you will need to run (as root); yum install gtkmm24-devel parted-devel e2fsprogs-devel gettext \ 'perl(XML::Parser)' desktop-file-utils libuuid-devel \ - gnome-doc-utils docbook-dtds rarian-compat intltool \ - gnome-common gcc-c++ + gnome-doc-utils docbook-dtds intltool gnome-common \ + gcc-c++ yum groupinstall 'Development Tools' On openSUSE, these dependencies may be obtained by running the @@ -123,9 +123,13 @@ b. Building from Source the --disable-doc flag: E.g., ./configure --disable-doc - If you wish to build this package for use on a desktop that does not - support scrollkeeper use the --disable-scrollkeeper flag: + Scrollkeeper is needed on GNOME/Gtk 2 desktops to update the OMF + catalog files to allow yelp to display the GParted help manual. On + GNOME/Gtk 3 desktops scrollkeeper in not required. Use can be + explicitly disabled with the --disable-scrollkeeper flag: E.g., ./configure --disable-scrollkeeper + Note that the configure script will automatically disable + scrollkeeper if the scrollkeeper-update command is not found. If you wish to build this package to use native libparted /dev/mapper dmraid support use the --enable-libparted-dmraid flag: diff --git a/configure.ac b/configure.ac index ce6f1224..b6229702 100644 --- a/configure.ac +++ b/configure.ac @@ -348,6 +348,23 @@ fi AM_CONDITIONAL([BUILD_HELP_DOC], [test "x$enable_doc" = xyes]) +dnl GNOME 2 yelp needs scrollkeeper database updates to find installed GNOME help files. +dnl GNOME 3 yelp doesn't need scrollkeeper and its use is deprecated. To avoid requiring +dnl deprecated scrollkeeper on GNOME 3, automatically disable scrollkeeper database +dnl updates when the command is not available. +dnl (See /usr/share/aclocal/gnome-doc-utils.m4 for the GNOME_DOC_INIT macro which has +dnl already parsed the --disable-scrollkeeper option and set enable_scrollkeeper and +dnl ENABLE_SK). +AC_CHECK_PROG([have_scrollkeeper_update], [scrollkeeper-update], yes, no) +AC_MSG_CHECKING([whether to enable scrollkeeper database update]) +if test "$enable_scrollkeeper" = "yes" -a "$have_scrollkeeper_update" = "yes"; then + AC_MSG_RESULT([yes]) +else + enable_scrollkeeper=no + AM_CONDITIONAL([ENABLE_SK], false) + AC_MSG_RESULT([no]) +fi + dnl====================== dnl check whether to use native libparted dmraid support @@ -438,6 +455,7 @@ echo "======================== Final configuration ===========================" echo " Installing into prefix : $prefix" echo "" echo " Build help documentation? : $enable_doc" +echo " Update scrollkeeper database? : $enable_scrollkeeper" echo "" echo " Use native libparted dmraid support? : $enable_libparted_dmraid" echo ""