Le blog de Jean David TECHER, un Réunionnais à Saint-Priest/Lyon

Aller au contenu | Aller au menu | Aller à la recherche

vendredi 26 septembre 2008

My patch for dblatex has been commited for the autobuild process...I'm happy!!!

Today Kevin Neufeld has sent me the following e-mail:

Thanx, David. That recent commit you saw was mainly used to trigger the autobuild process, testing the pdf generation you now see on the postgis website. Once folks are happy with the result, we can introduce the dblatex dependency to trunk.

One thought. Should configure also test for the correct version of dblatex and required dependencies? I fought with it for a while until I realized my dblatex version was a little to old. Upgrading it and python seemed to solve a plethra of problems.

Thanx for the patch,
-- Kevin

Now every doc (1.3.3,1.3.4SVN or 1.4.0.SVN) in PDF format are built using DBLATEX as you can see at http://www.postgis.org/documentation/..You know what? I'm happy...

Patch for using dblatex

Here is the patch I've used for dblatex.

You can download it at http://www.davidgis.fr/download/patch-dblatex.patch. Here is the content

--- postgis-svn/configure.ac	2008-09-11 14:18:37.000000000 +0200
+++ postgis-svn-new/configure.ac	2008-09-26 12:12:24.000000000 +0200
@@ -70,9 +70,9 @@
 dnl Search for db2pdf which is required for building PDF documentation
-AC_PATH_PROG([DB2PDF], [db2pdf], [])
-if test "x$DB2PDF" = "x"; then
-	AC_MSG_WARN([db2pdf is not installed so PDF documentation cannot be built])
+AC_PATH_PROG([DBLATEX], [dblatex], [])
+if test "x$DBLATEX" = "x"; then
+	AC_MSG_WARN([dblatex is not installed so PDF documentation cannot be built])
--- postgis-svn/doc/Makefile.in	2008-09-11 14:18:37.000000000 +0200
+++ postgis-svn-new/doc/Makefile.in	2008-09-26 12:26:41.000000000 +0200
@@ -30,8 +30,8 @@
-# OpenJade's db2pdf script for PDF generation from DocBook
+# DBLATEX for PDF generation from DocBook
 # Directories for documentation and man pages
@@ -66,12 +66,14 @@
 postgis.pdf: postgis-out.xml
-	@if test x"$(DB2PDF)" = x; then \
-	   echo "Error: db2pdf not found, can't build posgis.pdf"; \
-	   echo "       try installing docbook-utils package and then re-run configure"; \
+	@if test x"$(DBLATEX)" = x; then \
+	   echo "Error: dblatex not found, can't build posgis.pdf"; \
+	   echo "       try installing dblatex package from dblatex.sourcegforge.net nd then re-run configure"; \
 	   false; \
 	else \
-	   $(DB2PDF) $< && mv postgis-out.pdf postgis.pdf; \
+	   cp reference.xml reference.xml.orig; cat reference.xml.orig |sed -e "s:term:listitem:g" > reference.xml;\
+	   $(DBLATEX) -T native -t pdf -o postgis.pdf -I "$(PWD)/html" $<; \
+	   rm -f reference.xml.orig;\

In order to patching

wget http://www.postgis.org/postgis-svn.tar.gz;
tar xzf postgis-svn.tar.gz;
wget http://www.davidgis.fr/download/patch-dblatex.patch;
patch -p0 < patch-dblatex.patch