From: Thomas Weißschuh Date: Wed, 31 May 2023 15:12:12 +0000 (+0200) Subject: tools: (asciidoctor) explicitly require extensions module X-Git-Tag: v2.40-rc1~413 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a5b093698a21372831a293383fb369eba10f8bc9;p=thirdparty%2Futil-linux.git tools: (asciidoctor) explicitly require extensions module This is needed for older versions of asciidoctor. Signed-off-by: Thomas Weißschuh --- diff --git a/configure.ac b/configure.ac index c80ef7bded..7de254c2d5 100644 --- a/configure.ac +++ b/configure.ac @@ -805,16 +805,17 @@ AC_ARG_ENABLE([asciidoc], UL_BUILD_INIT([asciidoc]) UL_REQUIRES_PROGRAM([asciidoc], [ASCIIDOCTOR], [asciidoctor], [man pages]) AM_CONDITIONAL([ENABLE_ASCIIDOC], [test "x$build_asciidoc" = xyes]) +have_asciidoctor_failure_level=no AS_IF([test "x$build_asciidoc" = xyes], [ AC_MSG_CHECKING([whether ${ASCIIDOCTOR} supports --failure-level]) AS_IF([${ASCIIDOCTOR} --help | grep failure-level >/dev/null 2>&1 ], [ AC_MSG_RESULT([yes]) - AM_CONDITIONAL([HAVE_ASCIIDOCTOR_FAILURE_LEVEL], [true]) + have_asciidoctor_failure_level=yes ], [ AC_MSG_RESULT([no]) - AM_CONDITIONAL([HAVE_ASCIIDOCTOR_FAILURE_LEVEL], [false]) ]) ]) +AM_CONDITIONAL([HAVE_ASCIIDOCTOR_FAILURE_LEVEL], [test "x$have_asciidoctor_failure_level" = xyes]) have_manpages=no AS_IF([test -f "$srcdir/sys-utils/mount.8"], [ diff --git a/tools/asciidoctor-includetracker.rb b/tools/asciidoctor-includetracker.rb index 75a9e5b568..bcf9ce0302 100644 --- a/tools/asciidoctor-includetracker.rb +++ b/tools/asciidoctor-includetracker.rb @@ -1,6 +1,8 @@ # Copyright (C) 2023 Thomas Weißschuh # Extensions for asciidoctor to write dependency files for include directives. +require 'asciidoctor/extensions' + module IncludeTracker class Preprocessor < Asciidoctor::Extensions::Preprocessor diff --git a/tools/asciidoctor-unicodeconverter.rb b/tools/asciidoctor-unicodeconverter.rb index 4983ee5c64..7b90bd3722 100644 --- a/tools/asciidoctor-unicodeconverter.rb +++ b/tools/asciidoctor-unicodeconverter.rb @@ -1,6 +1,8 @@ # Copyright (C) 2023 Thomas Weißschuh # Extension for asciidoctor to remove unicode dash in first section of manpage +require 'asciidoctor/extensions' + module UnicodeConverter BEFORE_NAME_SECTION = 1 IN_NAME_SECTION = 2