mini_portile2 2.8.1 → 2.8.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d467d59c8fe3298a010263ffcf5de58be5ba9be7757dbce500fd96251a2c864e
4
- data.tar.gz: 70534d0b13bcdc0fe91c5524f8d40414ee1cc29fc357806aea4bbe52cc39129b
3
+ metadata.gz: c8c3bc43ff4324b2780fdac7f1832759fe3933330155380eeb4d3be23a55ac25
4
+ data.tar.gz: 4b9ed8985c6ae4b827b1cd9791a97a8a708fca9f02dd2bc0854e241d05ce71bf
5
5
  SHA512:
6
- metadata.gz: d67bc2e58d7fa53a4315fdaa1ab56f8ca5fe6b0a42e020b511e3aef3f7185690fbb51ee8f1bd5ccec48f0b37ef9037f45d7c56973ae3fdffadcfddc8679b6594
7
- data.tar.gz: f2ab11a49573096c9b7fe150d1fcde07161a36514b6bb885e455f82cf270a70465987b131d359e898bd99850c616989afcbf48a9de1b5dbfb46831f9eea46f42
6
+ metadata.gz: f29569cacecfd0ade1fc031add7f0e1bb7bccf3a180f260b17541d4493de809f7c4b53180ed47d159a01956318c67c16df810984e974718d0b0eeee42d789a52
7
+ data.tar.gz: b93d7d34b54e9f6e3083642bc11d14720c566eac2dd745ad99004961f6a37d770349a5f4c99cd2e4ed084246025d26ca8e2fdf434d4b1837c59ae02c7173aa60
@@ -25,7 +25,7 @@ jobs:
25
25
  fail-fast: false
26
26
  matrix:
27
27
  platform: [ubuntu-latest, windows-latest, macos-latest]
28
- ruby: ["2.3", "2.4", "2.5", "2.6", "2.7", "3.0", "3.1", "head"]
28
+ ruby: ["2.3", "2.4", "2.5", "2.6", "2.7", "3.0", "3.1", "3.2", "head"]
29
29
  runs-on: ${{ matrix.platform }}
30
30
  steps:
31
31
  - name: configure git crlf on windows
@@ -33,7 +33,7 @@ jobs:
33
33
  run: |
34
34
  git config --system core.autocrlf false
35
35
  git config --system core.eol lf
36
- - uses: actions/checkout@v2
36
+ - uses: actions/checkout@v3
37
37
  - uses: MSP-Greg/setup-ruby-pkgs@v1
38
38
  with:
39
39
  apt-get: _update_ build-essential cmake
@@ -57,14 +57,14 @@ jobs:
57
57
  run: |
58
58
  git config --system core.autocrlf false
59
59
  git config --system core.eol lf
60
- - uses: actions/checkout@v2
60
+ - uses: actions/checkout@v3
61
61
  - uses: MSP-Greg/setup-ruby-pkgs@v1
62
62
  with:
63
63
  apt-get: _update_ build-essential cmake
64
64
  mingw: _upgrade_ cmake
65
65
  ruby-version: ${{ matrix.ruby }}
66
66
  bundler-cache: true
67
- - uses: actions/cache@v2
67
+ - uses: actions/cache@v3
68
68
  with:
69
69
  path: examples/ports/archives
70
70
  key: ${{ matrix.platform }}-examples-${{ hashFiles('examples/Rakefile') }}
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  ## mini_portile changelog
2
2
 
3
+ ### 2.8.2 / 2023-04-30
4
+
5
+ #### Fixed
6
+
7
+ - Ensure that the `source_directory` option will work when given a Windows path to an autoconf directory. [#126]
8
+
9
+
3
10
  ### 2.8.1 / 2022-12-24
4
11
 
5
12
  #### Fixed
@@ -67,12 +67,12 @@ class MiniPortile
67
67
  end
68
68
 
69
69
  def source_directory=(path)
70
- @source_directory = File.expand_path(path)
70
+ @source_directory = posix_path(path)
71
71
  end
72
72
 
73
73
  def prepare_build_directory
74
74
  raise "source_directory is not set" if source_directory.nil?
75
- output "Building #{@name} #{@version} from source at '#{source_directory}'"
75
+ output "Building #{@name} from source at '#{source_directory}'"
76
76
  FileUtils.mkdir_p(File.join(tmp_path, [name, version].join("-")))
77
77
  FileUtils.rm_rf(port_path) # make sure we always re-install
78
78
  end
@@ -137,7 +137,7 @@ class MiniPortile
137
137
  # Windows doesn't recognize the shebang.
138
138
  command.unshift("sh")
139
139
  end
140
- execute('configure', command + computed_options)
140
+ execute('configure', command + computed_options, altlog: "config.log")
141
141
  end
142
142
 
143
143
  def compile
@@ -200,10 +200,7 @@ class MiniPortile
200
200
 
201
201
  output "Activating #{@name} #{@version} (from #{port_path})..."
202
202
  vars.each do |var, path|
203
- full_path = File.expand_path(path)
204
-
205
- # turn into a valid Windows path (if required)
206
- full_path.gsub!(File::SEPARATOR, File::ALT_SEPARATOR) if File::ALT_SEPARATOR
203
+ full_path = native_path(path)
207
204
 
208
205
  # save current variable value
209
206
  old_value = ENV[var] || ''
@@ -237,7 +234,25 @@ class MiniPortile
237
234
  (ENV["MAKE"] || @make_command || ENV["make"] || "make").dup
238
235
  end
239
236
 
240
- private
237
+ private
238
+
239
+ def native_path(path)
240
+ path = File.expand_path(path)
241
+ if File::ALT_SEPARATOR
242
+ path.tr(File::SEPARATOR, File::ALT_SEPARATOR)
243
+ else
244
+ path
245
+ end
246
+ end
247
+
248
+ def posix_path(path)
249
+ path = File.expand_path(path)
250
+ if File::ALT_SEPARATOR
251
+ "/" + path.tr(File::ALT_SEPARATOR, File::SEPARATOR).tr(":", File::SEPARATOR)
252
+ else
253
+ path
254
+ end
255
+ end
241
256
 
242
257
  def tmp_path
243
258
  "tmp/#{@host}/ports/#{@name}/#{@version}"
@@ -420,6 +435,7 @@ private
420
435
  opt_debug = command_opts.fetch(:debug, false)
421
436
  opt_cd = command_opts.fetch(:cd) { work_path }
422
437
  opt_env = command_opts.fetch(:env) { Hash.new }
438
+ opt_altlog = command_opts.fetch(:altlog, nil)
423
439
 
424
440
  log_out = log_file(action)
425
441
 
@@ -450,12 +466,12 @@ private
450
466
  output "OK"
451
467
  return true
452
468
  else
453
- if File.exist? log_out
454
- output "ERROR, review '#{log_out}' to see what happened. Last lines are:"
455
- output("=" * 72)
456
- log_lines = File.readlines(log_out)
457
- output(log_lines[-[log_lines.length, 20].min .. -1])
458
- output("=" * 72)
469
+ output "ERROR. Please review logs to see what happened:\n"
470
+ [log_out, opt_altlog].compact.each do |log|
471
+ next unless File.exist?(log)
472
+ output("----- contents of '#{log}' -----")
473
+ output(File.read(log))
474
+ output("----- end of file -----")
459
475
  end
460
476
  raise "Failed to complete #{action} task"
461
477
  end
@@ -1,3 +1,3 @@
1
1
  class MiniPortile
2
- VERSION = "2.8.1"
2
+ VERSION = "2.8.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mini_portile2
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.1
4
+ version: 2.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luis Lavena
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-12-24 00:00:00.000000000 Z
13
+ date: 2023-04-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
153
  - !ruby/object:Gem::Version
154
154
  version: '0'
155
155
  requirements: []
156
- rubygems_version: 3.3.26
156
+ rubygems_version: 3.4.10
157
157
  signing_key:
158
158
  specification_version: 4
159
159
  summary: Simplistic port-like solution for developers