File: use_debian_datadir.patch

package info (click to toggle)
ruby-unicode-display-width 1.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 128 kB
  • ctags: 16
  • sloc: ruby: 160; makefile: 3
file content (12 lines) | stat: -rw-r--r-- 595 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
--- a/lib/unicode/display_width/constants.rb
+++ b/lib/unicode/display_width/constants.rb
@@ -2,7 +2,8 @@
   module DisplayWidth
     VERSION = '1.1.3'
     UNICODE_VERSION = "9.0.0".freeze
-    DATA_DIRECTORY = File.expand_path(File.dirname(__FILE__) + '/../../../data/').freeze
+    DEBIAN_DATA_DIRECTORY = '/usr/share/ruby-unicode-display-width/'
+    DATA_DIRECTORY = (File.directory?(DEBIAN_DATA_DIRECTORY) ? DEBIAN_DATA_DIRECTORY : File.expand_path(File.dirname(__FILE__) + '/../../../data/')).freeze
     INDEX_FILENAME = (DATA_DIRECTORY + '/display_width.marshal.gz').freeze
   end
 end