page_print 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/page_print/extconf.rb +19 -0
- data/lib/page_print/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a292d88882b5668f65791fad5d942fc95890992419062715dd0b1b7a114381dd
|
|
4
|
+
data.tar.gz: d94937d5ebf7a2acb5cbe8becd1d40248c7a5d67ffda49529a343ed366e4e74a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eb9a9879bd184e68ad97e679f2d925d57b6a3f57461f61bf44bbce63b51db30d836578538e406539604a124d87919dd05452fdaeca0cbb633d9c5b110e563097
|
|
7
|
+
data.tar.gz: 31674df4b7e90f28cbcd0b7b97f69871734568fa4c1e3e67770dceefd502f2fceeea4dad0c25ca34833be885aedd22ac31ef7bccd814f6052ab84f076e2a9d8d
|
data/ext/page_print/extconf.rb
CHANGED
|
@@ -12,6 +12,24 @@ def page_print_native_platform
|
|
|
12
12
|
end
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
+
def restore_vendor_so_aliases(vendor_lib_dir)
|
|
16
|
+
manifest_path = File.join(vendor_lib_dir, 'so_aliases')
|
|
17
|
+
return unless File.file?(manifest_path)
|
|
18
|
+
|
|
19
|
+
File.foreach(manifest_path) do |line|
|
|
20
|
+
alias_name, target_name = line.strip.split("\t", 2)
|
|
21
|
+
next if alias_name.nil? || alias_name.empty? || target_name.nil? || target_name.empty?
|
|
22
|
+
next if alias_name.include?('/') || target_name.include?('/') || alias_name.start_with?('.') || target_name.start_with?('.')
|
|
23
|
+
|
|
24
|
+
alias_path = File.join(vendor_lib_dir, alias_name)
|
|
25
|
+
target_path = File.join(vendor_lib_dir, target_name)
|
|
26
|
+
next unless File.file?(target_path)
|
|
27
|
+
next if File.exist?(alias_path) || File.symlink?(alias_path)
|
|
28
|
+
|
|
29
|
+
File.symlink(target_name, alias_path)
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
15
33
|
project_root = File.expand_path('../..', __dir__)
|
|
16
34
|
vendor_platform = ENV.fetch('PAGE_PRINT_VENDOR_PLATFORM', page_print_native_platform)
|
|
17
35
|
vendor_dir = File.join(project_root, 'lib', 'page_print', 'vendor', vendor_platform)
|
|
@@ -19,6 +37,7 @@ vendor_include_dir = File.join(vendor_dir, 'include')
|
|
|
19
37
|
vendor_lib_dir = File.join(vendor_dir, 'lib')
|
|
20
38
|
|
|
21
39
|
if File.directory?(vendor_include_dir) && File.directory?(vendor_lib_dir)
|
|
40
|
+
restore_vendor_so_aliases(vendor_lib_dir)
|
|
22
41
|
dir_config('plutobook', vendor_include_dir, vendor_lib_dir)
|
|
23
42
|
|
|
24
43
|
if vendor_platform.end_with?('-linux')
|
data/lib/page_print/version.rb
CHANGED