[rubygem-mizuho/el6] asciidoc in EPEL6 patch
tdawson
tdawson at fedoraproject.org
Tue Jun 24 14:28:52 UTC 2014
commit 380a0802fceb0d5b92f9b33eaa72d5dededbbfed
Author: Troy Dawson <tdawson at redhat.com>
Date: Tue Jun 24 09:28:50 2014 -0500
asciidoc in EPEL6 patch
rubygem-mizuho-asciidoc_el6.patch | 57 +++++++++++++++++++++++++++++++++++++
rubygem-mizuho.spec | 7 ++++-
2 files changed, 63 insertions(+), 1 deletions(-)
---
diff --git a/rubygem-mizuho-asciidoc_el6.patch b/rubygem-mizuho-asciidoc_el6.patch
new file mode 100644
index 0000000..0f42139
--- /dev/null
+++ b/rubygem-mizuho-asciidoc_el6.patch
@@ -0,0 +1,57 @@
+commit 2fdfcc48bf5c5e143cd7534a87bfd38cbef565e6
+Author: František Dvořák <valtri at civ.zcu.cz>
+Date: Tue May 27 13:54:08 2014 +0200
+
+ Compatibility with older asciidoc.
+
+diff --git a/lib/mizuho/generator.rb b/lib/mizuho/generator.rb
+index e1b6e19..0b5a19a 100644
+--- a/lib/mizuho/generator.rb
++++ b/lib/mizuho/generator.rb
+@@ -78,7 +78,7 @@ class Generator
+ def self.run_asciidoc(input, output, icons_dir = nil, conf_file = nil, attributes = [])
+ args = [
+ ASCIIDOC,
+- "-b", "html5",
++ "-b", "html4",
+ "-a", "theme=flask",
+ "-a", "icons",
+ "-n"
+@@ -136,7 +136,6 @@ private
+ head = (doc / "head")[0]
+ body = (doc / "body")[0]
+ title = (doc / "title")[0].text
+- header_div = (doc / "#header")[0]
+ headers = (doc / "#content" / "h1, h2, h3, h4")
+
+ head.add_child(make_node(stylesheet_tag, doc))
+@@ -170,29 +169,6 @@ private
+ # Add Mizuho Javascript.
+ body.add_child(javascript_tag(doc))
+
+- # Move preamble from content area to header area.
+- if preamble = (doc / "#preamble")[0]
+- preamble.remove
+- header_div.add_child(make_node(preamble, doc))
+- end
+-
+- # Create a TOC after the preamble.
+- toc_div = add_child_and_get(header_div, %Q{<div id="toc"></div>})
+- if @commenting_system
+- # Add a commenting balloon to the TOC title.
+- toc_div.add_child(make_node(create_comment_balloon, doc))
+- end
+- toc_div.add_child(make_node(%Q{<div id="toctitle">Table of Contents</div>}, doc))
+- headers.each do |header|
+- if header['class'] !~ /float/
+- level = header.name.scan(/\d+/).first
+- div = add_child_and_get(toc_div, "<div class=\"foo toclevel#{level}\"></div>")
+- link = add_child_and_get(div, "<a></a>")
+- link['href'] = '#' + header['id']
+- link.content = header.text
+- end
+- end
+-
+ if @enable_topbar
+ # Add invisible spans before each header so that anchor jumps
+ # don't hide the header behind the top bar.
diff --git a/rubygem-mizuho.spec b/rubygem-mizuho.spec
index eda4d4b..5a51d61 100644
--- a/rubygem-mizuho.spec
+++ b/rubygem-mizuho.spec
@@ -7,12 +7,13 @@
Summary: Mizuho documentation formatting tool
Name: rubygem-%{gem_name}
Version: 0.9.20
-Release: 4%{?dist}
+Release: 5%{?dist}
Group: Development/Languages
License: MIT
URL: https://github.com/FooBarWidget/mizuho
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
Patch1: rubygem-mizuho-0.9.20-fix_native_templates_dir_el6.patch
+Patch2: rubygem-mizuho-asciidoc_el6.patch
Requires: asciidoc
Requires: ruby(abi) >= %{rubyabi}
Requires: ruby(rubygems)
@@ -57,6 +58,7 @@ sed -i 's/<sqlite3>/<sqlite3-ruby>/' %{gem_name}.gemspec
echo "#toc.html" >> templates/toc.html
%patch1 -p 1
+%patch2 -p 1
%build
gem build %{gem_name}.gemspec
@@ -104,6 +106,9 @@ popd
%changelog
+* Tue Jun 24 2014 Troy Dawson <tdawson at redhat.com> - 0.9.20-5
+- asciidoc in EPEL6 patch (František Dvořák)
+
* Mon May 19 2014 Troy Dawson <tdawson at redhat.com> - 0.9.20-4
- Real fix for different sqlite gem name in EPEL6
More information about the scm-commits
mailing list