Description: redefine BASEDIR and DATADIR
Author: Cédric Boutillier <boutil@debian.org>
Last-Update: 2014-09-28

--- a/lib/prawn.rb
+++ b/lib/prawn.rb
@@ -19,7 +19,9 @@
   #
   #
   BASEDIR = File.expand_path(File.join(dir, '..'))
-  DATADIR = File.expand_path(File.join(dir, '..', 'data'))
+  # 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
@@ -3,11 +3,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
