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

Cédric Boutillier boutil at moszumanska.debian.org
Mon Apr 14 23:07:52 UTC 2014


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

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

commit 18eb8c00bf52bf700397798d8ca59d3c866efcd7
Author: Cédric Boutillier <boutil at debian.org>
Date:   Mon Apr 14 23:55:20 2014 +0200

    refresh patches
---
 .../0100_remove_bundler_rubygems_stuff.patch       |  22 ++-
 .../0200_replace_BASEDIR_data_by_DATADIR.patch     |  53 ++++-
 debian/patches/0300_fix_paths.patch                |  10 +-
 debian/patches/0400_use_system_fonts.patch         | 150 ++++----------
 debian/patches/0405_use_system_fonts_manual.patch  | 218 +++------------------
 .../0500_disable_tests_using_removed_files.patch   | 159 +--------------
 debian/patches/series                              |   6 +-
 7 files changed, 134 insertions(+), 484 deletions(-)

diff --git a/debian/patches/0100_remove_bundler_rubygems_stuff.patch b/debian/patches/0100_remove_bundler_rubygems_stuff.patch
index a1aa7d1..986dcee 100644
--- a/debian/patches/0100_remove_bundler_rubygems_stuff.patch
+++ b/debian/patches/0100_remove_bundler_rubygems_stuff.patch
@@ -1,22 +1,24 @@
 Description: remove rubygems and bundler stuff from specs
 Author: Cédric Boutillier <boutil at debian.org>
-Last-Update: 2014-01-16
+Last-Update: 2014-04-14
 
-Index: ruby-prawn/spec/spec_helper.rb
-===================================================================
---- ruby-prawn.orig/spec/spec_helper.rb	2014-01-16 11:58:49.000000000 -0600
-+++ ruby-prawn/spec/spec_helper.rb	2014-01-16 11:59:18.000000000 -0600
-@@ -2,10 +2,10 @@
+--- a/spec/spec_helper.rb
++++ b/spec/spec_helper.rb
+@@ -2,17 +2,6 @@
  
  puts "Prawn specs: Running on Ruby Version: #{RUBY_VERSION}"
  
 -require "bundler"
 -Bundler.setup
-+#require "bundler"
-+#Bundler.setup
- 
+-
+-if ENV["COVERAGE"]
+-  require "simplecov"
+-  SimpleCov.start do
+-    add_filter "/spec/"
+-  end
+-end
+-
 -$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
-+#$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
  require "prawn"
  
  Prawn.debug = true
diff --git a/debian/patches/0200_replace_BASEDIR_data_by_DATADIR.patch b/debian/patches/0200_replace_BASEDIR_data_by_DATADIR.patch
index 65b42e0..bcfa3bd 100644
--- a/debian/patches/0200_replace_BASEDIR_data_by_DATADIR.patch
+++ b/debian/patches/0200_replace_BASEDIR_data_by_DATADIR.patch
@@ -1,12 +1,10 @@
 Description: redefine BASEDIR and DATADIR
 Author: Cédric Boutillier <boutil at debian.org>
-Last-Update: 2014-01-16
+Last-Update: 2014-04-14
 
-Index: ruby-prawn/lib/prawn.rb
-===================================================================
---- ruby-prawn.orig/lib/prawn.rb	2014-01-16 13:04:52.000000000 -0600
-+++ ruby-prawn/lib/prawn.rb	2014-01-16 13:05:29.000000000 -0600
-@@ -32,7 +32,9 @@
+--- a/lib/prawn.rb
++++ b/lib/prawn.rb
+@@ -19,7 +19,9 @@
    #
    #
    BASEDIR = File.expand_path(File.join(dir, '..'))
@@ -14,6 +12,45 @@ Index: ruby-prawn/lib/prawn.rb
 +  # Definition of a data directory that may be not in BASEDIR/data (Debian patch)
 +  # /usr/lib/ruby/vendor_ruby/prawn -> /usr/share/ruby-prawn/
 +  DATADIR = File.expand_path(File.join(dir, '..', '..', '..', 'share', 'ruby-prawn'))
+   
+   FLOAT_PRECISION = 1.0e-9
  
-   # Whe set to true, Prawn will verify hash options to ensure only valid keys
-   # are used.  Off by default.
+--- a/spec/acceptance/png.rb
++++ b/spec/acceptance/png.rb
+@@ -1,11 +1,11 @@
+ require_relative "../../lib/prawn"
+ 
+ images = [
+-      ["Type 0", "#{Prawn::BASEDIR}/data/images/web-links.png"],
+-      ["Type 2", "#{Prawn::BASEDIR}/data/images/ruport.png"],
+-      ["Type 3", "#{Prawn::BASEDIR}/data/images/indexed_color.png"],
+-      ["Type 4", "#{Prawn::BASEDIR}/data/images/page_white_text.png"],
+-      ["Type 6", "#{Prawn::BASEDIR}/data/images/dice.png"],
++      ["Type 0", "#{Prawn::DATADIR}/images/web-links.png"],
++      ["Type 2", "#{Prawn::DATADIR}/images/ruport.png"],
++      ["Type 3", "#{Prawn::DATADIR}/images/indexed_color.png"],
++      ["Type 4", "#{Prawn::DATADIR}/images/page_white_text.png"],
++      ["Type 6", "#{Prawn::DATADIR}/images/dice.png"],
+ ]
+ 
+ Prawn::Document.generate("png_types.pdf", :page_size => "A5") do
+--- a/spec/cell_spec.rb
++++ b/spec/cell_spec.rb
+@@ -470,7 +470,7 @@
+     end
+ 
+     it "supports variant styles of the current font" do
+-      font_path = "#{Prawn::BASEDIR}/data/fonts/Panic+Sans.dfont"
++      font_path = "#{Prawn::DATADIR}/fonts/Panic+Sans.dfont"
+       @pdf.font_families.merge!("Panic Sans" => {
+         :normal    => { :file => font_path, :font => "PanicSans" },
+         :bold      => { :file => font_path, :font => "PanicSans-Bold" },
+@@ -491,7 +491,7 @@
+ 
+ 
+     it "uses the style of the current font if none given" do
+-      font_path = "#{Prawn::BASEDIR}/data/fonts/Panic+Sans.dfont"
++      font_path = "#{Prawn::DATADIR}/fonts/Panic+Sans.dfont"
+       @pdf.font_families.merge!("Panic Sans" => {
+         :normal    => { :file => font_path, :font => "PanicSans" },
+         :bold      => { :file => font_path, :font => "PanicSans-Bold" },
diff --git a/debian/patches/0300_fix_paths.patch b/debian/patches/0300_fix_paths.patch
index fc574d7..225e504 100644
--- a/debian/patches/0300_fix_paths.patch
+++ b/debian/patches/0300_fix_paths.patch
@@ -1,12 +1,10 @@
 Description: fix fonts path to use only prawn's fonts directory
 Author: Cédric Boutillier <boutil at debian.org>
-Last-Update: 2014-01-16
+Last-Update: 2014-04-14
 
-Index: ruby-prawn/lib/prawn/font/afm.rb
-===================================================================
---- ruby-prawn.orig/lib/prawn/font/afm.rb	2014-01-16 12:11:23.000000000 -0600
-+++ ruby-prawn/lib/prawn/font/afm.rb	2014-01-16 12:11:23.000000000 -0600
-@@ -25,9 +25,7 @@
+--- a/lib/prawn/font/afm.rb
++++ b/lib/prawn/font/afm.rb
+@@ -28,9 +28,7 @@
            @metrics_path ||= m.split(':')
          else
            @metrics_path ||= [
diff --git a/debian/patches/0400_use_system_fonts.patch b/debian/patches/0400_use_system_fonts.patch
index 5fe7112..fe9b2b1 100644
--- a/debian/patches/0400_use_system_fonts.patch
+++ b/debian/patches/0400_use_system_fonts.patch
@@ -3,12 +3,10 @@ Description: use system fonts when possible
  available in Debian. These copies have been removed from the Debian source
  package, and system fonts are used instead. 
 Author: Cédric Boutillier <boutil at debian.org>
-Last-Update: 2014-01-16
+Last-Update: 2014-04-14
 
-Index: ruby-prawn/spec/line_wrap_spec.rb
-===================================================================
---- ruby-prawn.orig/spec/line_wrap_spec.rb	2014-01-16 13:31:26.000000000 -0600
-+++ ruby-prawn/spec/line_wrap_spec.rb	2014-01-16 13:31:26.000000000 -0600
+--- a/spec/line_wrap_spec.rb
++++ b/spec/line_wrap_spec.rb
 @@ -51,7 +51,7 @@
    end
  
@@ -63,23 +61,18 @@ Index: ruby-prawn/spec/line_wrap_spec.rb
      @line_wrap = Prawn::Text::Formatted::LineWrap.new
  
      string = "hello#{Prawn::Text::SHY}-"
-Index: ruby-prawn/spec/text_spec.rb
-===================================================================
---- ruby-prawn.orig/spec/text_spec.rb	2014-01-16 13:31:26.000000000 -0600
-+++ ruby-prawn/spec/text_spec.rb	2014-01-16 13:37:23.000000000 -0600
-@@ -256,8 +256,10 @@
-     lambda { @pdf.font "Pao bu" }.should raise_error(Prawn::Errors::UnknownFont)
+--- a/spec/text_spec.rb
++++ b/spec/text_spec.rb
+@@ -257,7 +257,7 @@
    end
  
-+  # replace non-free comicsans.ttf by system DejaVuSans.ttf (Debian patch)
    it "should_not raise_error an exception when providing Pathname instance as font" do
--    @pdf.font Pathname.new("#{Prawn::DATADIR}/fonts/comicsans.ttf")
-+    # @pdf.font Pathname.new("#{Prawn::DATADIR}/fonts/comicsans.ttf")
+-    @pdf.font Pathname.new("#{Prawn::DATADIR}/fonts/DejaVuSans.ttf")
 +    @pdf.font Pathname.new("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf")
    end
  
    it "should correctly render a utf-8 string when using a built-in font" do
-@@ -271,7 +273,7 @@
+@@ -271,7 +271,7 @@
  
    it "should correctly render a utf-8 string when using a TTF font" do
      str = "©" # copyright symbol
@@ -88,7 +81,7 @@ Index: ruby-prawn/spec/text_spec.rb
      @pdf.text str
  
      # grab the text from the rendered PDF and ensure it matches
-@@ -282,7 +284,7 @@
+@@ -282,7 +282,7 @@
    it "subsets mixed low-ASCII and non-ASCII characters when they can be " +
       "subsetted together" do
      str = "It’s super effective!"
@@ -97,7 +90,7 @@ Index: ruby-prawn/spec/text_spec.rb
      @pdf.text str
  
      text = PDF::Inspector::Text.analyze(@pdf.render)
-@@ -323,7 +325,7 @@
+@@ -323,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 }
@@ -106,7 +99,7 @@ Index: ruby-prawn/spec/text_spec.rb
  
      # Expect that the call to text will not raise an encoding error
      @pdf.text(sjis_str)
-@@ -425,7 +427,7 @@
+@@ -425,7 +425,7 @@
  
  
    def add_unicode_fonts(pdf)
@@ -115,10 +108,8 @@ Index: ruby-prawn/spec/text_spec.rb
      pdf.font_families.update("dejavu" => {
        :normal      => dejavu,
        :italic      => dejavu,
-Index: ruby-prawn/spec/text_spacing_spec.rb
-===================================================================
---- ruby-prawn.orig/spec/text_spacing_spec.rb	2014-01-16 13:31:26.000000000 -0600
-+++ ruby-prawn/spec/text_spacing_spec.rb	2014-01-16 13:31:26.000000000 -0600
+--- 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
@@ -128,10 +119,8 @@ Index: ruby-prawn/spec/text_spacing_spec.rb
  
      str = "こんにちは世界"
      @pdf.character_spacing(0) do
-Index: ruby-prawn/spec/formatted_text_box_spec.rb
-===================================================================
---- ruby-prawn.orig/spec/formatted_text_box_spec.rb	2014-01-16 13:31:26.000000000 -0600
-+++ ruby-prawn/spec/formatted_text_box_spec.rb	2014-01-16 13:31:26.000000000 -0600
+--- a/spec/formatted_text_box_spec.rb
++++ b/spec/formatted_text_box_spec.rb
 @@ -20,7 +20,7 @@
  
    it "should not raise an Encoding::CompatibilityError when keeping a TTF and an " +
@@ -177,10 +166,8 @@ Index: ruby-prawn/spec/formatted_text_box_spec.rb
      @pdf.font_families["Kai"] = {
        :normal => { :file => file, :font => "Kai" }
      }
-Index: ruby-prawn/spec/font_spec.rb
-===================================================================
---- ruby-prawn.orig/spec/font_spec.rb	2014-01-16 13:31:26.000000000 -0600
-+++ ruby-prawn/spec/font_spec.rb	2014-01-16 13:40:02.000000000 -0600
+--- a/spec/font_spec.rb
++++ b/spec/font_spec.rb
 @@ -50,7 +50,7 @@
    it "should exclude newlines" do
      create_pdf
@@ -190,45 +177,26 @@ Index: ruby-prawn/spec/font_spec.rb
  
      @pdf.width_of("\nhello world\n").should ==
        @pdf.width_of("hello world")
-@@ -146,18 +146,18 @@
+@@ -146,7 +146,7 @@
    end
  
    it "should accept Pathname objects for font files" do
--    file = Pathname.new( "#{Prawn::DATADIR}/fonts/Chalkboard.ttf" )
--    @pdf.font_families["Chalkboard"] = {
+-    file = Pathname.new( "#{Prawn::DATADIR}/fonts/DejaVuSans.ttf" )
 +    file = Pathname.new( "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf" )
-+    @pdf.font_families["DejaVuSans"] = {
+     @pdf.font_families["DejaVu Sans"] = {
        :normal => file
      }
- 
--    @pdf.font "Chalkboard"
--    @pdf.text "In Chalkboard"
-+    @pdf.font "DejaVuSans"
-+    @pdf.text "In DejaVuSans"
- 
-     text = PDF::Inspector::Text.analyze(@pdf.render)
-     name = text.font_settings.map { |e| e[:name] }.first.to_s
-     name = name.sub(/\w+\+/, "subset+")
--    name.should == "subset+Chalkboard"
-+    name.should == "subset+DejaVuSans"
-   end
- end
- 
-@@ -301,15 +301,19 @@
+@@ -301,15 +301,15 @@
    end
  
    it "should return true when present in a TTF font" do
--    font = @pdf.find_font("#{Prawn::DATADIR}/fonts/Activa.ttf")
-+    # replace non-free Activa.ttf by system DejaVuSans.ttf (Debian patch)
-+    # font = @pdf.find_font("#{Prawn::DATADIR}/fonts/Activa.ttf")
+-    font = @pdf.find_font("#{Prawn::DATADIR}/fonts/DejaVuSans.ttf")
 +    font = @pdf.find_font("/usr/share/fonts/truetype/dejavu/DejaVuSans.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::DATADIR}/fonts/Activa.ttf")
-+    # replace non-free Activa.ttf by system DejaVuSans.ttf (Debian patch)
-+    # font = @pdf.find_font("#{Prawn::DATADIR}/fonts/Activa.ttf")
+-    font = @pdf.find_font("#{Prawn::DATADIR}/fonts/DejaVuSans.ttf")
 +    font = @pdf.find_font("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf")
      font.glyph_present?("再").should be_false
  
@@ -237,36 +205,16 @@ Index: ruby-prawn/spec/font_spec.rb
      font.glyph_present?("€").should be_false
    end
  end
-@@ -318,7 +322,9 @@
+@@ -318,7 +318,7 @@
  
    before do
      create_pdf
--    @activa = @pdf.find_font "#{Prawn::DATADIR}/fonts/Activa.ttf"
-+    # replace non-free Activa.ttf by system DejaVuSans.ttf (Debian patch)
-+    # @activa = @pdf.find_font "#{Prawn::DATADIR}/fonts/Activa.ttf"
-+    @activa = @pdf.find_font "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf"
+-    @font = @pdf.find_font "#{Prawn::DATADIR}/fonts/DejaVuSans.ttf"
++    @font = @pdf.find_font "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf"
    end
  
    it "should calculate string width taking into account accented characters" do
-@@ -386,7 +392,7 @@
-     it "should allow TTF fonts to be used alongside document transactions" do
-       lambda {
-         Prawn::Document.new do
--          font "#{Prawn::DATADIR}/fonts/DejaVuSans.ttf"
-+          font "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf"
-           text "Hi there"
-           transaction { text "Nice, thank you" }
-         end
-@@ -396,7 +402,7 @@
-     it "should allow TTF fonts to be used inside transactions" do
-       pdf = Prawn::Document.new do
-         transaction do
--          font "#{Prawn::DATADIR}/fonts/DejaVuSans.ttf"
-+          font "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf"
-           text "Hi there"
-         end
-       end
-@@ -453,7 +459,7 @@
+@@ -422,7 +422,7 @@
  describe "#character_count(text)" do
    it "should work on TTF fonts" do
      create_pdf
@@ -275,10 +223,8 @@ Index: ruby-prawn/spec/font_spec.rb
      @pdf.font.character_count("こんにちは世界").should == 7
      @pdf.font.character_count("Hello, world!").should == 13
    end
-Index: ruby-prawn/spec/text_box_spec.rb
-===================================================================
---- ruby-prawn.orig/spec/text_box_spec.rb	2014-01-16 13:31:26.000000000 -0600
-+++ ruby-prawn/spec/text_box_spec.rb	2014-01-16 13:40:02.000000000 -0600
+--- a/spec/text_box_spec.rb
++++ b/spec/text_box_spec.rb
 @@ -74,7 +74,7 @@
      @pdf.text_direction(:rtl)
      @pdf.text_direction = :rtl
@@ -297,10 +243,8 @@ Index: ruby-prawn/spec/text_box_spec.rb
      @options[:overflow] = :truncate
      text_box = Prawn::Text::Box.new(@text, @options)
      text_box.render
-Index: ruby-prawn/spec/document_spec.rb
-===================================================================
---- ruby-prawn.orig/spec/document_spec.rb	2014-01-16 13:31:26.000000000 -0600
-+++ ruby-prawn/spec/document_spec.rb	2014-01-16 13:31:26.000000000 -0600
+--- a/spec/document_spec.rb
++++ b/spec/document_spec.rb
 @@ -261,7 +261,7 @@
      doc_uncompressed = Prawn::Document.new
      doc_compressed   = Prawn::Document.new(:compress => true)
@@ -310,10 +254,8 @@ Index: ruby-prawn/spec/document_spec.rb
         pdf.text "更可怕的是,同质化竞争对手可以按照URL中后面这个ID来遍历" * 10
      end
  
-Index: ruby-prawn/spec/text_at_spec.rb
-===================================================================
---- ruby-prawn.orig/spec/text_at_spec.rb	2014-01-16 13:31:26.000000000 -0600
-+++ ruby-prawn/spec/text_at_spec.rb	2014-01-16 13:31:26.000000000 -0600
+--- a/spec/text_at_spec.rb
++++ b/spec/text_at_spec.rb
 @@ -108,7 +108,7 @@
    it "should not raise an exception when a shift-jis string is rendered" do
      datafile = "#{Prawn::DATADIR}/shift_jis_text.txt"
@@ -323,29 +265,3 @@ Index: ruby-prawn/spec/text_at_spec.rb
  
      @pdf.draw_text(sjis_str, :at => [0, 0])
    end
-Index: ruby-prawn/spec/template_spec_obsolete.rb
-===================================================================
---- ruby-prawn.orig/spec/template_spec_obsolete.rb	2014-01-16 13:31:26.000000000 -0600
-+++ ruby-prawn/spec/template_spec_obsolete.rb	2014-01-16 13:31:26.000000000 -0600
-@@ -149,7 +149,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)
--    @pdf.font "#{Prawn::DATADIR}/fonts/Chalkboard.ttf"
-+    # replace non-free Chalkboard.ttf by system DejaVuSans.ttf (Debian patch)
-+    # @pdf.font "#{Prawn::DATADIR}/fonts/Chalkboard.ttf"
-+    @pdf.font "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf"
-     @pdf.move_down(40)
-     @pdf.text "Hi There"
- 
-@@ -301,7 +303,9 @@
-     filename = "#{Prawn::DATADIR}/pdfs/contains_ttf_font.pdf"
-     @pdf = Prawn::Document.new()
-     @pdf.start_new_page(:template => filename)
--    @pdf.font "#{Prawn::DATADIR}/fonts/Chalkboard.ttf"
-+    # replace non-free Chalkboard.ttf by system DejaVuSans.ttf (Debian patch)
-+    # @pdf.font "#{Prawn::DATADIR}/fonts/Chalkboard.ttf"
-+    @pdf.font "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf"
-     @pdf.move_down(40)
-     @pdf.text "Hi There"
- 
diff --git a/debian/patches/0405_use_system_fonts_manual.patch b/debian/patches/0405_use_system_fonts_manual.patch
index b475178..bf6192b 100644
--- a/debian/patches/0405_use_system_fonts_manual.patch
+++ b/debian/patches/0405_use_system_fonts_manual.patch
@@ -3,45 +3,21 @@ Description: use system fonts when possible
  These copies have been removed from the Debian source package, and system
  fonts are used instead.
 Author: Cédric Boutillier <boutil at debian.org>
-Last-Update: 2014-01-16
+Last-Update: 2014-04-14
 
-Index: ruby-prawn/manual/text/single_usage.rb
-===================================================================
---- ruby-prawn.orig/manual/text/single_usage.rb	2014-01-16 13:31:26.000000000 -0600
-+++ ruby-prawn/manual/text/single_usage.rb	2014-01-16 13:31:26.000000000 -0600
-@@ -19,19 +19,21 @@
+--- a/manual/text/single_usage.rb
++++ b/manual/text/single_usage.rb
+@@ -19,7 +19,7 @@
  filename = File.basename(__FILE__).gsub('.rb', '.pdf')
  Prawn::Example.generate(filename) do
    # Using a TTF font file
--  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/dejavu/DejaVuSans.ttf" do
-+    text "Written with the DejaVuSans TTF font."
+-  font("#{Prawn::DATADIR}/fonts/DejaVuSans.ttf") do
++  font("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf") do
+     text "Written with the DejaVu Sans TTF font."
    end
    move_down 20
-   
-   text "Written with the default font."
-   move_down 20
-   
--  # Using an DFONT font file
--  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
-+#   text "Written with the Action Man DFONT font"
-+# end
-+# move_down 20
- 
-   text "Written with the default font once more."
- end
-Index: ruby-prawn/manual/text/utf8.rb
-===================================================================
---- ruby-prawn.orig/manual/text/utf8.rb	2014-01-16 13:31:26.000000000 -0600
-+++ ruby-prawn/manual/text/utf8.rb	2014-01-16 13:31:26.000000000 -0600
+--- a/manual/text/utf8.rb
++++ b/manual/text/utf8.rb
 @@ -21,7 +21,7 @@
    text "Let's try them with another font."
    move_down 20
@@ -51,10 +27,8 @@ Index: ruby-prawn/manual/text/utf8.rb
      text "ὕαλον ϕαγεῖν δύναμαι· τοῦτο οὔ με βλάπτει."
      text "There you go."
    end
-Index: ruby-prawn/manual/text/line_wrapping.rb
-===================================================================
---- ruby-prawn.orig/manual/text/line_wrapping.rb	2014-01-16 13:31:26.000000000 -0600
-+++ ruby-prawn/manual/text/line_wrapping.rb	2014-01-16 13:31:26.000000000 -0600
+--- 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."
    move_down 20
@@ -64,10 +38,8 @@ Index: ruby-prawn/manual/text/line_wrapping.rb
      long_text = "No word boundaries:\n更可怕的是,同质化竞争对手可以按照URL中后面这个ID来遍历您的DB中的内容,写个小爬虫把你的页面上的关键信息顺次爬下来也不是什么难事,这样的话,你就非常被动了。更可怕的是,同质化竞争对手可以按照URL中后面这个ID来遍历您的DB中的内容,写个小爬虫把你的页面上的关键信息顺次爬下来也不是什么难事,这样的话,你就非常被动了。"
      text long_text
      move_down 20
-Index: ruby-prawn/manual/text/right_to_left_text.rb
-===================================================================
---- ruby-prawn.orig/manual/text/right_to_left_text.rb	2014-01-16 13:31:26.000000000 -0600
-+++ ruby-prawn/manual/text/right_to_left_text.rb	2014-01-16 13:31:26.000000000 -0600
+--- 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
@@ -77,10 +49,8 @@ Index: ruby-prawn/manual/text/right_to_left_text.rb
      long_text = "写个小爬虫把你的页面上的关键信息顺次爬下来也不是什么难事写个小爬虫把你的页面上的关键信息顺次爬下来也不是什么难事写个小爬虫把你的页面上的关键信息顺次爬下来也不是什么难事写个小"
      text long_text
      move_down 20
-Index: ruby-prawn/manual/example_helper.rb
-===================================================================
---- ruby-prawn.orig/manual/example_helper.rb	2014-01-16 13:31:26.000000000 -0600
-+++ ruby-prawn/manual/example_helper.rb	2014-01-16 13:31:26.000000000 -0600
+--- a/manual/example_helper.rb
++++ b/manual/example_helper.rb
 @@ -172,12 +172,12 @@
      # Register fonts used on the manual
      #
@@ -96,149 +66,25 @@ Index: ruby-prawn/manual/example_helper.rb
        font_families["DejaVu"] = {
          :normal => { :file => dejavu_file, :font => "DejaVu" }
        }
-Index: ruby-prawn/manual/text/fallback_fonts.rb
-===================================================================
---- ruby-prawn.orig/manual/text/fallback_fonts.rb	2014-01-16 13:31:26.000000000 -0600
-+++ ruby-prawn/manual/text/fallback_fonts.rb	2014-01-16 13:31:26.000000000 -0600
-@@ -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]))
+--- a/manual/text/fallback_fonts.rb
++++ b/manual/text/fallback_fonts.rb
+@@ -9,7 +9,7 @@
  
  filename = File.basename(__FILE__).gsub('.rb', '.pdf')
  Prawn::Example.generate(filename) do
 -  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
-+# 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"])
-+# formatted_text([ { :text => "Fallback fonts can even override" },
-+#                  { :text => "fragment fonts (你好)", :font => "Times-Roman" },
-+#                ],
-+#                :fallback_fonts => ["Times-Roman", "Kai"])
- end
-Index: ruby-prawn/manual/text/registering_families.rb
-===================================================================
---- ruby-prawn.orig/manual/text/registering_families.rb	2014-01-16 13:31:26.000000000 -0600
-+++ ruby-prawn/manual/text/registering_families.rb	2014-01-16 13:31:26.000000000 -0600
-@@ -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]))
- 
- filename = File.basename(__FILE__).gsub('.rb', '.pdf')
++  file = "/usr/share/fonts/truetype/arphic-gkai00mp/gkai00mp.ttf"
+   font_families["Kai"] = {
+     :normal => { :file => file, :font => "Kai" }
+   }
+--- a/manual/text/registering_families.rb
++++ b/manual/text/registering_families.rb
+@@ -15,7 +15,7 @@
  Prawn::Example.generate(filename) do
--  # 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
-+# # 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
+   # Registering a single TTF font
+   font_families.update("DejaVu Sans" => {
+-    :normal => "#{Prawn::DATADIR}/fonts/DejaVuSans.ttf"
++    :normal => "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf"
+   })
+   
+   font("DejaVu Sans") do
diff --git a/debian/patches/0500_disable_tests_using_removed_files.patch b/debian/patches/0500_disable_tests_using_removed_files.patch
index 66b0fc0..887196d 100644
--- a/debian/patches/0500_disable_tests_using_removed_files.patch
+++ b/debian/patches/0500_disable_tests_using_removed_files.patch
@@ -3,120 +3,10 @@ Description: disable some specs after removal of some files from the source pack
  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 <boutil at debian.org>
-Last-Update: 2014-01-16
+Last-Update: 2014-04-14
 
-Index: ruby-prawn/spec/font_spec.rb
-===================================================================
---- ruby-prawn.orig/spec/font_spec.rb	2014-01-16 13:45:54.000000000 -0600
-+++ ruby-prawn/spec/font_spec.rb	2014-01-16 13:45:54.000000000 -0600
-@@ -127,7 +127,8 @@
-       :Courier, :Helvetica]
-   end
- 
--  it "should allow font familes to be defined in a single dfont" do
-+  # spec disabled because Action Man.dfont is non free and cannot be distributed in Debian's package (Debian patch)
-+  xit "should allow font familes to be defined in a single dfont" do
-     file = "#{Prawn::DATADIR}/fonts/Action Man.dfont"
-     @pdf.font_families["Action Man"] = {
-       :normal      => { :file => file, :font => "ActionMan" },
-@@ -331,7 +332,8 @@
-     @activa.compute_width_of("é", :size => 12).should == @activa.compute_width_of("e", :size => 12)
-   end
- 
--  it "should calculate string width taking into account kerning pairs" do
-+  # spec disabled since relies on numeric values for a particular font, which has been removed (Debian patch)
-+  xit "should calculate string width taking into account kerning pairs" do
-     @activa.compute_width_of("To", :size => 12).should == 15.228
-     @activa.compute_width_of("To", :size => 12, :kerning => true).should == 12.996
-   end
-@@ -350,7 +352,8 @@
-     @activa.encode_text("Teχnology...").should == [[0, "Te"], [1, "!"], [0, "nology..."]]
-   end
- 
--  it "should encode text with kerning if requested" do
-+  # spec disabled since relies on numeric values for a particular font, which has been removed (Debian patch)
-+  xit "should encode text with kerning if requested" do
-     @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"]]]
-@@ -358,7 +361,8 @@
-     @activa.encode_text("Teχnology...", :kerning => true).should == [[0, ["T", 186.0, "e"]], [1, "!"], [0, ["nology", 88.0, "..."]]]
-   end
- 
--  it "should use the ascender, descender, and cap height from the TTF verbatim" do
-+  # spec disabled since relies on numeric values for a particular font, which has been removed (Debian patch)
-+  xit "should use the ascender, descender, and cap height from the TTF verbatim" do
-     # These metrics are relative to the font's own bbox. They should not be
-     # scaled with font size.
-     ref = @pdf.ref!({})
-@@ -423,31 +427,37 @@
-     @file = "#{Prawn::DATADIR}/fonts/Action Man.dfont"
-   end
- 
--  it "should list all named fonts" do
-+  # spec disabled because Action Man.dfont is non free and cannot be distributed in Debian's package (Debian patch)
-+  xit "should list all named fonts" do
-     list = Prawn::Font::DFont.named_fonts(@file)
-     list.sort.should == %w(ActionMan ActionMan-Italic ActionMan-Bold ActionMan-BoldItalic).sort
-   end
- 
--  it "should count the number of fonts in the file" do
-+  # spec disabled because Action Man.dfont is non free and cannot be distributed in Debian's package (Debian patch)
-+  xit "should count the number of fonts in the file" do
-     Prawn::Font::DFont.font_count(@file).should == 4
-   end
- 
--  it "should default selected font to the first one if not specified" do
-+  # spec disabled because Action Man.dfont is non free and cannot be distributed in Debian's package (Debian patch)
-+  xit "should default selected font to the first one if not specified" do
-     font = @pdf.find_font(@file)
-     font.basename.should == "ActionMan"
-   end
- 
--  it "should allow font to be selected by index" do
-+  # spec disabled because Action Man.dfont is non free and cannot be distributed in Debian's package (Debian patch)
-+  xit "should allow font to be selected by index" do
-     font = @pdf.find_font(@file, :font => 2)
-     font.basename.should == "ActionMan-Italic"
-   end
- 
--  it "should allow font to be selected by name" do
-+  # spec disabled because Action Man.dfont is non free and cannot be distributed in Debian's package (Debian patch)
-+  xit "should allow font to be selected by name" do
-     font = @pdf.find_font(@file, :font => "ActionMan-BoldItalic")
-     font.basename.should == "ActionMan-BoldItalic"
-   end
- 
--  it "should cache font object based on selected font" do
-+  # spec disabled because Action Man.dfont is non free and cannot be distributed in Debian's package (Debian patch)
-+  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")
-     f2.object_id.should_not == f1.object_id
-Index: ruby-prawn/spec/text_box_spec.rb
-===================================================================
---- ruby-prawn.orig/spec/text_box_spec.rb	2014-01-16 13:45:54.000000000 -0600
-+++ ruby-prawn/spec/text_box_spec.rb	2014-01-16 13:45:54.000000000 -0600
-@@ -659,13 +659,13 @@
-     @text_box = Prawn::Text::Box.new(@text, options)
-   end
-   describe "when using a TTF font" do
--    it "unprinted text should be in UTF-8 encoding" do
-+    xit "unprinted text should be in UTF-8 encoding" do
-       @pdf.font("Action Man")
-       remaining_text = @text_box.render
-       remaining_text.should == @text
-     end
- 
--    it "subsequent calls to Text::Box need not include the" +
-+    xit "subsequent calls to Text::Box need not include the" +
-        " :skip_encoding => true option" do
-       @pdf.font("Action Man")
-       remaining_text = @text_box.render
-Index: ruby-prawn/spec/images_spec.rb
-===================================================================
---- ruby-prawn.orig/spec/images_spec.rb	2014-01-16 13:45:54.000000000 -0600
-+++ ruby-prawn/spec/images_spec.rb	2014-01-16 13:46:21.000000000 -0600
+--- a/spec/images_spec.rb
++++ b/spec/images_spec.rb
 @@ -69,21 +69,24 @@
    end
  
@@ -144,25 +34,8 @@ Index: ruby-prawn/spec/images_spec.rb
      @pdf.image "#{Prawn::DATADIR}/images/16bit.png"
  
      output = @pdf.render
-Index: ruby-prawn/spec/object_store_spec.rb
-===================================================================
---- ruby-prawn.orig/spec/object_store_spec.rb	2014-01-16 13:45:54.000000000 -0600
-+++ ruby-prawn/spec/object_store_spec.rb	2014-01-16 13:45:54.000000000 -0600
-@@ -46,8 +46,9 @@
-     lambda { PDF::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_error PDF::Core::Errors::TemplateError when given a non PDF as a template" do
--    filename = "#{Prawn::DATADIR}/images/dice.png"
-+    filename = "#{Prawn::DATADIR}/images/pigs.jpg"
- 
-     lambda { PDF::Core::ObjectStore.new(:template => filename) }.should raise_error(PDF::Core::Errors::TemplateError)
-   end
-Index: ruby-prawn/spec/png_spec.rb
-===================================================================
---- ruby-prawn.orig/spec/png_spec.rb	2014-01-16 13:45:54.000000000 -0600
-+++ ruby-prawn/spec/png_spec.rb	2014-01-16 13:45:54.000000000 -0600
+--- a/spec/png_spec.rb
++++ b/spec/png_spec.rb
 @@ -17,7 +17,7 @@
      @img_data = File.binread(@filename)
    end
@@ -313,25 +186,3 @@ Index: ruby-prawn/spec/png_spec.rb
      png = Prawn::Images::PNG.new(@img_data)
      png.split_alpha_channel!
      data = File.binread(@alpha_data_filename)
-Index: ruby-prawn/spec/cell_spec.rb
-===================================================================
---- ruby-prawn.orig/spec/cell_spec.rb	2014-01-16 13:45:54.000000000 -0600
-+++ ruby-prawn/spec/cell_spec.rb	2014-01-16 13:45:54.000000000 -0600
-@@ -469,7 +469,7 @@
-       c.draw
-     end
- 
--    it "supports variant styles of the current font" do
-+    xit "supports variant styles of the current font" do
-       font_path = "#{Prawn::BASEDIR}/data/fonts/Action Man.dfont"
-       @pdf.font_families.merge!("Action Man" => {
-         :normal    => { :file => font_path, :font => "ActionMan" },
-@@ -490,7 +490,7 @@
-     end
- 
- 
--    it "uses the style of the current font if none given" do
-+    xit "uses the style of the current font if none given" do
-       font_path = "#{Prawn::BASEDIR}/data/fonts/Action Man.dfont"
-       @pdf.font_families.merge!("Action Man" => {
-         :normal    => { :file => font_path, :font => "ActionMan" },
diff --git a/debian/patches/series b/debian/patches/series
index 3bed314..d4d0bdf 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,9 +1,9 @@
 0100_remove_bundler_rubygems_stuff.patch
-0102_simply_require_ttfunk.patch
+#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
-0210_change_spec_data_to_datadir_pdfs.patch
+#0210_change_spec_data_to_datadir_pdfs.patch
 0300_fix_paths.patch
 0400_use_system_fonts.patch
 0405_use_system_fonts_manual.patch
@@ -11,4 +11,4 @@
 #0600_add_require_date_table_cell.rb
 #1001_fix_encoding_in_font_spec.patch
 #1002_define_external_encoding_for_manual.patch
-0700_dont_call_git_from_manual.patch
+#0700_dont_call_git_from_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