Boost logo

Boost-Commit :

From: fmhess_at_[hidden]
Date: 2007-10-15 09:43:00


Author: fmhess
Date: 2007-10-15 09:43:00 EDT (Mon, 15 Oct 2007)
New Revision: 40049
URL: http://svn.boost.org/trac/boost/changeset/40049

Log:
Updated setup_boostbook scripts to download newer versions of apache fop
and docbook xsl, since the old versions are no longer posted for download.
The newer version of apache fop is stricter about its input,
and currently fails to validate its input when trying to build boost.pdf,
due to various bits on invalid docbook. I have it working locally
though, and will create tickets with patches in trac for the remaining
issues in the library docs and tools.

Text files modified:
   trunk/tools/boostbook/setup_boostbook.py | 35 ++++++++++++++++++-----------------
   trunk/tools/boostbook/setup_boostbook.sh | 27 ++++++++++++++-------------
   trunk/tools/boostbook/xsl/fo.xsl | 2 +-
   3 files changed, 33 insertions(+), 31 deletions(-)

Modified: trunk/tools/boostbook/setup_boostbook.py
==============================================================================
--- trunk/tools/boostbook/setup_boostbook.py (original)
+++ trunk/tools/boostbook/setup_boostbook.py 2007-10-15 09:43:00 EDT (Mon, 15 Oct 2007)
@@ -1,5 +1,5 @@
 # Copyright (c) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
-#
+#
 # Distributed under the Boost Software License, Version 1.0.
 # (See accompanying file LICENSE_1_0.txt or copy at
 # http://www.boost.org/LICENSE_1_0.txt)
@@ -10,10 +10,11 @@
 # right now it is used only be release scripts
 
 # User configuration
-DOCBOOK_XSL_VERSION = "1.67.2"
+DOCBOOK_XSL_VERSION = "1.73.2"
 DOCBOOK_DTD_VERSION = "4.2"
-FOP_VERSION = "0.20.5"
-FOP_MIRROR = "http://mirrors.ibiblio.org/pub/mirrors/apache/xml/fop/"
+FOP_VERSION = "0.94"
+FOP_JDK_VERSION="1.4"
+FOP_MIRROR = "http://mirrors.ibiblio.org/pub/mirrors/apache/xmlgraphics/fop"
 SOURCEFORGE_MIRROR = "http://puzzle.dl.sourceforge.net"
 
 # No user configuration below this point-------------------------------------
@@ -40,7 +41,7 @@
     ( options, args ) = parser.parse_args( args )
     if options.tools is None:
         options.tools = os.getcwd()
-
+
 
     return options.tools
 
@@ -48,7 +49,7 @@
     return path.replace( "\\", "/" )
 
 def unzip( archive_path, result_dir ):
- z = zipfile.ZipFile( archive_path, 'r', zipfile.ZIP_DEFLATED )
+ z = zipfile.ZipFile( archive_path, 'r', zipfile.ZIP_DEFLATED )
     for f in z.infolist():
         print f.filename
         if not os.path.exists( os.path.join( result_dir, os.path.dirname( f.filename ) ) ):
@@ -56,11 +57,11 @@
         result = open( os.path.join( result_dir, f.filename ), 'wb' )
         result.write( z.read( f.filename ) )
         result.close()
-
+
     z.close()
 
 def gunzip( archive_path, result_dir ):
- tar = tarfile.open( archive_path, 'r:gz' )
+ tar = tarfile.open( archive_path, 'r:gz' )
     for tarinfo in tar:
         tar.extract( tarinfo, result_dir )
     tar.close()
@@ -143,7 +144,7 @@
     except OSError, e:
         os.unlink( config_file )
         os.rename( config_file + ".tmp", config_file )
-
+
 
 def setup_docbook_xsl( tools_directory ):
     print "DocBook XSLT Stylesheets ..."
@@ -181,7 +182,7 @@
         print "Expanding DocBook XML DTD into %s... " % DOCBOOK_DTD_DIR
         unzip( DOCBOOK_DTD_ZIP, DOCBOOK_DTD_DIR )
         print "done."
-
+
     return DOCBOOK_DTD_DIR
 
 def find_xsltproc():
@@ -206,13 +207,13 @@
 
 def setup_fop( tools_directory ):
     print "FOP ..."
- FOP_TARBALL = os.path.join( tools_directory, "fop-%s-bin.tar.gz" % FOP_VERSION )
+ FOP_TARBALL = os.path.join( tools_directory, "fop-%s-bin-jdk%s.tar.gz" % ( FOP_VERSION, FOP_JDK_VERSION ) )
     FOP_URL = "%s/%s" % ( FOP_MIRROR, os.path.basename( FOP_TARBALL ) )
     FOP_DIR = to_posix( "%s/fop-%s" % ( tools_directory, FOP_VERSION ) )
     if sys.platform == 'win32':
         fop_driver = "fop.bat"
     else:
- fop_driver = "fop.sh"
+ fop_driver = "fop"
 
     FOP = to_posix( os.path.join( FOP_DIR, fop_driver ) )
 
@@ -240,7 +241,7 @@
         print " Updating Boost.Jam configuration in %s... " % JAM_CONFIG_OUT
         return JAM_CONFIG_OUT
     elif os.environ.has_key( "BOOST_ROOT" ) and os.path.exists( os.path.join( os.environ[ "BOOST_ROOT" ], "tools/build/v2/user-config.jam" ) ):
- JAM_CONFIG_IN=os.path.join( os.environ[ "BOOST_ROOT" ], "tools/build/v2/user-config.jam" )
+ JAM_CONFIG_IN=os.path.join( os.environ[ "BOOST_ROOT" ], "tools/build/v2/user-config.jam" )
         print " Found user-config.jam in BOOST_ROOT directory (%s)" % JAM_CONFIG_IN
         JAM_CONFIG_IN_TEMP="no"
         print " Writing Boost.Jam configuration to %s... " % JAM_CONFIG_OUT
@@ -251,7 +252,7 @@
     print "Setting up boostbook tools..."
     print "-----------------------------"
     print ""
-
+
     DOCBOOK_XSL_DIR = setup_docbook_xsl( tools_directory )
     DOCBOOK_DTD_DIR = setup_docbook_dtd( tools_directory )
     XSLTPROC = find_xsltproc()
@@ -264,7 +265,7 @@
         FOP = setup_fop( tools_directory )
 
     user_config = find_user_config()
-
+
     # Find the input jamfile to configure
 
     if user_config is None:
@@ -296,8 +297,8 @@
 def main():
     ( tools_directory ) = accept_args( sys.argv[ 1: ] )
     setup_boostbook( tools_directory )
-
+
 if __name__ == "__main__":
     main()
 
-
+

Modified: trunk/tools/boostbook/setup_boostbook.sh
==============================================================================
--- trunk/tools/boostbook/setup_boostbook.sh (original)
+++ trunk/tools/boostbook/setup_boostbook.sh 2007-10-15 09:43:00 EDT (Mon, 15 Oct 2007)
@@ -1,15 +1,16 @@
 #!/bin/sh
 # Copyright (c) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
-#
+#
 # Distributed under the Boost Software License, Version 1.0.
 # (See accompanying file LICENSE_1_0.txt or copy at
 # http://www.boost.org/LICENSE_1_0.txt)
 
 # User configuration
-DOCBOOK_XSL_VERSION=1.68.1
+DOCBOOK_XSL_VERSION=1.73.2
 DOCBOOK_DTD_VERSION=4.2
-FOP_VERSION=0.20.5
-FOP_MIRROR=http://mirrors.ibiblio.org/pub/mirrors/apache/xml/fop/
+FOP_VERSION=0.94
+FOP_JDK_VERSION=1.4
+FOP_MIRROR=http://mirrors.ibiblio.org/pub/mirrors/apache/xmlgraphics/fop
 SOURCEFORGE_MIRROR=http://dl.sourceforge.net
 HTTP_GET_CMD="curl -O"
 
@@ -99,17 +100,17 @@
   HAVE_FOP="no"
 else
   echo "Searching for Java... $JAVA.";
- FOP_TARBALL="fop-$FOP_VERSION-bin.tar.gz"
+ FOP_TARBALL="fop-$FOP_VERSION-bin-jdk$FOP_JDK_VERSION.tar.gz"
   FOP_URL="$FOP_MIRROR/$FOP_TARBALL"
   FOP_DIR="$PWD/fop-$FOP_VERSION"
- FOP="$FOP_DIR/fop.sh"
+ FOP="$FOP_DIR/fop"
   if test -f $FOP_TARBALL; then
     echo "Using existing FOP distribution (version $FOP_VERSION)."
   else
- echo "Downloading FOP distribution version $FOP_VERSION..."
+ echo "Downloading FOP distribution version $FOP_VERSION..."
     $HTTP_GET_CMD $FOP_URL
   fi
-
+
   if test ! -d $FOP_DIR; then
     echo -n "Expanding FOP distribution into $FOP_DIR... ";
     gunzip -cd $FOP_TARBALL | tar xf -
@@ -122,7 +123,7 @@
 JAM_CONFIG_OUT="$HOME/user-config.jam"
 if test -r "$HOME/user-config.jam"; then
   JAM_CONFIG_IN="user-config-backup.jam"
- cp $JAM_CONFIG_OUT user-config-backup.jam
+ cp $JAM_CONFIG_OUT user-config-backup.jam
   JAM_CONFIG_IN_TEMP="yes"
   echo -n "Updating Boost.Jam configuration in $JAM_CONFIG_OUT... "
 
@@ -130,7 +131,7 @@
   JAM_CONFIG_IN="$BOOST_ROOT/tools/build/v2/user-config.jam";
   JAM_CONFIG_IN_TEMP="no"
   echo -n "Writing Boost.Jam configuration to $JAM_CONFIG_OUT... "
-else
+else
   echo "ERROR: Please set the BOOST_ROOT environment variable to refer to your"
   echo "Boost installation or copy user-config.jam into your home directory."
   exit 0
@@ -139,8 +140,8 @@
 cat > setup_boostbook.awk <<EOF
 BEGIN { using_boostbook = 0; eaten=0 }
 
-/^\s*using boostbook/ {
- using_boostbook = 1;
+/^\s*using boostbook/ {
+ using_boostbook = 1;
   print "using boostbook";
   print " : $DOCBOOK_XSL_DIR";
   print " : $DOCBOOK_DTD_DIR";
@@ -156,7 +157,7 @@
 
 /^.*$/ { if (eaten == 0) print; eaten=0 }
 
-END {
+END {
   if (using_boostbook==0) {
     print "using boostbook";
     print " : $DOCBOOK_XSL_DIR";

Modified: trunk/tools/boostbook/xsl/fo.xsl
==============================================================================
--- trunk/tools/boostbook/xsl/fo.xsl (original)
+++ trunk/tools/boostbook/xsl/fo.xsl 2007-10-15 09:43:00 EDT (Mon, 15 Oct 2007)
@@ -14,7 +14,7 @@
   <xsl:param name="chapter.autolabel" select="0"/>
   <xsl:param name="refentry.generate.name" select="0"/>
   <xsl:param name="refentry.generate.title" select="1"/>
- <xsl:param name="fop.extensions" select="1"/>
+ <xsl:param name="fop1.extensions" select="1"/>
   <xsl:param name="make.year.ranges" select="1"/>
   <xsl:param name="ulink.show" select="0"/>
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk