pico_phone 0.6.1 → 0.6.2
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/pico_phone/extconf.rb +11 -0
- data/lib/pico_phone/version.rb +1 -1
- data/lib/pico_phone.rb +23 -2
- 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: 531d0661fc329cddcf748e6d369ce736f0d55e424e9bcf3e12ae20cd603f1986
|
|
4
|
+
data.tar.gz: 026e44c1ae5fe953b21326438534fdfc81484e9bf1c606c183e385a1b1356b53
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7a6de20bf0c071c4a642ee8fe82d91418e04261a22a2a32a5b9732145e2b06db6c9528a61fb15a40ec61fda819a6674831e66da02d0066f3b4c2d1def708eeac
|
|
7
|
+
data.tar.gz: 2fedbde2893b28cd38ec37613e51613508ad89a3679f2d6a604a612d691e5ce503ea533d2536ac0f50ed5b111dc19afcccfd947ccb77608fd2bbf3e0b6456320
|
data/ext/pico_phone/extconf.rb
CHANGED
|
@@ -115,4 +115,15 @@ else
|
|
|
115
115
|
end
|
|
116
116
|
end
|
|
117
117
|
|
|
118
|
+
# Ruby builds with --enable-shared (used by ruby/setup-ruby, official Docker images, Homebrew, and
|
|
119
|
+
# most system packages) make mkmf hard-link every extension against a build-specific libruby.so/
|
|
120
|
+
# .dylib via LIBRUBYARG_SHARED, on top of -Wl,-undefined,dynamic_lookup which alone is already
|
|
121
|
+
# sufficient for symbol resolution at load time. On macOS that dependency is an absolute path tied
|
|
122
|
+
# to wherever that particular Ruby happened to be installed -- which cannot exist on any other
|
|
123
|
+
# machine, breaking every precompiled native gem once it's moved off the machine that built it,
|
|
124
|
+
# regardless of Ruby version. Drop it so the compiled extension only depends on libraries it
|
|
125
|
+
# actually needs.
|
|
126
|
+
$LIBRUBYARG_SHARED = ""
|
|
127
|
+
$LIBRUBYARG = ""
|
|
128
|
+
|
|
118
129
|
create_makefile("pico_phone/pico_phone")
|
data/lib/pico_phone/version.rb
CHANGED
data/lib/pico_phone.rb
CHANGED
|
@@ -1,8 +1,29 @@
|
|
|
1
1
|
# encoding: UTF-8
|
|
2
2
|
# frozen_string_literal: true
|
|
3
3
|
require "pico_phone/version"
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
# Native/precompiled gems ship one binary per Ruby minor actually tested in CI (bucketed by
|
|
6
|
+
# major.minor, e.g. "3.1", "3.4", "4.0") under lib/pico_phone/<major.minor>/. This is an EXACT
|
|
7
|
+
# match only, deliberately -- a binary built under one minor can produce wrong results (not just
|
|
8
|
+
# fail to load) under a different minor, because Rice (the C++ binding layer) is header-only and
|
|
9
|
+
# some Ruby C-API usage compiles down to macros that bake in that minor's internal struct layout.
|
|
10
|
+
# Ruby's "ABI stable within a major series" promise doesn't cover that, so there is no safe
|
|
11
|
+
# cross-minor fallback here. Source/dynamic gem installs (compiled fresh at `gem install` time
|
|
12
|
+
# against system libphonenumber) never have any lib/pico_phone/<major.minor>/ directory -- they
|
|
13
|
+
# fall straight through to the flat path below, unchanged from before this loader existed.
|
|
14
|
+
begin
|
|
15
|
+
abi = RUBY_VERSION.split(".").first(2).join(".")
|
|
16
|
+
bucket = File.join(__dir__, "pico_phone", abi)
|
|
17
|
+
|
|
18
|
+
if File.directory?(bucket)
|
|
19
|
+
require "pico_phone/#{abi}/pico_phone"
|
|
20
|
+
else
|
|
21
|
+
require "pico_phone/pico_phone"
|
|
22
|
+
end
|
|
23
|
+
rescue LoadError
|
|
24
|
+
require "pico_phone/pico_phone"
|
|
25
|
+
end
|
|
5
26
|
|
|
6
27
|
module PicoPhone
|
|
7
28
|
class Error < StandardError; end
|
|
8
|
-
end
|
|
29
|
+
end
|