[DRE-commits] [origami-pdf] 01/02: fix incompatibility with Ruby 2.2

Antonio Terceiro terceiro at moszumanska.debian.org
Thu Dec 3 17:10:17 UTC 2015


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

terceiro pushed a commit to branch master
in repository origami-pdf.

commit c3561a4b6c8cb25a1bc105fc38c609739786f458
Author: Antonio Terceiro <terceiro at softwarelivre.org>
Date:   Thu Dec 3 14:58:18 2015 -0200

    fix incompatibility with Ruby 2.2
    
    Closes: #806133
---
 debian/changelog                                   |   7 +
 debian/patches/dont_include_before_requiring.patch | 199 +++++++++++++++++++++
 debian/patches/series                              |   1 +
 3 files changed, 207 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index d58a6d6..8c006a9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+origami-pdf (1.2.7-3) UNRELEASED; urgency=medium
+
+  * dont_include_before_requiring.patch: fix incompatibility with Ruby 2.2
+    (Closes: #806133)
+
+ -- Antonio Terceiro <terceiro at debian.org>  Thu, 03 Dec 2015 14:57:40 -0200
+
 origami-pdf (1.2.7-2) unstable; urgency=medium
 
   * Rename source and main binary packages to origami-pdf. See #773197
diff --git a/debian/patches/dont_include_before_requiring.patch b/debian/patches/dont_include_before_requiring.patch
new file mode 100644
index 0000000..bcec5b9
--- /dev/null
+++ b/debian/patches/dont_include_before_requiring.patch
@@ -0,0 +1,199 @@
+Description: don't include modules at the global namespace before requiring libraries
+ This does not work on Ruby 2.2+. See the bug report at the Ruby upstream bug
+ tracker: https://bugs.ruby-lang.org/issues/11714#change-54967
+Author: Antonio Terceiro
+Origin: vendor
+Bug-Debian: https://bugs.debian.org/806133
+Forwarded: no
+Last-Update: 2015-12-03
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/bin/gui/walker.rb
++++ b/bin/gui/walker.rb
+@@ -30,7 +30,6 @@ begin
+ rescue LoadError
+   abort('Error: you need to install ruby-gtk2 to run this application')
+ end
+-include Gtk
+ 
+ begin
+   require 'origami'
+@@ -40,6 +39,8 @@ rescue LoadError
+   require 'origami'
+ end
+ 
++include Gtk
++
+ require 'gui/menu'
+ require 'gui/about'
+ require 'gui/file'
+--- a/bin/pdf2graph
++++ b/bin/pdf2graph
+@@ -31,10 +31,11 @@ rescue LoadError
+   $: << ORIGAMIDIR
+   require 'origami'
+ end
+-include Origami
+ 
+ require 'optparse'
+ 
++include Origami
++
+ class OptParser
+   BANNER = <<USAGE
+ Usage: #{$0} <PDF-file> [-f <format>] [-o <output-file>]
+--- a/bin/pdf2pdfa
++++ b/bin/pdf2pdfa
+@@ -32,9 +32,10 @@ rescue LoadError
+   $: << ORIGAMIDIR
+   require 'origami'
+ end
++require 'optparse'
++
+ include Origami
+ 
+-require 'optparse'
+ 
+ class OptParser
+   BANNER = <<USAGE
+--- a/bin/pdfcocoon
++++ b/bin/pdfcocoon
+@@ -31,10 +31,11 @@ rescue LoadError
+   $: << ORIGAMIDIR
+   require 'origami'
+ end
+-include Origami
+ 
+ require 'optparse'
+ 
++include Origami
++
+ class OptParser
+   BANNER = <<USAGE
+ Usage: #{$0} [<PDF-file>] [-o <output-file>]
+--- a/bin/pdfcop
++++ b/bin/pdfcop
+@@ -34,13 +34,14 @@ rescue LoadError
+   $: << ORIGAMIDIR
+   require 'origami'
+ end
+-include Origami
+ 
+ require 'optparse'
+ require 'yaml'
+ require 'rexml/document'
+ require 'digest/md5'
+ 
++include Origami
++
+ DEFAULT_CONFIG_FILE = "/etc/origami/pdfcop.conf.yml"
+ DEFAULT_POLICY = "standard"
+ SECURITY_POLICIES = {}
+--- a/bin/pdfdecompress
++++ b/bin/pdfdecompress
+@@ -31,10 +31,11 @@ rescue LoadError
+   $: << ORIGAMIDIR
+   require 'origami'
+ end
+-include Origami
+ 
+ require 'optparse'
+ 
++include Origami
++
+ class OptParser
+   BANNER = <<USAGE
+ Usage: #{$0} [<PDF-file>] [-p <password>] [-o <output-file>]
+--- a/bin/pdfdecrypt
++++ b/bin/pdfdecrypt
+@@ -31,10 +31,11 @@ rescue LoadError
+   $: << ORIGAMIDIR
+   require 'origami'
+ end
+-include Origami
+ 
+ require 'optparse'
+ 
++include Origami
++
+ class OptParser
+   BANNER = <<USAGE
+ Usage: #{$0} [<PDF-file>] [-p <password>] [-o <output-file>]
+--- a/bin/pdfencrypt
++++ b/bin/pdfencrypt
+@@ -31,10 +31,10 @@ rescue LoadError
+   $: << ORIGAMIDIR
+   require 'origami'
+ end
+-include Origami
+-
+ require 'optparse'
+ 
++include Origami
++
+ class OptParser
+   BANNER = <<USAGE
+ Usage: #{$0} [<PDF-file>] [-p <password>] [-c <cipher>] [-s <key-size>] [--hardened] [-o <output-file>]
+--- a/bin/pdfexplode
++++ b/bin/pdfexplode
+@@ -30,11 +30,12 @@ rescue LoadError
+   $: << ORIGAMIDIR
+   require 'origami'
+ end
+-include Origami
+ 
+ require 'optparse'
+ require 'rexml/document'
+ 
++include Origami
++
+ class OptParser
+   BANNER = <<USAGE
+ Usage: #{$0} <PDF-file> [-r <range>] [-t pages|rsrc] [-d <output-directory>]
+--- a/bin/pdfextract
++++ b/bin/pdfextract
+@@ -34,11 +34,12 @@ rescue LoadError
+   $: << ORIGAMIDIR
+   require 'origami'
+ end
+-include Origami
+ 
+ require 'optparse'
+ require 'rexml/document'
+ 
++include Origami
++
+ class OptParser
+   BANNER = <<USAGE
+ Usage: #{$0} <PDF-file> [-afjms] [-d <output-directory>]
+--- a/bin/pdfmetadata
++++ b/bin/pdfmetadata
+@@ -31,10 +31,11 @@ rescue LoadError
+   $: << ORIGAMIDIR
+   require 'origami'
+ end
+-include Origami
+ 
+ require 'optparse'
+ 
++include Origami
++
+ class OptParser
+   BANNER = <<USAGE
+ Usage: #{$0} [<PDF-file>] [-i] [-x]
+--- a/bin/shell/.irbrc
++++ b/bin/shell/.irbrc
+@@ -5,11 +5,12 @@ rescue LoadError
+   $: << ORIGAMIDIR
+   require 'origami'
+ end
+-include Origami
+ 
+ require 'console.rb'
+ require 'readline'
+ 
++include Origami
++
+ OPENSSL_SUPPORT = (defined?(OpenSSL).nil?) ? 'no' : 'yes'
+ JAVASCRIPT_SUPPORT = (defined?(PDF::JavaScript::Engine).nil?) ? 'no' : 'yes'
+ DEFAULT_BANNER = "Welcome to the PDF shell (Origami release #{Origami::VERSION}) [OpenSSL: #{OPENSSL_SUPPORT}, JavaScript: #{JAVASCRIPT_SUPPORT}]\n\n"
diff --git a/debian/patches/series b/debian/patches/series
index af4353b..bd8c398 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 gemspec.patch
 paths.patch
+dont_include_before_requiring.patch

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



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