leptris 1.9.412.2 → 1.9.412.4

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: 316684999cdbebb5f718d8e5696a2a87b9b52e1c44b3827490e9cdcd2d1150b9
4
- data.tar.gz: 28a2c5e317fc4422c006cc20fd12ce34cc1950b6bdf7b7995e4e525a1346a4d9
3
+ metadata.gz: dca73d9d919d70d6b135d7810d7b7caee6ad77c1875755730b4a043161a59317
4
+ data.tar.gz: 3e64fa9ca15e0c6318c6ccae986c12d5f3b996669e77ab95dd8bddd3255c975c
5
5
  SHA512:
6
- metadata.gz: e32440bb06c0109911724761c42541a376dc98e100069461ed161dab761c19e9a56b4ea0b62939b76ca731915971c9923452108a488eb867296df9ed2583d903
7
- data.tar.gz: 321db8645cd5df16648f5707e75b0000a045126eb0a4747cdc5a64208cd361810953d0bdeeb4d80169a3cc170f3dccacd17336e838789503880667c026e820e2
6
+ metadata.gz: 990d26a4708c4a7fd23fdf80b5f85d14a3cf571ae41cd80589fb9565423ebb18d7e56d6c20b183c276e1ba56ce2b919fd745105d125debcee407e85bbc04e7e6
7
+ data.tar.gz: 136119320baf1c2bce5c07528b0c3eaee5e2035bc3c2e0880a046862e63a738494785af4289c4e6111167846aa0268b5eb0ebec9a8ffff3d307cbd74bfde6b68
data/Rakefile CHANGED
@@ -181,9 +181,34 @@ task :compile do
181
181
  # 11.0 = the oldest macOS GitHub still hosts runners for;
182
182
  # matches extconf.rb.
183
183
  ENV["MACOSX_DEPLOYMENT_TARGET"] ||= "11.0" if RUBY_PLATFORM =~ /darwin/
184
+ # Linux: the vendored libutf8proc sits BESIDE libleptris in the gem's
185
+ # lib/ — resolve it by $ORIGIN, not by the build prefix's absolute
186
+ # RUNPATH and not by the ffi pre-load trick. The trick works on glibc
187
+ # and dyld (both reuse an already-loaded SONAME/install-name when
188
+ # resolving a later NEEDED entry) but NOT on musl, whose dependency
189
+ # search consults the filesystem paths only — the tebako musl smoke
190
+ # (packed-metanorma) failed exactly there: libleptris loaded, its
191
+ # libutf8proc.so.3 unfound. $ORIGIN is honored by glibc, musl, and
192
+ # any ELF loader; `-z origin` sets DF_ORIGIN for the loaders that
193
+ # gate on it. The `\$` survives Rake's `sh` (a shell).
194
+ # macOS keeps @rpath + the ffi pre-load (working, and $ORIGIN is not
195
+ # the macOS spelling); Windows has no rpath at all.
196
+ # The whole -D value must be ONE shell word: cmake_base runs through
197
+ # Rake's `sh` (bash), and an unquoted space splits it — cmake then
198
+ # sees SHARED_LINKER_FLAGS="-Wl,-z,origin" (rpath lost as a stray
199
+ # positional; the 1.9.412.3 gems shipped without the $ORIGIN RUNPATH
200
+ # for exactly this reason). The embedded double quotes survive bash;
201
+ # the backslash keeps $ORIGIN literal through the same shell.
202
+ origin_rpath =
203
+ if RUBY_PLATFORM =~ /linux/
204
+ '"-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-z,origin -Wl,-rpath,\\$ORIGIN"'
205
+ else
206
+ ""
207
+ end
184
208
  cmake_base =
185
209
  "#{CMAKE_FLAGS.join(' ').sub('-DLEPTRIS_ENABLE_UTF8PROC=OFF', '-DLEPTRIS_ENABLE_UTF8PROC=ON')} " \
186
- "-DCMAKE_PREFIX_PATH=#{u8_prefix} #{cflags.empty? ? '' : "-DCMAKE_C_FLAGS=#{cflags}"}"
210
+ "-DCMAKE_PREFIX_PATH=#{u8_prefix} #{cflags.empty? ? '' : "-DCMAKE_C_FLAGS=#{cflags}"} " \
211
+ "#{origin_rpath}".strip
187
212
 
188
213
  # Two-stage PGO (engine CMake: LEPTRIS_ENABLE_PGO GENERATE/USE;
189
214
  # measured ~20% CPU on the DOM parse path, v1.9.188 worktree A/B,
@@ -69,13 +69,25 @@ if !prebuilt && File.directory?(File.join(vendored, "libleptris")) &&
69
69
  eng_src = File.join(vendored, "libleptris")
70
70
  eng_bld = File.join(vendored, "libleptris-build")
71
71
  FileUtils.mkpath(eng_bld)
72
+ # Linux: resolve the vendored libutf8proc by $ORIGIN (it installs
73
+ # BESIDE libleptris in the gem's lib/). glibc/dyld forgive the
74
+ # missing rpath through their soname/install-name reuse of the ffi
75
+ # pre-load; musl does not (its dependency search reads filesystem
76
+ # paths only). Array spawn: no shell, `$ORIGIN` passes literally.
77
+ origin_flags =
78
+ if RUBY_PLATFORM =~ /linux/
79
+ ["-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-z,origin -Wl,-rpath,$ORIGIN"]
80
+ else
81
+ []
82
+ end
72
83
  sh_ok.call("cmake", "-B", eng_bld, "-S", eng_src,
73
84
  "-DCMAKE_BUILD_TYPE=Release",
74
85
  "-DLEPTRIS_BUILD_SHARED=ON", "-DLEPTRIS_BUILD_STATIC=OFF",
75
86
  "-DBUILD_TESTING=OFF", "-DLEPTRIS_BUILD_CLI=OFF",
76
87
  "-DLEPTRIS_BUILD_BENCHMARKS=OFF", "-DLEPTRIS_BUILD_MAN_PAGES=OFF",
77
88
  "-DLEPTRIS_ENABLE_UTF8PROC=ON",
78
- "-DCMAKE_PREFIX_PATH=#{u8_pre}")
89
+ "-DCMAKE_PREFIX_PATH=#{u8_pre}",
90
+ *origin_flags)
79
91
  sh_ok.call("cmake", "--build", eng_bld, "--config", "Release",
80
92
  ENV.fetch("MAKEFLAGS", "-j4").split.first || "-j4")
81
93
  built = Dir.glob(File.join(eng_bld, "**", "libleptris.{so,dylib,dll}")).first
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Leptris
4
- VERSION = "1.9.412.2"
4
+ VERSION = "1.9.412.4"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leptris
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.412.2
4
+ version: 1.9.412.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.