mini_portile2 2.8.0 → 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: 2602d6374f46f2b14904b287999ca7da911a08b28fa75517e220796847cd9496
4
- data.tar.gz: 450fc92cc01ae557e8ab7f43ddd241d479496160c2f759969531cfa6003321fd
3
+ metadata.gz: c8c3bc43ff4324b2780fdac7f1832759fe3933330155380eeb4d3be23a55ac25
4
+ data.tar.gz: 4b9ed8985c6ae4b827b1cd9791a97a8a708fca9f02dd2bc0854e241d05ce71bf
5
5
  SHA512:
6
- metadata.gz: 7ccfdbbb591033e43b155be58a3dd72145886a7c5b38e7f7ba4009adee5b76b6b33d3ee80d7b1d66be7160eeb6ffdf4d87dbd11898b3f624c56d91c316969d13
7
- data.tar.gz: 7bd90d3d534b25097e38d748f59286385010ee05f9f4ee06a38b844379bf8fe10b604fe013cc716aa9deab72a02d7e704ef045825acd370db198ec8f1ccb9bea
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,19 @@
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
+
10
+ ### 2.8.1 / 2022-12-24
11
+
12
+ #### Fixed
13
+
14
+ - Support applying patches via `git apply` even when the working directory resembles a git directory. [#119] (Thanks, @h0tw1r3!)
15
+
16
+
3
17
  ### 2.8.0 / 2022-02-20
4
18
 
5
19
  #### Added
@@ -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
@@ -99,9 +99,9 @@ class MiniPortile
99
99
  when which('git')
100
100
  lambda { |file|
101
101
  message "Running git apply with #{file}... "
102
- # By --work-tree=. git-apply uses the current directory as
103
- # the project root and will not search upwards for .git.
104
- execute('patch', ["git", "--git-dir=.", "--work-tree=.", "apply", "--whitespace=warn", file], :initial_message => false)
102
+ Dir.mktmpdir do |tmp_git_dir|
103
+ execute('patch', ["git", "--git-dir=#{tmp_git_dir}", "--work-tree=.", "apply", "--whitespace=warn", file], :initial_message => false)
104
+ end
105
105
  }
106
106
  when which('patch')
107
107
  lambda { |file|
@@ -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.0"
2
+ VERSION = "2.8.2"
3
3
  end
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
33
33
 
34
34
  spec.required_ruby_version = ">= 2.3.0"
35
35
 
36
- spec.add_development_dependency "bundler", "~> 2.3"
36
+ spec.add_development_dependency "bundler", "~> 2.2"
37
37
  spec.add_development_dependency "minitar", "~> 0.9"
38
38
  spec.add_development_dependency "minitest", "~> 5.15"
39
39
  spec.add_development_dependency "minitest-hooks", "~> 1.5"
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.0
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-02-20 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
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: '2.3'
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: '2.3'
28
+ version: '2.2'
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: minitar
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -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.5
156
+ rubygems_version: 3.4.10
157
157
  signing_key:
158
158
  specification_version: 4
159
159
  summary: Simplistic port-like solution for developers