Ticket #1732: add Docbook XSL and XML to check_alfs_tools

This is an oversight of when we moved to profiling and when we
removed the docbook xsl stylesheets from the LFS directory.
Docbook XML DTD and XSL stylesheets are needed, so test them
at start. This has the effect of removing the need for check_blfs_tools.
This commit is contained in:
Pierre Labastie 2021-12-13 16:05:39 +01:00
parent e57e0291c3
commit 837362b50f

View file

@ -227,23 +227,12 @@ inline_doc
echo "${nl_}\"${RED}xsltproc${OFF}\" ${BOLD}must be installed on your system for jhalfs to run" echo "${nl_}\"${RED}xsltproc${OFF}\" ${BOLD}must be installed on your system for jhalfs to run"
exit 1 exit 1
fi fi
}
#----------------------------#
check_blfs_tools() { #
#----------------------------#
: << inline_doc
In addition to the tools needed for the LFS part, docbook-xml
is needed for installing the BLFS tools
inline_doc
# Avoid translation of version strings
local LC_ALL=C
export LC_ALL
# Now that we do profiling, we need the docbook DTD, and the docbook XSL
# stylesheets.
# Minimal docbook-xml code for testing # Minimal docbook-xml code for testing
XML_FILE="<?xml version='1.0' encoding='ISO-8859-1'?> XML_FILE="<?xml version='1.0' encoding='ISO-8859-1'?>
<?xml-stylesheet type='text/xsl' href='http://docbook.sourceforge.net/release/xsl/1.69.1/xhtml/docbook.xsl'?> <?xml-stylesheet type='text/xsl' href='http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl'?>
<!DOCTYPE article PUBLIC '-//OASIS//DTD DocBook XML V4.5//EN' <!DOCTYPE article PUBLIC '-//OASIS//DTD DocBook XML V4.5//EN'
'http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd'> 'http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd'>
<article> <article>
@ -254,10 +243,17 @@ inline_doc
</sect1> </sect1>
</article>" </article>"
if `echo $XML_FILE | xmllint -nonet -noout -postvalid - 2>/dev/null` ; then if echo $XML_FILE | xmllint -nonet -noout -postvalid - 2>/dev/null ; then
check_version "4.5" "4.5" "DocBook XML DTD" check_version "4.5" "4.5" "DocBook XML DTD"
else else
echo "Error: you need the Docbook XML DTD for installing BLFS tools" echo "Error: you need the Docbook XML DTD for running jhalfs"
exit 2 exit 1
fi
if echo $XML_FILE | xsltproc -nonet -noout - 2>/dev/null ; then
check_version "current" "current" "DocBook XSL stylesheets"
else
echo "Error: you need the Docbook XSL stylesheets for running jhalfs"
exit 1
fi fi
} }