emf2svg 1.0.0-x86_64-linux → 1.2.1-x86_64-linux
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +66 -7
- data/.github/workflows/release.yml +45 -4
- data/.rubocop.yml +5 -1
- data/Rakefile +3 -1
- data/emf2svg.gemspec +1 -1
- data/lib/emf2svg/libemf2svg.so +0 -0
- data/lib/emf2svg/recipe.rb +45 -6
- data/lib/emf2svg/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fdf7b6c17da34bca221c88855dda8cb94a7cf06112262be5ddd7612f8d87716c
|
4
|
+
data.tar.gz: 6a866acac98078305d9688876cfd196a0ba68ab15f20ab8178cf36f94ba4aaaf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76c2f02447514479c2b70a41e1e8305ad1b5d1960664cd5c600e404ff68880fb2b7df1965fe07c26f2a87925c894f71199b806a5b38b94c9a4e11f076cdf05cc
|
7
|
+
data.tar.gz: 1efbdd0fcf07a484304e4e58d6ae56a3a69a71f0b322800e88b3a9e4212f7b6b7a18cb797e8998ab14ccdee6456b5d93f0db0de4f618662bc6b45b3edb7c6211
|
data/.github/workflows/main.yml
CHANGED
@@ -2,46 +2,60 @@ name: main
|
|
2
2
|
|
3
3
|
on:
|
4
4
|
push:
|
5
|
-
branches: [ main
|
5
|
+
branches: [ main ]
|
6
6
|
pull_request:
|
7
|
+
workflow_dispatch:
|
7
8
|
|
8
9
|
jobs:
|
9
10
|
test:
|
10
11
|
runs-on: ${{ matrix.os }}
|
11
12
|
strategy:
|
13
|
+
max-parallel: 3
|
12
14
|
fail-fast: false
|
13
15
|
matrix:
|
14
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'
|
15
21
|
steps:
|
16
22
|
- uses: actions/checkout@v2
|
17
23
|
|
18
24
|
- uses: ruby/setup-ruby@v1
|
19
25
|
with:
|
20
|
-
ruby-version: 2.6.6
|
21
26
|
bundler-cache: true
|
27
|
+
ruby-version: ${{ matrix.ruby-version }}
|
22
28
|
|
23
29
|
- run: bundle exec rake
|
24
30
|
|
25
31
|
build:
|
26
32
|
runs-on: ${{ matrix.os }}
|
27
33
|
strategy:
|
34
|
+
max-parallel: 3
|
28
35
|
fail-fast: false
|
29
36
|
matrix:
|
30
37
|
include:
|
31
38
|
- os: ubuntu-18.04
|
32
39
|
platform: any
|
40
|
+
ruby-version: '2.7'
|
33
41
|
- os: ubuntu-18.04
|
34
42
|
platform: x86_64-linux
|
43
|
+
ruby-version: '2.7'
|
35
44
|
- os: windows-latest
|
36
45
|
platform: x64-mingw32
|
46
|
+
ruby-version: '2.7'
|
47
|
+
- os: windows-latest
|
48
|
+
platform: x64-mingw-ucrt
|
49
|
+
ruby-version: '3.1'
|
37
50
|
- os: macos-latest
|
38
51
|
platform: x86_64-darwin
|
52
|
+
ruby-version: '2.7'
|
39
53
|
steps:
|
40
54
|
- uses: actions/checkout@v2
|
41
55
|
|
42
56
|
- uses: ruby/setup-ruby@v1
|
43
57
|
with:
|
44
|
-
ruby-version:
|
58
|
+
ruby-version: ${{ matrix.ruby-version }}
|
45
59
|
bundler-cache: true
|
46
60
|
|
47
61
|
- run: bundle exec rake gem:native:${{ matrix.platform }}
|
@@ -52,7 +66,7 @@ jobs:
|
|
52
66
|
path: pkg/*.gem
|
53
67
|
|
54
68
|
- name: Install gem
|
55
|
-
run: gem install
|
69
|
+
run: gem install -b pkg/emf2svg-*.gem
|
56
70
|
|
57
71
|
- name: Test conversion
|
58
72
|
run: |
|
@@ -62,29 +76,41 @@ jobs:
|
|
62
76
|
needs: build
|
63
77
|
runs-on: ${{ matrix.os }}
|
64
78
|
strategy:
|
79
|
+
max-parallel: 3
|
65
80
|
fail-fast: false
|
66
81
|
matrix:
|
67
82
|
include:
|
68
83
|
- os: ubuntu-latest
|
69
84
|
platform: any
|
85
|
+
ruby-version: '2.7'
|
70
86
|
- os: windows-latest
|
71
87
|
platform: any
|
88
|
+
ruby-version: '2.7'
|
72
89
|
- os: macos-latest
|
73
90
|
platform: any
|
91
|
+
ruby-version: '2.7'
|
74
92
|
- os: ubuntu-18.04
|
75
93
|
platform: x86_64-linux
|
94
|
+
ruby-version: '2.7'
|
76
95
|
- os: ubuntu-latest
|
77
96
|
platform: x86_64-linux
|
97
|
+
ruby-version: '2.7'
|
78
98
|
- os: windows-latest
|
79
99
|
platform: x64-mingw32
|
100
|
+
ruby-version: '2.7'
|
101
|
+
- os: windows-latest
|
102
|
+
platform: x64-mingw-ucrt
|
103
|
+
ruby-version: '3.1'
|
80
104
|
- os: macos-latest
|
81
105
|
platform: x86_64-darwin
|
106
|
+
ruby-version: '2.7'
|
107
|
+
|
82
108
|
steps:
|
83
109
|
- uses: actions/checkout@v2
|
84
110
|
|
85
111
|
- uses: ruby/setup-ruby@v1
|
86
112
|
with:
|
87
|
-
ruby-version:
|
113
|
+
ruby-version: ${{ matrix.ruby-version }}
|
88
114
|
|
89
115
|
- uses: actions/download-artifact@v2
|
90
116
|
with:
|
@@ -93,12 +119,45 @@ jobs:
|
|
93
119
|
|
94
120
|
- name: Install native gem
|
95
121
|
if: matrix.platform == 'any'
|
96
|
-
run: gem install
|
122
|
+
run: gem install -b pkg/emf2svg-$(ruby -I lib -r emf2svg/version -e "puts Emf2svg::VERSION").gem
|
97
123
|
|
98
124
|
- name: Install binary gem
|
99
125
|
if: matrix.platform != 'any'
|
100
|
-
run: gem install
|
126
|
+
run: gem install -b pkg/emf2svg-*-${{ matrix.platform }}.gem
|
101
127
|
|
102
128
|
- name: Test conversion
|
103
129
|
run: |
|
104
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
|
@@ -9,23 +9,31 @@ jobs:
|
|
9
9
|
build:
|
10
10
|
runs-on: ${{ matrix.os }}
|
11
11
|
strategy:
|
12
|
+
max-parallel: 3
|
12
13
|
fail-fast: false
|
13
14
|
matrix:
|
14
15
|
include:
|
15
16
|
- os: ubuntu-18.04
|
16
17
|
platform: any
|
18
|
+
ruby-version: '2.7'
|
17
19
|
- os: ubuntu-18.04
|
18
20
|
platform: x86_64-linux
|
21
|
+
ruby-version: '2.7'
|
19
22
|
- os: windows-latest
|
20
23
|
platform: x64-mingw32
|
24
|
+
ruby-version: '2.7'
|
25
|
+
- os: windows-latest
|
26
|
+
platform: x64-mingw-ucrt
|
27
|
+
ruby-version: '3.1'
|
21
28
|
- os: macos-latest
|
22
29
|
platform: x86_64-darwin
|
30
|
+
ruby-version: '2.7'
|
23
31
|
steps:
|
24
32
|
- uses: actions/checkout@v2
|
25
33
|
|
26
34
|
- uses: ruby/setup-ruby@v1
|
27
35
|
with:
|
28
|
-
ruby-version:
|
36
|
+
ruby-version: ${{ matrix.ruby-version }}
|
29
37
|
bundler-cache: true
|
30
38
|
|
31
39
|
- run: bundle exec rake gem:native:${{ matrix.platform }}
|
@@ -36,21 +44,54 @@ jobs:
|
|
36
44
|
path: pkg/*.gem
|
37
45
|
|
38
46
|
- name: Install gem
|
39
|
-
run: gem install
|
47
|
+
run: gem install -b pkg/emf2svg-*.gem
|
40
48
|
|
41
49
|
- name: Test conversion
|
42
50
|
run: |
|
43
51
|
ruby -remf2svg -e "puts File.write('output.svg', Emf2svg.from_file('spec/examples/image1.emf'), mode: 'wb')"
|
44
52
|
|
53
|
+
cross:
|
54
|
+
runs-on: ${{ matrix.os }}
|
55
|
+
strategy:
|
56
|
+
max-parallel: 3
|
57
|
+
fail-fast: false
|
58
|
+
matrix:
|
59
|
+
include:
|
60
|
+
- os: ubuntu-18.04
|
61
|
+
platform: arm64-linux
|
62
|
+
ruby-version: '2.7'
|
63
|
+
steps:
|
64
|
+
- uses: actions/checkout@v2
|
65
|
+
|
66
|
+
- name: Install packages
|
67
|
+
run: |
|
68
|
+
sudo apt-get update
|
69
|
+
sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu gperf
|
70
|
+
|
71
|
+
- uses: ruby/setup-ruby@v1
|
72
|
+
with:
|
73
|
+
ruby-version: ${{ matrix.ruby-version }}
|
74
|
+
bundler-cache: true
|
75
|
+
|
76
|
+
- run: bundle exec rake gem:native:${{ matrix.platform }}
|
77
|
+
|
78
|
+
- uses: actions/upload-artifact@v2
|
79
|
+
with:
|
80
|
+
name: pkg
|
81
|
+
path: pkg/*.gem
|
82
|
+
|
83
|
+
- name: Install gem
|
84
|
+
run: gem install -b pkg/emf2svg-*.gem
|
85
|
+
|
45
86
|
publish:
|
46
|
-
needs: build
|
87
|
+
needs: [ build, cross ]
|
47
88
|
runs-on: ubuntu-latest
|
48
89
|
steps:
|
49
90
|
- uses: actions/checkout@v2
|
50
91
|
|
51
92
|
- uses: ruby/setup-ruby@v1
|
52
93
|
with:
|
53
|
-
ruby-version: '2.
|
94
|
+
ruby-version: '2.7'
|
54
95
|
bundler-cache: true
|
55
96
|
|
56
97
|
- uses: actions/download-artifact@v2
|
data/.rubocop.yml
CHANGED
data/Rakefile
CHANGED
@@ -32,14 +32,16 @@ end
|
|
32
32
|
|
33
33
|
platforms = [
|
34
34
|
"x64-mingw32",
|
35
|
+
"x64-mingw-ucrt",
|
35
36
|
"x86_64-linux",
|
37
|
+
"arm64-linux",
|
36
38
|
"x86_64-darwin",
|
37
39
|
]
|
38
40
|
|
39
41
|
platforms.each do |platform|
|
40
42
|
desc "Build pre-compiled gem for the #{platform} platform"
|
41
43
|
task "gem:native:#{platform}" do
|
42
|
-
sh "rake compile platform:#{platform} gem"
|
44
|
+
sh "rake compile platform:#{platform} gem target_platform=#{platform}"
|
43
45
|
end
|
44
46
|
|
45
47
|
desc "Define the gem task to build on the #{platform} platform (binary gem)"
|
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.7.0"
|
15
15
|
|
16
16
|
spec.metadata["homepage_uri"] = spec.homepage
|
17
17
|
spec.metadata["source_code_uri"] = "https://github.com/metanorma/emf2svg-ruby"
|
data/lib/emf2svg/libemf2svg.so
CHANGED
Binary file
|
data/lib/emf2svg/recipe.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require "rbconfig"
|
1
2
|
require "mini_portile2"
|
2
3
|
require "pathname"
|
3
4
|
require "tmpdir"
|
@@ -7,11 +8,11 @@ module Emf2svg
|
|
7
8
|
ROOT = Pathname.new(File.expand_path("../..", __dir__))
|
8
9
|
|
9
10
|
def initialize
|
10
|
-
super("libemf2svg", "1.
|
11
|
+
super("libemf2svg", "1.4.0")
|
11
12
|
|
12
13
|
@files << {
|
13
|
-
url: "https://github.com/metanorma/libemf2svg/releases/download/
|
14
|
-
sha256: "
|
14
|
+
url: "https://github.com/metanorma/libemf2svg/releases/download/v1.4.0/libemf2svg.tar.gz",
|
15
|
+
sha256: "e05081986a0ec6c5bd494068825c7b55dd21fa1814942a61293b225af2d957d2", # rubocop:disable Layout/LineLength
|
15
16
|
}
|
16
17
|
|
17
18
|
@target = ROOT.join(@target).to_s
|
@@ -28,8 +29,42 @@ module Emf2svg
|
|
28
29
|
FileUtils.touch(checkpoint)
|
29
30
|
end
|
30
31
|
|
32
|
+
# rubocop:disable Metrics/MethodLength
|
33
|
+
# rubocop:disable Metrics/CyclomaticComplexity
|
34
|
+
def host_platform
|
35
|
+
@host_platform ||=
|
36
|
+
case @host
|
37
|
+
when /\Ax86_64.*mingw32/
|
38
|
+
"x64-mingw32"
|
39
|
+
when /\Ai[3-6]86.*mingw32/
|
40
|
+
"x86-mingw32"
|
41
|
+
when /\Ax86_64.*linux/
|
42
|
+
"x86_64-linux"
|
43
|
+
when /\A(arm64|aarch64).*linux/
|
44
|
+
"arm64-linux"
|
45
|
+
when /\Ai[3-6]86.*linux/
|
46
|
+
"x86-linux"
|
47
|
+
when /\Ax86_64.*darwin/
|
48
|
+
"x86_64-darwin"
|
49
|
+
when /\Aarm64.*darwin/
|
50
|
+
"arm64-darwin"
|
51
|
+
else
|
52
|
+
@host
|
53
|
+
end
|
54
|
+
end
|
55
|
+
# rubocop:enable Metrics/CyclomaticComplexity
|
56
|
+
# rubocop:enable Metrics/MethodLength
|
57
|
+
|
58
|
+
def target_platform
|
59
|
+
@target_platform = ENV["target_platform"] || host_platform
|
60
|
+
end
|
61
|
+
|
62
|
+
def cross_compiling?
|
63
|
+
not host_platform.eql? target_platform
|
64
|
+
end
|
65
|
+
|
31
66
|
def checkpoint
|
32
|
-
File.join(@target, "#{name}-#{version}-#{
|
67
|
+
File.join(@target, "#{name}-#{version}-#{target_platform}.installed")
|
33
68
|
end
|
34
69
|
|
35
70
|
def configure_defaults
|
@@ -37,9 +72,13 @@ module Emf2svg
|
|
37
72
|
|
38
73
|
opts << "-DCMAKE_BUILD_TYPE=Release"
|
39
74
|
|
40
|
-
if MiniPortile.windows?
|
75
|
+
if MiniPortile.windows? || cross_compiling?
|
41
76
|
opts << "-DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake"
|
42
|
-
|
77
|
+
end
|
78
|
+
|
79
|
+
if cross_compiling? && (not MiniPortile.windows?)
|
80
|
+
message("Cross-compiling on #{host_platform} for #{target_platform}\n")
|
81
|
+
opts << "-DVCPKG_TARGET_TRIPLET=#{target_platform}"
|
43
82
|
end
|
44
83
|
|
45
84
|
opts
|
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.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: x86_64-linux
|
6
6
|
authors:
|
7
7
|
- Ribose
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -109,14 +109,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
109
109
|
requirements:
|
110
110
|
- - ">="
|
111
111
|
- !ruby/object:Gem::Version
|
112
|
-
version: 2.
|
112
|
+
version: 2.7.0
|
113
113
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
requirements: []
|
119
|
-
rubygems_version: 3.
|
119
|
+
rubygems_version: 3.1.6
|
120
120
|
signing_key:
|
121
121
|
specification_version: 4
|
122
122
|
summary: Ruby interface to libemf2svg.
|