leptris 1.9.403.0-aarch64-linux → 1.9.403.1-aarch64-linux
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/Rakefile +17 -0
- data/ext/leptris/native/extconf.rb +6 -0
- data/ext/leptris/native/native.c +28 -7
- data/lib/leptris/version.rb +1 -1
- data/lib/leptris/xml/descriptor.rb +12 -3
- data/lib/leptris/xml/native.so +0 -0
- data/lib/leptris/xml/native_3_3.so +0 -0
- 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: b606f2e9f5830f242d5226b98f0ebedd00b09531156a6ad1430e5433342f3cd4
|
|
4
|
+
data.tar.gz: 1e9940a2f6b2682d2451ff080783315f6a72d32750ae36742df3a2f54552740b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b94cea3783af83c42846244eec207da859777860b777a381016e2681704e0a17f6b8687f8f04cce3a206320906a88f67df3640612a8f5736a7699f91c9e894a6
|
|
7
|
+
data.tar.gz: 8b76faa8a7e7a1c3575b147fbc32bbd1bb8351baca43e226f7cbb702c8270fabde833d1c23100d9fd15ae6ba9332850cc5dbfbf1435898e5bff76a3892740f8e
|
data/Rakefile
CHANGED
|
@@ -273,6 +273,23 @@ task :compile do
|
|
|
273
273
|
raise "utf8proc shared library not found after build" unless u8_lib
|
|
274
274
|
cp(u8_lib, "lib/#{File.basename(u8_lib)}")
|
|
275
275
|
sign_darwin_binaries("lib/libleptris#{ext}", "lib/#{File.basename(u8_lib)}")
|
|
276
|
+
# ruby#582 dev follow-through: a source checkout carrying the
|
|
277
|
+
# release-assembly vendor copy (lib/leptris/vendor/<platform>/)
|
|
278
|
+
# would shadow the fresh lib/ dylib — ffi_lib prefers vendor_dirs.
|
|
279
|
+
# Sync the platform copy so `rake compile` keeps every vendored
|
|
280
|
+
# location at the built engine version (CI source-install lanes
|
|
281
|
+
# hit the same shadow).
|
|
282
|
+
# the vendor dir spelling comes from the FFI loader's own platform
|
|
283
|
+
# derivation (RUBY_PLATFORM carries the darwin OS version:
|
|
284
|
+
# "arm64-darwin23" -> vendor "arm64-darwin")
|
|
285
|
+
cpu = RUBY_PLATFORM.split('-').first
|
|
286
|
+
os = RUBY_PLATFORM.include?('darwin') ? 'darwin' : 'linux'
|
|
287
|
+
vendor_dir = "lib/leptris/vendor/#{cpu}-#{os}"
|
|
288
|
+
if Dir.exist?(vendor_dir)
|
|
289
|
+
cp(lib, File.join(vendor_dir, "libleptris#{ext}"))
|
|
290
|
+
sign_darwin_binaries(File.join(vendor_dir, "libleptris#{ext}"))
|
|
291
|
+
puts "Synced #{vendor_dir}/libleptris#{ext}"
|
|
292
|
+
end
|
|
276
293
|
puts "Vendored #{File.basename(lib)} + #{File.basename(u8_lib)} into lib/"
|
|
277
294
|
|
|
278
295
|
# Opt-in native read layer ext (#185): built and vendored beside
|
|
@@ -165,4 +165,10 @@ end
|
|
|
165
165
|
# same basename — exported by native.c and pinned in the Windows
|
|
166
166
|
# .def above.
|
|
167
167
|
minor_us = RUBY_VERSION[/\A\d+\.\d+/].tr(".", "_")
|
|
168
|
+
# ruby#582: hide every internal symbol; only the Init_* entry
|
|
169
|
+
# points opt back in (visibility("default")). Linux's flat symbol
|
|
170
|
+
# scope otherwise lets another gem's exports hijack our calls.
|
|
171
|
+
unless RUBY_PLATFORM =~ /mswin|mingw/
|
|
172
|
+
append_cflags("-fvisibility=hidden")
|
|
173
|
+
end
|
|
168
174
|
create_makefile("leptris/xml/native_#{minor_us}")
|
data/ext/leptris/native/native.c
CHANGED
|
@@ -3701,6 +3701,11 @@ static VALUE leptris_native_resolve_rb(VALUE self, VALUE lib_path)
|
|
|
3701
3701
|
*/
|
|
3702
3702
|
#if defined(_WIN32)
|
|
3703
3703
|
# define LEPTRIS_INIT_EXPORT __declspec(dllexport)
|
|
3704
|
+
#elif defined(__GNUC__) || defined(__clang__)
|
|
3705
|
+
/* -fvisibility=hidden (extconf) keeps every internal symbol off
|
|
3706
|
+
* the dynamic table; the entry points opt back in (#582) so no
|
|
3707
|
+
* internal name can clash with another gem's exports. */
|
|
3708
|
+
# define LEPTRIS_INIT_EXPORT __attribute__((visibility("default")))
|
|
3704
3709
|
#else
|
|
3705
3710
|
# define LEPTRIS_INIT_EXPORT
|
|
3706
3711
|
#endif
|
|
@@ -3993,7 +3998,15 @@ static VALUE nf_capabilities(VALUE module) {
|
|
|
3993
3998
|
return hash;
|
|
3994
3999
|
}
|
|
3995
4000
|
|
|
3996
|
-
|
|
4001
|
+
/* leptris-ruby#582: the setup body is PRIVATE (static) so the
|
|
4002
|
+
* per-minor entry points call leptris's own code unconditionally.
|
|
4003
|
+
* MRI loads extensions into the global symbol scope on Linux —
|
|
4004
|
+
* when the per-minor entries called the exported `Init_native`,
|
|
4005
|
+
* a second gem's `Init_native` (loaded first) hijacked the call
|
|
4006
|
+
* and leptris's setup never ran (NativeNode undefined). The
|
|
4007
|
+
* exported plain `Init_native` stays only for the mkmf .def
|
|
4008
|
+
* contract; nothing in the gem loads it. */
|
|
4009
|
+
static void leptris_native_setup(void)
|
|
3997
4010
|
{
|
|
3998
4011
|
VALUE m_leptris, m_xml, m_native;
|
|
3999
4012
|
|
|
@@ -4236,9 +4249,17 @@ LEPTRIS_INIT_EXPORT void Init_native(void)
|
|
|
4236
4249
|
* unconditionally on every platform since ruby#476: the darwin/
|
|
4237
4250
|
* Linux per-minor bundles (native_<minor>) resolve these too —
|
|
4238
4251
|
* an artifact only ever loads under the Ruby minor it was built
|
|
4239
|
-
* against.
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
LEPTRIS_INIT_EXPORT void
|
|
4244
|
-
LEPTRIS_INIT_EXPORT void
|
|
4252
|
+
* against. Each entry calls the PRIVATE setup directly (#582):
|
|
4253
|
+
* routing through the exported `Init_native` let whichever gem
|
|
4254
|
+
* defined that symbol first win the call on Linux's flat
|
|
4255
|
+
* namespace. */
|
|
4256
|
+
LEPTRIS_INIT_EXPORT void Init_native_3_1(void) { leptris_native_setup(); }
|
|
4257
|
+
LEPTRIS_INIT_EXPORT void Init_native_3_2(void) { leptris_native_setup(); }
|
|
4258
|
+
LEPTRIS_INIT_EXPORT void Init_native_3_3(void) { leptris_native_setup(); }
|
|
4259
|
+
LEPTRIS_INIT_EXPORT void Init_native_3_4(void) { leptris_native_setup(); }
|
|
4260
|
+
LEPTRIS_INIT_EXPORT void Init_native_4_0(void) { leptris_native_setup(); }
|
|
4261
|
+
|
|
4262
|
+
/* The plain entry stays exported for the mkmf .def contract (see
|
|
4263
|
+
* the LEPTRIS_INIT_EXPORT note); the gem's own loader only ever
|
|
4264
|
+
* requires the per-minor bundles. */
|
|
4265
|
+
LEPTRIS_INIT_EXPORT void Init_native(void) { leptris_native_setup(); }
|
data/lib/leptris/version.rb
CHANGED
|
@@ -209,7 +209,12 @@ class Leptris::XML::Descriptor
|
|
|
209
209
|
# libleptris 1.9.312 (#1551): the root plan's serialization
|
|
210
210
|
# prefix (ns_form EXACT rows emit "prefix:local" and the
|
|
211
211
|
# xmlns declaration lands once on the output root).
|
|
212
|
-
|
|
212
|
+
# leptris#1941: the compiler's tree ns Hash carries the wire
|
|
213
|
+
# prefix ({exact:, prefix:}) — the emission prefix rides the
|
|
214
|
+
# same slot as an explicit plan[:ns_prefix].
|
|
215
|
+
prefix_src = plan[:ns_prefix] ||
|
|
216
|
+
(plan[:ns].is_a?(Hash) ? plan[:ns][:prefix] : nil)
|
|
217
|
+
ep[:ns_prefix] = anchor_string(anchors, prefix_src) if prefix_src
|
|
213
218
|
attrs = plan[:attributes] || []
|
|
214
219
|
attr_memory = attrs.empty? ? nil :
|
|
215
220
|
::FFI::MemoryPointer.new(Leptris::XML::FFI::AttrPlan, attrs.size)
|
|
@@ -233,7 +238,9 @@ class Leptris::XML::Descriptor
|
|
|
233
238
|
anchor_string(anchors, row[:ns].fetch(:exact)) : nil
|
|
234
239
|
# libleptris 1.9.312 (#1551): serialization prefix — with
|
|
235
240
|
# ns_form EXACT the attribute emits as "prefix:local".
|
|
236
|
-
|
|
241
|
+
aprefix = row[:ns_prefix] ||
|
|
242
|
+
(row[:ns].is_a?(Hash) ? row[:ns][:prefix] : nil)
|
|
243
|
+
ap[:ns_prefix] = anchor_string(anchors, aprefix) if aprefix
|
|
237
244
|
pack_predicates(ap, row, anchors)
|
|
238
245
|
end
|
|
239
246
|
ep[:attribute_count] = attrs.size
|
|
@@ -271,7 +278,9 @@ class Leptris::XML::Descriptor
|
|
|
271
278
|
# libleptris 1.9.312 (#1551): serialization prefix — with
|
|
272
279
|
# ns_form EXACT the element emits as "prefix:local" and
|
|
273
280
|
# its declaration lands once on the output root.
|
|
274
|
-
|
|
281
|
+
cprefix = row[:ns_prefix] ||
|
|
282
|
+
(row[:ns].is_a?(Hash) ? row[:ns][:prefix] : nil)
|
|
283
|
+
cp[:ns_prefix] = anchor_string(anchors, cprefix) if cprefix
|
|
275
284
|
pack_predicates(cp, row, anchors)
|
|
276
285
|
end
|
|
277
286
|
ep[:child_count] = children.size
|
data/lib/leptris/xml/native.so
CHANGED
|
Binary file
|
|
Binary file
|