mini_portile2 2.1.0 → 2.8.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/FUNDING.yml +2 -0
- data/.github/workflows/ci.yml +163 -0
- data/.github/workflows/downstream.yml +66 -0
- data/.gitignore +4 -3
- data/CHANGELOG.md +166 -0
- data/Gemfile +2 -0
- data/README.md +164 -9
- data/Rakefile +4 -6
- data/SECURITY.md +13 -0
- data/lib/mini_portile2/mini_portile.rb +384 -96
- data/lib/mini_portile2/mini_portile_cmake.rb +119 -0
- data/lib/mini_portile2/version.rb +1 -1
- data/lib/mini_portile2.rb +1 -0
- data/mini_portile2.gemspec +28 -22
- data/test/assets/gpg-fixtures/data +1 -0
- data/test/assets/gpg-fixtures/data.asc +9 -0
- data/test/assets/gpg-fixtures/data.invalid.asc +9 -0
- data/test/assets/pkgconf/libxml2/libxml-2.0.pc +13 -0
- data/test/assets/pkgconf/libxslt/libexslt.pc +13 -0
- data/test/assets/pkgconf/libxslt/libxslt.pc +13 -0
- data/test/assets/test-cmake-1.0/CMakeLists.txt +7 -0
- data/test/assets/test-cmake-1.0/hello.c +4 -0
- data/test/assets/test-download-archive.tar.gz +0 -0
- data/test/helper.rb +38 -3
- data/test/test_activate.rb +139 -0
- data/test/test_cmake.rb +266 -0
- data/test/test_cook.rb +134 -12
- data/test/test_digest.rb +147 -3
- data/test/test_download.rb +22 -19
- data/test/test_execute.rb +40 -0
- data/test/test_mkmf_config.rb +202 -0
- data/test/test_proxy.rb +9 -8
- data/test/test_recipe.rb +18 -0
- metadata +70 -27
- data/.travis.yml +0 -11
- data/appveyor.yml +0 -24
data/test/test_download.rb
CHANGED
@@ -1,54 +1,57 @@
|
|
1
1
|
require File.expand_path('../helper', __FILE__)
|
2
2
|
|
3
|
-
cert_name = [['CN', 'localhost', OpenSSL::ASN1::PRINTABLESTRING]]
|
4
|
-
|
5
3
|
describe "recipe download" do
|
6
4
|
include Minitest::Hooks
|
7
5
|
|
8
6
|
attr :recipe
|
9
7
|
|
10
|
-
def server_must_receive_connection &block
|
8
|
+
def server_must_receive_connection(connections = 3, &block)
|
11
9
|
request_count = 0
|
12
10
|
|
13
11
|
server = TCPServer.open('localhost', TestCase::HTTP_PORT)
|
14
12
|
thread = Thread.new do
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
13
|
+
connections.times do
|
14
|
+
conn = server.accept
|
15
|
+
request_count += 1
|
16
|
+
conn.puts "CONNECTION SUCESSFULLY MADE" rescue SystemCallError
|
17
|
+
conn.close
|
18
|
+
end
|
19
19
|
end
|
20
20
|
|
21
|
-
|
21
|
+
begin
|
22
|
+
block.call
|
23
|
+
ensure
|
24
|
+
thread.kill
|
25
|
+
server.close
|
26
|
+
end
|
22
27
|
|
23
|
-
|
24
|
-
server.close
|
25
|
-
|
26
|
-
request_count.must_be :>, 0
|
28
|
+
assert_operator(request_count, :>, 0)
|
27
29
|
end
|
28
30
|
|
29
31
|
before do
|
30
32
|
@request_count = 0
|
31
|
-
@
|
33
|
+
@logger = StringIO.new
|
34
|
+
@recipe = MiniPortile.new("test-download", "1.1.1", logger: @logger)
|
32
35
|
end
|
33
36
|
|
34
37
|
describe "urls" do
|
35
38
|
it "ftp" do
|
36
39
|
@recipe.files << "ftp://localhost:#{TestCase::HTTP_PORT}/foo"
|
37
|
-
server_must_receive_connection do
|
40
|
+
server_must_receive_connection 1 do
|
38
41
|
@recipe.download
|
39
42
|
end
|
40
43
|
end
|
41
44
|
|
42
45
|
it "handles http" do
|
43
46
|
@recipe.files << "http://localhost:#{TestCase::HTTP_PORT}/foo"
|
44
|
-
server_must_receive_connection do
|
47
|
+
server_must_receive_connection 3 do
|
45
48
|
@recipe.download
|
46
49
|
end
|
47
50
|
end
|
48
51
|
|
49
52
|
it "handles https" do
|
50
53
|
@recipe.files << "https://localhost:#{TestCase::HTTP_PORT}/foo"
|
51
|
-
server_must_receive_connection do
|
54
|
+
server_must_receive_connection 3 do
|
52
55
|
@recipe.download
|
53
56
|
end
|
54
57
|
end
|
@@ -60,12 +63,12 @@ describe "recipe download" do
|
|
60
63
|
@recipe.files << "file://#{path}"
|
61
64
|
@recipe.download
|
62
65
|
assert File.exist?(dest)
|
63
|
-
Digest::MD5.file(dest).hexdigest
|
66
|
+
assert_equal("ee0e9f44e72213015ef976d5ac23931d", Digest::MD5.file(dest).hexdigest)
|
64
67
|
end
|
65
68
|
|
66
69
|
it "other" do
|
67
70
|
@recipe.files << "foo://foo"
|
68
|
-
|
71
|
+
assert_raises(ArgumentError) { @recipe.download }
|
69
72
|
end
|
70
|
-
|
73
|
+
end
|
71
74
|
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require_relative "helper"
|
2
|
+
|
3
|
+
class TestExecute < TestCase
|
4
|
+
def setup
|
5
|
+
super
|
6
|
+
@env = {"TEST_ENV_VAR1" => "VAR1_VALUE", "TEST_ENV_VAR2" => "VAR2_VALUE"}
|
7
|
+
@logger = StringIO.new
|
8
|
+
@recipe = MiniPortile.new("test_execute", "1.0.0", logger: @logger)
|
9
|
+
@log_path = @recipe.send(:tmp_path)
|
10
|
+
FileUtils.mkdir_p File.join(@log_path, "subdir") # normally created by `download`
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_execute_one_big_string_arg
|
14
|
+
class << @recipe
|
15
|
+
def execute_with_env(env)
|
16
|
+
execute("testenv1",
|
17
|
+
%Q(ruby -e "puts ENV['TEST_ENV_VAR1'].inspect ; exit 0"),
|
18
|
+
{:env => env, :initial_message => false})
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
@recipe.execute_with_env(@env)
|
23
|
+
|
24
|
+
assert_equal("VAR1_VALUE".inspect, IO.read(File.join(@log_path, "testenv1.log")).chomp)
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_execute_array_args
|
28
|
+
class << @recipe
|
29
|
+
def execute_with_env(env)
|
30
|
+
execute("testenv2",
|
31
|
+
["ruby", "-e", "puts ENV['TEST_ENV_VAR2'].inspect"],
|
32
|
+
{:env => env, :initial_message => false})
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
@recipe.execute_with_env(@env)
|
37
|
+
|
38
|
+
assert_equal("VAR2_VALUE".inspect, IO.read(File.join(@log_path, "testenv2.log")).chomp)
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,202 @@
|
|
1
|
+
require File.expand_path('../helper', __FILE__)
|
2
|
+
|
3
|
+
require "mkmf" # initialize $LDFLAGS et al here, instead of in the middle of a test
|
4
|
+
|
5
|
+
class TestMkmfConfig < TestCase
|
6
|
+
attr_reader :recipe
|
7
|
+
|
8
|
+
LIBXML_PCP = File.join(__dir__, "assets", "pkgconf", "libxml2")
|
9
|
+
LIBXSLT_PCP = File.join(__dir__, "assets", "pkgconf", "libxslt")
|
10
|
+
|
11
|
+
def make_recipe(name, version)
|
12
|
+
MiniPortile.new(name, version).tap do |recipe|
|
13
|
+
recipe.logger = StringIO.new # hush output
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def setup
|
18
|
+
super
|
19
|
+
|
20
|
+
@save_env = %w[PATH CPATH LIBRARY_PATH LDFLAGS PKG_CONFIG_PATH].inject({}) do |env, var|
|
21
|
+
env.update(var => ENV[var])
|
22
|
+
end
|
23
|
+
$INCFLAGS = "-I/xxx"
|
24
|
+
$LIBPATH = ["xxx"]
|
25
|
+
$CFLAGS = "-xxx"
|
26
|
+
$CXXFLAGS = "-xxx"
|
27
|
+
$libs = "-lxxx"
|
28
|
+
$MINI_PORTILE_STATIC_LIBS = {}
|
29
|
+
|
30
|
+
FileUtils.rm_rf(["tmp", "ports"]) # remove any previous test files
|
31
|
+
|
32
|
+
@recipe = make_recipe("libfoo", "1.0.0")
|
33
|
+
end
|
34
|
+
|
35
|
+
def teardown
|
36
|
+
FileUtils.rm_rf(["tmp", "ports"]) # remove any previous test files
|
37
|
+
|
38
|
+
$INCFLAGS = ""
|
39
|
+
$LIBPATH = []
|
40
|
+
$CFLAGS = ""
|
41
|
+
$CXXFLAGS = ""
|
42
|
+
$libs = ""
|
43
|
+
$MINI_PORTILE_STATIC_LIBS = {}
|
44
|
+
@save_env.each do |var, val|
|
45
|
+
ENV[var] = val
|
46
|
+
end
|
47
|
+
|
48
|
+
super
|
49
|
+
end
|
50
|
+
|
51
|
+
def test_mkmf_config_recipe_LIBPATH_global_lib_dir_does_not_exist
|
52
|
+
recipe.mkmf_config
|
53
|
+
|
54
|
+
refute_includes($LIBPATH, recipe.lib_path)
|
55
|
+
refute_includes($libs.shellsplit, "-lfoo")
|
56
|
+
end
|
57
|
+
|
58
|
+
def test_mkmf_config_recipe_LIBPATH_global_not_static
|
59
|
+
FileUtils.mkdir_p(recipe.lib_path)
|
60
|
+
|
61
|
+
recipe.mkmf_config
|
62
|
+
|
63
|
+
assert_includes($LIBPATH, recipe.lib_path)
|
64
|
+
assert_operator($LIBPATH.index(recipe.lib_path), :<, $LIBPATH.index("xxx")) # prepend
|
65
|
+
|
66
|
+
assert_includes($libs.shellsplit, "-lfoo") # note the recipe name is "libfoo"
|
67
|
+
assert_match(%r{-lfoo.*-lxxx}, $libs) # prepend
|
68
|
+
end
|
69
|
+
|
70
|
+
def test_mkmf_config_recipe_LIBPATH_global_static
|
71
|
+
FileUtils.mkdir_p(recipe.lib_path)
|
72
|
+
static_lib_path = File.join(recipe.lib_path, "libfoo.#{$LIBEXT}")
|
73
|
+
|
74
|
+
recipe.mkmf_config(static: "foo")
|
75
|
+
|
76
|
+
refute_includes($LIBPATH, recipe.lib_path)
|
77
|
+
|
78
|
+
refute_includes($libs.shellsplit, "-lfoo") # note the recipe name is "libfoo"
|
79
|
+
assert_includes($libs.shellsplit, static_lib_path)
|
80
|
+
assert_match(%r{#{static_lib_path}.*-lxxx}, $libs) # prepend
|
81
|
+
end
|
82
|
+
|
83
|
+
def test_mkmf_config_recipe_INCFLAGS_global_include_dir_does_not_exist
|
84
|
+
recipe.mkmf_config
|
85
|
+
|
86
|
+
refute_includes($INCFLAGS.shellsplit, "-I#{recipe.include_path}")
|
87
|
+
end
|
88
|
+
|
89
|
+
def test_mkmf_config_recipe_INCFLAGS_global
|
90
|
+
FileUtils.mkdir_p(recipe.include_path)
|
91
|
+
|
92
|
+
recipe.mkmf_config
|
93
|
+
|
94
|
+
assert_includes($INCFLAGS.shellsplit, "-I#{recipe.include_path}")
|
95
|
+
assert_match(%r{-I#{recipe.include_path}.*-I/xxx}, $INCFLAGS) # prepend
|
96
|
+
end
|
97
|
+
|
98
|
+
def test_mkmf_config_pkgconf_does_not_exist
|
99
|
+
assert_raises(ArgumentError) do
|
100
|
+
recipe.mkmf_config(pkg: "foo")
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
def test_mkmf_config_pkgconf_LIBPATH_global_not_static
|
105
|
+
# can't get the pkgconf utility to install on windows with ruby 2.3 in CI
|
106
|
+
skip if MiniPortile.windows? && RUBY_VERSION < "2.4"
|
107
|
+
|
108
|
+
recipe.mkmf_config(pkg: "libxml-2.0", dir: LIBXML_PCP)
|
109
|
+
|
110
|
+
assert_includes($LIBPATH, "/foo/libxml2/2.11.5/lib")
|
111
|
+
assert_operator($LIBPATH.index("/foo/libxml2/2.11.5/lib"), :<, $LIBPATH.index("xxx")) # prepend
|
112
|
+
refute_includes($LIBPATH, "/foo/zlib/1.3/lib")
|
113
|
+
|
114
|
+
assert_includes($libs.shellsplit, "-lxml2")
|
115
|
+
assert_match(%r{-lxml2.*-lxxx}, $libs) # prepend
|
116
|
+
refute_includes($libs.shellsplit, "-lz")
|
117
|
+
end
|
118
|
+
|
119
|
+
def test_mkmf_config_pkgconf_LIBPATH_global_static
|
120
|
+
# can't get the pkgconf utility to install on windows with ruby 2.3 in CI
|
121
|
+
skip if MiniPortile.windows? && RUBY_VERSION < "2.4"
|
122
|
+
|
123
|
+
static_lib_path = "/foo/libxml2/2.11.5/lib/libxml2.#{$LIBEXT}"
|
124
|
+
|
125
|
+
recipe.mkmf_config(pkg: "libxml-2.0", dir: LIBXML_PCP, static: "xml2")
|
126
|
+
|
127
|
+
refute_includes($LIBPATH, "/foo/libxml2/2.11.5/lib")
|
128
|
+
refute_includes($libs.shellsplit, "-lxml2")
|
129
|
+
assert_includes($libs.shellsplit, static_lib_path)
|
130
|
+
assert_match(%r{#{static_lib_path}.*-lxxx}, $libs) # prepend
|
131
|
+
|
132
|
+
assert_includes($LIBPATH, "/foo/zlib/1.3/lib") # from --static
|
133
|
+
assert_includes($libs.shellsplit, "-lz") # from --static
|
134
|
+
end
|
135
|
+
|
136
|
+
def test_mkmf_config_pkgconf_CFLAGS_global
|
137
|
+
# can't get the pkgconf utility to install on windows with ruby 2.3 in CI
|
138
|
+
skip if MiniPortile.windows? && RUBY_VERSION < "2.4"
|
139
|
+
|
140
|
+
recipe.mkmf_config(pkg: "libxml-2.0", dir: LIBXML_PCP)
|
141
|
+
|
142
|
+
assert_includes($INCFLAGS.shellsplit, "-I/foo/libxml2/2.11.5/include/libxml2")
|
143
|
+
assert_match(%r{-I/foo/libxml2/2.11.5/include/libxml2.*-I/xxx}, $INCFLAGS) # prepend
|
144
|
+
|
145
|
+
assert_includes($CFLAGS.shellsplit, "-ggdb3")
|
146
|
+
assert_match(%r{-xxx.*-ggdb3}, $CFLAGS) # append
|
147
|
+
|
148
|
+
assert_includes($CXXFLAGS.shellsplit, "-ggdb3")
|
149
|
+
assert_match(%r{-xxx.*-ggdb3}, $CXXFLAGS) # append
|
150
|
+
end
|
151
|
+
|
152
|
+
def test_mkmf_config_pkgconf_path_accumulation
|
153
|
+
# can't get the pkgconf utility to install on windows with ruby 2.3 in CI
|
154
|
+
skip if MiniPortile.windows? && RUBY_VERSION < "2.4"
|
155
|
+
|
156
|
+
(ENV["PKG_CONFIG_PATH"] || "").split(File::PATH_SEPARATOR).tap do |pcpaths|
|
157
|
+
refute_includes(pcpaths, LIBXML_PCP)
|
158
|
+
refute_includes(pcpaths, LIBXSLT_PCP)
|
159
|
+
end
|
160
|
+
|
161
|
+
make_recipe("libxml2", "2.11.5").tap do |recipe|
|
162
|
+
recipe.mkmf_config(pkg: "libxml-2.0", dir: LIBXML_PCP, static: "xml2")
|
163
|
+
|
164
|
+
ENV["PKG_CONFIG_PATH"].split(File::PATH_SEPARATOR).tap do |pcpaths|
|
165
|
+
assert_includes(pcpaths, LIBXML_PCP)
|
166
|
+
refute_includes(pcpaths, LIBXSLT_PCP)
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
make_recipe("libxslt", "1.13.8").tap do |recipe|
|
171
|
+
recipe.mkmf_config(pkg: "libxslt", dir: LIBXSLT_PCP, static: "xslt")
|
172
|
+
|
173
|
+
ENV["PKG_CONFIG_PATH"].split(File::PATH_SEPARATOR).tap do |pcpaths|
|
174
|
+
assert_includes(pcpaths, LIBXML_PCP)
|
175
|
+
assert_includes(pcpaths, LIBXSLT_PCP)
|
176
|
+
end
|
177
|
+
|
178
|
+
recipe.mkmf_config(pkg: "libexslt", dir: LIBXSLT_PCP, static: "exslt")
|
179
|
+
end
|
180
|
+
|
181
|
+
$INCFLAGS.shellsplit.tap do |incflags|
|
182
|
+
assert_includes(incflags, "-I/foo/libxml2/2.11.5/include/libxml2")
|
183
|
+
assert_includes(incflags, "-I/foo/libxslt/1.1.38/include")
|
184
|
+
end
|
185
|
+
$CFLAGS.shellsplit.tap do |cflags|
|
186
|
+
assert_includes(cflags, "-ggdb3")
|
187
|
+
assert_includes(cflags, "-Wno-deprecated-enum-enum-conversion")
|
188
|
+
end
|
189
|
+
refute_includes($LIBPATH, "/foo/libxml2/2.11.5/lib")
|
190
|
+
refute_includes($LIBPATH, "/foo/libxslt/1.1.38/lib")
|
191
|
+
assert_includes($LIBPATH, "/foo/zlib/1.3/lib") # from `--static`
|
192
|
+
$libs.shellsplit.tap do |libflags|
|
193
|
+
refute_includes(libflags, "-lxml2")
|
194
|
+
assert_includes(libflags, "/foo/libxml2/2.11.5/lib/libxml2.#{$LIBEXT}")
|
195
|
+
refute_includes(libflags, "-lxslt")
|
196
|
+
assert_includes(libflags, "/foo/libxslt/1.1.38/lib/libxslt.#{$LIBEXT}")
|
197
|
+
refute_includes(libflags, "-lexslt")
|
198
|
+
assert_includes(libflags, "/foo/libxslt/1.1.38/lib/libexslt.#{$LIBEXT}")
|
199
|
+
assert_includes(libflags, "-lz") # from `--static`
|
200
|
+
end
|
201
|
+
end
|
202
|
+
end
|
data/test/test_proxy.rb
CHANGED
@@ -10,7 +10,7 @@ class TestProxy < TestCase
|
|
10
10
|
s = gs.accept
|
11
11
|
gs.close
|
12
12
|
begin
|
13
|
-
req = ''
|
13
|
+
req = ''.dup
|
14
14
|
while (l=s.gets) && !l.chomp.empty?
|
15
15
|
req << l
|
16
16
|
end
|
@@ -25,7 +25,7 @@ class TestProxy < TestCase
|
|
25
25
|
else
|
26
26
|
yield "http://localhost:#{gs.addr[1]}"
|
27
27
|
end
|
28
|
-
|
28
|
+
|
29
29
|
# Set timeout for reception of the request
|
30
30
|
Thread.new do
|
31
31
|
sleep 1
|
@@ -37,6 +37,7 @@ class TestProxy < TestCase
|
|
37
37
|
def setup
|
38
38
|
# remove any download files
|
39
39
|
FileUtils.rm_rf("port/archives")
|
40
|
+
@logger = StringIO.new
|
40
41
|
end
|
41
42
|
|
42
43
|
def assert_proxy_auth(expected, request)
|
@@ -48,7 +49,7 @@ class TestProxy < TestCase
|
|
48
49
|
end
|
49
50
|
|
50
51
|
def test_http_proxy
|
51
|
-
recipe = MiniPortile.new("test http_proxy", "1.0.0")
|
52
|
+
recipe = MiniPortile.new("test http_proxy", "1.0.0", logger: @logger)
|
52
53
|
recipe.files << "http://myserver/path/to/tar.gz"
|
53
54
|
request = with_dummy_proxy do |url, thread|
|
54
55
|
ENV['http_proxy'] = url
|
@@ -59,7 +60,7 @@ class TestProxy < TestCase
|
|
59
60
|
end
|
60
61
|
|
61
62
|
def test_http_proxy_with_basic_auth
|
62
|
-
recipe = MiniPortile.new("test http_proxy", "1.0.0")
|
63
|
+
recipe = MiniPortile.new("test http_proxy", "1.0.0", logger: @logger)
|
63
64
|
recipe.files << "http://myserver/path/to/tar.gz"
|
64
65
|
request = with_dummy_proxy('user: @name', '@12: üMp') do |url, thread|
|
65
66
|
ENV['http_proxy'] = url
|
@@ -72,7 +73,7 @@ class TestProxy < TestCase
|
|
72
73
|
end
|
73
74
|
|
74
75
|
def test_https_proxy
|
75
|
-
recipe = MiniPortile.new("test https_proxy", "1.0.0")
|
76
|
+
recipe = MiniPortile.new("test https_proxy", "1.0.0", logger: @logger)
|
76
77
|
recipe.files << "https://myserver/path/to/tar.gz"
|
77
78
|
request = with_dummy_proxy do |url, thread|
|
78
79
|
ENV['https_proxy'] = url
|
@@ -83,7 +84,7 @@ class TestProxy < TestCase
|
|
83
84
|
end
|
84
85
|
|
85
86
|
def test_https_proxy_with_basic_auth
|
86
|
-
recipe = MiniPortile.new("test https_proxy", "1.0.0")
|
87
|
+
recipe = MiniPortile.new("test https_proxy", "1.0.0", logger: @logger)
|
87
88
|
recipe.files << "https://myserver/path/to/tar.gz"
|
88
89
|
request = with_dummy_proxy('user: @name', '@12: üMp') do |url, thread|
|
89
90
|
ENV['https_proxy'] = url
|
@@ -96,7 +97,7 @@ class TestProxy < TestCase
|
|
96
97
|
end
|
97
98
|
|
98
99
|
def test_ftp_proxy
|
99
|
-
recipe = MiniPortile.new("test ftp_proxy", "1.0.0")
|
100
|
+
recipe = MiniPortile.new("test ftp_proxy", "1.0.0", logger: @logger)
|
100
101
|
recipe.files << "ftp://myserver/path/to/tar.gz"
|
101
102
|
request = with_dummy_proxy do |url, thread|
|
102
103
|
ENV['ftp_proxy'] = url
|
@@ -107,7 +108,7 @@ class TestProxy < TestCase
|
|
107
108
|
end
|
108
109
|
|
109
110
|
def test_ftp_proxy_with_basic_auth
|
110
|
-
recipe = MiniPortile.new("test ftp_proxy", "1.0.0")
|
111
|
+
recipe = MiniPortile.new("test ftp_proxy", "1.0.0", logger: @logger)
|
111
112
|
recipe.files << "ftp://myserver/path/to/tar.gz"
|
112
113
|
request = with_dummy_proxy('user: @name', '@12: üMp') do |url, thread|
|
113
114
|
ENV['ftp_proxy'] = url
|
data/test/test_recipe.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require File.expand_path('../helper', __FILE__)
|
2
|
+
|
3
|
+
class TestRecipe < TestCase
|
4
|
+
def test_path
|
5
|
+
recipe = MiniPortile.new("libfoo", "1.0.0")
|
6
|
+
assert_equal(File.expand_path(File.join(recipe.target, recipe.host, recipe.name, recipe.version)), recipe.path)
|
7
|
+
end
|
8
|
+
|
9
|
+
def test_lib_path
|
10
|
+
recipe = MiniPortile.new("libfoo", "1.0.0")
|
11
|
+
assert_equal(File.join(recipe.path, "lib"), recipe.lib_path)
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_include_path
|
15
|
+
recipe = MiniPortile.new("libfoo", "1.0.0")
|
16
|
+
assert_equal(File.join(recipe.path, "include"), recipe.include_path)
|
17
|
+
end
|
18
|
+
end
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mini_portile2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.8.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luis Lavena
|
8
8
|
- Mike Dalessio
|
9
9
|
- Lars Kanis
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2024-05-31 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -18,104 +18,135 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - "~>"
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: '
|
21
|
+
version: '2.2'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - "~>"
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: '
|
28
|
+
version: '2.2'
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
|
-
name:
|
30
|
+
name: minitar
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
33
|
- - "~>"
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: '
|
35
|
+
version: '0.9'
|
36
36
|
type: :development
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - "~>"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '
|
42
|
+
version: '0.9'
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: minitest
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - "~>"
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 5.
|
49
|
+
version: '5.15'
|
50
50
|
type: :development
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
54
|
- - "~>"
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: 5.
|
56
|
+
version: '5.15'
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
58
|
name: minitest-hooks
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
61
|
- - "~>"
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: 1.
|
63
|
+
version: '1.5'
|
64
64
|
type: :development
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
68
|
- - "~>"
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: 1.
|
70
|
+
version: '1.5'
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
|
-
name:
|
72
|
+
name: rake
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
74
74
|
requirements:
|
75
75
|
- - "~>"
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: 0
|
77
|
+
version: '13.0'
|
78
78
|
type: :development
|
79
79
|
prerelease: false
|
80
80
|
version_requirements: !ruby/object:Gem::Requirement
|
81
81
|
requirements:
|
82
82
|
- - "~>"
|
83
83
|
- !ruby/object:Gem::Version
|
84
|
-
version: 0
|
85
|
-
|
86
|
-
|
87
|
-
|
84
|
+
version: '13.0'
|
85
|
+
- !ruby/object:Gem::Dependency
|
86
|
+
name: webrick
|
87
|
+
requirement: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - "~>"
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '1.7'
|
92
|
+
type: :development
|
93
|
+
prerelease: false
|
94
|
+
version_requirements: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - "~>"
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '1.7'
|
99
|
+
description: |
|
100
|
+
Simple autoconf and cmake builder for developers. It provides a standard way to compile against
|
101
|
+
dependency libraries without requiring system-wide installation. It also simplifies
|
102
|
+
vendoring and cross-compilation by providing a consistent build interface.
|
88
103
|
email: mike.dalessio@gmail.com
|
89
104
|
executables: []
|
90
105
|
extensions: []
|
91
106
|
extra_rdoc_files: []
|
92
107
|
files:
|
108
|
+
- ".github/FUNDING.yml"
|
109
|
+
- ".github/workflows/ci.yml"
|
110
|
+
- ".github/workflows/downstream.yml"
|
93
111
|
- ".gitignore"
|
94
|
-
- ".travis.yml"
|
95
112
|
- CHANGELOG.md
|
96
113
|
- Gemfile
|
97
114
|
- LICENSE.txt
|
98
115
|
- README.md
|
99
116
|
- Rakefile
|
100
|
-
-
|
117
|
+
- SECURITY.md
|
101
118
|
- lib/mini_portile2.rb
|
102
119
|
- lib/mini_portile2/mini_portile.rb
|
120
|
+
- lib/mini_portile2/mini_portile_cmake.rb
|
103
121
|
- lib/mini_portile2/version.rb
|
104
122
|
- mini_portile2.gemspec
|
105
123
|
- test/assets/git/config
|
124
|
+
- test/assets/gpg-fixtures/data
|
125
|
+
- test/assets/gpg-fixtures/data.asc
|
126
|
+
- test/assets/gpg-fixtures/data.invalid.asc
|
106
127
|
- test/assets/patch 1.diff
|
128
|
+
- test/assets/pkgconf/libxml2/libxml-2.0.pc
|
129
|
+
- test/assets/pkgconf/libxslt/libexslt.pc
|
130
|
+
- test/assets/pkgconf/libxslt/libxslt.pc
|
107
131
|
- test/assets/test mini portile-1.0.0/configure
|
132
|
+
- test/assets/test-cmake-1.0/CMakeLists.txt
|
133
|
+
- test/assets/test-cmake-1.0/hello.c
|
108
134
|
- test/assets/test-download-archive.tar.gz
|
109
135
|
- test/helper.rb
|
136
|
+
- test/test_activate.rb
|
137
|
+
- test/test_cmake.rb
|
110
138
|
- test/test_cook.rb
|
111
139
|
- test/test_digest.rb
|
112
140
|
- test/test_download.rb
|
141
|
+
- test/test_execute.rb
|
142
|
+
- test/test_mkmf_config.rb
|
113
143
|
- test/test_proxy.rb
|
114
|
-
|
144
|
+
- test/test_recipe.rb
|
145
|
+
homepage: https://github.com/flavorjones/mini_portile
|
115
146
|
licenses:
|
116
147
|
- MIT
|
117
148
|
metadata: {}
|
118
|
-
post_install_message:
|
149
|
+
post_install_message:
|
119
150
|
rdoc_options: []
|
120
151
|
require_paths:
|
121
152
|
- lib
|
@@ -123,25 +154,37 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
123
154
|
requirements:
|
124
155
|
- - ">="
|
125
156
|
- !ruby/object:Gem::Version
|
126
|
-
version:
|
157
|
+
version: 2.3.0
|
127
158
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
128
159
|
requirements:
|
129
160
|
- - ">="
|
130
161
|
- !ruby/object:Gem::Version
|
131
162
|
version: '0'
|
132
163
|
requirements: []
|
133
|
-
|
134
|
-
|
135
|
-
signing_key:
|
164
|
+
rubygems_version: 3.5.10
|
165
|
+
signing_key:
|
136
166
|
specification_version: 4
|
137
|
-
summary:
|
167
|
+
summary: Simple autoconf and cmake builder for developers
|
138
168
|
test_files:
|
139
169
|
- test/assets/git/config
|
170
|
+
- test/assets/gpg-fixtures/data
|
171
|
+
- test/assets/gpg-fixtures/data.asc
|
172
|
+
- test/assets/gpg-fixtures/data.invalid.asc
|
140
173
|
- test/assets/patch 1.diff
|
174
|
+
- test/assets/pkgconf/libxml2/libxml-2.0.pc
|
175
|
+
- test/assets/pkgconf/libxslt/libexslt.pc
|
176
|
+
- test/assets/pkgconf/libxslt/libxslt.pc
|
141
177
|
- test/assets/test mini portile-1.0.0/configure
|
178
|
+
- test/assets/test-cmake-1.0/CMakeLists.txt
|
179
|
+
- test/assets/test-cmake-1.0/hello.c
|
142
180
|
- test/assets/test-download-archive.tar.gz
|
143
181
|
- test/helper.rb
|
182
|
+
- test/test_activate.rb
|
183
|
+
- test/test_cmake.rb
|
144
184
|
- test/test_cook.rb
|
145
185
|
- test/test_digest.rb
|
146
186
|
- test/test_download.rb
|
187
|
+
- test/test_execute.rb
|
188
|
+
- test/test_mkmf_config.rb
|
147
189
|
- test/test_proxy.rb
|
190
|
+
- test/test_recipe.rb
|
data/.travis.yml
DELETED
data/appveyor.yml
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
---
|
2
|
-
install:
|
3
|
-
- ps: ((New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt', "$env:TMP\ca-bundle.crt"))
|
4
|
-
- SET SSL_CERT_FILE=%TMP%\ca-bundle.crt
|
5
|
-
- SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
|
6
|
-
- SET RAKEOPT=-rdevkit
|
7
|
-
- ruby --version
|
8
|
-
- gem --version
|
9
|
-
- bundle install
|
10
|
-
|
11
|
-
build: off
|
12
|
-
|
13
|
-
test_script:
|
14
|
-
- bundle exec rake
|
15
|
-
|
16
|
-
environment:
|
17
|
-
matrix:
|
18
|
-
- ruby_version: "22-x64"
|
19
|
-
- ruby_version: "22"
|
20
|
-
- ruby_version: "21-x64"
|
21
|
-
- ruby_version: "21"
|
22
|
-
- ruby_version: "200-x64"
|
23
|
-
- ruby_version: "200"
|
24
|
-
- ruby_version: "193"
|