Description: redefine BASEDIR and DATADIR
Author: Cédric Boutillier <boutil@debian.org>
Last-Update: 2016-06-07

--- 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_spec.rb
+++ b/spec/acceptance/png_spec.rb
@@ -3,7 +3,7 @@
 require_relative "../../spec/spec_helper"
 
 describe "When making a pdf file with png images" do
-  image_dir = "#{Prawn::BASEDIR}/data/images"
+  image_dir = "#{Prawn::DATADIR}/images"
   images = [
     ["Type 0", "#{image_dir}/web-links.png"],
     ["Type 0 with transparency", "#{image_dir}/ruport_type0.png"],
