emf2svg 1.8.2.1 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 538e00319831dda7add43b965668d972e69d24aea07e84d9a5d25dffb2a7e8b0
4
- data.tar.gz: 767056c9c62621aac370eb67ec6fab184ce815d8a3246c923b1ad568d4b9963b
3
+ metadata.gz: de3d80eff20c4ad3b510a3147dbf55f2b142c12b3932b8f72d1ec8437f421cb1
4
+ data.tar.gz: eecc6a586eb66fd3457da151141c1f962ee04b2b3de14a94c8ea007a0fde6f3e
5
5
  SHA512:
6
- metadata.gz: 37a2a3f284f0fdea54642343aa4f6c72f74400c657f17ac8c8d63375fdb776597bd923e05c3818da6df8df4b26bfa5f993696a03087d1777625525a583b73487
7
- data.tar.gz: f6cb40efb341c5d63a942495105d9da1c61c48ed0f7bf253ce645c6e76a947e706fed092bbd89ac973283190802b1cb461b292b6180e9ea5685be8dc7914dd5d
6
+ metadata.gz: d535e8c3b76eb0179e15fac723f74bc7740dc8cc716d4f94a8a065a15f645308349ccf5ff46928c619d52cc13ab1fba1132fe0cb75a20777912ddf30907be46c
7
+ data.tar.gz: 259fd34017a62b849799de36e2f43d24e8791a05522ef0251ca0d9da49f6ea25cb421310e8cfb16eb34089d11fc0a3edfc53335803450b830f7151cdac3c3346
@@ -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
- cross-build:
118
- name: build ${{ matrix.os }}, ${{ matrix.ruby-version }}, ${{ matrix.platform }}
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: aarch64-linux
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: Install Ubuntu packages
135
- if: startsWith(matrix.os, 'ubuntu')
154
+ - name: Build gem in Alpine container
155
+ env:
156
+ TARGET_PLATFORM: ${{ matrix.platform }}
136
157
  run: |
137
- sudo apt-get update
138
- sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu gperf autoconf autoconf-archive automake libtool
139
-
140
- - name: Install macOS packages
141
- if: startsWith(matrix.os, 'macos')
142
- run: brew install gperf autoconf autoconf-archive automake libtool
143
-
144
- - name: Install Ruby
145
- uses: ruby/setup-ruby@master
146
- with:
147
- ruby-version: ${{ matrix.ruby-version }}
148
- bundler-cache: true
149
-
150
- - name: Build native extension
151
- run: bundle exec rake gem:native:${{ matrix.platform }}
152
-
153
- - if: matrix.platform != 'aarch64-linux'
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, cross-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, cross-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
- cross:
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: aarch64-linux
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: Install Ubuntu packages
197
- if: startsWith(matrix.os, 'ubuntu')
211
+ - name: Build gem in Alpine container
212
+ env:
213
+ TARGET_PLATFORM: ${{ matrix.platform }}
198
214
  run: |
199
- sudo apt-get update
200
- sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu gperf autoconf autoconf-archive automake libtool
201
-
202
- - name: Install macOS packages
203
- if: startsWith(matrix.os, 'macos')
204
- run: brew install gperf autoconf autoconf-archive automake libtool
205
-
206
- - uses: ruby/setup-ruby@master
207
- with:
208
- ruby-version: ${{ matrix.ruby-version }}
209
- bundler-cache: true
210
-
211
- - run: bundle exec rake gem:native:${{ matrix.platform }}
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, cross ]
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` (GNU and `musl` flavors)
153
- * `aarch64-linux` (GNU and `musl` flavors)
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
@@ -34,7 +34,9 @@ end
34
34
  platforms = [
35
35
  "x64-mingw32",
36
36
  "x64-mingw-ucrt",
37
+ "aarch64-mingw-ucrt",
37
38
  "x86_64-linux",
39
+ "x86_64-linux-musl",
38
40
  "aarch64-linux",
39
41
  "x86_64-darwin",
40
42
  "arm64-darwin",
@@ -92,6 +92,11 @@ module Emf2svg
92
92
  end
93
93
 
94
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
+
95
100
  windows_native? || host_platform.eql?(target_platform)
96
101
  end
97
102
 
@@ -189,6 +194,12 @@ module Emf2svg
189
194
  case @host
190
195
  when /\Ax86_64.*mingw32/
191
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"
192
203
  when /\Ax86_64.*linux/
193
204
  "x86_64-linux"
194
205
  when /\A(arm64|aarch64).*linux/
@@ -209,8 +220,14 @@ module Emf2svg
209
220
  "arm64-darwin"
210
221
  when /\Ax86_64.*(darwin|macos|osx)/
211
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"
212
227
  when /\A(arm64|aarch64).*linux/
213
228
  "aarch64-linux"
229
+ when /\Aaarch64-mingw-ucrt/, /\A(arm64|aarch64).*mingw.*ucrt/
230
+ "aarch64-mingw-ucrt"
214
231
  else
215
232
  ENV.fetch("target_platform", host_platform)
216
233
  end
@@ -225,8 +242,14 @@ module Emf2svg
225
242
  "x64-osx"
226
243
  when "aarch64-linux"
227
244
  "arm64-linux"
245
+ when "aarch64-linux-musl"
246
+ "arm64-linux-musl"
228
247
  when "x86_64-linux"
229
248
  "x64-linux"
249
+ when "x86_64-linux-musl"
250
+ "x64-linux-musl"
251
+ when "aarch64-mingw-ucrt"
252
+ "arm64-windows-static"
230
253
  when /\Ax64-mingw(32|-ucrt)/
231
254
  "x64-mingw-static"
232
255
  end
@@ -239,14 +262,16 @@ module Emf2svg
239
262
  /Mach-O 64-bit dynamically linked shared library arm64/
240
263
  when "x86_64-darwin"
241
264
  /Mach-O 64-bit dynamically linked shared library x86_64/
242
- when "aarch64-linux"
265
+ when "aarch64-linux", "aarch64-linux-musl"
243
266
  /ELF 64-bit LSB shared object, ARM aarch64/
244
- when "x86_64-linux"
267
+ when "x86_64-linux", "x86_64-linux-musl"
245
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
246
274
  when /\Ax64-mingw(32|-ucrt)/
247
- # Modern `file` prints e.g. "PE32+ executable for MS Windows 6.00
248
- # (DLL), x86-64, 6 sections"; older prints "PE32+ executable
249
- # (DLL) (console) x86-64, for MS Windows". Match the stable bits.
250
275
  /PE32\+ executable.*\(DLL\).*x86-64/
251
276
  else
252
277
  "skip"
@@ -13,6 +13,6 @@ module Emf2svg
13
13
  #
14
14
  # See README.adoc -> "Versioning" for the rationale and examples.
15
15
  LIBEMF2SVG_VERSION = "1.8.2"
16
- LIBEMF2SVG_RUBY_ITERATION = 1
16
+ LIBEMF2SVG_RUBY_ITERATION = 2
17
17
  VERSION = "#{LIBEMF2SVG_VERSION}.#{LIBEMF2SVG_RUBY_ITERATION}"
18
18
  end
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.1
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-25 00:00:00.000000000 Z
11
+ date: 2026-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi