[gl-manpages] Try to actually use the bundled mathml2. Fix warnings

Yanko Kaneti yaneti at fedoraproject.org
Tue Jan 22 19:19:39 UTC 2013


commit 689fb53f87dedaa6443cbc08b31a6d6dd4f84d33
Author: Yanko Kaneti <yaneti at declera.com>
Date:   Tue Jan 22 21:09:30 2013 +0200

    Try to actually use the bundled mathml2. Fix warnings

 gl-manpages.spec |   16 ++++++++++++++--
 metainfo.xsl     |   34 ++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+), 2 deletions(-)
---
diff --git a/gl-manpages.spec b/gl-manpages.spec
index 4bdca39..85d384d 100644
--- a/gl-manpages.spec
+++ b/gl-manpages.spec
@@ -18,6 +18,8 @@ Source3:        http://www.w3.org/Math/DTD/mathml2.tgz
 # Ship until somebody in the know helps figuring whats what.
 # When matching install the kronos version.
 Source4:        gl-manpages-1.0.1.tar.bz2
+#Silence author/version/manual etc. warnings
+Source5:        metainfo.xsl
 
 BuildArch:      noarch
 
@@ -35,10 +37,19 @@ tar xjf %{SOURCE4}
 
 %build
 # FIXME Figure out how to build the GLSL manpages
-# FIXME Figure out how to silence the author/version etc warnings
+export BD=`pwd`
+xmlcatalog --create --noout \
+	--add public "-//W3C//DTD MathML 2.0//EN" "file://$BD/mathml2/mathml2.dtd" \
+	--add system "http://www.w3.org/TR/MathML2/dtd/mathml2.dtd" "file://$BD/mathml2/mathml2.dtd" \
+	--add public "-//OASIS//DTD DocBook MathML Module V1.1b1//EN" "file://$BD/mathml2/dbmathml.dtd" \
+	--add system "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd" "file://$BD/mathml2/dbmathml.dtd" \
+	mathml2.cat
+export XML_CATALOG_FILES="$BD/mathml2.cat /etc/xml/catalog"
 for MAN in man4 man3 man2 ; do
 	pushd $MAN
-	ls -1 *.xml | xargs -n1 xsltproc --noout --nonet --path ../mathml2/ /usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl
+	for MANP in gl*.xml ; do
+		xsltproc --nonet %{SOURCE5} $MANP | xsltproc --nonet /usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl -
+	done
 	popd
 done
 
@@ -63,6 +74,7 @@ find $RPM_BUILD_ROOT%{_mandir}/man3/ -type f -size -100b | xargs sed -i -e 's/\.
 * Tue Jan 22 2013 Yanko Kaneti <yaneti at declera.com> - 1.1-5.%{codate}
 - Newer upstream snapshot. Minor upstream rearrangement.
 - Remove checkout script from sources and add to git.
+- Try to actually use the bundled mathml2. Fix warnings.
 
 * Wed Jan 16 2013 Yanko Kaneti <yaneti at declera.com> - 1.1-4.%{codate}
 - Fix symlinked man references some more (#895986) 
diff --git a/metainfo.xsl b/metainfo.xsl
new file mode 100644
index 0000000..eb38dfa
--- /dev/null
+++ b/metainfo.xsl
@@ -0,0 +1,34 @@
+<?xml version='1.0'?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+    <xsl:output
+        doctype-public="-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
+        doctype-system="http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd"
+        cdata-section-elements="book"
+        indent="yes"
+        encoding="UTF-8"
+    />
+    <xsl:template match="@*|node()">
+        <xsl:copy>
+            <xsl:apply-templates select="@*|node()"/>
+        </xsl:copy>
+    </xsl:template>
+    
+
+    <xsl:template match="refentry/refmeta">
+        <xsl:element name="info">
+            <xsl:element name="orgname">
+                <xsl:attribute name="class">consortium</xsl:attribute>
+                <xsl:text>opengl.org</xsl:text>
+            </xsl:element>
+        </xsl:element>
+        <xsl:element name="refmeta">
+            <xsl:apply-templates select="@*|node()"/>
+            <xsl:element name="refmiscinfo">
+                <xsl:attribute name="class">manual</xsl:attribute>
+                <xsl:text>OpenGL Manual</xsl:text>
+            </xsl:element>
+        </xsl:element>
+    </xsl:template>
+
+</xsl:stylesheet>


More information about the scm-commits mailing list