[DRE-commits] [ruby-prawn] 01/10: refresh patches

Cédric Boutillier boutil at alioth.debian.org
Thu Aug 8 22:46:10 UTC 2013


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

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

commit 12a74e3efc85d493d09c798e2ce98885bf2a11ab
Author: Cédric Boutillier <boutil at debian.org>
Date:   Sat Jun 22 10:27:49 2013 +0200

    refresh patches
---
 .../0100_remove_bundler_rubygems_stuff.patch       |    8 +-
 debian/patches/0102_simply_require_ttfunk.patch    |    2 +-
 ...105_remove_rubygems_loadpath_stuff_manual.patch |    8 +-
 .../0200_replace_BASEDIR_data_by_DATADIR.patch     |  767 +-------------------
 ...05_replace_BASEDIR_data_by_DATADIR_manual.patch |    2 +-
 .../0210_change_spec_data_to_datadir_pdfs.patch    |   21 +-
 debian/patches/0300_fix_paths.patch                |   10 +-
 debian/patches/0400_use_system_fonts.patch         |   68 +-
 debian/patches/0405_use_system_fonts_manual.patch  |  187 +++--
 .../0500_disable_tests_using_removed_files.patch   |   48 +-
 .../1002_define_external_encoding_for_manual.patch |    2 +-
 debian/patches/series                              |    8 +-
 12 files changed, 180 insertions(+), 951 deletions(-)

diff --git a/debian/patches/0100_remove_bundler_rubygems_stuff.patch b/debian/patches/0100_remove_bundler_rubygems_stuff.patch
index 12e60a1..d44a1ee 100644
--- a/debian/patches/0100_remove_bundler_rubygems_stuff.patch
+++ b/debian/patches/0100_remove_bundler_rubygems_stuff.patch
@@ -1,17 +1,15 @@
 Description: remove rubygems and bundler stuff from specs
-Author: Cédric Boutillier <cedric.boutillier at gmail.com>
-Last-Update: 2011-11-07
+Author: Cédric Boutillier <boutil at debian.org>
+Last-Update: 2013-06-22
 
 --- a/spec/spec_helper.rb
 +++ b/spec/spec_helper.rb
-@@ -2,11 +2,11 @@
+@@ -2,10 +2,10 @@
  
  puts "Prawn specs: Running on Ruby Version: #{RUBY_VERSION}"
  
--require "rubygems"
 -require "bundler"
 -Bundler.setup
-+#require "rubygems"
 +#require "bundler"
 +#Bundler.setup
  
diff --git a/debian/patches/0102_simply_require_ttfunk.patch b/debian/patches/0102_simply_require_ttfunk.patch
index 66152d7..5c67e88 100644
--- a/debian/patches/0102_simply_require_ttfunk.patch
+++ b/debian/patches/0102_simply_require_ttfunk.patch
@@ -1,7 +1,7 @@
 Description: replace complicated statements by a simple require 'ttfunk'
  ttfunk is available as a Debian package. We do not need $LOAD_PATH
  manipulations and rescues to load this library.
-Author: Cédric Boutillier <cedric.boutillier at gmail.com>
+Author: Cédric Boutillier <boutil at debian.org>
 Last-Update: 2011-11-24
 
 --- a/lib/prawn/core.rb
diff --git a/debian/patches/0105_remove_rubygems_loadpath_stuff_manual.patch b/debian/patches/0105_remove_rubygems_loadpath_stuff_manual.patch
index 762528b..32ee080 100644
--- a/debian/patches/0105_remove_rubygems_loadpath_stuff_manual.patch
+++ b/debian/patches/0105_remove_rubygems_loadpath_stuff_manual.patch
@@ -1,17 +1,15 @@
 Description: remove LOAD_PATH manipulation from manual sources
-Author: Cédric Boutillier <cedric.boutillier at gmail.com>
-Last-Update: 2011-11-24
+Author: Cédric Boutillier <boutil at debian.org>
+Last-Update: 2013-06-22
 
 --- a/manual/example_helper.rb
 +++ b/manual/example_helper.rb
-@@ -3,8 +3,8 @@
+@@ -3,7 +3,7 @@
  # Helper for organizing examples
  #
  
 -$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
--require 'rubygems'
 +#$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
-+#require 'rubygems'
  require 'prawn'
  require 'prawn/security'
  require 'prawn/layout'
diff --git a/debian/patches/0200_replace_BASEDIR_data_by_DATADIR.patch b/debian/patches/0200_replace_BASEDIR_data_by_DATADIR.patch
index a56f7e6..7dff138 100644
--- a/debian/patches/0200_replace_BASEDIR_data_by_DATADIR.patch
+++ b/debian/patches/0200_replace_BASEDIR_data_by_DATADIR.patch
@@ -1,757 +1,15 @@
-Description: define Prawn::DATADIR as the name of the directory containing data
- Upstream hardcoded the relative path with respect to prawn/core.rb of the
- directory containing data.
- A new constant, Prawn::DATADIR is introduced to permit using another
- directory, and change its name just once.
- The code (mainly comments and specs) is patched to make use of this new
- constant instead of the hardcoded path
-Author: Cédric Boutillier <cedric.boutillier at gmail.com>
-Last-Update: 2011-11-15
-Bug: https://github.com/sandal/prawn/pull/299
+Description: redefine BASEDIR and DATADIR
+Author: Cédric Boutillier <boutil at debian.org>
+Last-Update: 2013-06-22
 
---- a/lib/prawn/document.rb
-+++ b/lib/prawn/document.rb
-@@ -166,7 +166,7 @@
-     #   pdf = Prawn::Document.new(:page_size => [200, 300])
-     #
-     #   # New document, with background
--    #   pdf = Prawn::Document.new(:background => "#{Prawn::BASEDIR}/data/images/pigs.jpg")
-+    #   pdf = Prawn::Document.new(:background => "#{Prawn::DATADIR}/images/pigs.jpg")
-     #
-     def initialize(options={},&block)
-       options = options.dup
---- a/lib/prawn/images.rb
-+++ b/lib/prawn/images.rb
-@@ -32,10 +32,10 @@
-     # <tt>:fit</tt>:: scale the dimensions of the image proportionally to fit inside [width,height]
-     # 
-     #   Prawn::Document.generate("image2.pdf", :page_layout => :landscape) do     
--    #     pigs = "#{Prawn::BASEDIR}/data/images/pigs.jpg" 
-+    #     pigs = "#{Prawn::DATADIR}/images/pigs.jpg" 
-     #     image pigs, :at => [50,450], :width => 450                                      
-     #
--    #     dice = "#{Prawn::BASEDIR}/data/images/dice.png"
-+    #     dice = "#{Prawn::DATADIR}/images/dice.png"
-     #     image dice, :at => [50, 450], :scale => 0.75 
-     #   end   
-     #
---- a/lib/prawn/core/text.rb
-+++ b/lib/prawn/core/text.rb
-@@ -131,11 +131,11 @@
-       #
-       # Call with an empty array to turn off fallback fonts
-       #
--      # file = "#{Prawn::BASEDIR}/data/fonts/gkai00mp.ttf"
-+      # file = "#{Prawn::DATADIR}/fonts/gkai00mp.ttf"
-       # font_families["Kai"] = {
-       #   :normal => { :file => file, :font => "Kai" }
-       # }
--      # file = "#{Prawn::BASEDIR}/data/fonts/Action Man.dfont"
-+      # file = "#{Prawn::DATADIR}/fonts/Action Man.dfont"
-       # font_families["Action Man"] = {
-       #   :normal      => { :file => file, :font => "ActionMan" },
-       # }
---- a/lib/prawn/font/afm.rb
-+++ b/lib/prawn/font/afm.rb
-@@ -28,7 +28,7 @@
-             ".", "/usr/lib/afm",
-             "/usr/local/lib/afm",
-             "/usr/openwin/lib/fonts/afm/",
--             Prawn::BASEDIR+'/data/fonts/']
-+             Prawn::DATADIR+'/fonts/']
-         end
-       end
- 
---- a/spec/template_spec.rb
-+++ b/spec/template_spec.rb
-@@ -59,7 +59,7 @@
-   end
-     
-   it "should have a single page object if importing a single page template" do
--    filename = "#{Prawn::BASEDIR}/data/pdfs/hexagon.pdf"
-+    filename = "#{Prawn::DATADIR}/pdfs/hexagon.pdf"
- 
-     @pdf = Prawn::Document.new(:template => filename)
-     output = StringIO.new(@pdf.render)
-@@ -71,7 +71,7 @@
-   end
- 
-   it "should have two content streams if importing a single page template" do
--    filename = "#{Prawn::BASEDIR}/data/pdfs/hexagon.pdf"
-+    filename = "#{Prawn::DATADIR}/pdfs/hexagon.pdf"
- 
-     @pdf = Prawn::Document.new(:template => filename)
-     output = StringIO.new(@pdf.render)
-@@ -83,7 +83,7 @@
-   end
- 
-   it "should not die if using this PDF as a template" do
--    filename = "#{Prawn::BASEDIR}/data/pdfs/complex_template.pdf"
-+    filename = "#{Prawn::DATADIR}/pdfs/complex_template.pdf"
- 
-     assert_nothing_raised do
-       @pdf = Prawn::Document.new(:template => filename)
-@@ -92,7 +92,7 @@
- 
- 
-   it "should have balance q/Q operators on all content streams" do
--    filename = "#{Prawn::BASEDIR}/data/pdfs/hexagon.pdf"
-+    filename = "#{Prawn::DATADIR}/pdfs/hexagon.pdf"
- 
-     @pdf = Prawn::Document.new(:template => filename)
-     output = StringIO.new(@pdf.render)
-@@ -108,7 +108,7 @@
-   end
- 
-   it "should allow text to be added to a single page template" do
--    filename = "#{Prawn::BASEDIR}/data/pdfs/hexagon.pdf"
-+    filename = "#{Prawn::DATADIR}/pdfs/hexagon.pdf"
- 
-     @pdf = Prawn::Document.new(:template => filename)
- 
-@@ -119,7 +119,7 @@
-   end
- 
-   it "should allow PDFs with page resources behind an indirect object to be used as templates" do
--    filename = "#{Prawn::BASEDIR}/data/pdfs/resources_as_indirect_object.pdf"
-+    filename = "#{Prawn::DATADIR}/pdfs/resources_as_indirect_object.pdf"
- 
-     @pdf = Prawn::Document.new(:template => filename)
- 
-@@ -131,7 +131,7 @@
-   end
- 
-   it "should copy the PDF version from the template file" do
--    filename = "#{Prawn::BASEDIR}/data/pdfs/version_1_6.pdf"
-+    filename = "#{Prawn::DATADIR}/pdfs/version_1_6.pdf"
- 
-     @pdf = Prawn::Document.new(:template => filename)
-     str = @pdf.render
-@@ -139,9 +139,9 @@
-   end
- 
-   it "should correctly add a TTF font to a template that has existing fonts" do
--    filename = "#{Prawn::BASEDIR}/data/pdfs/contains_ttf_font.pdf"
-+    filename = "#{Prawn::DATADIR}/pdfs/contains_ttf_font.pdf"
-     @pdf = Prawn::Document.new(:template => filename)
--    @pdf.font "#{Prawn::BASEDIR}/data/fonts/Chalkboard.ttf"
-+    @pdf.font "#{Prawn::DATADIR}/fonts/Chalkboard.ttf"
-     @pdf.move_down(40)
-     @pdf.text "Hi There"
- 
-@@ -155,7 +155,7 @@
-   end
- 
-   it "should correctly import a template file that is missing a MediaBox entry" do
--    filename = "#{Prawn::BASEDIR}/data/pdfs/page_without_mediabox.pdf"
-+    filename = "#{Prawn::DATADIR}/pdfs/page_without_mediabox.pdf"
- 
-     @pdf = Prawn::Document.new(:template => filename)
-     str = @pdf.render
-@@ -215,7 +215,7 @@
-   end
-   
-   it "should have two content streams if importing a single page template" do
--    filename = "#{Prawn::BASEDIR}/data/pdfs/hexagon.pdf"
-+    filename = "#{Prawn::DATADIR}/pdfs/hexagon.pdf"
-     @pdf = Prawn::Document.new()
-     @pdf.start_new_page(:template => filename)
-     output = StringIO.new(@pdf.render)
-@@ -226,7 +226,7 @@
-   end
-   
-   it "should have balance q/Q operators on all content streams" do
--    filename = "#{Prawn::BASEDIR}/data/pdfs/hexagon.pdf"
-+    filename = "#{Prawn::DATADIR}/pdfs/hexagon.pdf"
- 
-     @pdf = Prawn::Document.new()
-     @pdf.start_new_page(:template => filename)
-@@ -254,7 +254,7 @@
-   end
-   
-   it "should allow PDFs with page resources behind an indirect object to be used as templates" do
--    filename = "#{Prawn::BASEDIR}/data/pdfs/resources_as_indirect_object.pdf"
-+    filename = "#{Prawn::DATADIR}/pdfs/resources_as_indirect_object.pdf"
- 
-     @pdf = Prawn::Document.new()
-     @pdf.start_new_page(:template => filename)
-@@ -267,10 +267,10 @@
-   end
-   
-   it "should correctly add a TTF font to a template that has existing fonts" do
--    filename = "#{Prawn::BASEDIR}/data/pdfs/contains_ttf_font.pdf"
-+    filename = "#{Prawn::DATADIR}/pdfs/contains_ttf_font.pdf"
-     @pdf = Prawn::Document.new()
-     @pdf.start_new_page(:template => filename)
--    @pdf.font "#{Prawn::BASEDIR}/data/fonts/Chalkboard.ttf"
-+    @pdf.font "#{Prawn::DATADIR}/fonts/Chalkboard.ttf"
-     @pdf.move_down(40)
-     @pdf.text "Hi There"
- 
-@@ -286,7 +286,7 @@
-   
-   context "using template_page option" do
-     it "uses the specified page option" do
--      filename = "#{Prawn::BASEDIR}/data/pdfs/multipage_template.pdf"
-+      filename = "#{Prawn::DATADIR}/pdfs/multipage_template.pdf"
-       @pdf = Prawn::Document.new()
-       @pdf.start_new_page(:template => filename, :template_page => 2)
-       text = PDF::Inspector::Text.analyze(@pdf.render)
---- a/spec/text_box_spec.rb
-+++ b/spec/text_box_spec.rb
-@@ -74,7 +74,7 @@
-     @pdf.text_direction(:rtl)
-     @pdf.text_direction = :rtl
-     @pdf.text_direction = :rtl
--    @pdf.font("#{Prawn::BASEDIR}/data/fonts/gkai00mp.ttf", :size => 16) do
-+    @pdf.font("#{Prawn::DATADIR}/fonts/gkai00mp.ttf", :size => 16) do
-       @pdf.text "写个小"
-     end
-     text = PDF::Inspector::Text.analyze(@pdf.render)
-@@ -617,7 +617,7 @@
-       :height => bounding_height,
-       :document => @pdf
-     }
--    file = "#{Prawn::BASEDIR}/data/fonts/Action Man.dfont"
-+    file = "#{Prawn::DATADIR}/fonts/Action Man.dfont"
-     @pdf.font_families["Action Man"] = {
-       :normal      => { :file => file, :font => "ActionMan" },
-       :italic      => { :file => file, :font => "ActionMan-Italic" },
-@@ -800,7 +800,7 @@
-       :height => 162.0,
-       :document => @pdf
-     }
--    @pdf.font "#{Prawn::BASEDIR}/data/fonts/gkai00mp.ttf"
-+    @pdf.font "#{Prawn::DATADIR}/fonts/gkai00mp.ttf"
-     @options[:overflow] = :truncate
-     text_box = Prawn::Text::Box.new(@text, @options)
-     text_box.render
---- a/spec/text_at_spec.rb
-+++ b/spec/text_at_spec.rb
-@@ -107,9 +107,9 @@
-         Prawn::Errors::IncompatibleStringEncoding)
-     end
-     it "should not raise an exception when a shift-jis string is rendered" do
--      datafile = "#{Prawn::BASEDIR}/data/shift_jis_text.txt"
-+      datafile = "#{Prawn::DATADIR}/shift_jis_text.txt"
-       sjis_str = File.open(datafile, "r:shift_jis") { |f| f.gets }
--      @pdf.font("#{Prawn::BASEDIR}/data/fonts/gkai00mp.ttf")
-+      @pdf.font("#{Prawn::DATADIR}/fonts/gkai00mp.ttf")
-       lambda { @pdf.draw_text(sjis_str, :at => [0, 0]) }.should.not.raise(
-         Prawn::Errors::IncompatibleStringEncoding)
-     end
-@@ -121,7 +121,7 @@
-         Prawn::Errors::IncompatibleStringEncoding)
-     end
-     it "should raise an exception when a shift-jis string is rendered" do
--      sjis_str = File.read("#{Prawn::BASEDIR}/data/shift_jis_text.txt")
-+      sjis_str = File.read("#{Prawn::DATADIR}/shift_jis_text.txt")
-       lambda { @pdf.draw_text(sjis_str, :at => [0, 0]) }.should.raise(
-         Prawn::Errors::IncompatibleStringEncoding)
-     end
---- a/spec/font_spec.rb
-+++ b/spec/font_spec.rb
-@@ -24,7 +24,7 @@
-   it "should exclude newlines" do
-     create_pdf
-     # Use a TTF font that has a non-zero width for \n
--    @pdf.font("#{Prawn::BASEDIR}/data/fonts/gkai00mp.ttf")
-+    @pdf.font("#{Prawn::DATADIR}/fonts/gkai00mp.ttf")
- 
-     @pdf.width_of("\nhello world\n").should ==
-       @pdf.width_of("hello world")
-@@ -96,7 +96,7 @@
-   end
- 
-   it "should allow font familes to be defined in a single dfont" do
--    file = "#{Prawn::BASEDIR}/data/fonts/Action Man.dfont"
-+    file = "#{Prawn::DATADIR}/fonts/Action Man.dfont"
-     @pdf.font_families["Action Man"] = {
-       :normal      => { :file => file, :font => "ActionMan" },
-       :italic      => { :file => file, :font => "ActionMan-Italic" },
-@@ -253,15 +253,15 @@
-   end
- 
-   it "should return true when present in a TTF font" do
--    font = @pdf.find_font("#{Prawn::BASEDIR}/data/fonts/Activa.ttf")
-+    font = @pdf.find_font("#{Prawn::DATADIR}/fonts/Activa.ttf")
-     font.glyph_present?("H").should.be true
-   end
- 
-   it "should return false when absent in a TTF font" do
--    font = @pdf.find_font("#{Prawn::BASEDIR}/data/fonts/Activa.ttf")
-+    font = @pdf.find_font("#{Prawn::DATADIR}/fonts/Activa.ttf")
-     font.glyph_present?("再").should.be false
- 
--    font = @pdf.find_font("#{Prawn::BASEDIR}/data/fonts/gkai00mp.ttf")
-+    font = @pdf.find_font("#{Prawn::DATADIR}/fonts/gkai00mp.ttf")
-     font.glyph_present?("€").should.be false
-   end
- end
-@@ -270,7 +270,7 @@
-   
-   setup do
-     create_pdf
--    @activa = @pdf.find_font "#{Prawn::BASEDIR}/data/fonts/Activa.ttf"
-+    @activa = @pdf.find_font "#{Prawn::DATADIR}/fonts/Activa.ttf"
-   end
-   
-   it "should calculate string width taking into account accented characters" do
-@@ -336,7 +336,7 @@
-     it "should allow TTF fonts to be used alongside document transactions" do
-       lambda {
-         Prawn::Document.new do
--          font "#{Prawn::BASEDIR}/data/fonts/DejaVuSans.ttf"
-+          font "#{Prawn::DATADIR}/fonts/DejaVuSans.ttf"
-           text "Hi there"
-           transaction { text "Nice, thank you" }
-         end
-@@ -346,7 +346,7 @@
-     it "should allow TTF fonts to be used inside transactions" do
-       pdf = Prawn::Document.new do
-         transaction do
--          font "#{Prawn::BASEDIR}/data/fonts/DejaVuSans.ttf"
-+          font "#{Prawn::DATADIR}/fonts/DejaVuSans.ttf"
-           text "Hi there"
-         end
-       end
-@@ -364,7 +364,7 @@
- describe "DFont fonts" do
-   setup do
-     create_pdf
--    @file = "#{Prawn::BASEDIR}/data/fonts/Action Man.dfont"
-+    @file = "#{Prawn::DATADIR}/fonts/Action Man.dfont"
-   end
- 
-   it "should list all named fonts" do
-@@ -403,7 +403,7 @@
- describe "#character_count(text)" do
-   it "should work on TTF fonts" do
-     create_pdf
--    @pdf.font("#{Prawn::BASEDIR}/data/fonts/gkai00mp.ttf")
-+    @pdf.font("#{Prawn::DATADIR}/fonts/gkai00mp.ttf")
-     @pdf.font.character_count("こんにちは世界").should == 7
-     @pdf.font.character_count("Hello, world!").should == 13
-   end
---- a/spec/cell_spec.rb
-+++ b/spec/cell_spec.rb
-@@ -509,7 +509,7 @@
-   describe "with default options" do
-     before(:each) do
-       @cell = Prawn::Table::Cell.make(@pdf,
--        :image => "#{Prawn::BASEDIR}/data/images/prawn.png")
-+        :image => "#{Prawn::DATADIR}/images/prawn.png")
-     end
- 
-     it "should create a Cell::Image" do
-@@ -525,7 +525,7 @@
-   describe "hash syntax" do
-     before(:each) do
-       @table = @pdf.make_table([[{
--        :image => "#{Prawn::BASEDIR}/data/images/prawn.png",
-+        :image => "#{Prawn::DATADIR}/images/prawn.png",
-         :scale => 2,
-         :fit => [100, 200],
-         :image_width => 123,
---- a/spec/formatted_text_box_spec.rb
-+++ b/spec/formatted_text_box_spec.rb
-@@ -21,7 +21,7 @@
-   it "should not raise Encoding::CompatibilityError when keeping a TTF and an " +
-     "AFM font together" do
-     ruby_19 do
--      file = "#{Prawn::BASEDIR}/data/fonts/gkai00mp.ttf"
-+      file = "#{Prawn::DATADIR}/fonts/gkai00mp.ttf"
-       @pdf.font_families["Kai"] = {
-         :normal => { :file => file, :font => "Kai" }
-       }
-@@ -121,7 +121,7 @@
-   "a Chinese font and set of Chinese glyphs not in the current font" do
-   it "should change the font to the Chinese font for the Chinese glyphs" do
-     create_pdf
--    file = "#{Prawn::BASEDIR}/data/fonts/gkai00mp.ttf"
-+    file = "#{Prawn::DATADIR}/fonts/gkai00mp.ttf"
-     @pdf.font_families["Kai"] = {
-       :normal => { :file => file, :font => "Kai" }
-     }
-@@ -149,7 +149,7 @@
-   "an AFM font and Win-Ansi glyph not in the current Chinese font" do
-   it "should change the font to the AFM font for the Win-Ansi glyph" do
-     create_pdf
--    file = "#{Prawn::BASEDIR}/data/fonts/gkai00mp.ttf"
-+    file = "#{Prawn::DATADIR}/fonts/gkai00mp.ttf"
-     @pdf.font_families["Kai"] = {
-       :normal => { :file => file, :font => "Kai" }
-     }
-@@ -178,7 +178,7 @@
-   "level font" do
-   it "should use the fragment level font except for glyphs not in that font" do
-     create_pdf
--    file = "#{Prawn::BASEDIR}/data/fonts/gkai00mp.ttf"
-+    file = "#{Prawn::DATADIR}/fonts/gkai00mp.ttf"
-     @pdf.font_families["Kai"] = {
-       :normal => { :file => file, :font => "Kai" }
-     }
-@@ -205,7 +205,7 @@
- describe "Text::Formatted::Box" do
-   before(:each) do
-     create_pdf
--    file = "#{Prawn::BASEDIR}/data/fonts/gkai00mp.ttf"
-+    file = "#{Prawn::DATADIR}/fonts/gkai00mp.ttf"
-     @pdf.font_families["Kai"] = {
-       :normal => { :file => file, :font => "Kai" }
-     }
---- a/spec/text_spacing_spec.rb
-+++ b/spec/text_spacing_spec.rb
-@@ -42,7 +42,7 @@
-   #
-   it "should calculate character spacing widths by characters, not bytes" do
-     create_pdf
--    @pdf.font("#{Prawn::BASEDIR}/data/fonts/gkai00mp.ttf")
-+    @pdf.font("#{Prawn::DATADIR}/fonts/gkai00mp.ttf")
- 
-     str = "こんにちは世界"
-     @pdf.character_spacing(0) do
---- a/spec/png_spec.rb
-+++ b/spec/png_spec.rb
-@@ -12,8 +12,8 @@
- describe "When reading a greyscale PNG file (color type 0)" do
- 
-   before(:each) do
--    @filename = "#{Prawn::BASEDIR}/data/images/web-links.png"
--    @data_filename = "#{Prawn::BASEDIR}/data/images/web-links.dat"
-+    @filename = "#{Prawn::DATADIR}/images/web-links.png"
-+    @data_filename = "#{Prawn::DATADIR}/images/web-links.dat"
-     @img_data = File.binread(@filename)
-   end
- 
-@@ -39,7 +39,7 @@
- describe "When reading a greyscale PNG file with transparency (color type 0)" do
- 
-   before(:each) do
--    @filename = "#{Prawn::BASEDIR}/data/images/ruport_type0.png"
-+    @filename = "#{Prawn::DATADIR}/images/ruport_type0.png"
-     @img_data = File.binread(@filename)
-   end
- 
-@@ -56,8 +56,8 @@
- describe "When reading an RGB PNG file (color type 2)" do
- 
-   before(:each) do
--    @filename = "#{Prawn::BASEDIR}/data/images/ruport.png"
--    @data_filename = "#{Prawn::BASEDIR}/data/images/ruport_data.dat"
-+    @filename = "#{Prawn::DATADIR}/images/ruport.png"
-+    @data_filename = "#{Prawn::DATADIR}/images/ruport_data.dat"
-     @img_data = File.binread(@filename)
-   end
- 
-@@ -83,7 +83,7 @@
- describe "When reading an RGB PNG file with transparency (color type 2)" do
- 
-   before(:each) do
--    @filename = "#{Prawn::BASEDIR}/data/images/arrow2.png"
-+    @filename = "#{Prawn::DATADIR}/images/arrow2.png"
-     @img_data = File.binread(@filename)
-   end
- 
-@@ -103,8 +103,8 @@
- describe "When reading an indexed color PNG file (color type 3)" do
- 
-   before(:each) do
--    @filename = "#{Prawn::BASEDIR}/data/images/rails.png"
--    @data_filename = "#{Prawn::BASEDIR}/data/images/rails.dat"
-+    @filename = "#{Prawn::DATADIR}/images/rails.png"
-+    @data_filename = "#{Prawn::DATADIR}/images/rails.dat"
-     @img_data = File.binread(@filename)
-   end
- 
-@@ -130,9 +130,9 @@
- describe "When reading a greyscale+alpha PNG file (color type 4)" do
- 
-   before(:each) do
--    @filename = "#{Prawn::BASEDIR}/data/images/page_white_text.png"
--    @data_filename = "#{Prawn::BASEDIR}/data/images/page_white_text.dat"
--    @alpha_data_filename = "#{Prawn::BASEDIR}/data/images/page_white_text.alpha"
-+    @filename = "#{Prawn::DATADIR}/images/page_white_text.png"
-+    @data_filename = "#{Prawn::DATADIR}/images/page_white_text.dat"
-+    @alpha_data_filename = "#{Prawn::DATADIR}/images/page_white_text.alpha"
-     @img_data = File.binread(@filename)
-   end
- 
-@@ -166,9 +166,9 @@
- describe "When reading an RGB+alpha PNG file (color type 6)" do
- 
-   before(:each) do
--    @filename = "#{Prawn::BASEDIR}/data/images/dice.png"
--    @data_filename = "#{Prawn::BASEDIR}/data/images/dice.dat"
--    @alpha_data_filename = "#{Prawn::BASEDIR}/data/images/dice.alpha"
-+    @filename = "#{Prawn::DATADIR}/images/dice.png"
-+    @data_filename = "#{Prawn::DATADIR}/images/dice.dat"
-+    @alpha_data_filename = "#{Prawn::DATADIR}/images/dice.alpha"
-     @img_data = File.binread(@filename)
-   end
- 
-@@ -202,10 +202,10 @@
- describe "When reading a 16bit RGB+alpha PNG file (color type 6)" do
- 
-   before(:each) do
--    @filename = "#{Prawn::BASEDIR}/data/images/16bit.png"
--    @data_filename = "#{Prawn::BASEDIR}/data/images/16bit.dat"
-+    @filename = "#{Prawn::DATADIR}/images/16bit.png"
-+    @data_filename = "#{Prawn::DATADIR}/images/16bit.dat"
-     # alpha channel truncated to 8-bit
--    @alpha_data_filename = "#{Prawn::BASEDIR}/data/images/16bit.alpha"
-+    @alpha_data_filename = "#{Prawn::DATADIR}/images/16bit.alpha"
-     @img_data = File.binread(@filename)
-   end
- 
---- a/spec/object_store_spec.rb
-+++ b/spec/object_store_spec.rb
-@@ -35,7 +35,7 @@
-   end
- 
-   it "should import all objects from a PDF that has an indirect reference in a stream dict" do
--    filename = "#{Prawn::BASEDIR}/data/pdfs/indirect_reference.pdf"
-+    filename = "#{Prawn::DATADIR}/pdfs/indirect_reference.pdf"
-     store = Prawn::Core::ObjectStore.new(:template => filename)
-     store.size.should == 8
-   end
-@@ -47,13 +47,13 @@
-   end
- 
-   it "should raise Prawn::Errors::TemplateError when given a non PDF as a template" do
--    filename = "#{Prawn::BASEDIR}/data/images/dice.png"
-+    filename = "#{Prawn::DATADIR}/images/dice.png"
- 
-     lambda { Prawn::Core::ObjectStore.new(:template => filename) }.should.raise(Prawn::Errors::TemplateError)
-   end
- 
-   it "should raise Prawn::Errors::TemplateError when given an encrypted PDF as a template" do
--    filename = "#{Prawn::BASEDIR}/data/pdfs/encrypted.pdf"
-+    filename = "#{Prawn::DATADIR}/pdfs/encrypted.pdf"
- 
-     lambda { Prawn::Core::ObjectStore.new(:template => filename) }.should.raise(Prawn::Errors::TemplateError)
-   end
-@@ -118,37 +118,37 @@
- 
- describe "Prawn::ObjectStorie#object_id_for_page" do
-   it "should return the object ID of an imported template page" do
--    filename = "#{Prawn::BASEDIR}/data/pdfs/hexagon.pdf"
-+    filename = "#{Prawn::DATADIR}/pdfs/hexagon.pdf"
-     store = Prawn::Core::ObjectStore.new(:template => filename)
-     store.object_id_for_page(0).should == 4
-   end
- 
-   it "should return the object ID of the first imported template page" do
--    filename = "#{Prawn::BASEDIR}/data/pdfs/two_hexagons.pdf"
-+    filename = "#{Prawn::DATADIR}/pdfs/two_hexagons.pdf"
-     store = Prawn::Core::ObjectStore.new(:template => filename)
-     store.object_id_for_page(1).should == 4
-   end
- 
-   it "should return the object ID of the last imported template page" do
--    filename = "#{Prawn::BASEDIR}/data/pdfs/two_hexagons.pdf"
-+    filename = "#{Prawn::DATADIR}/pdfs/two_hexagons.pdf"
-     store = Prawn::Core::ObjectStore.new(:template => filename)
-     store.object_id_for_page(-1).should == 6
-   end
- 
-   it "should return the object ID of the first page of a template that uses nested Pages" do
--    filename = "#{Prawn::BASEDIR}/data/pdfs/nested_pages.pdf"
-+    filename = "#{Prawn::DATADIR}/pdfs/nested_pages.pdf"
-     store = Prawn::Core::ObjectStore.new(:template => filename)
-     store.object_id_for_page(1).should == 5
-   end
- 
-   it "should return the object ID of the last page of a template that uses nested Pages" do
--    filename = "#{Prawn::BASEDIR}/data/pdfs/nested_pages.pdf"
-+    filename = "#{Prawn::DATADIR}/pdfs/nested_pages.pdf"
-     store = Prawn::Core::ObjectStore.new(:template => filename)
-     store.object_id_for_page(-1).should == 8
-   end
- 
-   it "should return nil if given an invalid page number" do
--    filename = "#{Prawn::BASEDIR}/data/pdfs/hexagon.pdf"
-+    filename = "#{Prawn::DATADIR}/pdfs/hexagon.pdf"
-     store = Prawn::Core::ObjectStore.new(:template => filename)
-     store.object_id_for_page(10).should == nil
-   end
---- a/spec/jpg_spec.rb
-+++ b/spec/jpg_spec.rb
-@@ -9,7 +9,7 @@
- describe "When reading a JPEG file" do
- 
-   before(:each) do
--    @filename = "#{Prawn::BASEDIR}/data/images/pigs.jpg"
-+    @filename = "#{Prawn::DATADIR}/images/pigs.jpg"
-     @img_data = File.open(@filename, "rb") { |f| f.read }
-   end
-    
---- a/spec/images_spec.rb
-+++ b/spec/images_spec.rb
-@@ -7,7 +7,7 @@
- describe "the image() function" do
- 
-   before(:each) do
--    @filename = "#{Prawn::BASEDIR}/data/images/pigs.jpg" 
-+    @filename = "#{Prawn::DATADIR}/images/pigs.jpg" 
-     create_pdf
-   end
- 
-@@ -44,17 +44,17 @@
-   end
- 
-   it "should raise an UnsupportedImageType if passed a BMP" do
--    filename = "#{Prawn::BASEDIR}/data/images/tru256.bmp"
-+    filename = "#{Prawn::DATADIR}/images/tru256.bmp"
-     lambda { @pdf.image filename, :at => [100,100] }.should.raise(Prawn::Errors::UnsupportedImageType)
-   end
- 
-   it "should raise an UnsupportedImageType if passed an interlaced PNG" do
--    filename = "#{Prawn::BASEDIR}/data/images/dice_interlaced.png"
-+    filename = "#{Prawn::DATADIR}/images/dice_interlaced.png"
-     lambda { @pdf.image filename, :at => [100,100] }.should.raise(Prawn::Errors::UnsupportedImageType)
-   end
- 
-   it "should bump PDF version to 1.5 or greater on embedding 16-bit PNGs" do
--    @pdf.image "#{Prawn::BASEDIR}/data/images/16bit.png"
-+    @pdf.image "#{Prawn::DATADIR}/images/16bit.png"
-     @pdf.state.version.should >= 1.5
-   end
- 
-@@ -63,7 +63,7 @@
-   # or anything. OS X Preview handles those files just fine.
-   #
-   it "should embed 8-bit alpha channels for 16-bit PNGs" do
--    @pdf.image "#{Prawn::BASEDIR}/data/images/16bit.png"
-+    @pdf.image "#{Prawn::DATADIR}/images/16bit.png"
- 
-     output = @pdf.render
-     output.should =~ /\/BitsPerComponent 16/
---- a/spec/line_wrap_spec.rb
-+++ b/spec/line_wrap_spec.rb
-@@ -51,7 +51,7 @@
-   end
- 
-   it "should break on zero-width space" do
--    @pdf.font("#{Prawn::BASEDIR}/data/fonts/DejaVuSans.ttf")
-+    @pdf.font("#{Prawn::DATADIR}/fonts/DejaVuSans.ttf")
-     array = [{ :text => "hello#{Prawn::Text::ZWSP}world" }]
-     @arranger.format_array = array
-     string = @line_wrap.wrap_line(:arranger => @arranger,
-@@ -61,7 +61,7 @@
-   end
- 
-   it "should not display zero-width space" do
--    @pdf.font("#{Prawn::BASEDIR}/data/fonts/DejaVuSans.ttf")
-+    @pdf.font("#{Prawn::DATADIR}/fonts/DejaVuSans.ttf")
-     array = [{ :text => "hello#{Prawn::Text::ZWSP}world" }]
-     @arranger.format_array = array
-     string = @line_wrap.wrap_line(:arranger => @arranger,
-@@ -116,7 +116,7 @@
-     expected.force_encoding("utf-8") if "".respond_to?(:force_encoding)
-     string.should == expected
- 
--    @pdf.font("#{Prawn::BASEDIR}/data/fonts/DejaVuSans.ttf")
-+    @pdf.font("#{Prawn::DATADIR}/fonts/DejaVuSans.ttf")
-     @line_wrap = Prawn::Core::Text::Formatted::LineWrap.new
- 
-     string = "hello#{Prawn::Text::SHY}world"
-@@ -137,7 +137,7 @@
-                                   :document => @pdf)
-     string.should == "helloworld"
- 
--    @pdf.font("#{Prawn::BASEDIR}/data/fonts/DejaVuSans.ttf")
-+    @pdf.font("#{Prawn::DATADIR}/fonts/DejaVuSans.ttf")
-     @line_wrap = Prawn::Core::Text::Formatted::LineWrap.new
- 
-     string = "hello#{Prawn::Text::SHY}world"
-@@ -166,7 +166,7 @@
-                                   :document => @pdf)
-     string.should == "hello"
- 
--    @pdf.font("#{Prawn::BASEDIR}/data/fonts/DejaVuSans.ttf")
-+    @pdf.font("#{Prawn::DATADIR}/fonts/DejaVuSans.ttf")
-     @line_wrap = Prawn::Core::Text::Formatted::LineWrap.new
-     enough_width_for_hello_world = 68
- 
-@@ -205,7 +205,7 @@
-     expected.force_encoding("utf-8") if "".respond_to?(:force_encoding)
-     string.should == expected
- 
--    @pdf.font("#{Prawn::BASEDIR}/data/fonts/DejaVuSans.ttf")
-+    @pdf.font("#{Prawn::DATADIR}/fonts/DejaVuSans.ttf")
-     @line_wrap = Prawn::Core::Text::Formatted::LineWrap.new
- 
-     string = "hello#{Prawn::Text::SHY}-"
---- a/spec/text_spec.rb
-+++ b/spec/text_spec.rb
-@@ -259,7 +259,7 @@
-   
-   it "should not raise an exception when providing Pathname instance as font" do
-     lambda {
--      @pdf.font Pathname.new("#{Prawn::BASEDIR}/data/fonts/comicsans.ttf")
-+      @pdf.font Pathname.new("#{Prawn::DATADIR}/fonts/comicsans.ttf")
-     }.should.not.raise(Prawn::Errors::UnknownFont)
-   end
- 
-@@ -274,7 +274,7 @@
- 
-   it "should correctly render a utf-8 string when using a TTF font" do
-     str = "©" # copyright symbol
--    @pdf.font "#{Prawn::BASEDIR}/data/fonts/DejaVuSans.ttf"
-+    @pdf.font "#{Prawn::DATADIR}/fonts/DejaVuSans.ttf"
-     @pdf.text str
- 
-     # grab the text from the rendered PDF and ensure it matches
-@@ -315,9 +315,9 @@
-         Prawn::Errors::IncompatibleStringEncoding)
-     end
-     it "should not raise an exception when a shift-jis string is rendered" do
--      datafile = "#{Prawn::BASEDIR}/data/shift_jis_text.txt"
-+      datafile = "#{Prawn::DATADIR}/shift_jis_text.txt"
-       sjis_str = File.open(datafile, "r:shift_jis") { |f| f.gets }
--      @pdf.font("#{Prawn::BASEDIR}/data/fonts/gkai00mp.ttf")
-+      @pdf.font("#{Prawn::DATADIR}/fonts/gkai00mp.ttf")
-       lambda { @pdf.text sjis_str }.should.not.raise(
-         Prawn::Errors::IncompatibleStringEncoding)
-     end
-@@ -329,7 +329,7 @@
-         Prawn::Errors::IncompatibleStringEncoding)
-     end
-     it "should raise an exception when a shift-jis string is rendered" do
--      sjis_str = File.read("#{Prawn::BASEDIR}/data/shift_jis_text.txt")
-+      sjis_str = File.read("#{Prawn::DATADIR}/shift_jis_text.txt")
-       lambda { @pdf.text sjis_str }.should.raise(
-         Prawn::Errors::IncompatibleStringEncoding)
-     end
---- a/spec/document_spec.rb
-+++ b/spec/document_spec.rb
-@@ -89,7 +89,7 @@
- 
-   describe "Background template feature" do
-     before(:each) do
--      @filename = "#{Prawn::BASEDIR}/data/images/pigs.jpg"
-+      @filename = "#{Prawn::DATADIR}/images/pigs.jpg"
-       @pdf = Prawn::Document.new(:background => @filename)
-     end
-     it "should place a background image if it is in options block" do
-@@ -235,7 +235,7 @@
-     doc_uncompressed = Prawn::Document.new
-     doc_compressed   = Prawn::Document.new(:compress => true)
-     [doc_compressed, doc_uncompressed].each do |pdf|
--       pdf.font "#{Prawn::BASEDIR}/data/fonts/gkai00mp.ttf"
-+       pdf.font "#{Prawn::DATADIR}/fonts/gkai00mp.ttf"
-        pdf.text "更可怕的是,同质化竞争对手可以按照URL中后面这个ID来遍历" * 10
-     end
- 
 --- a/lib/prawn/core.rb
 +++ b/lib/prawn/core.rb
-@@ -17,7 +17,11 @@
-                           
+@@ -18,8 +18,10 @@
    # The base source directory for Prawn as installed on the system
    #
--  BASEDIR = File.expand_path(File.join(dir, '..', '..'))
-+  # 
+   # 
+-  BASEDIR = File.expand_path(File.join(dir, '..','..'))
+-  DATADIR = File.expand_path(File.join(dir, '..', '..', 'data'))
 +  BASEDIR = File.expand_path(File.join(dir, '..'))
 +  # Definition of a data directory that may be not in BASEDIR/data (Debian patch)
 +  # /usr/lib/ruby/vendor_ruby/prawn -> /usr/share/ruby-prawn/
@@ -759,14 +17,3 @@ Bug: https://github.com/sandal/prawn/pull/299
  
    # Whe set to true, Prawn will verify hash options to ensure only valid keys
    # are used.  Off by default.
---- a/lib/prawn/encoding.rb
-+++ b/lib/prawn/encoding.rb
-@@ -84,7 +84,7 @@
-       ]    
-       
-       def initialize
--        @mapping_file = "#{Prawn::BASEDIR}/data/encodings/win_ansi.txt"
-+        @mapping_file = "#{Prawn::DATADIR}/encodings/win_ansi.txt"
-         load_mapping if self.class.mapping.empty?
-       end
- 
diff --git a/debian/patches/0205_replace_BASEDIR_data_by_DATADIR_manual.patch b/debian/patches/0205_replace_BASEDIR_data_by_DATADIR_manual.patch
index c2ac363..2e459ff 100644
--- a/debian/patches/0205_replace_BASEDIR_data_by_DATADIR_manual.patch
+++ b/debian/patches/0205_replace_BASEDIR_data_by_DATADIR_manual.patch
@@ -5,7 +5,7 @@ Description: define Prawn::DATADIR as the name of the directory containing data
  directory, and change its name just once.
  The code producing the manual is patched to make use of this new
  constant instead of the hardcoded path
-Author: Cédric Boutillier <cedric.boutillier at gmail.com>
+Author: Cédric Boutillier <boutil at debian.org>
 Last-Update: 2011-11-15
 Bug: https://github.com/sandal/prawn/pull/299
 Bug: https://github.com/sandal/prawn/pull/299
diff --git a/debian/patches/0210_change_spec_data_to_datadir_pdfs.patch b/debian/patches/0210_change_spec_data_to_datadir_pdfs.patch
index 0955cb6..786e80e 100644
--- a/debian/patches/0210_change_spec_data_to_datadir_pdfs.patch
+++ b/debian/patches/0210_change_spec_data_to_datadir_pdfs.patch
@@ -3,8 +3,8 @@ Description: reflect the fact that spec/data moved to data/spec
  library installed in debian/ruby-prawn/, these files are moved to data/spec, so
  that they can be installed too (see debian/ruby-prawn.install).
  The code of the specs has to be modified to find correctly the files which moved away.
-Author: Cédric Boutillier <cedric.boutillier at gmail.com>
-Last-Update: 2011-11-15
+Author: Cédric Boutillier <boutil at debian.org>
+Last-Update: 2013-06-22
 
 --- a/spec/object_store_spec.rb
 +++ b/spec/object_store_spec.rb
@@ -43,8 +43,8 @@ Last-Update: 2011-11-15
      @pdf = Prawn::Document.new(:template => filename)
      page_counter = PDF::Inspector::Page.analyze(@pdf.render)
  
-@@ -10,14 +10,14 @@
-   end
+@@ -17,14 +17,14 @@
+ 
  
    it "should have start with the Y cursor at the top of the document" do
 -    filename = "#{Prawn::BASEDIR}/spec/data/curves.pdf"
@@ -59,8 +59,8 @@ Last-Update: 2011-11-15
 +    filename = "#{Prawn::DATADIR}/spec/curves.pdf"
  
      @pdf = Prawn::Document.new(:template => filename, :margin => 0)
-     assert_equal @pdf.page.margins, { :left   => 0,
-@@ -44,7 +44,7 @@
+     @pdf.page.margins.should == { :left   => 0,
+@@ -51,7 +51,7 @@
    end
  
    it "should not add an extra restore_graphics_state operator to the end of any content stream" do
@@ -69,12 +69,3 @@ Last-Update: 2011-11-15
  
      @pdf = Prawn::Document.new(:template => filename)
      output = StringIO.new(@pdf.render)
-@@ -165,7 +165,7 @@
- end
- 
- describe "Document#start_new_page with :template option" do
--  filename = "#{Prawn::BASEDIR}/spec/data/curves.pdf"
-+  filename = "#{Prawn::DATADIR}/spec/curves.pdf"
-   
-   it "should set the imported page's parent to the document pages catalog" do
-     @pdf = Prawn::Document.new()
diff --git a/debian/patches/0300_fix_paths.patch b/debian/patches/0300_fix_paths.patch
index 7c370b2..43f057c 100644
--- a/debian/patches/0300_fix_paths.patch
+++ b/debian/patches/0300_fix_paths.patch
@@ -1,17 +1,17 @@
 Description: fix fonts path to use only prawn's fonts directory
-Author: Cédric Boutillier <cedric.boutillier at gmail.com>
-Last-Update: 2011-11-15
+Author: Cédric Boutillier <boutil at debian.org>
+Last-Update: 2013-06-22
 
 --- a/lib/prawn/font/afm.rb
 +++ b/lib/prawn/font/afm.rb
-@@ -25,9 +25,7 @@
+@@ -26,9 +26,7 @@
            @metrics_path ||= m.split(':')
          else
            @metrics_path ||= [
 -            ".", "/usr/lib/afm",
 -            "/usr/local/lib/afm",
--            "/usr/openwin/lib/fonts/afm/",
+-            "/usr/openwin/lib/fonts/afm",
 +            # use Prawn's font directories (Debian patch)
-              Prawn::DATADIR+'/fonts/']
+              Prawn::DATADIR+'/fonts']
          end
        end
diff --git a/debian/patches/0400_use_system_fonts.patch b/debian/patches/0400_use_system_fonts.patch
index 28c5806..c5c332d 100644
--- a/debian/patches/0400_use_system_fonts.patch
+++ b/debian/patches/0400_use_system_fonts.patch
@@ -2,8 +2,8 @@ Description: use system fonts when possible
  Upstream ships embedded copies of several truetype fonts. Some of them are
  available in Debian. These copies have been removed from the Debian source
  package, and system fonts are used instead. 
-Author: Cédric Boutillier <cedric.boutillier at gmail.com>
-Last-Update: 2011-11-21
+Author: Cédric Boutillier <boutil at debian.org>
+Last-Update: 2013-06-22
 
 --- a/spec/line_wrap_spec.rb
 +++ b/spec/line_wrap_spec.rb
@@ -63,20 +63,20 @@ Last-Update: 2011-11-21
      string = "hello#{Prawn::Text::SHY}-"
 --- a/spec/text_spec.rb
 +++ b/spec/text_spec.rb
-@@ -257,9 +257,11 @@
-     lambda { @pdf.font "Pao bu" }.should.raise(Prawn::Errors::UnknownFont)
+@@ -261,9 +261,11 @@
+     lambda { @pdf.font "Pao bu" }.should raise_error(Prawn::Errors::UnknownFont)
    end
    
 +  # replace non-free comicsans.ttf by system DejaVuSans.ttf (Debian patch)
-   it "should not raise an exception when providing Pathname instance as font" do
+   it "should_not raise_error an exception when providing Pathname instance as font" do
      lambda {
 -      @pdf.font Pathname.new("#{Prawn::DATADIR}/fonts/comicsans.ttf")
 +      # @pdf.font Pathname.new("#{Prawn::DATADIR}/fonts/comicsans.ttf")
 +      @pdf.font Pathname.new("/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf")
-     }.should.not.raise(Prawn::Errors::UnknownFont)
+     }.should_not raise_error(Prawn::Errors::UnknownFont)
    end
  
-@@ -274,7 +276,7 @@
+@@ -278,7 +280,7 @@
  
    it "should correctly render a utf-8 string when using a TTF font" do
      str = "©" # copyright symbol
@@ -85,13 +85,13 @@ Last-Update: 2011-11-21
      @pdf.text str
  
      # grab the text from the rendered PDF and ensure it matches
-@@ -317,7 +319,7 @@
-     it "should not raise an exception when a shift-jis string is rendered" do
+@@ -321,7 +323,7 @@
+     it "should_not raise_error an exception when a shift-jis string is rendered" do
        datafile = "#{Prawn::DATADIR}/shift_jis_text.txt"
        sjis_str = File.open(datafile, "r:shift_jis") { |f| f.gets }
 -      @pdf.font("#{Prawn::DATADIR}/fonts/gkai00mp.ttf")
 +      @pdf.font("/usr/share/fonts/truetype/arphic-gkai00mp/gkai00mp.ttf")
-       lambda { @pdf.text sjis_str }.should.not.raise(
+       lambda { @pdf.text sjis_str }.should_not raise_error(
          Prawn::Errors::IncompatibleStringEncoding)
      end
 --- a/spec/text_spacing_spec.rb
@@ -108,7 +108,7 @@ Last-Update: 2011-11-21
 --- a/spec/formatted_text_box_spec.rb
 +++ b/spec/formatted_text_box_spec.rb
 @@ -21,7 +21,7 @@
-   it "should not raise Encoding::CompatibilityError when keeping a TTF and an " +
+   it "should_not raise_error Encoding::CompatibilityError when keeping a TTF and an " +
      "AFM font together" do
      ruby_19 do
 -      file = "#{Prawn::DATADIR}/fonts/gkai00mp.ttf"
@@ -163,7 +163,7 @@ Last-Update: 2011-11-21
  
      @pdf.width_of("\nhello world\n").should ==
        @pdf.width_of("hello world")
-@@ -253,15 +253,19 @@
+@@ -269,15 +269,19 @@
    end
  
    it "should return true when present in a TTF font" do
@@ -171,7 +171,7 @@ Last-Update: 2011-11-21
 +    # replace non-free Activa.ttf by system DejaVuSans.ttf (Debian patch)
 +    # font = @pdf.find_font("#{Prawn::DATADIR}/fonts/Activa.ttf")
 +    font = @pdf.find_font("/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf")
-     font.glyph_present?("H").should.be true
+     font.glyph_present?("H").should be_true
    end
  
    it "should return false when absent in a TTF font" do
@@ -179,16 +179,16 @@ Last-Update: 2011-11-21
 +    # replace non-free Activa.ttf by system DejaVuSans.ttf (Debian patch)
 +    # font = @pdf.find_font("#{Prawn::DATADIR}/fonts/Activa.ttf")
 +    font = @pdf.find_font("/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf")
-     font.glyph_present?("再").should.be false
+     font.glyph_present?("再").should be_false
  
 -    font = @pdf.find_font("#{Prawn::DATADIR}/fonts/gkai00mp.ttf")
 +    font = @pdf.find_font("/usr/share/fonts/truetype/arphic-gkai00mp/gkai00mp.ttf")
-     font.glyph_present?("€").should.be false
+     font.glyph_present?("€").should be_false
    end
  end
-@@ -270,7 +274,9 @@
+@@ -286,7 +290,9 @@
    
-   setup do
+   before do
      create_pdf
 -    @activa = @pdf.find_font "#{Prawn::DATADIR}/fonts/Activa.ttf"
 +    # replace non-free Activa.ttf by system DejaVuSans.ttf (Debian patch)
@@ -197,7 +197,7 @@ Last-Update: 2011-11-21
    end
    
    it "should calculate string width taking into account accented characters" do
-@@ -336,7 +342,7 @@
+@@ -354,7 +360,7 @@
      it "should allow TTF fonts to be used alongside document transactions" do
        lambda {
          Prawn::Document.new do
@@ -206,7 +206,7 @@ Last-Update: 2011-11-21
            text "Hi there"
            transaction { text "Nice, thank you" }
          end
-@@ -346,7 +352,7 @@
+@@ -364,7 +370,7 @@
      it "should allow TTF fonts to be used inside transactions" do
        pdf = Prawn::Document.new do
          transaction do
@@ -215,7 +215,7 @@ Last-Update: 2011-11-21
            text "Hi there"
          end
        end
-@@ -403,7 +409,7 @@
+@@ -421,7 +427,7 @@
  describe "#character_count(text)" do
    it "should work on TTF fonts" do
      create_pdf
@@ -235,7 +235,7 @@ Last-Update: 2011-11-21
        @pdf.text "写个小"
      end
      text = PDF::Inspector::Text.analyze(@pdf.render)
-@@ -800,7 +800,7 @@
+@@ -831,7 +831,7 @@
        :height => 162.0,
        :document => @pdf
      }
@@ -244,20 +244,9 @@ Last-Update: 2011-11-21
      @options[:overflow] = :truncate
      text_box = Prawn::Text::Box.new(@text, @options)
      text_box.render
---- a/spec/text_at_spec.rb
-+++ b/spec/text_at_spec.rb
-@@ -109,7 +109,7 @@
-     it "should not raise an exception when a shift-jis string is rendered" do
-       datafile = "#{Prawn::DATADIR}/shift_jis_text.txt"
-       sjis_str = File.open(datafile, "r:shift_jis") { |f| f.gets }
--      @pdf.font("#{Prawn::DATADIR}/fonts/gkai00mp.ttf")
-+      @pdf.font("/usr/share/fonts/truetype/arphic-gkai00mp/gkai00mp.ttf")
-       lambda { @pdf.draw_text(sjis_str, :at => [0, 0]) }.should.not.raise(
-         Prawn::Errors::IncompatibleStringEncoding)
-     end
 --- a/spec/template_spec.rb
 +++ b/spec/template_spec.rb
-@@ -141,7 +141,9 @@
+@@ -148,7 +148,9 @@
    it "should correctly add a TTF font to a template that has existing fonts" do
      filename = "#{Prawn::DATADIR}/pdfs/contains_ttf_font.pdf"
      @pdf = Prawn::Document.new(:template => filename)
@@ -268,7 +257,7 @@ Last-Update: 2011-11-21
      @pdf.move_down(40)
      @pdf.text "Hi There"
  
-@@ -270,7 +272,9 @@
+@@ -300,7 +302,9 @@
      filename = "#{Prawn::DATADIR}/pdfs/contains_ttf_font.pdf"
      @pdf = Prawn::Document.new()
      @pdf.start_new_page(:template => filename)
@@ -290,3 +279,14 @@ Last-Update: 2011-11-21
         pdf.text "更可怕的是,同质化竞争对手可以按照URL中后面这个ID来遍历" * 10
      end
  
+--- a/spec/text_at_spec.rb
++++ b/spec/text_at_spec.rb
+@@ -109,7 +109,7 @@
+     it "should_not raise_error an exception when a shift-jis string is rendered" do
+       datafile = "#{Prawn::DATADIR}/shift_jis_text.txt"
+       sjis_str = File.open(datafile, "r:shift_jis") { |f| f.gets }
+-      @pdf.font("#{Prawn::DATADIR}/fonts/gkai00mp.ttf")
++      @pdf.font("/usr/share/fonts/truetype/arphic-gkai00mp/gkai00mp.ttf")
+       lambda { @pdf.draw_text(sjis_str, :at => [0, 0]) }.should_not raise_error(
+         Prawn::Errors::IncompatibleStringEncoding)
+     end
diff --git a/debian/patches/0405_use_system_fonts_manual.patch b/debian/patches/0405_use_system_fonts_manual.patch
index 808b8d7..67f3b25 100644
--- a/debian/patches/0405_use_system_fonts_manual.patch
+++ b/debian/patches/0405_use_system_fonts_manual.patch
@@ -2,16 +2,16 @@ Description: use system fonts when possible
  Upstream ships embedded copies of several truetype fonts. Some are available in Debian.
  These copies have been removed from the Debian source package, and system
  fonts are used instead.
-Author: Cédric Boutillier <cedric.boutillier at gmail.com>
-Last-Update: 2011-11-21
+Author: Cédric Boutillier <boutil at debian.org>
+Last-Update: 2013-06-22
 
 --- a/manual/text/single_usage.rb
 +++ b/manual/text/single_usage.rb
-@@ -17,19 +17,21 @@
+@@ -19,19 +19,21 @@
  filename = File.basename(__FILE__).gsub('.rb', '.pdf')
  Prawn::Example.generate(filename) do
    # Using a TTF font file
--  font "#{Prawn::DATADIR}/fonts/Chalkboard.ttf" do
+-  font("#{Prawn::DATADIR}/fonts/Chalkboard.ttf") do
 -    text "Written with the Chalkboard TTF font."
 +  # Debian: non-free Chalkboard replaced by system DejaVuSans"
 +  font "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf" do
@@ -23,13 +23,13 @@ Last-Update: 2011-11-21
    move_down 20
    
 -  # Using an DFONT font file
--  font "#{Prawn::DATADIR}/fonts/Action Man.dfont" do
+-  font("#{Prawn::DATADIR}/fonts/Action Man.dfont") do
 -    text "Written with the Action Man DFONT font"
 -  end
 -  move_down 20
 +# # Using an DFONT font file
 +# # Debian: deactivated, because using non-free font removed from the Debian package
-+# font "#{Prawn::DATADIR}/fonts/Action Man.dfont" do
++# font("#{Prawn::DATADIR}/fonts/Action Man.dfont") do
 +#   text "Written with the Action Man DFONT font"
 +# end
 +# move_down 20
@@ -50,7 +50,7 @@ Last-Update: 2011-11-21
 --- a/manual/text/line_wrapping.rb
 +++ b/manual/text/line_wrapping.rb
 @@ -29,7 +29,7 @@
-     "nearer your destination the more you're slip#{nbsp}sliding away."
+        "nearer your destination the more you're slip#{nbsp}sliding away."
    move_down 20
  
 -  font("#{Prawn::DATADIR}/fonts/gkai00mp.ttf", :size => 16) do
@@ -58,17 +58,29 @@ Last-Update: 2011-11-21
      long_text = "No word boundaries:\n更可怕的是,同质化竞争对手可以按照URL中后面这个ID来遍历您的DB中的内容,写个小爬虫把你的页面上的关键信息顺次爬下来也不是什么难事,这样的话,你就非常被动了。更可怕的是,同质化竞争对手可以按照URL中后面这个ID来遍历您的DB中的内容,写个小爬虫把你的页面上的关键信息顺次爬下来也不是什么难事,这样的话,你就非常被动了。"
      text long_text
      move_down 20
+--- a/manual/text/right_to_left_text.rb
++++ b/manual/text/right_to_left_text.rb
+@@ -17,7 +17,7 @@
+   # set the direction document-wide
+   self.text_direction = :rtl
+ 
+-  font("#{Prawn::DATADIR}/fonts/gkai00mp.ttf", :size => 16) do
++  font("/usr/share/fonts/truetype/arphic-gkai00mp/gkai00mp.ttf", :size => 16) do
+     long_text = "写个小爬虫把你的页面上的关键信息顺次爬下来也不是什么难事写个小爬虫把你的页面上的关键信息顺次爬下来也不是什么难事写个小爬虫把你的页面上的关键信息顺次爬下来也不是什么难事写个小"
+     text long_text
+     move_down 20
 --- a/manual/example_helper.rb
 +++ b/manual/example_helper.rb
-@@ -143,11 +143,11 @@
-   
-       text(extract_introduction_text(data), :inline_format => true)
- 
+@@ -172,12 +172,12 @@
+     # Register fonts used on the manual
+     #
+     def register_fonts
 -      kai_file = "#{Prawn::DATADIR}/fonts/gkai00mp.ttf"
 +      kai_file = "/usr/share/fonts/truetype/arphic-gkai00mp/gkai00mp.ttf"
        font_families["Kai"] = {
          :normal => { :file => kai_file, :font => "Kai" }
        }
+ 
 -      dejavu_file = "#{Prawn::DATADIR}/fonts/DejaVuSans.ttf"
 +      dejavu_file = "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf"
        font_families["DejaVu"] = {
@@ -76,13 +88,12 @@ Last-Update: 2011-11-21
        }
 --- a/manual/text/fallback_fonts.rb
 +++ b/manual/text/fallback_fonts.rb
-@@ -4,32 +4,35 @@
- # be present in the desired font. Use the :fallback_fonts option with any of the
- # text or text box methods, or set fallback_fonts document-wide.
+@@ -4,34 +4,36 @@
+ # be present in the desired font. Use the <code>:fallback_fonts</code> option
+ # with any of the text or text box methods, or set fallback_fonts document-wide.
  #
 +# The result of this example is not included because requires non-free fonts,
 +# removed from the Debian package.
-+
  require File.expand_path(File.join(File.dirname(__FILE__),
                                     %w[.. example_helper]))
  
@@ -92,69 +103,61 @@ Last-Update: 2011-11-21
 -  font_families["Kai"] = {
 -    :normal => { :file => file, :font => "Kai" }
 -  }
+-  
 -  file = "#{Prawn::DATADIR}/fonts/Action Man.dfont"
 -  font_families["Action Man"] = {
--    :normal      => { :file => file, :font => "ActionMan" },
+-    :normal => { :file => file, :font => "ActionMan" },
 -  }
+-  
 -  font("Action Man") do
--    text("When fallback fonts are included, each glyph will be rendered using " +
--         "the first font that includes the glyph, starting with the current " +
--         "font and then moving through the fallback fonts from left to right." +
+-    text("When fallback fonts are included, each glyph will be rendered " +
+-         "using the first font that includes the glyph, starting with the " +
+-         "current font and then moving through the fallback fonts from left " +
+-         "to right." +
 -         "\n\n" +
 -         "hello ƒ 你好\n再见 ƒ goodbye",
 -         :fallback_fonts => ["Times-Roman", "Kai"])
 -  end
 -  move_down 20
--
--  formatted_text([
--                  { :text => "Fallback fonts can even override" },
--                  { :text => "fragment fonts (你好)", :font => "Times-Roman" },
++# file = "#{Prawn::DATADIR}/fonts/gkai00mp.ttf"
++# font_families["Kai"] = {
++#   :normal => { :file => file, :font => "Kai" }
++# }
++# 
++# file = "#{Prawn::DATADIR}/fonts/Action Man.dfont"
++# font_families["Action Man"] = {
++#   :normal => { :file => file, :font => "ActionMan" },
++# }
++# 
++# font("Action Man") do
++#   text("When fallback fonts are included, each glyph will be rendered " +
++#        "using the first font that includes the glyph, starting with the " +
++#        "current font and then moving through the fallback fonts from left " +
++#        "to right." +
++#        "\n\n" +
++#        "hello ƒ 你好\n再见 ƒ goodbye",
++#        :fallback_fonts => ["Times-Roman", "Kai"])
++# end
++# move_down 20
+ 
+-  formatted_text([ { :text => "Fallback fonts can even override" },
+-                   { :text => "fragment fonts (你好)", :font => "Times-Roman" },
 -                 ],
 -                 :fallback_fonts => ["Times-Roman", "Kai"])
-+#  file = "usr/share/fonts/truetype/arphic-gkai00mp/gkai00mp.ttf"
-+#  font_families["Kai"] = {
-+#    :normal => { :file => file, :font => "Kai" }
-+#  }
-+#  file = "#{Prawn::DATADIR}/fonts/Action Man.dfont"
-+#  font_families["Action Man"] = {
-+#    :normal      => { :file => file, :font => "ActionMan" },
-+#  }
-+#  font("Action Man") do
-+#    text("When fallback fonts are included, each glyph will be rendered using " +
-+#         "the first font that includes the glyph, starting with the current " +
-+#         "font and then moving through the fallback fonts from left to right." +
-+#         "\n\n" +
-+#         "hello ƒ 你好\n再见 ƒ goodbye",
-+#         :fallback_fonts => ["Times-Roman", "Kai"])
-+#  end
-+#  move_down 20
-+#
-+#  formatted_text([
-+#                  { :text => "Fallback fonts can even override" },
++# formatted_text([ { :text => "Fallback fonts can even override" },
 +#                  { :text => "fragment fonts (你好)", :font => "Times-Roman" },
-+#                 ],
-+#                 :fallback_fonts => ["Times-Roman", "Kai"])
++#                ],
++#                :fallback_fonts => ["Times-Roman", "Kai"])
  end
---- a/manual/text/right_to_left_text.rb
-+++ b/manual/text/right_to_left_text.rb
-@@ -16,7 +16,7 @@
-   # set the direction document-wide
-   self.text_direction = :rtl
- 
--  font("#{Prawn::DATADIR}/fonts/gkai00mp.ttf", :size => 16) do
-+  font("/usr/share/fonts/truetype/arphic-gkai00mp/gkai00mp.ttf", :size => 16) do
-     long_text = "写个小爬虫把你的页面上的关键信息顺次爬下来也不是什么难事写个小爬虫把你的页面上的关键信息顺次爬下来也不是什么难事写个小爬虫把你的页面上的关键信息顺次爬下来也不是什么难事写个小"
-     text long_text
-     move_down 20
 --- a/manual/text/registering_families.rb
 +++ b/manual/text/registering_families.rb
-@@ -8,43 +8,46 @@
+@@ -8,41 +8,44 @@
  # To register a font family update the <code>font_families</code>
  # hash with the font path for each style you want to use.
  #
 +# The result of this example is not included because requires non-free fonts,
 +# removed from the Debian package.
-+
++#
  require File.expand_path(File.join(File.dirname(__FILE__),
                                     %w[.. example_helper]))
  
@@ -192,40 +195,36 @@ Last-Update: 2011-11-21
 -         :style => style
 -    move_down 10
 -  end
--  
--  font "Helvetica"  # Back to normal
-+#  # Registering a single TTF font
-+#  font_families.update("Chalkboard" => {
-+#    :normal => "#{Prawn::DATADIR}/fonts/Chalkboard.ttf"
-+#  })
-+#
-+#  font("Chalkboard") do
-+#    text "Using the Chalkboard font providing only its name to the font method"
-+#  end
-+#  move_down 20
-+#
-+#  # Registering a DFONT package
-+#  font_path = "#{Prawn::DATADIR}/fonts/Action Man.dfont"
-+#  font_families.update("Action Man" => {
-+#    :normal      => { :file => font_path, :font => "ActionMan" },
-+#    :italic      => { :file => font_path, :font => "ActionMan-Italic" },
-+#    :bold        => { :file => font_path, :font => "ActionMan-Bold" },
-+#    :bold_italic => { :file => font_path, :font => "ActionMan-BoldItalic" }
-+#  })
-+#
-+#  font "Action Man"
-+#  text "Also using the Action Man by providing only its name"
-+#  move_down 20
-+#
-+#  text "Taking <b>advantage</b> of the <i>inline formatting</i>",
-+#       :inline_format => true
-+#  move_down 20
-+#
-+#  [:bold, :bold_italic, :italic, :normal].each do |style|
-+#    text "Using the #{style} style option.",
-+#         :style => style
-+#    move_down 10
-+#  end
-+#
-+#  font "Helvetica"  # Back to normal
++# # Registering a single TTF font
++# font_families.update("Chalkboard" => {
++#   :normal => "#{Prawn::DATADIR}/fonts/Chalkboard.ttf"
++# })
++# 
++# font("Chalkboard") do
++#   text "Using the Chalkboard font providing only its name to the font method"
++# end
++# move_down 20
++# 
++# # Registering a DFONT package
++# font_path = "#{Prawn::DATADIR}/fonts/Action Man.dfont"
++# font_families.update("Action Man" => {
++#   :normal      => { :file => font_path, :font => "ActionMan" },
++#   :italic      => { :file => font_path, :font => "ActionMan-Italic" },
++#   :bold        => { :file => font_path, :font => "ActionMan-Bold" },
++#   :bold_italic => { :file => font_path, :font => "ActionMan-BoldItalic" }
++# })
++# 
++# font "Action Man"
++# text "Also using the Action Man by providing only its name"
++# move_down 20
++# 
++# text "Taking <b>advantage</b> of the <i>inline formatting</i>",
++#      :inline_format => true
++# move_down 20
++# 
++# [:bold, :bold_italic, :italic, :normal].each do |style|
++#   text "Using the #{style} style option.",
++#        :style => style
++#   move_down 10
++# end
  end
diff --git a/debian/patches/0500_disable_tests_using_removed_files.patch b/debian/patches/0500_disable_tests_using_removed_files.patch
index 6efe81e..5c822ea 100644
--- a/debian/patches/0500_disable_tests_using_removed_files.patch
+++ b/debian/patches/0500_disable_tests_using_removed_files.patch
@@ -2,8 +2,8 @@ Description: disable some specs after removal of some files from the source pack
  Some specs are using for the moment images with unclear license and/or
  non-free fonts. These are disabled because they cannot be run since these
  files have been removed from the Debian source package.
-Author: Cédric Boutillier <cedric.boutillier at gmail.com>
-Last-Update: 2011-11-21
+Author: Cédric Boutillier <boutil at debian.org>
+Last-Update: 2013-06-22
 
 --- a/spec/font_spec.rb
 +++ b/spec/font_spec.rb
@@ -17,7 +17,7 @@ Last-Update: 2011-11-21
      file = "#{Prawn::DATADIR}/fonts/Action Man.dfont"
      @pdf.font_families["Action Man"] = {
        :normal      => { :file => file, :font => "ActionMan" },
-@@ -283,7 +284,8 @@
+@@ -299,7 +300,8 @@
      @activa.compute_width_of("é", :size => 12).should == @activa.compute_width_of("e", :size => 12)
    end
    
@@ -27,7 +27,7 @@ Last-Update: 2011-11-21
      @activa.compute_width_of("To", :size => 12).should == 15.228
      @activa.compute_width_of("To", :size => 12, :kerning => true).should == 12.996
    end
-@@ -300,7 +302,8 @@
+@@ -318,7 +320,8 @@
      @activa.encode_text("Teχnology...").should == [[0, "Te"], [1, "!"], [0, "nology..."]]
    end
  
@@ -37,7 +37,7 @@ Last-Update: 2011-11-21
      @activa.encode_text("To", :kerning => true).should == [[0, ["T", 186.0, "o"]]]
      @activa.encode_text("To", :kerning => true).should == [[0, ["T", 186.0, "o"]]]
      @activa.encode_text("Technology", :kerning => true).should == [[0, ["T", 186.0, "echnology"]]]
-@@ -308,7 +311,8 @@
+@@ -326,7 +329,8 @@
      @activa.encode_text("Teχnology...", :kerning => true).should == [[0, ["T", 186.0, "e"]], [1, "!"], [0, ["nology", 88.0, "..."]]]
    end
  
@@ -47,7 +47,7 @@ Last-Update: 2011-11-21
      # These metrics are relative to the font's own bbox. They should not be
      # scaled with font size.
      ref = @pdf.ref!({})
-@@ -373,31 +377,37 @@
+@@ -391,31 +395,37 @@
      @file = "#{Prawn::DATADIR}/fonts/Action Man.dfont"
    end
  
@@ -90,10 +90,10 @@ Last-Update: 2011-11-21
 +  xit "should cache font object based on selected font" do
      f1 = @pdf.find_font(@file, :font => "ActionMan")
      f2 = @pdf.find_font(@file, :font => "ActionMan-Bold")
-     assert_not_equal f1.object_id, f2.object_id
+     f2.object_id.should_not == f1.object_id
 --- a/spec/text_box_spec.rb
 +++ b/spec/text_box_spec.rb
-@@ -627,12 +627,12 @@
+@@ -658,12 +658,12 @@
      @text_box = Prawn::Text::Box.new(@text, options)
    end
    describe "when using a TTF font" do
@@ -121,31 +121,27 @@ Last-Update: 2011-11-21
      
 --- a/spec/images_spec.rb
 +++ b/spec/images_spec.rb
-@@ -43,17 +43,20 @@
-     info.height.should == 453
+@@ -52,16 +52,19 @@
    end
  
--  it "should raise an UnsupportedImageType if passed a BMP" do
-+  # spec disabled since tru256.bmp removed from source package (Debian patch)
-+  xit "should raise an UnsupportedImageType if passed a BMP" do
+   it "should raise_error an UnsupportedImageType if passed a BMP" do
++    pending "spec disabled since tru256.bmp removed from source package (Debian patch)"
      filename = "#{Prawn::DATADIR}/images/tru256.bmp"
-     lambda { @pdf.image filename, :at => [100,100] }.should.raise(Prawn::Errors::UnsupportedImageType)
+     lambda { @pdf.image filename, :at => [100,100] }.should raise_error(Prawn::Errors::UnsupportedImageType)
    end
  
--  it "should raise an UnsupportedImageType if passed an interlaced PNG" do
-+  # spec disabled since dice_interlaced.png removed from source package (Debian patch)
-+  xit "should raise an UnsupportedImageType if passed an interlaced PNG" do
+   it "should raise_error an UnsupportedImageType if passed an interlaced PNG" do
++    pending "spec disabled since dice_interlaced.png removed from source package (Debian patch)"
      filename = "#{Prawn::DATADIR}/images/dice_interlaced.png"
-     lambda { @pdf.image filename, :at => [100,100] }.should.raise(Prawn::Errors::UnsupportedImageType)
+     lambda { @pdf.image filename, :at => [100,100] }.should raise_error(Prawn::Errors::UnsupportedImageType)
    end
  
--  it "should bump PDF version to 1.5 or greater on embedding 16-bit PNGs" do
-+  # spec disabled since 16bit.png removed from source package (Debian patch)
-+  xit "should bump PDF version to 1.5 or greater on embedding 16-bit PNGs" do
+   it "should bump PDF version to 1.5 or greater on embedding 16-bit PNGs" do
++    pending "spec disabled since 16bit.png removed from source package (Debian patch)"
      @pdf.image "#{Prawn::DATADIR}/images/16bit.png"
      @pdf.state.version.should >= 1.5
    end
-@@ -62,7 +65,8 @@
+@@ -70,7 +73,8 @@
    # channels. Verified experimentally [BE] but not confirmed in documentation
    # or anything. OS X Preview handles those files just fine.
    #
@@ -158,13 +154,13 @@ Last-Update: 2011-11-21
 --- a/spec/object_store_spec.rb
 +++ b/spec/object_store_spec.rb
 @@ -46,8 +46,9 @@
-     lambda { Prawn::Core::ObjectStore.new(:template => filename) }.should.raise(ArgumentError)
+     lambda { Prawn::Core::ObjectStore.new(:template => filename) }.should raise_error(ArgumentError)
    end
  
 +  # replace dice.png by pigs.jpg as dice.png has been removed from the source package. (Debian patch)
-   it "should raise Prawn::Errors::TemplateError when given a non PDF as a template" do
+   it "should raise_error Prawn::Errors::TemplateError when given a non PDF as a template" do
 -    filename = "#{Prawn::DATADIR}/images/dice.png"
-+    filename = "#{Prawn::DATADIR}/images/pigs.jpg"
++    filename = "#{Prawn::DATADIR}/images/pigs.png"
  
-     lambda { Prawn::Core::ObjectStore.new(:template => filename) }.should.raise(Prawn::Errors::TemplateError)
+     lambda { Prawn::Core::ObjectStore.new(:template => filename) }.should raise_error(Prawn::Errors::TemplateError)
    end
diff --git a/debian/patches/1002_define_external_encoding_for_manual.patch b/debian/patches/1002_define_external_encoding_for_manual.patch
index 2cbd0b9..3c157dd 100644
--- a/debian/patches/1002_define_external_encoding_for_manual.patch
+++ b/debian/patches/1002_define_external_encoding_for_manual.patch
@@ -1,7 +1,7 @@
 Description: Set default external encoding with Ruby 1.9 for the manual
  This is needed to successfully build the manual on systems with non unicode
  locale
-Author: Cédric Boutillier <cedric.boutillier at gmail.com>
+Author: Cédric Boutillier <boutil at debian.org>
 Bug: https://github.com/prawnpdf/prawn/pull/358
 Last-Update: 2012-06-12
 
diff --git a/debian/patches/series b/debian/patches/series
index 7ab690d..b263fe8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,12 +2,12 @@
 0102_simply_require_ttfunk.patch
 0105_remove_rubygems_loadpath_stuff_manual.patch
 0200_replace_BASEDIR_data_by_DATADIR.patch
-0205_replace_BASEDIR_data_by_DATADIR_manual.patch
+#0205_replace_BASEDIR_data_by_DATADIR_manual.patch
 0210_change_spec_data_to_datadir_pdfs.patch
 0300_fix_paths.patch
 0400_use_system_fonts.patch
 0405_use_system_fonts_manual.patch
 0500_disable_tests_using_removed_files.patch
-0600_add_require_date_table_cell.rb
-1001_fix_encoding_in_font_spec.patch
-1002_define_external_encoding_for_manual.patch
+#0600_add_require_date_table_cell.rb
+#1001_fix_encoding_in_font_spec.patch
+#1002_define_external_encoding_for_manual.patch

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



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