From d9c2bdcfaa696d68399482aa855ac9fa60a68c36 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 17 Nov 2007 03:37:25 +0000 Subject: [PATCH] Improve man page handling --- hp.patch | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ yelp.spec | 8 ++++++- 2 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 hp.patch diff --git a/hp.patch b/hp.patch new file mode 100644 index 0000000..4a66021 --- /dev/null +++ b/hp.patch @@ -0,0 +1,66 @@ +--- yelp-2.20.0/src/yelp-man.c 2007-09-17 16:49:09.000000000 -0400 ++++ hacked/src/yelp-man.c 2007-11-16 22:21:32.000000000 -0500 +@@ -463,6 +463,16 @@ + yelp_document_error_pending (document, error); + } + ++#if 0 ++ { ++ xmlChar *text; ++ int len; ++ xmlDocDumpFormatMemory (priv->xmldoc, &text, &len, 1); ++ g_print (text); ++ xmlFree (text); ++ } ++#endif ++ + g_mutex_lock (priv->mutex); + if (priv->state == MAN_STATE_STOP) { + g_mutex_unlock (priv->mutex); +--- yelp-2.20.0/src/yelp-man-parser.c 2007-09-17 16:49:09.000000000 -0400 ++++ hacked/src/yelp-man-parser.c 2007-11-16 20:00:34.000000000 -0500 +@@ -501,7 +501,12 @@ + static void + macro_hanging_paragraph_handler (YelpManParser *parser, gchar *macro, GSList *args) + { +- parser_stack_pop_node (parser, "IP"); ++ xmlNodePtr tmpNode; ++ ++ tmpNode = parser_stack_pop_node (parser, "HP"); ++ ++ if (tmpNode != NULL) ++ parser->ins = tmpNode->parent; + + parser->ins = parser_append_node (parser, macro); + +@@ -510,6 +515,8 @@ + parser_append_given_text (parser, args->data); + parser->ins = parser->ins->parent; + } ++ ++ parser_stack_push_node (parser, parser->ins); + } + + /* BSD mandoc macros +--- yelp-2.20.0/stylesheets/man2html.xsl 2007-09-17 16:49:10.000000000 -0400 ++++ hacked/stylesheets/man2html.xsl 2007-11-16 22:19:34.000000000 -0500 +@@ -85,6 +85,8 @@ + span[class~="Section"] { margin-left: 0.4em; } + + dd { padding-bottom: 10px; } ++ ++ p[class~="HP"] { text-indent: -2em; margin-left: 2em; } + + + +@@ -204,6 +206,10 @@ +

+ + ++ ++

++
++ + + + diff --git a/yelp.spec b/yelp.spec index 3db055a..74a75cd 100644 --- a/yelp.spec +++ b/yelp.spec @@ -20,7 +20,7 @@ Summary: A system documentation reader from the Gnome project Name: yelp Version: 2.20.0 -Release: 6%{?dist} +Release: 7%{?dist} Source: http://ftp.gnome.org/pub/GNOME/sources/yelp/2.19/%{name}-%{version}.tar.bz2 URL: http://live.gnome.org/Yelp # http://bugzilla.gnome.org/show_bug.cgi?id=319096 @@ -31,6 +31,8 @@ Patch3: yelp-2.15.91-use-pango.patch Patch4: rarian-crash.patch # http://bugzilla.gnome.org/show_bug.cgi?id=493751 Patch5: search-crash.patch +# http://bugzilla.gnome.org/show_bug.cgi?id=497559 +Patch6: hp.patch # http://bugzilla.gnome.org/show_bug.cgi?id=431077 # XXX Does this no longer apply to yelp >= 2.19.1 ? @@ -91,6 +93,7 @@ one central tool. %patch3 -p1 -b .use-pango %patch4 -p1 -b .rarian-crash %patch5 -p1 -b .search-crash +%patch6 -p1 -b .hp #%patch8 -p1 -b .posix-man %build @@ -155,6 +158,9 @@ update-desktop-database &> /dev/null ||: %{_datadir}/yelp %changelog +* Fri Nov 16 2007 Matthias Clasen - 2.20.0-7 +- Handle .HP tags in man pages + * Fri Nov 09 2007 Matthew Barnes - 2.20.0-6 - Rebuild against gecko-libs 1.8.1.9.