From: Mattia Rizzolo <mattia@debian.org>
Date: Wed, 4 Mar 2020 13:44:21 +0100
Subject: use the just-built xsltproc and the packaged stylesheet to rebuild
 the manpage if needed

Bug-Debian: https://bugs.debian.org/947914
Forwarded: no
---
 doc/Makefile.am | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: libxslt/doc/Makefile.am
===================================================================
--- libxslt.orig/doc/Makefile.am
+++ libxslt/doc/Makefile.am
@@ -32,12 +32,14 @@ EXTRA_DIST =				\
 	tutorial2/libxslt_pipes.xml	\
 	xsltproc.xml
 
-DOCBOOK_HTML = http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl
+DOCBOOK_HTML = /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl
 
 rebuild:
 	cd $(srcdir) && ./apibuild.py
-	cd $(srcdir) && $(XSLTPROC) --nonet xsltproc.xml
-	cd $(srcdir) && $(XSLTPROC) --nonet -o xsltproc.html $(DOCBOOK_HTML) xsltproc.xml
+	(if [ -x $(srcdir)/../xsltproc/xsltproc ] ; then \
+		cd $(srcdir) && $(srcdir)/../xsltproc/xsltproc --nonet xsltproc.xml; \
+		cd $(srcdir) && $(srcdir)/../xsltproc/xsltproc --nonet -o xsltproc.html $(DOCBOOK_HTML) xsltproc.xml; \
+	fi)
 	cd devhelp && $(MAKE) rebuild
 	cd EXSLT/devhelp && $(MAKE) rebuild
 
