--- a/open-src/common/Makefile.inc Wed Aug 31 14:52:31 2011 -0700
+++ b/open-src/common/Makefile.inc Thu Sep 01 19:13:57 2011 -0700
@@ -713,6 +713,30 @@
$(PKG_MANIFEST_DIR):
mkdir -p $(PKG_MANIFEST_DIR)
+### Doc tools
+
+# Convert DocBook/XML to HTML (since Solaris doesn't bundle the xmlto tool
+# used by most upstream code to do this)
+XML_TO_HTML = /usr/bin/xsltproc --nonet --xinclude
+XML_TO_HTML += --stringparam html.stylesheet $(X11_SGML_DIR)/xorg.css
+XML_TO_HTML += --stringparam current.docid $(@F:.html=)
+XML_TO_HTML += --stringparam collect.xref.targets no
+XML_TO_HTML += --path "$(PROTODIR)$(X11_SGML_DIR) $(MODULE_XML_PATH)"
+XML_TO_HTML += $(TOP)/open-src/doc/xorg-sgml-doctools/xmltohtml.xsl
+
+# Convert HTML to text (also normally done by xmlto upstream)
+HTML_TO_TEXT = /usr/bin/w3m -dump -O UTF-8
+
+.SUFFIXES: .xml .html .txt
+
+.xml.html:
+ $(XML_TO_HTML) $< > $@
+ @ if [[ ! -s $@ ]] ; then print "xml to html failed" ; exit 1 ; fi
+
+.html.txt:
+ $(HTML_TO_TEXT) $< > $@
+ @ if [[ ! -s $@ ]] ; then print "html to text failed" ; exit 1 ; fi
+
### Other tools/dependencies needed to build
# Some modules (such as FreeType 2) require GNU make
--- a/open-src/common/Makefile.init Wed Aug 31 14:52:31 2011 -0700
+++ b/open-src/common/Makefile.init Thu Sep 01 19:13:57 2011 -0700
@@ -259,6 +259,7 @@
X11_FONT_CATALOGUE=/etc/X11/fontpath.d
TRUETYPE_FONT_DIR=$(SHARE_FONT_DIR)/TrueType
X11_DOC_DIR=/usr/share/doc/X11
+X11_SGML_DIR=$(X11_DIR)/share/sgml/X11
X11_LOCALE_DIR=$(X11_DIR)/share/locale
X11_MAN_DIR=$(X11_DIR)/share/man
X11_ACLOCAL_DIR=$(X11_DIR)/share/aclocal
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/doc/xorg-sgml-doctools/xmltohtml.xsl Thu Sep 01 19:13:57 2011 -0700
@@ -0,0 +1,9 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+ <!-- settings similar to those xmlto would use if we had it available -->
+ <xsl:import href="/usr/share/sgml/X11/xorg.xsl"/>
+ <xsl:import href="/usr/share/sgml/X11/xorg-xhtml.xsl"/>
+ <xsl:param name="chunker.output.encoding" select="'UTF-8'"/>
+ <xsl:param name="man.charmap.use.subset" select="'0'"/>
+</xsl:stylesheet>
--- a/open-src/xserver/Makefile.inc Wed Aug 31 14:52:31 2011 -0700
+++ b/open-src/xserver/Makefile.inc Thu Sep 01 19:13:57 2011 -0700
@@ -49,7 +49,7 @@
# Command line options to GNU autoconf configure script for xorg-server
XSERVER_CONFIG_OPTS_COMMON = \
- --docdir='$(X11_DOC_DIR)' \
+ --docdir='$(MODULE_DOC_DIR)' \
--enable-xdm-auth-1 --enable-xdmcp --enable-xcsecurity \
--enable-shared --disable-static \
--enable-glx --enable-dri2 \
--- a/open-src/xserver/xorg/Makefile Wed Aug 31 14:52:31 2011 -0700
+++ b/open-src/xserver/xorg/Makefile Thu Sep 01 19:13:57 2011 -0700
@@ -107,6 +107,16 @@
$(BUILD_DIR)/mapfile-Xorg-externs
BUILD_TARGETS_SET=yes
+# Need to convert dtrace docs from xml to text/html ourselves, since
+# Solaris doesn't bundle the xmlto tool used upstream
+MODULE_DOC_DIR = $(MODULE_PREFIX)/share/doc/Xserver
+MODULE_DOC_DIR_SET=yes
+MODULE_XML_PATH = $(SOURCE_DIR)/doc/xml
+DTRACE_DOC_DIR = $(SOURCE_DIR)/doc/xml/dtrace
+DTRACE_DOCS = $(DTRACE_DOC_DIR)/Xserver-DTrace.html
+DTRACE_DOCS += $(DTRACE_DOC_DIR)/Xserver-DTrace.txt
+BUILD_TARGETS += $(DTRACE_DOCS)
+
# Need to regenerate autoconf/automake files after patching
AUTORECONF=yes
@@ -148,7 +158,7 @@
# Additional install targets beyond the defaults
MODULE_ADD_INSTALL_TARGETS=install_extras install_mdb install_pc_common \
- install_fix_paths
+ install_fix_paths install_docs
# Have to avoid dependency loop between install_pc_common and
# install_pkgconfig_uninstalled
@@ -354,3 +364,9 @@
install_mdb: $(INSTALLED_MDB_ALL)
$(INSTALL_SCRIPT) -c -m 0444 $(MDB_SOURCE_DIR)/README \
$(PROTODIR)$(MDB_SCRIPT_DIR)/
+
+## Dtrace docs rules
+$(DTRACE_DOC_DIR)/Xserver-DTrace.xml: $(AUTOCONF_TARGET)
+
+install_docs: $(DTRACE_DOCS) $(PROTODIR)$(MODULE_DOC_DIR)
+ $(INSTALL_SCRIPT) -c -m 0444 $(DTRACE_DOCS) $(PROTODIR)$(MODULE_DOC_DIR)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/xserver/xorg/dtrace-doc.patch Thu Sep 01 19:13:57 2011 -0700
@@ -0,0 +1,83 @@
+From a883023b2ed63d9e02d09b6d39002566eace3ecb Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <[email protected]>
+Date: Thu, 1 Sep 2011 16:48:37 -0700
+Subject: [PATCH] Assign ids to more tags in Xserver-Dtrace.xml
+
+Keeps xsltproc from adding random-number id tags to html output so that
+it's easier to see real changes vs. different random numbers.
+
+Signed-off-by: Alan Coopersmith <[email protected]>
+---
+ doc/dtrace/Xserver-DTrace.xml | 14 +++++++-------
+ 1 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/doc/dtrace/Xserver-DTrace.xml b/doc/dtrace/Xserver-DTrace.xml
+index 69cd30e..ebba466 100644
+--- a/doc/xml/dtrace/Xserver-DTrace.xml
++++ b/doc/xml/dtrace/Xserver-DTrace.xml
+@@ -15,7 +15,7 @@
+ </affiliation>
+ </author>
+ <releaseinfo>X.Org Xserver version &xserver.version;</releaseinfo>
+- <legalnotice>
++ <legalnotice id="copyright">
+ <para>
+ Copyright (c) 2005, 2006, 2007, 2010, Oracle and/or its affiliates.
+ All rights reserved.
+@@ -79,7 +79,7 @@ DEALINGS IN THE SOFTWARE.
+ <parameter>arg2</parameter>, etc. These tables should help you
+ determine what the real data is for each of the probe arguments.
+
+- <table>
++ <table id="probe-table">
+ <title>Probes and their arguments</title>
+ <tgroup cols='7'>
+ <colspec colname="probe" colwidth="2*"/>
+@@ -195,7 +195,7 @@ DEALINGS IN THE SOFTWARE.
+ To access data buffers referenced via <type>uintptr_t</type>'s, you will
+ need to use <ulink url="http://wikis.sun.com/display/DTrace/Actions+and+Subroutines#ActionsandSubroutines-{{copyin}}"><function>copyin()</function></ulink>.
+
+- <table>
++ <table id="arguments-table">
+ <title>Probe Arguments</title>
+ <tgroup cols='3'>
+ <colspec colname="arg" colwidth="2*"/>
+@@ -313,7 +313,7 @@ DEALINGS IN THE SOFTWARE.
+ <sect1 id="examples">
+ <title>Examples</title>
+
+- <example>
++ <example id="counting-requests">
+ <title>Counting requests by request name</title>
+
+ <para>
+@@ -370,7 +370,7 @@ Xserver*:::request-start
+ </para>
+ </example>
+
+- <example>
++ <example id="cpu-per-request">
+ <title>Get average CPU time per request</title>
+
+ <para>This script records the CPU time used between the probes at
+@@ -419,7 +419,7 @@ Xserver*:::request-done
+ </para>
+ </example>
+
+- <example>
++ <example id="monitor-connects">
+ <title>Monitoring clients that connect and disconnect</title>
+
+ <para>
+@@ -476,7 +476,7 @@ CPU ID FUNCTION:NAME
+ </para>
+ </example>
+
+- <example>
++ <example id="monitor-pixmaps">
+ <title>Monitoring clients creating Pixmaps</title>
+
+ <para>
+--
+1.7.3.2
+
--- a/open-src/xserver/xorg/patch-list Wed Aug 31 14:52:31 2011 -0700
+++ b/open-src/xserver/xorg/patch-list Thu Sep 01 19:13:57 2011 -0700
@@ -1,4 +1,5 @@
oslog-race.patch,-p1
+dtrace-doc.patch,-p1
osaudit.patch,-p1
sun-paths.patch,-p1
sun-extramodes.patch,-p1
--- a/open-src/xserver/xorg/sun-manpage.patch Wed Aug 31 14:52:31 2011 -0700
+++ b/open-src/xserver/xorg/sun-manpage.patch Thu Sep 01 19:13:57 2011 -0700
@@ -211,7 +211,7 @@
.SH "SEE ALSO"
General information: \fIX\fP(__miscmansuffix__)
.PP
-@@ -565,14 +718,17 @@ Security: \fIXsecurity\fP(__miscmansuffix__), \fIxauth\fP(1), \fIXau\fP(1),
+@@ -565,14 +718,21 @@ Security: \fIXsecurity\fP(__miscmansuffix__), \fIxauth\fP(1), \fIXau\fP(1),
\fIxdm\fP(1), \fIxhost\fP(1), \fIxfwp\fP(1),
.I "Security Extension Specification"
.PP
@@ -229,6 +229,10 @@
+.PP
+Service management framework:
+\fIsmf\fP(5), \fIsvcadm\fP(1M), \fIsvccfg\fP(1M)
++.PP
++Dtrace probes:
++\fI/usr/share/doc/Xserver/Xserver-DTrace.html\fP,
++\fI/usr/share/doc/Xserver/Xserver-DTrace.txt\fP
.PP
Server internal documentation:
.I "Definition of the Porting Layer for the X v11 Sample Server"
--- a/pkg/manifests/developer-opensolaris-X.p5m Wed Aug 31 14:52:31 2011 -0700
+++ b/pkg/manifests/developer-opensolaris-X.p5m Thu Sep 01 19:13:57 2011 -0700
@@ -176,5 +176,8 @@
# autoconf scripts prefer gnu sed
depend fmri=pkg:/text/gnu-sed type=require
+# w3m is used to convert html docs to text, after generating html from docbook
+depend fmri=pkg:/web/browser/w3m type=require
+
# Builds need to be able to download upstream sources with wget
depend fmri=pkg:/web/wget type=require
--- a/pkg/manifests/x11-server-xorg.p5m Wed Aug 31 14:52:31 2011 -0700
+++ b/pkg/manifests/x11-server-xorg.p5m Thu Sep 01 19:13:57 2011 -0700
@@ -236,7 +236,6 @@
file path=usr/lib/xorg/modules/multimedia/tda9885_drv.so
file path=usr/lib/xorg/modules/multimedia/uda1380_drv.so
file path=usr/share/aclocal/xorg-server.m4
-file path=usr/share/doc/X11/Xserver-DTrace.xml
file path=usr/share/man/man1/Xorg.1
file path=usr/share/man/man1/cvt.1
file path=usr/share/man/man1/gtf.1
--- a/pkg/manifests/x11-server-xserver-common.p5m Wed Aug 31 14:52:31 2011 -0700
+++ b/pkg/manifests/x11-server-xserver-common.p5m Thu Sep 01 19:13:57 2011 -0700
@@ -35,6 +35,7 @@
dir path=usr/demo/Xserver
dir path=usr/demo/Xserver/mdb
dir path=usr/lib/xorg
+dir path=usr/share/doc/Xserver
file path=etc/security/auth_attr.d/xserver-common group=sys
file path=etc/security/prof_attr.d/xserver-common group=sys
file path=lib/svc/manifest/application/x11/x11-server.xml
@@ -49,6 +50,9 @@
file path=usr/lib/mdb/proc/$(ARCH64)/Xserver.so
file path=usr/lib/xorg/TrustedExtensionsPolicy
file path=usr/lib/xorg/protocol.txt
+file path=usr/share/doc/Xserver/Xserver-DTrace.html
+file path=usr/share/doc/Xserver/Xserver-DTrace.txt
+file path=usr/share/doc/Xserver/Xserver-DTrace.xml
file path=usr/share/man/man1/Xnest.1
file path=usr/share/man/man1/Xserver.1
link path=usr/X11/bin/X target=../../bin/X