emf2svg 1.8.2.2 → 1.8.2.3
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 +9 -10
- data/.github/workflows/release.yml +9 -7
- data/README.adoc +1 -5
- data/Rakefile +1 -0
- data/lib/emf2svg/recipe.rb +21 -6
- data/lib/emf2svg/version.rb +1 -1
- 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: 19c3fdd0a05e010deec1fd9a81c7a4a50975bd7aa7825e2a786e6c26bb6aa7b7
|
|
4
|
+
data.tar.gz: b813a36aa0144ac7bce9c04e24fd2c552fe71406f0c4b43cc8c8541184962be5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5128fcb2a6231aa98a628b3e311f3fce40c166fdea817167064f0d047090055db7068379331ee20786eeff7d3b7e10e096f2377d400515877e1bcb6c3893c3a8
|
|
7
|
+
data.tar.gz: 7458d9fac36d80421280ed1947690dfc09bc7d03533e4c3ba20b53c86f96012de1f212c9e2ef551269f5875de84aa28590b87c3a934d83703600ca62d99c63e4
|
data/.github/workflows/build.yml
CHANGED
|
@@ -124,20 +124,16 @@ jobs:
|
|
|
124
124
|
path: pkg/*.gem
|
|
125
125
|
|
|
126
126
|
# Musl builds run inside an Alpine container so the resulting libs
|
|
127
|
-
# link against musl libc, not the runner's glibc.
|
|
127
|
+
# link against musl libc, not the runner's glibc. They link against
|
|
128
|
+
# the distro's own -dev packages (freetype/fontconfig/libxml2/libpng)
|
|
129
|
+
# via pkg-config -- vcpkg has no public binary cache for musl
|
|
130
|
+
# triplets, so building deps from source would exceed CI timeouts.
|
|
128
131
|
#
|
|
129
132
|
# GitHub Actions does not allow JS-based actions (checkout, upload-
|
|
130
133
|
# artifact, etc.) inside an Alpine container on ARM64 runners
|
|
131
134
|
# (limitation noted at actions/runner#2006). We therefore do the
|
|
132
135
|
# checkout and artifact upload on the host, and run the actual build
|
|
133
136
|
# 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
137
|
build-musl:
|
|
142
138
|
name: build-musl ${{ matrix.os }}, ${{ matrix.platform }}
|
|
143
139
|
runs-on: ${{ matrix.os }}
|
|
@@ -148,6 +144,8 @@ jobs:
|
|
|
148
144
|
include:
|
|
149
145
|
- os: ubuntu-latest
|
|
150
146
|
platform: x86_64-linux-musl
|
|
147
|
+
- os: ubuntu-24.04-arm
|
|
148
|
+
platform: aarch64-linux-musl
|
|
151
149
|
steps:
|
|
152
150
|
- uses: actions/checkout@v4
|
|
153
151
|
|
|
@@ -161,11 +159,12 @@ jobs:
|
|
|
161
159
|
-e target_platform="${TARGET_PLATFORM}" \
|
|
162
160
|
alpine:3.20 sh -c '
|
|
163
161
|
set -eux
|
|
164
|
-
export VCPKG_FORCE_SYSTEM_BINARIES=1
|
|
165
162
|
apk add --no-cache \
|
|
166
163
|
build-base bash curl git cmake make ninja gcc g++ gperf \
|
|
167
164
|
automake autoconf autoconf-archive libtool linux-headers \
|
|
168
|
-
perl zip unzip tar python3 pkgconfig
|
|
165
|
+
perl zip unzip tar python3 pkgconfig \
|
|
166
|
+
freetype-dev fontconfig-dev libpng-dev libxml2-dev \
|
|
167
|
+
gettext-dev zlib-dev \
|
|
169
168
|
ruby ruby-dev ruby-bundler ruby-rake file
|
|
170
169
|
git config --global --add safe.directory /work
|
|
171
170
|
bundle config set --local path vendor/bundle
|
|
@@ -184,15 +184,14 @@ jobs:
|
|
|
184
184
|
ruby -remf2svg -e "puts File.write('output.svg', Emf2svg.from_file('spec/examples/image1.emf'), mode: 'wb')"
|
|
185
185
|
|
|
186
186
|
# Musl builds run inside an Alpine container so the resulting libs
|
|
187
|
-
# link against musl libc, not the runner's glibc.
|
|
187
|
+
# link against musl libc, not the runner's glibc. They link against
|
|
188
|
+
# the distro's own -dev packages (freetype/fontconfig/libxml2/libpng)
|
|
189
|
+
# via pkg-config -- vcpkg has no public binary cache for musl
|
|
190
|
+
# triplets, so building deps from source would exceed CI timeouts.
|
|
188
191
|
#
|
|
189
192
|
# GitHub Actions does not allow JS-based actions inside an Alpine
|
|
190
193
|
# container on ARM64 runners. We do checkout + artifact on the host
|
|
191
194
|
# 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
195
|
build-musl:
|
|
197
196
|
needs: bump
|
|
198
197
|
if: always() && !cancelled() && !failure() && (needs.bump.result == 'success' || needs.bump.result == 'skipped')
|
|
@@ -203,6 +202,8 @@ jobs:
|
|
|
203
202
|
include:
|
|
204
203
|
- os: ubuntu-latest
|
|
205
204
|
platform: x86_64-linux-musl
|
|
205
|
+
- os: ubuntu-24.04-arm
|
|
206
|
+
platform: aarch64-linux-musl
|
|
206
207
|
steps:
|
|
207
208
|
- uses: actions/checkout@v4
|
|
208
209
|
with:
|
|
@@ -218,11 +219,12 @@ jobs:
|
|
|
218
219
|
-e target_platform="${TARGET_PLATFORM}" \
|
|
219
220
|
alpine:3.20 sh -c '
|
|
220
221
|
set -eux
|
|
221
|
-
export VCPKG_FORCE_SYSTEM_BINARIES=1
|
|
222
222
|
apk add --no-cache \
|
|
223
223
|
build-base bash curl git cmake make ninja gcc g++ gperf \
|
|
224
224
|
automake autoconf autoconf-archive libtool linux-headers \
|
|
225
|
-
perl zip unzip tar python3 pkgconfig
|
|
225
|
+
perl zip unzip tar python3 pkgconfig \
|
|
226
|
+
freetype-dev fontconfig-dev libpng-dev libxml2-dev \
|
|
227
|
+
gettext-dev zlib-dev \
|
|
226
228
|
ruby ruby-dev ruby-bundler ruby-rake file
|
|
227
229
|
git config --global --add safe.directory /work
|
|
228
230
|
bundle config set --local path vendor/bundle
|
data/README.adoc
CHANGED
|
@@ -152,17 +152,13 @@ The pre-compiled platforms are:
|
|
|
152
152
|
* `x86_64-linux` (glibc)
|
|
153
153
|
* `x86_64-linux-musl` (Alpine and other musl-based distros)
|
|
154
154
|
* `aarch64-linux` (glibc)
|
|
155
|
+
* `aarch64-linux-musl` (Alpine and other musl-based distros)
|
|
155
156
|
* `x86_64-darwin`
|
|
156
157
|
* `arm64-darwin`
|
|
157
158
|
* `x64-mingw32` (legacy RubyInstaller < 3.0)
|
|
158
159
|
* `x64-mingw-ucrt` (RubyInstaller >= 3.1)
|
|
159
160
|
* `aarch64-mingw-ucrt` (Windows on ARM)
|
|
160
161
|
|
|
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.
|
|
165
|
-
|
|
166
162
|
When installing the gem, Ruby will automatically select a pre-compiled version
|
|
167
163
|
suitable for your platform, or opt to install from source if the platform
|
|
168
164
|
is not supported.
|
data/Rakefile
CHANGED
data/lib/emf2svg/recipe.rb
CHANGED
|
@@ -38,9 +38,14 @@ module Emf2svg
|
|
|
38
38
|
|
|
39
39
|
# Since libemf2svg v1.8.2 the source tarball no longer bundles the
|
|
40
40
|
# vcpkg tool (it moved too fast to ship as a snapshot). We bootstrap
|
|
41
|
-
# vcpkg into the work path before CMake configure runs
|
|
41
|
+
# vcpkg into the work path before CMake configure runs -- unless
|
|
42
|
+
# we're targeting musl, in which case vcpkg has no public binary
|
|
43
|
+
# cache for arm64-linux-musl / x64-linux-musl and would compile
|
|
44
|
+
# every dependency from source (hours). For musl we use the
|
|
45
|
+
# distribution's own -dev packages (freetype, fontconfig, etc.)
|
|
46
|
+
# via pkg-config instead.
|
|
42
47
|
def configure
|
|
43
|
-
bootstrap_vcpkg
|
|
48
|
+
bootstrap_vcpkg unless use_system_libs?
|
|
44
49
|
export_toolchain_to_env
|
|
45
50
|
super
|
|
46
51
|
end
|
|
@@ -110,15 +115,25 @@ module Emf2svg
|
|
|
110
115
|
opts << "-DCMAKE_BUILD_TYPE=Release"
|
|
111
116
|
opts << "-DLONLY=ON"
|
|
112
117
|
|
|
113
|
-
unless
|
|
114
|
-
|
|
118
|
+
unless use_system_libs?
|
|
119
|
+
unless target_triplet.nil? || drop_target_triplet?
|
|
120
|
+
opts << "-DVCPKG_TARGET_TRIPLET=#{target_triplet}"
|
|
121
|
+
end
|
|
122
|
+
opts << "-DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake"
|
|
115
123
|
end
|
|
116
124
|
|
|
117
|
-
opts << "-DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake"
|
|
118
|
-
|
|
119
125
|
opts
|
|
120
126
|
end
|
|
121
127
|
|
|
128
|
+
# Musl builds link against the distro's own -dev packages
|
|
129
|
+
# (freetype, fontconfig, libxml2, libpng) via pkg-config. This
|
|
130
|
+
# sidesteps vcpkg's lack of a public binary cache for musl
|
|
131
|
+
# triplets, which otherwise forces from-source compiles that
|
|
132
|
+
# exceed CI timeouts.
|
|
133
|
+
def use_system_libs?
|
|
134
|
+
target_platform.end_with?("-linux-musl")
|
|
135
|
+
end
|
|
136
|
+
|
|
122
137
|
def compile
|
|
123
138
|
execute("compile", "#{make_cmd} --target emf2svg")
|
|
124
139
|
end
|
data/lib/emf2svg/version.rb
CHANGED