[PATCH 2/2:libXmu] Use shared stylesheets from xorg-doc-sgmltools instead of a private copy

Alan Coopersmith alan.coopersmith at oracle.com
Tue Jun 15 22:27:24 PDT 2010


Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---

Depends on xorg-sgml-doctools having a version bump to 1.5 to reflect
the addition of the shared stylesheets there.

 configure.ac    |    8 +++--
 doc/Makefile.am |   15 ++++++++--
 doc/Xmu.css     |   84 -------------------------------------------------------
 doc/Xmu.xsl     |   36 -----------------------
 4 files changed, 17 insertions(+), 126 deletions(-)
 delete mode 100644 doc/Xmu.css
 delete mode 100644 doc/Xmu.xsl

diff --git a/configure.ac b/configure.ac
index 8e92e39..936e0ae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,14 +15,16 @@ AM_INIT_AUTOMAKE([foreign dist-bzip2])
 
 AM_MAINTAINER_MODE
 
-# Require xorg-macros: XORG_DEFAULT_OPTIONS, XORG_ENABLE_DOCS & friends
+# Require xorg-macros minimum of 1.7 for XORG_CHECK_SGML_DOCTOOLS
 m4_ifndef([XORG_MACROS_VERSION],
-          [m4_fatal([must install xorg-macros 1.6 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.6)
+          [m4_fatal([must install xorg-macros 1.7 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.7)
 XORG_DEFAULT_OPTIONS
 XORG_ENABLE_DOCS
 XORG_WITH_XMLTO(0.0.20)
 XORG_WITH_FOP
+XORG_CHECK_SGML_DOCTOOLS(1.5)
+AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XORG_SGML_PATH" != "x"])
 
 AM_CONFIG_HEADER([config.h])
 
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 82dd2a4..8840776 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -25,7 +25,7 @@ if ENABLE_DOCS
 dist_doc_DATA = Xmu.xml xlogo.svg
 
 if HAVE_XMLTO
-doc_DATA = Xmu.txt Xmu.html $(srcdir)/Xmu.css
+doc_DATA = Xmu.txt Xmu.html
 
 if HAVE_FOP
 doc_DATA += Xmu.pdf Xmu.ps
@@ -33,9 +33,18 @@ endif
 
 CLEANFILES = Xmu.txt Xmu.html Xmu.pdf Xmu.ps
 
-XMLTO_FLAGS = -m $(srcdir)/Xmu.xsl
+if HAVE_STYLESHEETS
+STYLESHEET_SRCDIR = $(XORG_SGML_PATH)/X11
 
-XML_SOURCEFILES =  $(srcdir)/Xmu.xml $(srcdir)/Xmu.xsl
+XSL_STYLESHEET = $(STYLESHEET_SRCDIR)/xorg.xsl
+XMLTO_FLAGS = -m $(XSL_STYLESHEET)
+
+doc_DATA += xorg.css
+xorg.css: $(STYLESHEET_SRCDIR)/xorg.css
+	$(AM_V_GEN)cp -pf $(STYLESHEET_SRCDIR)/xorg.css $@
+endif
+
+XML_SOURCEFILES =  $(srcdir)/Xmu.xml $(XSL_STYLESHEET)
 
 Xmu.txt: $(XML_SOURCEFILES)
 	$(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) txt $(srcdir)/Xmu.xml
diff --git a/doc/Xmu.css b/doc/Xmu.css
deleted file mode 100644
index 33de915..0000000
--- a/doc/Xmu.css
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-body { 
-  font-family: sans-serif;
-  background: white;
-  color: black;
-}
-
-div.sect1 { 
-  border-top: 1px solid #2b5e82;
-}
-
-.structname, .property, .errorname, .function, .parameter, .filename,
-.type, .symbol, .funcsynopsis, .synopsis {
-  font-family: monospace;
-}
-
-.funcsynopsis, .synopsis { 
-  background: #e6e6fa; /* #eeeeee; */
-  border: 1px solid #aaaaaa;
-  padding: 0.5em;
-  clear: both;
-}
-
-.programlisting { 
-  background: #ffefd5;
-  margin: 0 1.0em;
-  padding-top: 0.5em;
-}
-
-.funcsynopsis p, table p, .synopsis p, .figure p {
-  margin: 0;
-}
-
-.variablelist { 
-  padding-left: 0.5em;
-}
-
-td { 
-  padding-left: 0.5em;
-}
-
-h1, .author, .pubdate, .abstract {
-  text-align: center;
-}
-
-.legalnotice {
-  text-align: justify;
-  font-size: small;
-  font-style: italic;
-}
-
-.warning {
-  border: 1px solid red;
-  background: yellow;
-  padding-left: 0.5em;
-}
-
-.figure-float {
-  float: right;
-  margin-left: 0.5em;
-}
-
diff --git a/doc/Xmu.xsl b/doc/Xmu.xsl
deleted file mode 100644
index a881da5..0000000
--- a/doc/Xmu.xsl
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version="1.0">
-  <!--
-Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice (including the next
-paragraph) shall be included in all copies or substantial portions of the
-Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
-   -->
-  <xsl:param name="html.cleanup" select="1"/>
-  <xsl:param name="html.stylesheet" select="'Xmu.css'"/>
-  <xsl:param name="chunker.output.indent">yes</xsl:param>
-  <xsl:param name="html.extra.head.links" select="1"/>
-  <xsl:param name="saxon.character.representation" select="'entity;decimal'"/>
-  <xsl:param name="function.parens" select="1"/>
-  <xsl:param name="funcsynopsis.style" select="ansi"/>
-  <xsl:param name="abstract.notitle.enabled" select="1"/>
-  <xsl:param name="variablelist.as.table" select="1"/>
-  <xsl:param name="use.svg" select="1"/>
-</xsl:stylesheet>
-- 
1.5.6.5



More information about the xorg-devel mailing list