[DRE-commits] [SCM] ruby-tidy.git branch, master, updated. upstream/1.1.2-3-g8d35b97

Dmitry Borodaenko angdraug at debian.org
Sat Oct 8 16:09:27 UTC 2011


The following commit has been merged in the master branch:
commit 8d35b978c732eaf93b1becb0ccca2ead0241c51b
Author: Dmitry Borodaenko <angdraug at debian.org>
Date:   Sat Oct 8 18:56:24 2011 +0300

    patches from 1.1.2-1, ruby1.9 DL API fixes

diff --git a/debian/patches/0001-fix-load-paths.patch b/debian/patches/0001-fix-load-paths.patch
new file mode 100644
index 0000000..89e5f73
--- /dev/null
+++ b/debian/patches/0001-fix-load-paths.patch
@@ -0,0 +1,35 @@
+From: Dmitry Borodaenko <angdraug at debian.org>
+Date: Sat, 8 Oct 2011 18:16:53 +0300
+Subject: fix load paths
+
+---
+ lib/tidy.rb   |    2 +-
+ test/usage.rb |    3 +--
+ 2 files changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/lib/tidy.rb b/lib/tidy.rb
+index 32167e7..0117473 100644
+--- a/lib/tidy.rb
++++ b/lib/tidy.rb
+@@ -52,7 +52,7 @@ module Tidy
+   # aTidyObj.release is ensured at end of the block.
+   #
+   def open(options=nil)
+-    raise "Tidy.path was not specified." unless @path
++    self.path = '/usr/lib/libtidy.so' unless @path
+     tidy = Tidy.new(options)
+     if block_given?
+       begin
+diff --git a/test/usage.rb b/test/usage.rb
+index fca47c2..3f729c2 100644
+--- a/test/usage.rb
++++ b/test/usage.rb
+@@ -1,6 +1,5 @@
+-$LOAD_PATH.unshift('../lib')
++$LOAD_PATH.unshift('./lib')
+ require 'tidy'
+-Tidy.path = '/usr/lib/tidylib.so'
+ html = '<html><title>title</title>Body</html>'
+ xml = Tidy.open(:show_warnings=>true) do |tidy|
+   tidy.options.output_xml = true
+-- 
diff --git a/debian/patches/0002-rubyforge-4095-line-separator.patch b/debian/patches/0002-rubyforge-4095-line-separator.patch
new file mode 100644
index 0000000..a950e2b
--- /dev/null
+++ b/debian/patches/0002-rubyforge-4095-line-separator.patch
@@ -0,0 +1,22 @@
+From: Dmitry Borodaenko <angdraug at debian.org>
+Date: Sat, 8 Oct 2011 18:36:02 +0300
+Subject: rubyforge #4095: line separator
+
+---
+ lib/tidy/tidybuf.rb |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/lib/tidy/tidybuf.rb b/lib/tidy/tidybuf.rb
+index 234ea72..39d6a18 100644
+--- a/lib/tidy/tidybuf.rb
++++ b/lib/tidy/tidybuf.rb
+@@ -30,7 +30,7 @@ class Tidybuf
+   # Convert to array.
+   #
+   def to_a
+-    to_s.split("\r\n")
++    to_s.split($/)
+   end
+ 
+   # Convert to string.
+-- 
diff --git a/debian/patches/0003-rubyforge-10007-TidyBuffer-struct-change.patch b/debian/patches/0003-rubyforge-10007-TidyBuffer-struct-change.patch
new file mode 100644
index 0000000..2281246
--- /dev/null
+++ b/debian/patches/0003-rubyforge-10007-TidyBuffer-struct-change.patch
@@ -0,0 +1,21 @@
+From: Dmitry Borodaenko <angdraug at debian.org>
+Date: Sat, 8 Oct 2011 18:35:05 +0300
+Subject: rubyforge #10007: TidyBuffer struct change
+
+---
+ lib/tidy/tidybuf.rb |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/lib/tidy/tidybuf.rb b/lib/tidy/tidybuf.rb
+index 39d6a18..b2a420c 100644
+--- a/lib/tidy/tidybuf.rb
++++ b/lib/tidy/tidybuf.rb
+@@ -11,6 +11,7 @@ class Tidybuf
+   # Mimic TidyBuffer.
+   #
+   TidyBuffer = struct [
++    "TidyAllocator* allocator",
+     "byte* bp",
+     "uint size",
+     "uint allocated",
+-- 
diff --git a/debian/patches/0004-ruby1.9-DL-Importer-DL-CPtr.patch b/debian/patches/0004-ruby1.9-DL-Importer-DL-CPtr.patch
new file mode 100644
index 0000000..6c90448
--- /dev/null
+++ b/debian/patches/0004-ruby1.9-DL-Importer-DL-CPtr.patch
@@ -0,0 +1,50 @@
+From: Dmitry Borodaenko <angdraug at debian.org>
+Date: Sat, 8 Oct 2011 18:41:37 +0300
+Subject: ruby1.9: DL::Importer, DL::CPtr
+
+---
+ lib/tidy/tidybuf.rb |    2 +-
+ lib/tidy/tidylib.rb |    2 +-
+ lib/tidy/tidyobj.rb |    2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lib/tidy/tidybuf.rb b/lib/tidy/tidybuf.rb
+index b2a420c..2de3133 100644
+--- a/lib/tidy/tidybuf.rb
++++ b/lib/tidy/tidybuf.rb
+@@ -2,7 +2,7 @@
+ #
+ class Tidybuf
+ 
+-  extend DL::Importable
++  extend DL.const_defined?(:Importer) ? DL::Importer : DL::Importable
+   
+   # Access TidyBuffer instance.
+   #
+diff --git a/lib/tidy/tidylib.rb b/lib/tidy/tidylib.rb
+index 795dc11..268dd81 100644
+--- a/lib/tidy/tidylib.rb
++++ b/lib/tidy/tidylib.rb
+@@ -2,7 +2,7 @@
+ #
+ module Tidylib
+ 
+-  extend DL::Importable
++  extend DL.const_defined?(:Importer) ? DL::Importer : DL::Importable
+ 
+   module_function
+   
+diff --git a/lib/tidy/tidyobj.rb b/lib/tidy/tidyobj.rb
+index e54ad78..99715e2 100644
+--- a/lib/tidy/tidyobj.rb
++++ b/lib/tidy/tidyobj.rb
+@@ -89,7 +89,7 @@ class Tidyobj
+   # Raise an error if the tidy document is invalid.
+   #
+   def verify_doc
+-    raise TypeError, 'Invalid Tidy document' unless @doc.class == DL::PtrData
++    raise TypeError, 'Invalid Tidy document' unless @doc.class == (DL.const_defined?(:CPtr) ? DL::CPtr : DL::PtrData)
+   end
+ 
+   # Raise severe error based on tidy status value.
+-- 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..79e83e4
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,4 @@
+0001-fix-load-paths.patch
+0002-rubyforge-4095-line-separator.patch
+0003-rubyforge-10007-TidyBuffer-struct-change.patch
+0004-ruby1.9-DL-Importer-DL-CPtr.patch

-- 
ruby-tidy.git



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