[DRE-commits] [ruby-prawn] 03/15: refresh patch queue

Cédric Boutillier boutil at moszumanska.debian.org
Mon Sep 8 14:04:24 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 5d5f93da8555180b1cca3ed3d42c7956e0e022ba
Author: Cédric Boutillier <boutil at debian.org>
Date:   Wed Aug 6 00:04:28 2014 +0200

    refresh patch queue
---
 ...105_remove_rubygems_loadpath_stuff_manual.patch | 13 -----
 .../0200_replace_BASEDIR_data_by_DATADIR.patch     | 10 ++--
 debian/patches/0400_use_system_fonts.patch         | 15 ++++--
 debian/patches/0405_use_system_fonts_manual.patch  | 63 ++++++++--------------
 .../0600_replace_require_relative_manual.patch     | 12 +++++
 debian/patches/series                              |  3 +-
 6 files changed, 54 insertions(+), 62 deletions(-)

diff --git a/debian/patches/0105_remove_rubygems_loadpath_stuff_manual.patch b/debian/patches/0105_remove_rubygems_loadpath_stuff_manual.patch
index 46e36b6..ac42ee4 100644
--- a/debian/patches/0105_remove_rubygems_loadpath_stuff_manual.patch
+++ b/debian/patches/0105_remove_rubygems_loadpath_stuff_manual.patch
@@ -2,16 +2,3 @@ Description: remove LOAD_PATH manipulation from manual sources
 Author: Cédric Boutillier <boutil at debian.org>
 Last-Update: 2014-01-16
 
-Index: ruby-prawn/manual/example_helper.rb
-===================================================================
---- ruby-prawn.orig/manual/example_helper.rb	2014-01-16 12:02:05.000000000 -0600
-+++ ruby-prawn/manual/example_helper.rb	2014-01-16 12:02:05.000000000 -0600
-@@ -3,7 +3,7 @@
- # Helper for organizing examples
- #
- 
--$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
-+#$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
- 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 bcfa3bd..4bbb40c 100644
--- a/debian/patches/0200_replace_BASEDIR_data_by_DATADIR.patch
+++ b/debian/patches/0200_replace_BASEDIR_data_by_DATADIR.patch
@@ -4,7 +4,7 @@ Last-Update: 2014-04-14
 
 --- a/lib/prawn.rb
 +++ b/lib/prawn.rb
-@@ -19,7 +19,9 @@
+@@ -21,7 +21,9 @@
    #
    #
    BASEDIR = File.expand_path(File.join(dir, '..'))
@@ -12,12 +12,12 @@ Last-Update: 2014-04-14
 +  # 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
  
 --- a/spec/acceptance/png.rb
 +++ b/spec/acceptance/png.rb
-@@ -1,11 +1,11 @@
+@@ -3,11 +3,11 @@
  require_relative "../../lib/prawn"
  
  images = [
@@ -36,7 +36,7 @@ Last-Update: 2014-04-14
  Prawn::Document.generate("png_types.pdf", :page_size => "A5") do
 --- a/spec/cell_spec.rb
 +++ b/spec/cell_spec.rb
-@@ -470,7 +470,7 @@
+@@ -471,7 +471,7 @@
      end
  
      it "supports variant styles of the current font" do
@@ -45,7 +45,7 @@ Last-Update: 2014-04-14
        @pdf.font_families.merge!("Panic Sans" => {
          :normal    => { :file => font_path, :font => "PanicSans" },
          :bold      => { :file => font_path, :font => "PanicSans-Bold" },
-@@ -491,7 +491,7 @@
+@@ -492,7 +492,7 @@
  
  
      it "uses the style of the current font if none given" do
diff --git a/debian/patches/0400_use_system_fonts.patch b/debian/patches/0400_use_system_fonts.patch
index fe9b2b1..1465f99 100644
--- a/debian/patches/0400_use_system_fonts.patch
+++ b/debian/patches/0400_use_system_fonts.patch
@@ -186,7 +186,16 @@ Last-Update: 2014-04-14
      @pdf.font_families["DejaVu Sans"] = {
        :normal => file
      }
-@@ -301,15 +301,15 @@
+@@ -161,7 +161,7 @@
+   end
+ 
+   it "should accept IO objects for font files" do
+-    io = File.open "#{Prawn::DATADIR}/fonts/DejaVuSans.ttf"
++    io = File.open "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf"
+     @pdf.font_families["DejaVu Sans"] = {
+       normal: Prawn::Font.load(@pdf, io)
+     }
+@@ -316,15 +316,15 @@
    end
  
    it "should return true when present in a TTF font" do
@@ -205,7 +214,7 @@ Last-Update: 2014-04-14
      font.glyph_present?("€").should be_false
    end
  end
-@@ -318,7 +318,7 @@
+@@ -333,7 +333,7 @@
  
    before do
      create_pdf
@@ -214,7 +223,7 @@ Last-Update: 2014-04-14
    end
  
    it "should calculate string width taking into account accented characters" do
-@@ -422,7 +422,7 @@
+@@ -437,7 +437,7 @@
  describe "#character_count(text)" do
    it "should work on TTF fonts" do
      create_pdf
diff --git a/debian/patches/0405_use_system_fonts_manual.patch b/debian/patches/0405_use_system_fonts_manual.patch
index bf6192b..749a907 100644
--- a/debian/patches/0405_use_system_fonts_manual.patch
+++ b/debian/patches/0405_use_system_fonts_manual.patch
@@ -9,24 +9,13 @@ Last-Update: 2014-04-14
 +++ b/manual/text/single_usage.rb
 @@ -19,7 +19,7 @@
  filename = File.basename(__FILE__).gsub('.rb', '.pdf')
- Prawn::Example.generate(filename) do
+ Prawn::ManualBuilder::Example.generate(filename) do
    # Using a TTF font file
 -  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
---- 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
-   
--  font("#{Prawn::DATADIR}/fonts/DejaVuSans.ttf") do
-+  font("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf") do
-     text "ὕαλον ϕαγεῖν δύναμαι· τοῦτο οὔ με βλάπτει."
-     text "There you go."
-   end
 --- a/manual/text/line_wrapping.rb
 +++ b/manual/text/line_wrapping.rb
 @@ -29,7 +29,7 @@
@@ -49,42 +38,36 @@ Last-Update: 2014-04-14
      long_text = "写个小爬虫把你的页面上的关键信息顺次爬下来也不是什么难事写个小爬虫把你的页面上的关键信息顺次爬下来也不是什么难事写个小爬虫把你的页面上的关键信息顺次爬下来也不是什么难事写个小"
      text long_text
      move_down 20
---- a/manual/example_helper.rb
-+++ b/manual/example_helper.rb
-@@ -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" }
-       }
+--- a/manual/text/registering_families.rb
++++ b/manual/text/registering_families.rb
+@@ -15,7 +15,7 @@
+ Prawn::ManualBuilder::Example.generate(filename) do
+   # Registering a single TTF font
+   font_families.update("DejaVu Sans" => {
+-    :normal => "#{Prawn::DATADIR}/fonts/DejaVuSans.ttf"
++    :normal => "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf"
+   })
  
--      dejavu_file = "#{Prawn::DATADIR}/fonts/DejaVuSans.ttf"
-+      dejavu_file = "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf"
-       font_families["DejaVu"] = {
-         :normal => { :file => dejavu_file, :font => "DejaVu" }
-       }
+   font("DejaVu Sans") do
+--- 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
+ 
+-  font("#{Prawn::DATADIR}/fonts/DejaVuSans.ttf") do
++  font("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf") do
+     text "ὕαλον ϕαγεῖν δύναμαι· τοῦτο οὔ με βλάπτει."
+     text "There you go."
+   end
 --- 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
+ Prawn::ManualBuilder::Example.generate(filename) do
 -  file = "#{Prawn::DATADIR}/fonts/gkai00mp.ttf"
 +  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("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/0600_replace_require_relative_manual.patch b/debian/patches/0600_replace_require_relative_manual.patch
new file mode 100644
index 0000000..3385b57
--- /dev/null
+++ b/debian/patches/0600_replace_require_relative_manual.patch
@@ -0,0 +1,12 @@
+--- a/manual/example_helper.rb
++++ b/manual/example_helper.rb
+@@ -1,7 +1,7 @@
+ # encoding: UTF-8
+ 
+-require_relative "../lib/prawn"
+-require_relative "../lib/prawn/table"
++require "prawn"
++require "prawn/table"
+ require "prawn/manual_builder"
+ 
+ Prawn::ManualBuilder.manual_dir = File.dirname(__FILE__)
diff --git a/debian/patches/series b/debian/patches/series
index d4d0bdf..8944931 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1,6 @@
 0100_remove_bundler_rubygems_stuff.patch
 #0102_simply_require_ttfunk.patch
-0105_remove_rubygems_loadpath_stuff_manual.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
@@ -12,3 +12,4 @@
 #1001_fix_encoding_in_font_spec.patch
 #1002_define_external_encoding_for_manual.patch
 #0700_dont_call_git_from_manual.patch
+0600_replace_require_relative_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