emf2svg 1.8.2.0 → 1.8.2.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/.github/workflows/build.yml +49 -32
- data/.github/workflows/release.yml +42 -25
- data/README.adoc +11 -4
- data/Rakefile +2 -0
- data/lib/emf2svg/recipe.rb +48 -5
- data/lib/emf2svg/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: de3d80eff20c4ad3b510a3147dbf55f2b142c12b3932b8f72d1ec8437f421cb1
|
|
4
|
+
data.tar.gz: eecc6a586eb66fd3457da151141c1f962ee04b2b3de14a94c8ea007a0fde6f3e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d535e8c3b76eb0179e15fac723f74bc7740dc8cc716d4f94a8a065a15f645308349ccf5ff46928c619d52cc13ab1fba1132fe0cb75a20777912ddf30907be46c
|
|
7
|
+
data.tar.gz: 259fd34017a62b849799de36e2f43d24e8791a05522ef0251ca0d9da49f6ea25cb421310e8cfb16eb34089d11fc0a3edfc53335803450b830f7151cdac3c3346
|
data/.github/workflows/build.yml
CHANGED
|
@@ -72,13 +72,22 @@ jobs:
|
|
|
72
72
|
- os: ubuntu-latest
|
|
73
73
|
platform: x86_64-linux
|
|
74
74
|
ruby-version: ${{ needs.prepare.outputs.default-ruby-version }}
|
|
75
|
+
- os: ubuntu-24.04-arm
|
|
76
|
+
platform: aarch64-linux
|
|
77
|
+
ruby-version: ${{ needs.prepare.outputs.default-ruby-version }}
|
|
75
78
|
- os: windows-latest
|
|
76
79
|
platform: x64-mingw32
|
|
77
80
|
ruby-version: ${{ needs.prepare.outputs.default-ruby-version }}
|
|
78
81
|
- os: windows-latest
|
|
79
82
|
platform: x64-mingw-ucrt
|
|
80
83
|
ruby-version: ${{ needs.prepare.outputs.default-ruby-version }}
|
|
84
|
+
- os: windows-11-arm
|
|
85
|
+
platform: aarch64-mingw-ucrt
|
|
86
|
+
ruby-version: '3.4'
|
|
81
87
|
- os: macos-latest
|
|
88
|
+
platform: arm64-darwin
|
|
89
|
+
ruby-version: ${{ needs.prepare.outputs.default-ruby-version }}
|
|
90
|
+
- os: macos-15-intel
|
|
82
91
|
platform: x86_64-darwin
|
|
83
92
|
ruby-version: ${{ needs.prepare.outputs.default-ruby-version }}
|
|
84
93
|
steps:
|
|
@@ -114,8 +123,23 @@ jobs:
|
|
|
114
123
|
name: pkg-${{ matrix.platform }}
|
|
115
124
|
path: pkg/*.gem
|
|
116
125
|
|
|
117
|
-
|
|
118
|
-
|
|
126
|
+
# Musl builds run inside an Alpine container so the resulting libs
|
|
127
|
+
# link against musl libc, not the runner's glibc.
|
|
128
|
+
#
|
|
129
|
+
# GitHub Actions does not allow JS-based actions (checkout, upload-
|
|
130
|
+
# artifact, etc.) inside an Alpine container on ARM64 runners
|
|
131
|
+
# (limitation noted at actions/runner#2006). We therefore do the
|
|
132
|
+
# checkout and artifact upload on the host, and run the actual build
|
|
133
|
+
# via `docker run` with the workspace mounted.
|
|
134
|
+
#
|
|
135
|
+
# NOTE: aarch64-linux-musl is intentionally absent. vcpkg has no
|
|
136
|
+
# binary cache for arm64-linux-musl, so first-time builds compile
|
|
137
|
+
# freetype/fontconfig/libxml2/etc. from source on native arm64-musl,
|
|
138
|
+
# which consistently exceeds the 6h job timeout. Re-add once vcpkg
|
|
139
|
+
# publishes arm64-linux-musl binaries or we ship a pre-built Alpine
|
|
140
|
+
# arm64 image with the deps already compiled.
|
|
141
|
+
build-musl:
|
|
142
|
+
name: build-musl ${{ matrix.os }}, ${{ matrix.platform }}
|
|
119
143
|
runs-on: ${{ matrix.os }}
|
|
120
144
|
needs: prepare
|
|
121
145
|
strategy:
|
|
@@ -123,38 +147,31 @@ jobs:
|
|
|
123
147
|
matrix:
|
|
124
148
|
include:
|
|
125
149
|
- os: ubuntu-latest
|
|
126
|
-
platform:
|
|
127
|
-
ruby-version: ${{ needs.prepare.outputs.default-ruby-version }}
|
|
128
|
-
- os: macos-latest
|
|
129
|
-
platform: arm64-darwin
|
|
130
|
-
ruby-version: ${{ needs.prepare.outputs.default-ruby-version }}
|
|
150
|
+
platform: x86_64-linux-musl
|
|
131
151
|
steps:
|
|
132
152
|
- uses: actions/checkout@v4
|
|
133
153
|
|
|
134
|
-
- name:
|
|
135
|
-
|
|
154
|
+
- name: Build gem in Alpine container
|
|
155
|
+
env:
|
|
156
|
+
TARGET_PLATFORM: ${{ matrix.platform }}
|
|
136
157
|
run: |
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
uses: metanorma/ci/native-deps-action@main
|
|
155
|
-
with:
|
|
156
|
-
libname: emf2svg
|
|
157
|
-
directory: lib/emf2svg
|
|
158
|
+
docker run --rm \
|
|
159
|
+
-v "$PWD:/work" \
|
|
160
|
+
-w /work \
|
|
161
|
+
-e target_platform="${TARGET_PLATFORM}" \
|
|
162
|
+
alpine:3.20 sh -c '
|
|
163
|
+
set -eux
|
|
164
|
+
export VCPKG_FORCE_SYSTEM_BINARIES=1
|
|
165
|
+
apk add --no-cache \
|
|
166
|
+
build-base bash curl git cmake make ninja gcc g++ gperf \
|
|
167
|
+
automake autoconf autoconf-archive libtool linux-headers \
|
|
168
|
+
perl zip unzip tar python3 pkgconfig gcompat argp-standalone \
|
|
169
|
+
ruby ruby-dev ruby-bundler ruby-rake file
|
|
170
|
+
git config --global --add safe.directory /work
|
|
171
|
+
bundle config set --local path vendor/bundle
|
|
172
|
+
bundle install --jobs 4 --retry 3
|
|
173
|
+
bundle exec rake gem:native:"'"${TARGET_PLATFORM}"'"
|
|
174
|
+
'
|
|
158
175
|
|
|
159
176
|
- uses: actions/upload-artifact@v4
|
|
160
177
|
with:
|
|
@@ -162,7 +179,7 @@ jobs:
|
|
|
162
179
|
path: pkg/*.gem
|
|
163
180
|
|
|
164
181
|
test-build:
|
|
165
|
-
needs: [ prepare, build,
|
|
182
|
+
needs: [ prepare, build, build-musl ]
|
|
166
183
|
runs-on: ${{ matrix.os }}
|
|
167
184
|
|
|
168
185
|
continue-on-error: ${{ matrix.ruby.experimental }}
|
|
@@ -194,7 +211,7 @@ jobs:
|
|
|
194
211
|
ruby -remf2svg -e "puts File.write('output.svg', Emf2svg.from_file('spec/examples/image1.emf'), mode: 'wb')"
|
|
195
212
|
|
|
196
213
|
test-build-any:
|
|
197
|
-
needs: [ prepare, build,
|
|
214
|
+
needs: [ prepare, build, build-musl ]
|
|
198
215
|
runs-on: ${{ matrix.os }}
|
|
199
216
|
|
|
200
217
|
continue-on-error: ${{ matrix.ruby.experimental }}
|
|
@@ -130,15 +130,24 @@ jobs:
|
|
|
130
130
|
- os: ubuntu-latest
|
|
131
131
|
platform: x86_64-linux
|
|
132
132
|
ruby-version: '3.3'
|
|
133
|
+
- os: ubuntu-24.04-arm
|
|
134
|
+
platform: aarch64-linux
|
|
135
|
+
ruby-version: '3.3'
|
|
133
136
|
- os: windows-latest
|
|
134
137
|
platform: x64-mingw32
|
|
135
138
|
ruby-version: '3.3'
|
|
136
139
|
- os: windows-latest
|
|
137
140
|
platform: x64-mingw-ucrt
|
|
138
141
|
ruby-version: '3.3'
|
|
142
|
+
- os: windows-11-arm
|
|
143
|
+
platform: aarch64-mingw-ucrt
|
|
144
|
+
ruby-version: '3.4'
|
|
139
145
|
- os: macos-latest
|
|
140
146
|
platform: arm64-darwin
|
|
141
147
|
ruby-version: '3.3'
|
|
148
|
+
- os: macos-15-intel
|
|
149
|
+
platform: x86_64-darwin
|
|
150
|
+
ruby-version: '3.3'
|
|
142
151
|
steps:
|
|
143
152
|
- uses: actions/checkout@v4
|
|
144
153
|
with:
|
|
@@ -174,7 +183,17 @@ jobs:
|
|
|
174
183
|
run: |
|
|
175
184
|
ruby -remf2svg -e "puts File.write('output.svg', Emf2svg.from_file('spec/examples/image1.emf'), mode: 'wb')"
|
|
176
185
|
|
|
177
|
-
|
|
186
|
+
# Musl builds run inside an Alpine container so the resulting libs
|
|
187
|
+
# link against musl libc, not the runner's glibc.
|
|
188
|
+
#
|
|
189
|
+
# GitHub Actions does not allow JS-based actions inside an Alpine
|
|
190
|
+
# container on ARM64 runners. We do checkout + artifact on the host
|
|
191
|
+
# and run the build via `docker run` with the workspace mounted.
|
|
192
|
+
#
|
|
193
|
+
# NOTE: aarch64-linux-musl intentionally omitted -- vcpkg compiles
|
|
194
|
+
# all deps from source on arm64-musl and exceeds the 6h job limit.
|
|
195
|
+
# See build.yml for details.
|
|
196
|
+
build-musl:
|
|
178
197
|
needs: bump
|
|
179
198
|
if: always() && !cancelled() && !failure() && (needs.bump.result == 'success' || needs.bump.result == 'skipped')
|
|
180
199
|
runs-on: ${{ matrix.os }}
|
|
@@ -183,43 +202,41 @@ jobs:
|
|
|
183
202
|
matrix:
|
|
184
203
|
include:
|
|
185
204
|
- os: ubuntu-latest
|
|
186
|
-
platform:
|
|
187
|
-
ruby-version: '3.3'
|
|
188
|
-
- os: macos-latest
|
|
189
|
-
platform: x86_64-darwin
|
|
190
|
-
ruby-version: '3.3'
|
|
205
|
+
platform: x86_64-linux-musl
|
|
191
206
|
steps:
|
|
192
207
|
- uses: actions/checkout@v4
|
|
193
208
|
with:
|
|
194
209
|
ref: ${{ needs.bump.outputs.sha || github.ref }}
|
|
195
210
|
|
|
196
|
-
- name:
|
|
197
|
-
|
|
211
|
+
- name: Build gem in Alpine container
|
|
212
|
+
env:
|
|
213
|
+
TARGET_PLATFORM: ${{ matrix.platform }}
|
|
198
214
|
run: |
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
215
|
+
docker run --rm \
|
|
216
|
+
-v "$PWD:/work" \
|
|
217
|
+
-w /work \
|
|
218
|
+
-e target_platform="${TARGET_PLATFORM}" \
|
|
219
|
+
alpine:3.20 sh -c '
|
|
220
|
+
set -eux
|
|
221
|
+
export VCPKG_FORCE_SYSTEM_BINARIES=1
|
|
222
|
+
apk add --no-cache \
|
|
223
|
+
build-base bash curl git cmake make ninja gcc g++ gperf \
|
|
224
|
+
automake autoconf autoconf-archive libtool linux-headers \
|
|
225
|
+
perl zip unzip tar python3 pkgconfig gcompat argp-standalone \
|
|
226
|
+
ruby ruby-dev ruby-bundler ruby-rake file
|
|
227
|
+
git config --global --add safe.directory /work
|
|
228
|
+
bundle config set --local path vendor/bundle
|
|
229
|
+
bundle install --jobs 4 --retry 3
|
|
230
|
+
bundle exec rake gem:native:"'"${TARGET_PLATFORM}"'"
|
|
231
|
+
'
|
|
212
232
|
|
|
213
233
|
- uses: actions/upload-artifact@v4
|
|
214
234
|
with:
|
|
215
235
|
name: pkg-${{ matrix.platform }}
|
|
216
236
|
path: pkg/*.gem
|
|
217
237
|
|
|
218
|
-
- name: Install gem
|
|
219
|
-
run: gem install -b pkg/emf2svg-*.gem
|
|
220
|
-
|
|
221
238
|
publish:
|
|
222
|
-
needs: [ bump, build,
|
|
239
|
+
needs: [ bump, build, build-musl ]
|
|
223
240
|
if: always() && !cancelled() && !failure()
|
|
224
241
|
runs-on: ubuntu-latest
|
|
225
242
|
steps:
|
data/README.adoc
CHANGED
|
@@ -149,12 +149,19 @@ reliable installation step.
|
|
|
149
149
|
|
|
150
150
|
The pre-compiled platforms are:
|
|
151
151
|
|
|
152
|
-
* `x86_64-linux` (
|
|
153
|
-
* `
|
|
152
|
+
* `x86_64-linux` (glibc)
|
|
153
|
+
* `x86_64-linux-musl` (Alpine and other musl-based distros)
|
|
154
|
+
* `aarch64-linux` (glibc)
|
|
154
155
|
* `x86_64-darwin`
|
|
155
156
|
* `arm64-darwin`
|
|
156
|
-
* `x64-mingw32`
|
|
157
|
-
* `x64-mingw-ucrt`
|
|
157
|
+
* `x64-mingw32` (legacy RubyInstaller < 3.0)
|
|
158
|
+
* `x64-mingw-ucrt` (RubyInstaller >= 3.1)
|
|
159
|
+
* `aarch64-mingw-ucrt` (Windows on ARM)
|
|
160
|
+
|
|
161
|
+
NOTE: `aarch64-linux-musl` is not currently shipped. vcpkg has no
|
|
162
|
+
binary cache for that triplet, so first-time builds compile all deps
|
|
163
|
+
from source on native arm64-musl and exceed CI time limits. Track
|
|
164
|
+
re-adding it in a follow-up.
|
|
158
165
|
|
|
159
166
|
When installing the gem, Ruby will automatically select a pre-compiled version
|
|
160
167
|
suitable for your platform, or opt to install from source if the platform
|
data/Rakefile
CHANGED
data/lib/emf2svg/recipe.rb
CHANGED
|
@@ -41,9 +41,27 @@ module Emf2svg
|
|
|
41
41
|
# vcpkg into the work path before CMake configure runs.
|
|
42
42
|
def configure
|
|
43
43
|
bootstrap_vcpkg
|
|
44
|
+
export_toolchain_to_env
|
|
44
45
|
super
|
|
45
46
|
end
|
|
46
47
|
|
|
48
|
+
# Downstream consumers (e.g. metanorma) sometimes patch RbConfig at
|
|
49
|
+
# runtime to point Ruby's toolchain at a known-good compiler, but
|
|
50
|
+
# those overrides live in the Ruby process and don't reach the raw
|
|
51
|
+
# cmake subprocess that mini_portile2 spawns. The result is
|
|
52
|
+
# "CMAKE_C_COMPILER not set" when the deploy environment has a
|
|
53
|
+
# stripped PATH. Mirror the resolved RbConfig toolchain into ENV so
|
|
54
|
+
# the subprocess sees the same compiler the running Ruby was built
|
|
55
|
+
# with.
|
|
56
|
+
def export_toolchain_to_env
|
|
57
|
+
%w[CC CXX LDFLAGS].each do |var|
|
|
58
|
+
val = RbConfig::CONFIG[var]
|
|
59
|
+
next if val.nil? || val.empty?
|
|
60
|
+
|
|
61
|
+
ENV[var] = val
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
47
65
|
def bootstrap_vcpkg
|
|
48
66
|
vcpkg_root = File.join(work_path, "vcpkg")
|
|
49
67
|
return if vcpkg_bootstrapped?(vcpkg_root)
|
|
@@ -74,6 +92,11 @@ module Emf2svg
|
|
|
74
92
|
end
|
|
75
93
|
|
|
76
94
|
def drop_target_triplet?
|
|
95
|
+
# Windows ARM64 builds against MSVC with static linking. vcpkg's
|
|
96
|
+
# auto-detection would pick arm64-windows (dynamic) instead of
|
|
97
|
+
# arm64-windows-static, so always pass the triplet explicitly.
|
|
98
|
+
return false if target_platform == "aarch64-mingw-ucrt"
|
|
99
|
+
|
|
77
100
|
windows_native? || host_platform.eql?(target_platform)
|
|
78
101
|
end
|
|
79
102
|
|
|
@@ -171,6 +194,12 @@ module Emf2svg
|
|
|
171
194
|
case @host
|
|
172
195
|
when /\Ax86_64.*mingw32/
|
|
173
196
|
"x64-mingw32"
|
|
197
|
+
when /\A(aarch64|arm64).*mingw.*ucrt/
|
|
198
|
+
"aarch64-mingw-ucrt"
|
|
199
|
+
when /\Ax86_64.*linux-musl/
|
|
200
|
+
"x86_64-linux-musl"
|
|
201
|
+
when /\A(arm64|aarch64).*linux-musl/
|
|
202
|
+
"aarch64-linux-musl"
|
|
174
203
|
when /\Ax86_64.*linux/
|
|
175
204
|
"x86_64-linux"
|
|
176
205
|
when /\A(arm64|aarch64).*linux/
|
|
@@ -191,8 +220,14 @@ module Emf2svg
|
|
|
191
220
|
"arm64-darwin"
|
|
192
221
|
when /\Ax86_64.*(darwin|macos|osx)/
|
|
193
222
|
"x86_64-darwin"
|
|
223
|
+
when /\A(arm64|aarch64).*linux-musl/
|
|
224
|
+
"aarch64-linux-musl"
|
|
225
|
+
when /\Ax86_64.*linux-musl/
|
|
226
|
+
"x86_64-linux-musl"
|
|
194
227
|
when /\A(arm64|aarch64).*linux/
|
|
195
228
|
"aarch64-linux"
|
|
229
|
+
when /\Aaarch64-mingw-ucrt/, /\A(arm64|aarch64).*mingw.*ucrt/
|
|
230
|
+
"aarch64-mingw-ucrt"
|
|
196
231
|
else
|
|
197
232
|
ENV.fetch("target_platform", host_platform)
|
|
198
233
|
end
|
|
@@ -207,8 +242,14 @@ module Emf2svg
|
|
|
207
242
|
"x64-osx"
|
|
208
243
|
when "aarch64-linux"
|
|
209
244
|
"arm64-linux"
|
|
245
|
+
when "aarch64-linux-musl"
|
|
246
|
+
"arm64-linux-musl"
|
|
210
247
|
when "x86_64-linux"
|
|
211
248
|
"x64-linux"
|
|
249
|
+
when "x86_64-linux-musl"
|
|
250
|
+
"x64-linux-musl"
|
|
251
|
+
when "aarch64-mingw-ucrt"
|
|
252
|
+
"arm64-windows-static"
|
|
212
253
|
when /\Ax64-mingw(32|-ucrt)/
|
|
213
254
|
"x64-mingw-static"
|
|
214
255
|
end
|
|
@@ -221,14 +262,16 @@ module Emf2svg
|
|
|
221
262
|
/Mach-O 64-bit dynamically linked shared library arm64/
|
|
222
263
|
when "x86_64-darwin"
|
|
223
264
|
/Mach-O 64-bit dynamically linked shared library x86_64/
|
|
224
|
-
when "aarch64-linux"
|
|
265
|
+
when "aarch64-linux", "aarch64-linux-musl"
|
|
225
266
|
/ELF 64-bit LSB shared object, ARM aarch64/
|
|
226
|
-
when "x86_64-linux"
|
|
267
|
+
when "x86_64-linux", "x86_64-linux-musl"
|
|
227
268
|
/ELF 64-bit LSB shared object, x86-64/
|
|
269
|
+
when "aarch64-mingw-ucrt"
|
|
270
|
+
# `file` prints "PE32+ executable for MS Windows 6.02 (DLL),
|
|
271
|
+
# ARM64, 6 sections". Note: ARM64 (not AArch64), and (DLL)
|
|
272
|
+
# may appear before or after the arch token.
|
|
273
|
+
/PE32\+ executable.*ARM64/i
|
|
228
274
|
when /\Ax64-mingw(32|-ucrt)/
|
|
229
|
-
# Modern `file` prints e.g. "PE32+ executable for MS Windows 6.00
|
|
230
|
-
# (DLL), x86-64, 6 sections"; older prints "PE32+ executable
|
|
231
|
-
# (DLL) (console) x86-64, for MS Windows". Match the stable bits.
|
|
232
275
|
/PE32\+ executable.*\(DLL\).*x86-64/
|
|
233
276
|
else
|
|
234
277
|
"skip"
|
data/lib/emf2svg/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: emf2svg
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.8.2.
|
|
4
|
+
version: 1.8.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-07-
|
|
11
|
+
date: 2026-07-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: ffi
|