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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 169eff31f74498423a1a2e143966ade6f58e912a548922f906fba8b64264e905
4
- data.tar.gz: 61a523b3f98cd4b36cdcd4b9fce35fa011995ef37a431a0b6379fa15e05a24c4
3
+ metadata.gz: a292d88882b5668f65791fad5d942fc95890992419062715dd0b1b7a114381dd
4
+ data.tar.gz: d94937d5ebf7a2acb5cbe8becd1d40248c7a5d67ffda49529a343ed366e4e74a
5
5
  SHA512:
6
- metadata.gz: 703a44815c6a315aabf6bafd7e8f2f355794f619689ed5b37b31b58ba83388176da9ddde484484c818fb9ebc13132e5b62cbe32613f72776c778cb500406be88
7
- data.tar.gz: 80a783772bd1ff36397aa6c830dd80373697664cd4a9d0e36a7d4798a87c906bf28683cca854b07f6edfd080b91fd5956d49cae22e35e9d2e04860f62c244b9a
6
+ metadata.gz: eb9a9879bd184e68ad97e679f2d925d57b6a3f57461f61bf44bbce63b51db30d836578538e406539604a124d87919dd05452fdaeca0cbb633d9c5b110e563097
7
+ data.tar.gz: 31674df4b7e90f28cbcd0b7b97f69871734568fa4c1e3e67770dceefd502f2fceeea4dad0c25ca34833be885aedd22ac31ef7bccd814f6052ab84f076e2a9d8d
@@ -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')
@@ -1,3 +1,3 @@
1
1
  module PagePrint
2
- VERSION = '0.1.6'
2
+ VERSION = '0.1.7'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: page_print
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dino Maric