[postgis-tickets] [SCM] PostGIS branch master updated. 3.4.0rc1-551-g119b6e4bf

git at osgeo.org git at osgeo.org
Thu Sep 14 13:48:32 PDT 2023


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, master has been updated
       via  119b6e4bf0f5b48c37ca978a69ffab1c3c60001b (commit)
      from  0027ccc8973427ba2d7188c9cd193b0f2e1bfb66 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 119b6e4bf0f5b48c37ca978a69ffab1c3c60001b
Author: Sandro Santilli <strk at kbt.io>
Date:   Thu Sep 14 22:32:40 2023 +0200

    Go back to find docbook XSL at configure time
    
    This reverts commit b6583e98323ffe1a8438b51f3a9c70205fdbcf6b
    bringing --with-xsldir support back.
    
    Closes #5538 #5539
    
    References #5537

diff --git a/configure.ac b/configure.ac
index f4b0a34e9..2af8f28d7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -266,6 +266,87 @@ if test "x$XMLLINT" = "x"; then
 	AC_MSG_WARN([xmllint is not installed so documentation cannot be checked])
 fi
 
+
+dnl
+dnl Allow the user to specify the location of the html/docbook.xsl stylesheet
+dnl
+
+AC_ARG_WITH([xsldir],
+	[AS_HELP_STRING([--with-xsldir=PATH], [specify the directory containing the docbook.xsl stylesheet])],
+	[XSLBASE="$withval"], [XSLBASE=""])
+
+XSLBASE_AUTO=""
+if test "x$XSLBASE" = "x"; then
+	dnl If the user did not specify a directory for the docbook
+	dnl stylesheet, choose the first uri that can resolve
+  dnl html/docbook.xsl or the first directory
+	dnl that matches from the following list
+	SEARCHPATH="
+    http://cdn.docbook.org/release/xsl/current
+    http://docbook.sourceforge.net/release/xsl-ns
+		/usr/share/sgml/docbook/xsl-stylesheets
+		/usr/share/xml/docbook/stylesheet/docbook-xsl-ns
+		/usr/share/xml/docbook/stylesheet/docbook-xsl
+		/usr/share/xml/docbook/stylesheet/nwalsh
+		/usr/share/sgml/docbook/stylesheet/xsl/nwalsh
+		/opt/local/share/xsl/docbook-xsl
+		/usr/local/opt/docbook-xsl/docbook-xsl
+		/usr/local/share/xsl/docbook-xsl
+		/usr/share/xsl/docbook-xsl
+		"
+	for p in ${SEARCHPATH}; do
+    if expr "${p}" : / >/dev/null; then
+      AC_MSG_CHECKING([for html/docbook.xsl in directory $p...])
+      if test -r "${p}"/html/docbook.xsl; then
+        XSLBASE_AUTO="${p}"
+        AC_MSG_RESULT([found])
+        break
+      fi
+      AC_MSG_RESULT([not found])
+    elif test "x$XMLCATALOG" != "x"; then
+      AC_MSG_CHECKING([for html/docbook.xsl in URI $p...])
+      if $XMLCATALOG '' "${p}/html/docbook.xsl" >/dev/null; then
+        XSLBASE_AUTO="${p}"
+        AC_MSG_RESULT([found])
+        break
+      fi
+      AC_MSG_RESULT([not found])
+    fi
+	done
+
+	dnl Check to see if the automatically searched paths above located a
+	dnl valid Docbook stylesheet
+	if test "x$XSLBASE_AUTO" = "x"; then
+		AC_MSG_WARN([could not locate Docbook stylesheets required to build the documentation])
+	fi
+else
+	dnl The user specified an alternate directory so make sure everything
+	dnl looks sensible
+	if test ! -d "$XSLBASE"; then
+		AC_MSG_ERROR([the docbook stylesheet directory specified using --with-xsldir does not exist])
+	fi
+
+	if test ! -f "$XSLBASE/html/docbook.xsl"; then
+		AC_MSG_ERROR([the docbook stylesheet directory specified using --with-xsldir does not contain the html/docbook.xsl file])
+	fi
+fi
+
+dnl
+dnl If XSLBASE has been set then at this point we know it must be
+dnl valid and so we can just use it. If XSLBASE_AUTO has been set, and XSLBASE
+dnl is empty then a valid stylesheet was found in XSLBASE_AUTO so we
+dnl should use that. Otherwise just continue silently with a blank XSLBASE
+dnl variable which will trigger the error message in the documentation Makefile
+dnl
+
+if test "x$XSLBASE" = "x"; then
+	if test ! "x$XSLBASE_AUTO" = "x"; then
+		XSLBASE="$XSLBASE_AUTO"
+	fi
+fi
+
+AC_SUBST([XSLBASE])
+
 dnl ===========================================================================
 dnl Detect if pkg-config installed
 dnl ===========================================================================
@@ -1817,6 +1898,7 @@ fi
 AC_MSG_RESULT()
 AC_MSG_RESULT([ -------- Documentation Generation -------- ])
 AC_MSG_RESULT([  xsltproc:             ${XSLTPROC}])
+AC_MSG_RESULT([  docbook xsl base:     ${XSLBASE}])
 AC_MSG_RESULT([  dblatex:              ${DBLATEX}])
 AC_MSG_RESULT([  convert:              ${CONVERT}])
 AC_MSG_RESULT()
diff --git a/doc/Makefile.in b/doc/Makefile.in
index eaf8576f7..2577683ce 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -60,6 +60,7 @@ INSTALL=@INSTALL@
 INSTALL_DATA=@INSTALL_DATA@
 
 XSLTPROC=@XSLTPROC@
+XSLBASE=@XSLBASE@
 CAN_UPDATE_TRANSLATIONS=@CAN_UPDATE_TRANSLATIONS@
 XMLLINT=@XMLLINT@
 CAN_BUILD_COMMENTS=@CAN_BUILD_COMMENTS@
@@ -111,12 +112,8 @@ XSLTPROC_CHUNKED_HTML_OPTS = \
 	--stringparam img.src.path ../ \
 	--stringparam html.stylesheet ../style.css
 
-# FIXME: the official URI would be http://cdn.docbook.org/release/xsl/current/
-# but see https://trac.osgeo.org/postgis/ticket/5539
-#DOCBOOK_XSLBASE=http://cdn.docbook.org/release/xsl/current
-DOCBOOK_XSLBASE=http://docbook.sourceforge.net/release/xsl-ns
-HTML_DOCBOOK_XSL=$(DOCBOOK_XSLBASE)/html/docbook.xsl
-CHUNK_HTML_DOCBOOK_XSL=$(DOCBOOK_XSLBASE)/html/chunk.xsl
+HTML_DOCBOOK_XSL=$(XSLBASE)/html/docbook.xsl
+CHUNK_HTML_DOCBOOK_XSL=$(XSLBASE)/html/chunk.xsl
 
 # DBLatex's dblatex script for PDF generation from DocBook
 DBLATEX=@DBLATEX@

-----------------------------------------------------------------------

Summary of changes:
 configure.ac    | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 doc/Makefile.in |  9 +++----
 2 files changed, 85 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list