[DRE-commits] [ruby-bluecloth] 02/03: build against system discount/libmarkdown2; fix testsuite

Cédric Boutillier boutil at moszumanska.debian.org
Sat Aug 23 16:18:23 UTC 2014


This is an automated email from the git hooks/post-receive script.

boutil pushed a commit to branch master
in repository ruby-bluecloth.

commit 25eb9fb63ee6f289ac503ea9d815f1bf0ee60149
Author: Cédric Boutillier <boutil at debian.org>
Date:   Sat Aug 23 17:48:15 2014 +0200

    build against system discount/libmarkdown2; fix testsuite
---
 debian/control                                     |  2 +-
 debian/patches/06_update_test_suite.patch          | 79 ++++++++++++++++++++++
 .../patches/08_build_against_system_discount.patch | 39 +++++++++++
 debian/patches/series                              |  2 +
 4 files changed, 121 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index c02edf9..30ac592 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: ruby
 Priority: optional
 Maintainer: Debian Ruby Extras Maintainers <pkg-ruby-extras-maintainers at lists.alioth.debian.org>
 Uploaders: Arnaud Cornet <arnaud.cornet at gmail.com>, Paul van Tilburg <paulvt at debian.org>, Cédric Boutillier <boutil at debian.org>
-Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.5.0~), ruby-rspec
+Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.5.0~), ruby-rspec, libmarkdown2-dev
 Standards-Version: 3.9.5
 Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-bluecloth.git
 Vcs-Browser: http://anonscm.debian.org/gitweb?p=pkg-ruby-extras/ruby-bluecloth.git;a=summary
diff --git a/debian/patches/06_update_test_suite.patch b/debian/patches/06_update_test_suite.patch
new file mode 100644
index 0000000..c4bf87c
--- /dev/null
+++ b/debian/patches/06_update_test_suite.patch
@@ -0,0 +1,79 @@
+Description: adapt the test suite to newer version of discount/libmarkdown
+ The C discount library modified its output. The tests need to be modified to
+ reflect those changes in the compared strings. This affects:
+ - header labels:
+   discount is built with WITH_ID_ANCHOR, providing ids to headers instead of
+   hypertext links when using a table of content
+ - spaces in tables
+   See: https://github.com/Orc/discount/commit/a888c16a4fc18d614477f3ca7286cf66a4767e3c
+ - Non interpretation of definition lists: indentation is not enough to start a
+   code block. A new paragraph is needed
+Author: Cédric Boutillier <boutil at debian.org>
+Forwarded: no
+Last-Update: 2014-08-23 
+
+--- a/spec/bluecloth_spec.rb
++++ b/spec/bluecloth_spec.rb
+@@ -170,8 +170,8 @@
+ 
+ 		it "correctly adds IDs to headers when :header_labels is enabled" do
+ 			input = %{# A header\n\nSome stuff\n\n## Another header\n\nMore stuff.\n\n}
+-			expected = %{<a name=\"A.header\"></a>\n<h1>A header</h1>\n\n<p>Some stuff</p>\n\n} +
+-			           %{<a name=\"Another.header\"></a>\n<h2>Another header</h2>\n\n<p>More stuff.</p>}
++			expected = %{<h1 id=\"A.header\">A header</h1>\n\n<p>Some stuff</p>\n\n} +
++			           %{<h2 id=\"Another.header\">Another header</h2>\n\n<p>More stuff.</p>}
+ 
+ 			the_markdown( input, :header_labels => true ).should be_transformed_into( expected )
+ 		end
+--- a/spec/discount_spec.rb
++++ b/spec/discount_spec.rb
+@@ -78,15 +78,15 @@
+ 
+ 		it "renders the example from orc's blog" do
+ 			the_indented_markdown( <<-"END_MARKDOWN", :tables => true ).should be_transformed_into(<<-"END_HTML").without_indentation
+-			 a   |    b
++			  a  |  b
+ 			-----|-----
+ 			hello|sailor
+ 			END_MARKDOWN
+ 			<table>
+ 			<thead>
+ 			<tr>
+-			<th> a   </th>
+-			<th>    b</th>
++			<th>a  </th>
++			<th>  b</th>
+ 			</tr>
+ 			</thead>
+ 			<tbody>
+@@ -219,14 +219,12 @@
+ 
+ 		describe "(discount style)" do
+ 			it "aren't rendered by default" do
+-				the_indented_markdown( <<-"---" ).should be_transformed_into(<<-"---").without_indentation
++				the_indented_markdown( <<-"---").should be_transformed_into(<<-"---").without_indentation
+ 				=hey!=
+ 				    This is a definition list
+ 				---
+-				<p>=hey!=</p>
+-
+-				<pre><code>This is a definition list
+-				</code></pre>
++				<p>=hey!=
++				    This is a definition list</p>
+ 				---
+ 			end
+ 
+@@ -268,10 +266,8 @@
+ 				:   The fruit of an evergreen tree of the genus Citrus.
+ 				---
+ 				<p>Apple
+-				:   Pomaceous fruit of plants of the genus Malus in</p>
+-
+-				<pre><code>the family Rosaceae.
+-				</code></pre>
++				:   Pomaceous fruit of plants of the genus Malus in
++				    the family Rosaceae.</p>
+ 
+ 				<p>Orange
+ 				:   The fruit of an evergreen tree of the genus Citrus.</p>
diff --git a/debian/patches/08_build_against_system_discount.patch b/debian/patches/08_build_against_system_discount.patch
new file mode 100644
index 0000000..e3d25a1
--- /dev/null
+++ b/debian/patches/08_build_against_system_discount.patch
@@ -0,0 +1,39 @@
+Description: build against system discount/libmarkdown2 library
+Author: Cédric Boutillier <boutil at debian.org>
+Last-Update: 2014-08-23
+
+--- a/ext/bluecloth.h
++++ b/ext/bluecloth.h
+@@ -7,18 +7,17 @@
+ #ifndef BLUECLOTH_H
+ #define BLUECLOTH_H
+ 
+-#include "config.h"
+-#include "assert.h"
++#include <assert.h>
+ 
+-#include "mkdio.h"
+-#include "ruby.h"
++#include <mkdio.h>
++#include <ruby.h>
+ 
+ void mkd_initialize  		_(( void ));
+ void mkd_with_html5_tags	_(( void ));
+ 
+ #if defined(HAVE_RUBY_ENCODING_H) && HAVE_RUBY_ENCODING_H
+ #	define M17N_SUPPORTED
+-#	include "ruby/encoding.h"
++#	include <ruby/encoding.h>
+ #endif
+ 
+ /* Replace the macro from encoding.h that refers to static 'rb_encoding_list' */
+--- a/ext/extconf.rb
++++ b/ext/extconf.rb
+@@ -39,6 +39,7 @@
+ end
+ 
+ have_header( 'mkdio.h' ) or abort "missing mkdio.h"
++have_library('markdown')
+ 
+ # Check for 1.9.xish encoding header
+ have_header( 'ruby/encoding.h' )
diff --git a/debian/patches/series b/debian/patches/series
index 2bd861a..198213a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,4 @@
 02_test_deactivate_BEGIN_headers.diff
 04_drop_tidy_part.patch
+06_update_test_suite.patch
+08_build_against_system_discount.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-bluecloth.git



More information about the Pkg-ruby-extras-commits mailing list