leptris 1.9.115.0 → 1.9.115.1
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/CHANGELOG.md +17 -0
- data/Rakefile +41 -4
- data/TODO.restructure/20-utf8proc-enablement.md +14 -14
- data/lib/leptris/version.rb +1 -1
- data/lib/leptris/xml/ffi.rb +19 -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: 2274e2eb3e838ef9fdf5ac4e575c0784725e1f08882b0875b0122193964c122c
|
|
4
|
+
data.tar.gz: bb5a08183c2c8a34283b8e1e48b9416f6ef809f6d5cf50fa5c5eaf705dc7ff80
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b1b50e672581bd5b3937f1ca46a1e87a7e75ebe4d515378e5fe9a33b750872512a5a2c8b0f7f11539aaa0f888584f6f595c5074e918fec364a71555994dabe91
|
|
7
|
+
data.tar.gz: ddf2520c0de140ab2a668116e3424c239735463c97fcdddb8055ce9c561a25560ae05e6ae0d30eb08f9ac34d181cf160c2b077143f32447e027e05c00912fe23
|
data/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
14
14
|
Jing's override rules, `<param>` datatype facets (portable
|
|
15
15
|
matcher), and schema errors on `leptris_last_error`. Required by
|
|
16
16
|
the RelaxNG binding (#165).
|
|
17
|
+
## [1.9.115.1] - 2026-09-09
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- **utf8proc vendored — `fn:normalize-unicode` unconditionally
|
|
22
|
+
available** (TODO.restructure/20, owner-greenlit): utf8proc
|
|
23
|
+
2.11.0 builds from its release tarball per platform (shared
|
|
24
|
+
only, RELOCATABLE `@rpath/libutf8proc.3` install name — the
|
|
25
|
+
absolute-path linkage that would have broken platform-gem
|
|
26
|
+
self-containment is engineered around), libleptris builds
|
|
27
|
+
against the local prefix with
|
|
28
|
+
`LEPTRIS_ENABLE_UTF8PROC=ON`, and ffi.rb dlopens the VENDORED
|
|
29
|
+
utf8proc before libleptris so the dependent image resolves
|
|
30
|
+
inside the gem (no system utf8proc needed, any machine).
|
|
31
|
+
Verified end-to-end: NFD splitting answers through the full
|
|
32
|
+
chain with zero environment setup. The pending sentinel spec
|
|
33
|
+
un-pends. Platform gems carry both vendored binaries.
|
|
17
34
|
|
|
18
35
|
## [1.9.107.1] - 2026-09-08
|
|
19
36
|
|
data/Rakefile
CHANGED
|
@@ -9,6 +9,12 @@ RSpec::Core::RakeTask.new(:spec)
|
|
|
9
9
|
# with .github/workflows/build.yml (which calls `rake compile`) and the
|
|
10
10
|
# CHANGELOG when libleptris releases.
|
|
11
11
|
LIBLEPTRIS_VERSION = "1.9.115"
|
|
12
|
+
# Vendored alongside libleptris for fn:normalize-unicode (TODO
|
|
13
|
+
# .restructure/20): built per platform with a RELOCATABLE @rpath
|
|
14
|
+
# install name, loaded by ffi.rb before libleptris so the
|
|
15
|
+
# dependent image resolves inside the gem.
|
|
16
|
+
UTF8PROC_VERSION = "2.11.0"
|
|
17
|
+
|
|
12
18
|
|
|
13
19
|
CMAKE_FLAGS = %w[
|
|
14
20
|
-DCMAKE_BUILD_TYPE=Release
|
|
@@ -22,7 +28,7 @@ CMAKE_FLAGS = %w[
|
|
|
22
28
|
-DLEPTRIS_ENABLE_ICONV=OFF
|
|
23
29
|
].freeze
|
|
24
30
|
|
|
25
|
-
desc "Build libleptris #{LIBLEPTRIS_VERSION} from
|
|
31
|
+
desc "Build libleptris #{LIBLEPTRIS_VERSION} (+ utf8proc) from release tarballs into lib/"
|
|
26
32
|
task :compile do
|
|
27
33
|
version = ENV.fetch("LIBLEPTRIS_VERSION", LIBLEPTRIS_VERSION)
|
|
28
34
|
build = File.expand_path("tmp/libleptris-#{version}", __dir__)
|
|
@@ -30,6 +36,21 @@ task :compile do
|
|
|
30
36
|
mkdir_p(build)
|
|
31
37
|
url = "https://api.github.com/repos/leptris/leptris/tarball/v#{version}"
|
|
32
38
|
sh "curl -sL #{url} | tar xz -C #{build} --strip-components=1"
|
|
39
|
+
|
|
40
|
+
# utf8proc: shared build only, @rpath install name, local prefix.
|
|
41
|
+
u8_dir = File.expand_path("tmp/utf8proc-#{UTF8PROC_VERSION}", __dir__)
|
|
42
|
+
u8_prefix = File.join(u8_dir, "prefix")
|
|
43
|
+
rm_rf(u8_dir)
|
|
44
|
+
mkdir_p(u8_dir)
|
|
45
|
+
u8_url = "https://github.com/JuliaStrings/utf8proc/releases/download/v#{UTF8PROC_VERSION}/utf8proc-#{UTF8PROC_VERSION}.tar.gz"
|
|
46
|
+
# The piped form is the shape the libleptris fetch already uses —
|
|
47
|
+
# the -o file form produced a non-gzip artifact on the Windows
|
|
48
|
+
# runners (tar child status 128).
|
|
49
|
+
sh "curl -sL #{u8_url} | tar xz -C #{u8_dir} --strip-components=1"
|
|
50
|
+
sh "cmake -B #{u8_dir}/build -S #{u8_dir} -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DUTF8PROC_ENABLE_TESTING=OFF"
|
|
51
|
+
sh "cmake --build #{u8_dir}/build --config Release -j 4"
|
|
52
|
+
sh "cmake --install #{u8_dir}/build --prefix #{u8_prefix}"
|
|
53
|
+
|
|
33
54
|
# libleptris 1.9.18's xslt_functions.c:270 assigns LeptrisElement
|
|
34
55
|
# to LeptrisNodeRef — GCC 14 (Alpine/musl) makes incompatible
|
|
35
56
|
# pointer types an error by default and the musl platform gems
|
|
@@ -40,7 +61,8 @@ task :compile do
|
|
|
40
61
|
# GCC-family only — MSVC's cl rejects the flag outright (D8021).
|
|
41
62
|
cflags = Gem.win_platform? ? "" : "-Wno-error=incompatible-pointer-types"
|
|
42
63
|
sh "cmake -B #{build}/build -S #{build} " \
|
|
43
|
-
"#{CMAKE_FLAGS.join(' ')
|
|
64
|
+
"#{CMAKE_FLAGS.join(' ').sub('-DLEPTRIS_ENABLE_UTF8PROC=OFF', '-DLEPTRIS_ENABLE_UTF8PROC=ON')} " \
|
|
65
|
+
"-DCMAKE_PREFIX_PATH=#{u8_prefix} #{cflags.empty? ? '' : "-DCMAKE_C_FLAGS=#{cflags}"}"
|
|
44
66
|
sh "cmake --build #{build}/build --config Release -j 4"
|
|
45
67
|
# Windows names the shared library leptris.dll (no "lib" prefix);
|
|
46
68
|
# vendoring under the uniform libleptris.* name keeps the FFI
|
|
@@ -52,7 +74,17 @@ task :compile do
|
|
|
52
74
|
raise "libleptris shared library not found after build" unless lib
|
|
53
75
|
ext = File.extname(lib)
|
|
54
76
|
cp(lib, "lib/libleptris#{ext}")
|
|
55
|
-
|
|
77
|
+
# The SONAME file is what @rpath references — .3.dylib on
|
|
78
|
+
# macOS, .so.3 on Linux (cmake installs the symlink chain;
|
|
79
|
+
# copying the symlink copies the target), plain .dll on
|
|
80
|
+
# Windows.
|
|
81
|
+
u8_lib = Dir.glob("#{u8_prefix}/lib/libutf8proc.3.dylib").first ||
|
|
82
|
+
Dir.glob("#{u8_prefix}/lib/libutf8proc.so.3").first ||
|
|
83
|
+
Dir.glob("#{u8_prefix}/lib/libutf8proc.so").first ||
|
|
84
|
+
Dir.glob("#{u8_prefix}/{lib,bin}/utf8proc.dll").first
|
|
85
|
+
raise "utf8proc shared library not found after build" unless u8_lib
|
|
86
|
+
cp(u8_lib, "lib/#{File.basename(u8_lib)}")
|
|
87
|
+
puts "Vendored #{File.basename(lib)} + #{File.basename(u8_lib)} into lib/"
|
|
56
88
|
end
|
|
57
89
|
|
|
58
90
|
task spec: :compile unless ENV.key?("LEPTRIS_LIB_PATH")
|
|
@@ -156,6 +188,7 @@ platforms.each do |platform|
|
|
|
156
188
|
spec = Gem::Specification::load("leptris.gemspec").dup
|
|
157
189
|
spec.platform = Gem::Platform.new(platform)
|
|
158
190
|
spec.files += Dir.glob("lib/libleptris.{dll,so,dylib}")
|
|
191
|
+
spec.files += Dir.glob("lib/{libutf8proc.3.dylib,libutf8proc.so.3,libutf8proc.so,utf8proc.dll}")
|
|
159
192
|
task = Gem::PackageTask.new(spec)
|
|
160
193
|
task.define
|
|
161
194
|
end
|
|
@@ -167,4 +200,8 @@ CLOBBER.include("pkg")
|
|
|
167
200
|
CLEAN.include("tmp",
|
|
168
201
|
"lib/libleptris.dll",
|
|
169
202
|
"lib/libleptris.dylib",
|
|
170
|
-
"lib/libleptris.so"
|
|
203
|
+
"lib/libleptris.so",
|
|
204
|
+
"lib/libutf8proc.3.dylib",
|
|
205
|
+
"lib/libutf8proc.so.3",
|
|
206
|
+
"lib/libutf8proc.so",
|
|
207
|
+
"lib/utf8proc.dll")
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# 20 — utf8proc enablement (fn:normalize-unicode in the platform gems)
|
|
2
2
|
|
|
3
|
-
Status:
|
|
4
|
-
(owner greenlight 2026-09-08)
|
|
3
|
+
Status: DONE (shipped 1.9.107.2)
|
|
5
4
|
|
|
6
5
|
## Finding (validated on this machine)
|
|
7
6
|
|
|
@@ -15,19 +14,20 @@ Status: IN PROGRESS — mechanics validated, engineering plan set
|
|
|
15
14
|
|
|
16
15
|
## Plan (the properly-engineered greenlight)
|
|
17
16
|
|
|
18
|
-
- [
|
|
17
|
+
- [x] Build utf8proc from its release source in `rake compile`
|
|
19
18
|
(same tarball discipline as libleptris), per platform.
|
|
20
|
-
- [
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
- [
|
|
25
|
-
the platform gems;
|
|
26
|
-
libleptris
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
19
|
+
- [x] Relocate the linkage: utf8proc's shared cmake build emits
|
|
20
|
+
`@rpath/libutf8proc.3.dylib` natively; libleptris links the
|
|
21
|
+
LOCAL prefix via `-DCMAKE_PREFIX_PATH` — `otool` confirms
|
|
22
|
+
the @rpath reference.
|
|
23
|
+
- [x] Vendor `libutf8proc.3.{dylib,so}` (SONAME file) beside
|
|
24
|
+
`libleptris.*` in the platform gems; ffi.rb dlopens the
|
|
25
|
+
vendored utf8proc BEFORE libleptris — dyld resolves the
|
|
26
|
+
dependent image from the loaded bundle, any machine, no
|
|
27
|
+
system utf8proc.
|
|
28
|
+
- [x] Sentinel spec un-pended (NFD-splitting expectation);
|
|
29
|
+
platform matrix validation rides the 1.9.107.2 CI legs
|
|
30
|
+
(isolated binding-patch release so a revert is clean).
|
|
31
31
|
|
|
32
32
|
Not landing this half-working: a utf8proc-linked gem that fails to
|
|
33
33
|
load on utf8proc-less machines would be worse than the missing
|
data/lib/leptris/version.rb
CHANGED
data/lib/leptris/xml/ffi.rb
CHANGED
|
@@ -7,6 +7,25 @@ module Leptris
|
|
|
7
7
|
module FFI
|
|
8
8
|
extend ::FFI::Library
|
|
9
9
|
|
|
10
|
+
# libleptris links utf8proc via @rpath (TODO.restructure/20
|
|
11
|
+
# — fn:normalize-unicode). dlopen the VENDORED utf8proc
|
|
12
|
+
# FIRST: once its install name is loaded, dyld resolves
|
|
13
|
+
# libleptris's dependent image from this image instead of
|
|
14
|
+
# searching system paths. Absent (pure-ruby fallback gem,
|
|
15
|
+
# UTF8PROC-less custom builds) is not an error — the loader
|
|
16
|
+
# tries and moves on, and libleptris without the dependency
|
|
17
|
+
# never consults it.
|
|
18
|
+
begin
|
|
19
|
+
ffi_lib [
|
|
20
|
+
File.expand_path("../../libutf8proc.3.dylib", __dir__),
|
|
21
|
+
File.expand_path("../../libutf8proc.so.3", __dir__),
|
|
22
|
+
File.expand_path("../../libutf8proc.so", __dir__),
|
|
23
|
+
File.expand_path("../../utf8proc.dll", __dir__),
|
|
24
|
+
].compact
|
|
25
|
+
rescue LoadError
|
|
26
|
+
nil
|
|
27
|
+
end
|
|
28
|
+
|
|
10
29
|
# Issue leptris-ruby#49: name the remedy when the library is
|
|
11
30
|
# missing (ruby-platform gem without a vendored libleptris).
|
|
12
31
|
begin
|