emf2svg 1.2.1-x64-mingw32 → 1.4.0-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/build.yml +184 -0
- data/.github/workflows/release.yml +71 -62
- data/.rubocop.yml +1 -1
- data/README.adoc +28 -20
- data/Rakefile +2 -1
- data/emf2svg.gemspec +1 -1
- data/lib/emf2svg/brotlicommon.dll +0 -0
- data/lib/emf2svg/brotlidec.dll +0 -0
- data/lib/emf2svg/bz2.dll +0 -0
- data/lib/emf2svg/emf2svg.dll +0 -0
- data/lib/emf2svg/fontconfig-1.dll +0 -0
- data/lib/emf2svg/freetype.dll +0 -0
- data/lib/emf2svg/iconv-2.dll +0 -0
- data/lib/emf2svg/libexpat.dll +0 -0
- data/lib/emf2svg/libpng16.dll +0 -0
- data/lib/emf2svg/recipe.rb +44 -20
- data/lib/emf2svg/version.rb +1 -1
- data/lib/emf2svg/zlib1.dll +0 -0
- metadata +4 -4
- data/.github/workflows/main.yml +0 -163
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f62a09ddc9929d899586dacfa0f729bddf1dc8590bbfe149f56cc10efb896ba4
|
4
|
+
data.tar.gz: 01a4f15203237e2bd9847a517ebae2a7077e20c2a6e21f322ee7066d68fd9eec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a650b02d9abfd0473c2d42987cfa24e198b95a342f1befacd6ace309c7b12bf24fa5ecbb528af44bf6981a2b02e25b3da33263088e5902c60f23c003657d612
|
7
|
+
data.tar.gz: ad8bb29e1a511d29345a03132c17b8ddbb3f321ab919824d2fadb8525adf2d3c58f821e247efedd4b8191a56a7d368063fda7c710f2d0c4d46100b0ee5902933
|
@@ -0,0 +1,184 @@
|
|
1
|
+
name: build
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ main ]
|
6
|
+
paths-ignore:
|
7
|
+
- '*.adoc'
|
8
|
+
pull_request:
|
9
|
+
workflow_dispatch:
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
test:
|
13
|
+
runs-on: ${{ matrix.os }}
|
14
|
+
strategy:
|
15
|
+
fail-fast: false
|
16
|
+
matrix:
|
17
|
+
os: [ ubuntu-18.04, ubuntu-latest, windows-latest, macos-latest ]
|
18
|
+
ruby-version: [ '2.7' ]
|
19
|
+
include:
|
20
|
+
- os: windows-latest
|
21
|
+
ruby-version: '3.1'
|
22
|
+
steps:
|
23
|
+
- uses: actions/checkout@v3
|
24
|
+
|
25
|
+
- uses: ruby/setup-ruby@v1
|
26
|
+
with:
|
27
|
+
bundler-cache: true
|
28
|
+
ruby-version: ${{ matrix.ruby-version }}
|
29
|
+
|
30
|
+
# https://github.com/microsoft/vcpkg/issues/15931
|
31
|
+
# no good solution :(
|
32
|
+
- name: Workaround for vcpkg
|
33
|
+
if: startsWith(matrix.os, 'ubuntu')
|
34
|
+
run: |
|
35
|
+
sudo apt-get update
|
36
|
+
sudo apt-get install gperf
|
37
|
+
|
38
|
+
- run: bundle exec rake
|
39
|
+
|
40
|
+
build:
|
41
|
+
runs-on: ${{ matrix.os }}
|
42
|
+
strategy:
|
43
|
+
fail-fast: false
|
44
|
+
matrix:
|
45
|
+
include:
|
46
|
+
- os: ubuntu-18.04
|
47
|
+
platform: any
|
48
|
+
ruby-version: '2.7'
|
49
|
+
- os: ubuntu-18.04
|
50
|
+
platform: x86_64-linux
|
51
|
+
ruby-version: '2.7'
|
52
|
+
- os: windows-latest
|
53
|
+
platform: x64-mingw32
|
54
|
+
ruby-version: '2.7'
|
55
|
+
- os: windows-latest
|
56
|
+
platform: x64-mingw-ucrt
|
57
|
+
ruby-version: '3.1'
|
58
|
+
- os: macos-latest
|
59
|
+
platform: x86_64-darwin
|
60
|
+
ruby-version: '2.7'
|
61
|
+
steps:
|
62
|
+
- uses: actions/checkout@v3
|
63
|
+
|
64
|
+
- uses: ruby/setup-ruby@v1
|
65
|
+
with:
|
66
|
+
ruby-version: ${{ matrix.ruby-version }}
|
67
|
+
bundler-cache: true
|
68
|
+
|
69
|
+
- name: Workaround for vcpkg
|
70
|
+
if: startsWith(matrix.os, 'ubuntu')
|
71
|
+
run: |
|
72
|
+
sudo apt-get update
|
73
|
+
sudo apt-get install gperf
|
74
|
+
|
75
|
+
- run: bundle exec rake gem:native:${{ matrix.platform }}
|
76
|
+
|
77
|
+
- uses: actions/upload-artifact@v2
|
78
|
+
with:
|
79
|
+
name: pkg
|
80
|
+
path: pkg/*.gem
|
81
|
+
|
82
|
+
- name: Install gem
|
83
|
+
run: gem install -b pkg/emf2svg-*.gem
|
84
|
+
|
85
|
+
- name: Test conversion
|
86
|
+
run: |
|
87
|
+
ruby -remf2svg -e "puts File.write('output.svg', Emf2svg.from_file('spec/examples/image1.emf'), mode: 'wb')"
|
88
|
+
|
89
|
+
test-build:
|
90
|
+
needs: build
|
91
|
+
runs-on: ${{ matrix.os }}
|
92
|
+
strategy:
|
93
|
+
fail-fast: false
|
94
|
+
matrix:
|
95
|
+
include:
|
96
|
+
- os: ubuntu-latest
|
97
|
+
platform: any
|
98
|
+
ruby-version: '2.7'
|
99
|
+
- os: windows-latest
|
100
|
+
platform: any
|
101
|
+
ruby-version: '2.7'
|
102
|
+
- os: macos-latest
|
103
|
+
platform: any
|
104
|
+
ruby-version: '2.7'
|
105
|
+
- os: ubuntu-18.04
|
106
|
+
platform: x86_64-linux
|
107
|
+
ruby-version: '2.7'
|
108
|
+
- os: ubuntu-latest
|
109
|
+
platform: x86_64-linux
|
110
|
+
ruby-version: '2.7'
|
111
|
+
- os: windows-latest
|
112
|
+
platform: x64-mingw32
|
113
|
+
ruby-version: '2.7'
|
114
|
+
- os: windows-latest
|
115
|
+
platform: x64-mingw-ucrt
|
116
|
+
ruby-version: '3.1'
|
117
|
+
- os: macos-latest
|
118
|
+
platform: x86_64-darwin
|
119
|
+
ruby-version: '2.7'
|
120
|
+
|
121
|
+
steps:
|
122
|
+
- uses: actions/checkout@v2
|
123
|
+
|
124
|
+
- uses: ruby/setup-ruby@v1
|
125
|
+
with:
|
126
|
+
ruby-version: ${{ matrix.ruby-version }}
|
127
|
+
|
128
|
+
- uses: actions/download-artifact@v2
|
129
|
+
with:
|
130
|
+
name: pkg
|
131
|
+
path: pkg
|
132
|
+
|
133
|
+
- name: Workaround for vcpkg
|
134
|
+
if: startsWith(matrix.os, 'ubuntu')
|
135
|
+
run: |
|
136
|
+
sudo apt-get update
|
137
|
+
sudo apt-get install gperf
|
138
|
+
|
139
|
+
- name: Install native gem
|
140
|
+
if: matrix.platform == 'any'
|
141
|
+
run: gem install -b pkg/emf2svg-$(ruby -I lib -r emf2svg/version -e "puts Emf2svg::VERSION").gem
|
142
|
+
|
143
|
+
- name: Install binary gem
|
144
|
+
if: matrix.platform != 'any'
|
145
|
+
run: gem install -b pkg/emf2svg-*-${{ matrix.platform }}.gem
|
146
|
+
|
147
|
+
- name: Test conversion
|
148
|
+
run: |
|
149
|
+
ruby -remf2svg -e "puts File.write('output.svg', Emf2svg.from_file('spec/examples/image1.emf'), mode: 'wb')"
|
150
|
+
|
151
|
+
cross:
|
152
|
+
runs-on: ${{ matrix.os }}
|
153
|
+
strategy:
|
154
|
+
matrix:
|
155
|
+
include:
|
156
|
+
- os: ubuntu-latest
|
157
|
+
platform: aarch64-linux
|
158
|
+
ruby-version: '2.7'
|
159
|
+
- os: macos-latest
|
160
|
+
platform: arm64-darwin
|
161
|
+
ruby-version: '2.7'
|
162
|
+
steps:
|
163
|
+
- uses: actions/checkout@v3
|
164
|
+
|
165
|
+
- name: Install packages
|
166
|
+
if: matrix.os == 'ubuntu-latest'
|
167
|
+
run: |
|
168
|
+
sudo apt-get update
|
169
|
+
sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu gperf
|
170
|
+
|
171
|
+
- uses: ruby/setup-ruby@v1
|
172
|
+
with:
|
173
|
+
ruby-version: ${{ matrix.ruby-version }}
|
174
|
+
bundler-cache: true
|
175
|
+
|
176
|
+
- run: bundle exec rake gem:native:${{ matrix.platform }}
|
177
|
+
|
178
|
+
- uses: actions/upload-artifact@v2
|
179
|
+
with:
|
180
|
+
name: pkg
|
181
|
+
path: pkg/*.gem
|
182
|
+
|
183
|
+
- name: Install gem
|
184
|
+
run: gem install -b pkg/emf2svg-*.gem
|
@@ -9,7 +9,6 @@ jobs:
|
|
9
9
|
build:
|
10
10
|
runs-on: ${{ matrix.os }}
|
11
11
|
strategy:
|
12
|
-
max-parallel: 3
|
13
12
|
fail-fast: false
|
14
13
|
matrix:
|
15
14
|
include:
|
@@ -29,87 +28,97 @@ jobs:
|
|
29
28
|
platform: x86_64-darwin
|
30
29
|
ruby-version: '2.7'
|
31
30
|
steps:
|
32
|
-
|
31
|
+
- uses: actions/checkout@v3
|
33
32
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
33
|
+
- uses: ruby/setup-ruby@v1
|
34
|
+
with:
|
35
|
+
ruby-version: ${{ matrix.ruby-version }}
|
36
|
+
bundler-cache: true
|
38
37
|
|
39
|
-
|
38
|
+
# https://github.com/microsoft/vcpkg/issues/15931
|
39
|
+
# no good solution :(
|
40
|
+
- name: Workaround for vcpkg
|
41
|
+
if: startsWith(matrix.os, 'ubuntu')
|
42
|
+
run: |
|
43
|
+
sudo apt-get update
|
44
|
+
sudo apt-get install gperf
|
40
45
|
|
41
|
-
|
42
|
-
with:
|
43
|
-
name: pkg
|
44
|
-
path: pkg/*.gem
|
46
|
+
- run: bundle exec rake gem:native:${{ matrix.platform }}
|
45
47
|
|
46
|
-
|
47
|
-
|
48
|
+
- uses: actions/upload-artifact@v3
|
49
|
+
with:
|
50
|
+
name: pkg
|
51
|
+
path: pkg/*.gem
|
48
52
|
|
49
|
-
|
50
|
-
|
51
|
-
|
53
|
+
- name: Install gem
|
54
|
+
run: gem install -b pkg/emf2svg-*.gem
|
55
|
+
|
56
|
+
- name: Test conversion
|
57
|
+
run: |
|
58
|
+
ruby -remf2svg -e "puts File.write('output.svg', Emf2svg.from_file('spec/examples/image1.emf'), mode: 'wb')"
|
52
59
|
|
53
60
|
cross:
|
54
61
|
runs-on: ${{ matrix.os }}
|
55
62
|
strategy:
|
56
|
-
max-parallel: 3
|
57
63
|
fail-fast: false
|
58
64
|
matrix:
|
59
65
|
include:
|
60
|
-
- os: ubuntu-
|
61
|
-
platform:
|
66
|
+
- os: ubuntu-latest
|
67
|
+
platform: aarch64-linux
|
68
|
+
ruby-version: '2.7'
|
69
|
+
- os: macos-latest
|
70
|
+
platform: arm64-darwin
|
62
71
|
ruby-version: '2.7'
|
63
72
|
steps:
|
64
|
-
|
73
|
+
- uses: actions/checkout@v2
|
74
|
+
|
75
|
+
- name: Install packages
|
76
|
+
if: matrix.os == 'ubuntu-latest'
|
77
|
+
run: |
|
78
|
+
sudo apt-get update
|
79
|
+
sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu gperf
|
65
80
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
- uses: ruby/setup-ruby@v1
|
72
|
-
with:
|
73
|
-
ruby-version: ${{ matrix.ruby-version }}
|
74
|
-
bundler-cache: true
|
81
|
+
- uses: ruby/setup-ruby@v1
|
82
|
+
with:
|
83
|
+
ruby-version: ${{ matrix.ruby-version }}
|
84
|
+
bundler-cache: true
|
75
85
|
|
76
|
-
|
86
|
+
- run: bundle exec rake gem:native:${{ matrix.platform }}
|
77
87
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
88
|
+
- uses: actions/upload-artifact@v2
|
89
|
+
with:
|
90
|
+
name: pkg
|
91
|
+
path: pkg/*.gem
|
82
92
|
|
83
|
-
|
84
|
-
|
93
|
+
- name: Install gem
|
94
|
+
run: gem install -b pkg/emf2svg-*.gem
|
85
95
|
|
86
96
|
publish:
|
87
97
|
needs: [ build, cross ]
|
88
98
|
runs-on: ubuntu-latest
|
89
99
|
steps:
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
for gem in pkg/*.gem; do gem push -V $gem; done
|
100
|
+
- uses: actions/checkout@v2
|
101
|
+
|
102
|
+
- uses: ruby/setup-ruby@v1
|
103
|
+
with:
|
104
|
+
ruby-version: '2.7'
|
105
|
+
bundler-cache: true
|
106
|
+
|
107
|
+
- uses: actions/download-artifact@v2
|
108
|
+
with:
|
109
|
+
name: pkg
|
110
|
+
path: pkg
|
111
|
+
|
112
|
+
- name: Publish to rubygems.org
|
113
|
+
env:
|
114
|
+
RUBYGEMS_API_KEY: ${{secrets.METANORMA_CI_RUBYGEMS_API_KEY}}
|
115
|
+
run: |
|
116
|
+
mkdir -p ~/.gem
|
117
|
+
touch ~/.gem/credentials
|
118
|
+
cat > ~/.gem/credentials << EOF
|
119
|
+
---
|
120
|
+
:rubygems_api_key: ${RUBYGEMS_API_KEY}
|
121
|
+
EOF
|
122
|
+
chmod 0600 ~/.gem/credentials
|
123
|
+
gem signin
|
124
|
+
for gem in pkg/*.gem; do gem push -V $gem; done
|
data/.rubocop.yml
CHANGED
data/README.adoc
CHANGED
@@ -1,13 +1,18 @@
|
|
1
|
-
=
|
1
|
+
image:https://github.com/metanorma/emf2svg-ruby/actions/workflows/build.yml/badge.svg["Build", link="https://github.com/metanorma/emf2svg-ruby/actions/workflows/build.yml"]
|
2
|
+
image:https://badge.fury.io/rb/emf2svg.svg["Gem Version", link="https://badge.fury.io/rb/emf2svg"]
|
3
|
+
|
2
4
|
|
3
|
-
|
5
|
+
= emf2svg
|
4
6
|
|
5
|
-
|
7
|
+
== Overview
|
8
|
+
emf2svg-ruby provides Ruby front-end to emf to svg converter https://github.com/kakwa/libemf2svg (temporarily using
|
6
9
|
the https://github.com/metanorma/libemf2svg[Metanorma fork] until upstreaming
|
7
10
|
is complete).
|
8
11
|
|
9
|
-
==
|
12
|
+
== Requirements:
|
13
|
+
Ruby >= 2.6
|
10
14
|
|
15
|
+
== Installation
|
11
16
|
Install the gem directly:
|
12
17
|
|
13
18
|
[source,sh]
|
@@ -22,19 +27,28 @@ Or add it to your `Gemfile`:
|
|
22
27
|
gem 'emf2svg'
|
23
28
|
----
|
24
29
|
|
25
|
-
===
|
30
|
+
=== Packaging
|
31
|
+
We distribute pre-compiled libraries for a set of machine architecture. On supported platforms, this removes the need
|
32
|
+
for compiling the C extension and installation of system dependencies. This results in much faster and more reliable installation.
|
33
|
+
|
34
|
+
==== Native extensions
|
35
|
+
* x86_64-linux (GNU and musl flavors)
|
36
|
+
* aarch64-linux (GNU and musl flavors)
|
37
|
+
* x86_64-darwin
|
38
|
+
* arm64-darwin
|
39
|
+
* x64-mingw32
|
40
|
+
* x64-mingw-ucrt
|
26
41
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
42
|
+
=== Building GEM from source
|
43
|
+
emf2svg build script maintaince and installs all required libraries and other dependencies using vcpkg package manager
|
44
|
+
You still need to install appropriate build system (like gcc, clang or Visual Studio) and cmake
|
45
|
+
On Debian systems there is vcpkg bug [https://github.com/microsoft/vcpkg/issues/15931] that needs to be addressed by installing gperf package:
|
31
46
|
|
32
47
|
==== Windows
|
33
48
|
|
34
49
|
On Windows all necessary libraries are precompiled but you'll need Visual
|
35
50
|
Studio 2019 with C++ Build Tools, which can be downloaded
|
36
|
-
https://visualstudio.microsoft.com/downloads/[here], or installed with
|
37
|
-
Chocolatey:
|
51
|
+
https://visualstudio.microsoft.com/downloads/[here], or installed with Chocolatey:
|
38
52
|
|
39
53
|
[source,sh]
|
40
54
|
----
|
@@ -55,22 +69,16 @@ brew install cmake
|
|
55
69
|
[source,sh]
|
56
70
|
----
|
57
71
|
# compiler
|
58
|
-
apt-get install gcc g++
|
72
|
+
apt-get install gcc g++ gperf cmake pkg-config
|
59
73
|
# or
|
60
|
-
apt-get install clang
|
61
|
-
|
62
|
-
# build deps
|
63
|
-
apt-get install cmake pkg-config
|
64
|
-
|
65
|
-
# library deps with their headers
|
66
|
-
apt-get install libpng-dev libc6-dev libfontconfig1-dev libfreetype6-dev zlib1g-dev
|
74
|
+
apt-get install clang gperf cmake pkg-config
|
67
75
|
----
|
68
76
|
|
69
77
|
===== Fedora
|
70
78
|
|
71
79
|
[source,sh]
|
72
80
|
----
|
73
|
-
yum install cmake
|
81
|
+
yum install cmake gcc-c++ gcc
|
74
82
|
----
|
75
83
|
|
76
84
|
== Usage
|
data/Rakefile
CHANGED
data/emf2svg.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
11
11
|
spec.summary = "Ruby interface to libemf2svg."
|
12
12
|
spec.homepage = "https://github.com/metanorma/emf2svg-ruby"
|
13
13
|
spec.license = "BSD-2-Clause"
|
14
|
-
spec.required_ruby_version = ">= 2.
|
14
|
+
spec.required_ruby_version = ">= 2.6.0"
|
15
15
|
|
16
16
|
spec.metadata["homepage_uri"] = spec.homepage
|
17
17
|
spec.metadata["source_code_uri"] = "https://github.com/metanorma/emf2svg-ruby"
|
Binary file
|
data/lib/emf2svg/brotlidec.dll
CHANGED
Binary file
|
data/lib/emf2svg/bz2.dll
CHANGED
Binary file
|
data/lib/emf2svg/emf2svg.dll
CHANGED
Binary file
|
Binary file
|
data/lib/emf2svg/freetype.dll
CHANGED
Binary file
|
data/lib/emf2svg/iconv-2.dll
CHANGED
Binary file
|
data/lib/emf2svg/libexpat.dll
CHANGED
Binary file
|
data/lib/emf2svg/libpng16.dll
CHANGED
Binary file
|
data/lib/emf2svg/recipe.rb
CHANGED
@@ -8,11 +8,11 @@ module Emf2svg
|
|
8
8
|
ROOT = Pathname.new(File.expand_path("../..", __dir__))
|
9
9
|
|
10
10
|
def initialize
|
11
|
-
super("libemf2svg", "1.
|
11
|
+
super("libemf2svg", "1.7.0")
|
12
12
|
|
13
13
|
@files << {
|
14
|
-
url: "https://github.com/metanorma/libemf2svg/releases/download/v1.
|
15
|
-
sha256: "
|
14
|
+
url: "https://github.com/metanorma/libemf2svg/releases/download/v1.7.0/libemf2svg.tar.gz",
|
15
|
+
sha256: "a87a02510f87ed4510a3426fa8636b340e26d96f25edf63c3ba465e7e9d7e2eb", # rubocop:disable Layout/LineLength
|
16
16
|
}
|
17
17
|
|
18
18
|
@target = ROOT.join(@target).to_s
|
@@ -25,7 +25,6 @@ module Emf2svg
|
|
25
25
|
|
26
26
|
def cook
|
27
27
|
super
|
28
|
-
|
29
28
|
FileUtils.touch(checkpoint)
|
30
29
|
end
|
31
30
|
|
@@ -36,31 +35,57 @@ module Emf2svg
|
|
36
35
|
case @host
|
37
36
|
when /\Ax86_64.*mingw32/
|
38
37
|
"x64-mingw32"
|
39
|
-
when /\Ai[3-6]86.*mingw32/
|
40
|
-
"x86-mingw32"
|
41
38
|
when /\Ax86_64.*linux/
|
42
39
|
"x86_64-linux"
|
43
40
|
when /\A(arm64|aarch64).*linux/
|
44
41
|
"arm64-linux"
|
45
|
-
when /\
|
46
|
-
"x86-linux"
|
47
|
-
when /\Ax86_64.*darwin/
|
42
|
+
when /\Ax86_64.*(darwin|macos|osx)/
|
48
43
|
"x86_64-darwin"
|
49
|
-
when /\
|
44
|
+
when /\A(arm64|aarch64).*(darwin|macos|osx)/
|
50
45
|
"arm64-darwin"
|
51
46
|
else
|
52
47
|
@host
|
53
48
|
end
|
54
49
|
end
|
50
|
+
|
51
|
+
def target_platform
|
52
|
+
@target_platform ||=
|
53
|
+
case ENV["target_platform"]
|
54
|
+
when /\A(arm64|aarch64).*(darwin|macos|osx)/
|
55
|
+
"arm64-darwin"
|
56
|
+
when /\Ax86_64.*(darwin|macos|osx)/
|
57
|
+
"x86_64-darwin"
|
58
|
+
when /\A(arm64|aarch64).*linux/
|
59
|
+
"aarch64-linux"
|
60
|
+
else
|
61
|
+
ENV["target_platform"] || host_platform
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
def target_triplet
|
66
|
+
@target_triplet ||=
|
67
|
+
case target_platform
|
68
|
+
when "arm64-darwin"
|
69
|
+
"arm64-osx"
|
70
|
+
when "x86_64-darwin"
|
71
|
+
"x64-osx"
|
72
|
+
when "aarch64-linux"
|
73
|
+
"arm64-linux"
|
74
|
+
when "x86_64-linux"
|
75
|
+
"x64-linux"
|
76
|
+
when /\Ax64-mingw(32|-ucrt)/
|
77
|
+
"x64-mingw-static"
|
78
|
+
end
|
79
|
+
end
|
55
80
|
# rubocop:enable Metrics/CyclomaticComplexity
|
56
81
|
# rubocop:enable Metrics/MethodLength
|
57
82
|
|
58
|
-
def
|
59
|
-
|
83
|
+
def windows_native?
|
84
|
+
MiniPortile.windows? && target_triplet.eql?("x64-mingw-static")
|
60
85
|
end
|
61
86
|
|
62
|
-
def
|
63
|
-
|
87
|
+
def drop_target_triplet?
|
88
|
+
windows_native? || host_platform.eql?(target_platform)
|
64
89
|
end
|
65
90
|
|
66
91
|
def checkpoint
|
@@ -71,15 +96,13 @@ module Emf2svg
|
|
71
96
|
opts = []
|
72
97
|
|
73
98
|
opts << "-DCMAKE_BUILD_TYPE=Release"
|
99
|
+
opts << "-DLONLY=ON"
|
74
100
|
|
75
|
-
|
76
|
-
opts << "-
|
101
|
+
unless target_triplet.nil? || drop_target_triplet?
|
102
|
+
opts << " -DVCPKG_TARGET_TRIPLET=#{target_triplet}"
|
77
103
|
end
|
78
104
|
|
79
|
-
|
80
|
-
message("Cross-compiling on #{host_platform} for #{target_platform}\n")
|
81
|
-
opts << "-DVCPKG_TARGET_TRIPLET=#{target_platform}"
|
82
|
-
end
|
105
|
+
opts << "-DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake"
|
83
106
|
|
84
107
|
opts
|
85
108
|
end
|
@@ -93,6 +116,7 @@ module Emf2svg
|
|
93
116
|
end
|
94
117
|
|
95
118
|
def install
|
119
|
+
message("Called install\n")
|
96
120
|
libs = if MiniPortile.windows?
|
97
121
|
Dir.glob(File.join(work_path, "Release", "*.dll"))
|
98
122
|
else
|
data/lib/emf2svg/version.rb
CHANGED
data/lib/emf2svg/zlib1.dll
CHANGED
Binary file
|
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.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: x64-mingw32
|
6
6
|
authors:
|
7
7
|
- Ribose
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -74,7 +74,7 @@ executables:
|
|
74
74
|
extensions: []
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
|
-
- ".github/workflows/
|
77
|
+
- ".github/workflows/build.yml"
|
78
78
|
- ".github/workflows/release.yml"
|
79
79
|
- ".gitignore"
|
80
80
|
- ".rspec"
|
@@ -118,7 +118,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
118
118
|
requirements:
|
119
119
|
- - ">="
|
120
120
|
- !ruby/object:Gem::Version
|
121
|
-
version: 2.
|
121
|
+
version: 2.6.0
|
122
122
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
123
123
|
requirements:
|
124
124
|
- - ">="
|
data/.github/workflows/main.yml
DELETED
@@ -1,163 +0,0 @@
|
|
1
|
-
name: main
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
branches: [ main ]
|
6
|
-
pull_request:
|
7
|
-
workflow_dispatch:
|
8
|
-
|
9
|
-
jobs:
|
10
|
-
test:
|
11
|
-
runs-on: ${{ matrix.os }}
|
12
|
-
strategy:
|
13
|
-
max-parallel: 3
|
14
|
-
fail-fast: false
|
15
|
-
matrix:
|
16
|
-
os: [ ubuntu-18.04, ubuntu-latest, windows-latest, macos-latest ]
|
17
|
-
ruby-version: [ '2.7' ]
|
18
|
-
include:
|
19
|
-
- os: windows-latest
|
20
|
-
ruby-version: '3.1'
|
21
|
-
steps:
|
22
|
-
- uses: actions/checkout@v2
|
23
|
-
|
24
|
-
- uses: ruby/setup-ruby@v1
|
25
|
-
with:
|
26
|
-
bundler-cache: true
|
27
|
-
ruby-version: ${{ matrix.ruby-version }}
|
28
|
-
|
29
|
-
- run: bundle exec rake
|
30
|
-
|
31
|
-
build:
|
32
|
-
runs-on: ${{ matrix.os }}
|
33
|
-
strategy:
|
34
|
-
max-parallel: 3
|
35
|
-
fail-fast: false
|
36
|
-
matrix:
|
37
|
-
include:
|
38
|
-
- os: ubuntu-18.04
|
39
|
-
platform: any
|
40
|
-
ruby-version: '2.7'
|
41
|
-
- os: ubuntu-18.04
|
42
|
-
platform: x86_64-linux
|
43
|
-
ruby-version: '2.7'
|
44
|
-
- os: windows-latest
|
45
|
-
platform: x64-mingw32
|
46
|
-
ruby-version: '2.7'
|
47
|
-
- os: windows-latest
|
48
|
-
platform: x64-mingw-ucrt
|
49
|
-
ruby-version: '3.1'
|
50
|
-
- os: macos-latest
|
51
|
-
platform: x86_64-darwin
|
52
|
-
ruby-version: '2.7'
|
53
|
-
steps:
|
54
|
-
- uses: actions/checkout@v2
|
55
|
-
|
56
|
-
- uses: ruby/setup-ruby@v1
|
57
|
-
with:
|
58
|
-
ruby-version: ${{ matrix.ruby-version }}
|
59
|
-
bundler-cache: true
|
60
|
-
|
61
|
-
- run: bundle exec rake gem:native:${{ matrix.platform }}
|
62
|
-
|
63
|
-
- uses: actions/upload-artifact@v2
|
64
|
-
with:
|
65
|
-
name: pkg
|
66
|
-
path: pkg/*.gem
|
67
|
-
|
68
|
-
- name: Install gem
|
69
|
-
run: gem install -b pkg/emf2svg-*.gem
|
70
|
-
|
71
|
-
- name: Test conversion
|
72
|
-
run: |
|
73
|
-
ruby -remf2svg -e "puts File.write('output.svg', Emf2svg.from_file('spec/examples/image1.emf'), mode: 'wb')"
|
74
|
-
|
75
|
-
test-build:
|
76
|
-
needs: build
|
77
|
-
runs-on: ${{ matrix.os }}
|
78
|
-
strategy:
|
79
|
-
max-parallel: 3
|
80
|
-
fail-fast: false
|
81
|
-
matrix:
|
82
|
-
include:
|
83
|
-
- os: ubuntu-latest
|
84
|
-
platform: any
|
85
|
-
ruby-version: '2.7'
|
86
|
-
- os: windows-latest
|
87
|
-
platform: any
|
88
|
-
ruby-version: '2.7'
|
89
|
-
- os: macos-latest
|
90
|
-
platform: any
|
91
|
-
ruby-version: '2.7'
|
92
|
-
- os: ubuntu-18.04
|
93
|
-
platform: x86_64-linux
|
94
|
-
ruby-version: '2.7'
|
95
|
-
- os: ubuntu-latest
|
96
|
-
platform: x86_64-linux
|
97
|
-
ruby-version: '2.7'
|
98
|
-
- os: windows-latest
|
99
|
-
platform: x64-mingw32
|
100
|
-
ruby-version: '2.7'
|
101
|
-
- os: windows-latest
|
102
|
-
platform: x64-mingw-ucrt
|
103
|
-
ruby-version: '3.1'
|
104
|
-
- os: macos-latest
|
105
|
-
platform: x86_64-darwin
|
106
|
-
ruby-version: '2.7'
|
107
|
-
|
108
|
-
steps:
|
109
|
-
- uses: actions/checkout@v2
|
110
|
-
|
111
|
-
- uses: ruby/setup-ruby@v1
|
112
|
-
with:
|
113
|
-
ruby-version: ${{ matrix.ruby-version }}
|
114
|
-
|
115
|
-
- uses: actions/download-artifact@v2
|
116
|
-
with:
|
117
|
-
name: pkg
|
118
|
-
path: pkg
|
119
|
-
|
120
|
-
- name: Install native gem
|
121
|
-
if: matrix.platform == 'any'
|
122
|
-
run: gem install -b pkg/emf2svg-$(ruby -I lib -r emf2svg/version -e "puts Emf2svg::VERSION").gem
|
123
|
-
|
124
|
-
- name: Install binary gem
|
125
|
-
if: matrix.platform != 'any'
|
126
|
-
run: gem install -b pkg/emf2svg-*-${{ matrix.platform }}.gem
|
127
|
-
|
128
|
-
- name: Test conversion
|
129
|
-
run: |
|
130
|
-
ruby -remf2svg -e "puts File.write('output.svg', Emf2svg.from_file('spec/examples/image1.emf'), mode: 'wb')"
|
131
|
-
|
132
|
-
cross:
|
133
|
-
runs-on: ${{ matrix.os }}
|
134
|
-
strategy:
|
135
|
-
max-parallel: 3
|
136
|
-
fail-fast: false
|
137
|
-
matrix:
|
138
|
-
include:
|
139
|
-
- os: ubuntu-18.04
|
140
|
-
platform: arm64-linux
|
141
|
-
ruby-version: '2.7'
|
142
|
-
steps:
|
143
|
-
- uses: actions/checkout@v2
|
144
|
-
|
145
|
-
- name: Install packages
|
146
|
-
run: |
|
147
|
-
sudo apt-get update
|
148
|
-
sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu gperf
|
149
|
-
|
150
|
-
- uses: ruby/setup-ruby@v1
|
151
|
-
with:
|
152
|
-
ruby-version: ${{ matrix.ruby-version }}
|
153
|
-
bundler-cache: true
|
154
|
-
|
155
|
-
- run: bundle exec rake gem:native:${{ matrix.platform }}
|
156
|
-
|
157
|
-
- uses: actions/upload-artifact@v2
|
158
|
-
with:
|
159
|
-
name: pkg
|
160
|
-
path: pkg/*.gem
|
161
|
-
|
162
|
-
- name: Install gem
|
163
|
-
run: gem install -b pkg/emf2svg-*.gem
|