leptris 1.9.412.2-ppc64le-linux → 1.9.412.3-ppc64le-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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b96c4194518fcc1db992ed3cd6bada8ba2039e59367d627b3696002bc2d653e9
4
- data.tar.gz: a5458e85fe85442f792e36c72f4abcdcacb52e122253cb37f8f752f9cd75866d
3
+ metadata.gz: 9db1f24c99a3207c37e013540f09c5be706fc9647090434a8bd08d9a8ce8cce2
4
+ data.tar.gz: 19c1b944bbc6ada8176d5e4c52727e0e151f05945c081f17bef36e19f6543108
5
5
  SHA512:
6
- metadata.gz: 4fb72313fd15cb0742eeb2c608af6501b089b4c7e6100b711a4f17d88362fdf2b7f8b0ccc105efef08081401cb10bb3044c5910a14a449c0a9e18b565c257a55
7
- data.tar.gz: 3e257754e1f1b993f0366dcf6ed687fa48683d665186e2aafb55a10562467819ff8cfa7da8750d38f51a03bf60e44c9ec40f94fd43703ac04f1ab932d9ce6460
6
+ metadata.gz: 1d1ec9859394242382d776ef559b349a6ef9c1b6240c16bc24a42e37b1f29f88cfb0bafb595b6a44c04250099dc18da96241acd8a91c8d47f19bfad14a38605f
7
+ data.tar.gz: 8b9500c7f958f24a6301d8c9e0edf4eb9f44bca54f39242975efd1f63b593ad66c25125392f4a3e5de581feafc9b6c1cd67467ce19586a1c2b6822cd3d7d0748
data/Rakefile CHANGED
@@ -181,9 +181,28 @@ 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
+ origin_rpath =
197
+ if RUBY_PLATFORM =~ /linux/
198
+ "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-z,origin -Wl,-rpath,\\$ORIGIN"
199
+ else
200
+ ""
201
+ end
184
202
  cmake_base =
185
203
  "#{CMAKE_FLAGS.join(' ').sub('-DLEPTRIS_ENABLE_UTF8PROC=OFF', '-DLEPTRIS_ENABLE_UTF8PROC=ON')} " \
186
- "-DCMAKE_PREFIX_PATH=#{u8_prefix} #{cflags.empty? ? '' : "-DCMAKE_C_FLAGS=#{cflags}"}"
204
+ "-DCMAKE_PREFIX_PATH=#{u8_prefix} #{cflags.empty? ? '' : "-DCMAKE_C_FLAGS=#{cflags}"} " \
205
+ "#{origin_rpath}".strip
187
206
 
188
207
  # Two-stage PGO (engine CMake: LEPTRIS_ENABLE_PGO GENERATE/USE;
189
208
  # 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.3"
5
5
  end
data/lib/libleptris.so CHANGED
Binary file
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.3
5
5
  platform: ppc64le-linux
6
6
  authors:
7
7
  - Ribose Inc.