Michal Schmidt e43452
From 1b6836c15717a62ef81cef8e9617fc7df6c7e605 Mon Sep 17 00:00:00 2001
Michal Schmidt e43452
From: Lennart Poettering <lennart@poettering.net>
Michal Schmidt e43452
Date: Mon, 19 Dec 2011 20:25:52 +0100
Michal Schmidt f1996e
Subject: [PATCH] man: switch to UTF-8 output, to work around charset issues
Michal Schmidt f1996e
 (cherry picked from commit
Michal Schmidt e43452
 76318284fc970b30e9dc4c079960807345331dad)
Michal Schmidt e43452
Michal Schmidt e43452
---
Michal Schmidt e43452
 Makefile.am         |    9 +++++----
Michal Schmidt e43452
 man/custom-html.xsl |   29 +++++++++++++++++++++++++++++
Michal Schmidt e43452
 2 files changed, 34 insertions(+), 4 deletions(-)
Michal Schmidt e43452
 create mode 100644 man/custom-html.xsl
Michal Schmidt e43452
Michal Schmidt e43452
diff --git a/Makefile.am b/Makefile.am
Michal Schmidt e43452
index 9ee2c7f..295944d 100644
Michal Schmidt e43452
--- a/Makefile.am
Michal Schmidt e43452
+++ b/Makefile.am
Michal Schmidt e43452
@@ -495,7 +495,8 @@ EXTRA_DIST = \
Michal Schmidt e43452
 	src/libsystemd-login.sym \
Michal Schmidt e43452
 	introspect.awk \
Michal Schmidt e43452
 	src/73-seat-late.rules.in \
Michal Schmidt e43452
-        src/99-systemd.rules.in
Michal Schmidt e43452
+        src/99-systemd.rules.in \
Michal Schmidt e43452
+        man/custom-html.xsl
Michal Schmidt e43452
 
Michal Schmidt e43452
 if ENABLE_BINFMT
Michal Schmidt e43452
 EXTRA_DIST += \
Michal Schmidt e43452
@@ -1696,7 +1697,7 @@ endif
Michal Schmidt e43452
 if HAVE_XSLTPROC
Michal Schmidt e43452
 XSLTPROC_FLAGS = \
Michal Schmidt e43452
 	--nonet \
Michal Schmidt e43452
-	--param funcsynopsis.style "'ansi'"
Michal Schmidt e43452
+	--stringparam funcsynopsis.style ansi
Michal Schmidt e43452
 
Michal Schmidt e43452
 XSLTPROC_PROCESS_MAN = \
Michal Schmidt e43452
 	$(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
Michal Schmidt e43452
@@ -1709,11 +1710,11 @@ XSLTPROC_PROCESS_MAN_IN = \
Michal Schmidt e43452
 
Michal Schmidt e43452
 XSLTPROC_PROCESS_HTML = \
Michal Schmidt e43452
 	$(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
Michal Schmidt e43452
-	$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $<
Michal Schmidt e43452
+	$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) man/custom-html.xsl $<
Michal Schmidt e43452
 
Michal Schmidt e43452
 XSLTPROC_PROCESS_HTML_IN = \
Michal Schmidt e43452
 	$(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
Michal Schmidt e43452
-	$(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< && \
Michal Schmidt e43452
+	$(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) man/custom-html.xsl $< && \
Michal Schmidt e43452
 	mv ${@:.in=} $@
Michal Schmidt e43452
 
Michal Schmidt e43452
 man/%.1: man/%.xml
Michal Schmidt e43452
diff --git a/man/custom-html.xsl b/man/custom-html.xsl
Michal Schmidt e43452
new file mode 100644
Michal Schmidt e43452
index 0000000..2d2f458
Michal Schmidt e43452
--- /dev/null
Michal Schmidt e43452
+++ b/man/custom-html.xsl
Michal Schmidt e43452
@@ -0,0 +1,29 @@
Michal Schmidt e43452
+ 
Michal Schmidt e43452
+
Michal Schmidt e43452
+
Michal Schmidt e43452
+  This file is part of systemd.
Michal Schmidt e43452
+
Michal Schmidt e43452
+  Copyright 2011 Lennart Poettering
Michal Schmidt e43452
+
Michal Schmidt e43452
+  systemd is free software; you can redistribute it and/or modify it
Michal Schmidt e43452
+  under the terms of the GNU General Public License as published by
Michal Schmidt e43452
+  the Free Software Foundation; either version 2 of the License, or
Michal Schmidt e43452
+  (at your option) any later version.
Michal Schmidt e43452
+
Michal Schmidt e43452
+  systemd is distributed in the hope that it will be useful, but
Michal Schmidt e43452
+  WITHOUT ANY WARRANTY; without even the implied warranty of
Michal Schmidt e43452
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Michal Schmidt e43452
+  General Public License for more details.
Michal Schmidt e43452
+
Michal Schmidt e43452
+  You should have received a copy of the GNU General Public License
Michal Schmidt e43452
+  along with systemd; If not, see <http://www.gnu.org/licenses/>.
Michal Schmidt e43452
+-->
Michal Schmidt e43452
+
Michal Schmidt e43452
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
Michal Schmidt e43452
+
Michal Schmidt e43452
+<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"/>
Michal Schmidt e43452
+
Michal Schmidt e43452
+
Michal Schmidt e43452
+<xsl:output method="html" encoding="UTF-8" indent="no"/>
Michal Schmidt e43452
+
Michal Schmidt e43452
+</xsl:stylesheet>