mini_portile 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +7 -0
  2. data/History.txt +9 -0
  3. data/Rakefile +1 -1
  4. data/lib/mini_portile.rb +35 -12
  5. metadata +8 -10
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 68971ad5491d04db792cc4c302012dba5c426a8f
4
+ data.tar.gz: 4e4dbabe7a1ea8310f95aa6e7617f7ab54980e5d
5
+ SHA512:
6
+ metadata.gz: bd5797cd26aa5b37cef63b0c16315d31445d95362d9102c4800af077dc40d495f0810a2abc28090526cc276f7b3712839915adb0c7fa68cf604645d245081ace
7
+ data.tar.gz: d27ce0daed9bf07388092c125e90a75e32763e4f7fcfdf71ac802dd1f2ce7574aad988800636b2439ce89762c0f1675a80769a5def71bb4002b6c6f6363fa547
data/History.txt CHANGED
@@ -1,3 +1,12 @@
1
+ === 0.5.2 / 2013-10-23
2
+
3
+ * Bugfixes:
4
+ * Change tar detection order to support NetBSD 'gtar'. Closes #24
5
+ * Trick 'git-apply' when applying patches on nested Git checkouts. [larskanis]
6
+ * Respect ENV's MAKE before fallback to 'make'. [larskanis]
7
+ * Respect ENV's CC variable before fallback to 'gcc'.
8
+ * Avoid non-ASCII output of GCC cause host detection issues. Closes #22
9
+
1
10
  === 0.5.1 / 2013-07-07
2
11
 
3
12
  * Bugfixes:
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ require "rubygems/package_task"
4
4
  GEM_SPEC = Gem::Specification.new do |s|
5
5
  # basic information
6
6
  s.name = "mini_portile"
7
- s.version = "0.5.1"
7
+ s.version = "0.5.2"
8
8
  s.platform = Gem::Platform::RUBY
9
9
 
10
10
  # description and details
data/lib/mini_portile.rb CHANGED
@@ -36,10 +36,18 @@ class MiniPortile
36
36
  end
37
37
 
38
38
  def patch
39
- @patch_files.each do |full_path|
40
- next unless File.exists?(full_path)
41
- output "Running git apply with #{full_path}..."
42
- execute('patch', %Q(git apply #{full_path}))
39
+ # Set GIT_DIR while appying patches to work around
40
+ # git-apply doing nothing when started within another
41
+ # git directory.
42
+ ENV['GIT_DIR'], old_git = '.', ENV['GIT_DIR']
43
+ begin
44
+ @patch_files.each do |full_path|
45
+ next unless File.exists?(full_path)
46
+ output "Running git apply with #{full_path}..."
47
+ execute('patch', %Q(git apply #{full_path}))
48
+ end
49
+ ensure
50
+ ENV['GIT_DIR'] = old_git
43
51
  end
44
52
  end
45
53
 
@@ -58,12 +66,12 @@ class MiniPortile
58
66
  end
59
67
 
60
68
  def compile
61
- execute('compile', 'make')
69
+ execute('compile', make_cmd)
62
70
  end
63
71
 
64
72
  def install
65
73
  return if installed?
66
- execute('install', %Q(make install))
74
+ execute('install', %Q(#{make_cmd} install))
67
75
  end
68
76
 
69
77
  def downloaded?
@@ -186,7 +194,7 @@ private
186
194
 
187
195
  def tar_exe
188
196
  @@tar_exe ||= begin
189
- %w[tar bsdtar basic-bsdtar].find { |c|
197
+ %w[gtar bsdtar tar basic-bsdtar].find { |c|
190
198
  which(c)
191
199
  }
192
200
  end
@@ -212,12 +220,18 @@ private
212
220
  def detect_host
213
221
  return @detect_host if defined?(@detect_host)
214
222
 
215
- output = `gcc -v 2>&1`
216
- if m = output.match(/^Target\: (.*)$/)
217
- @detect_host = m[1]
218
- end
223
+ begin
224
+ ENV["LC_ALL"], old_lc_all = "C", ENV["LC_ALL"]
225
+
226
+ output = `#{gcc_cmd} -v 2>&1`
227
+ if m = output.match(/^Target\: (.*)$/)
228
+ @detect_host = m[1]
229
+ end
219
230
 
220
- @detect_host
231
+ @detect_host
232
+ ensure
233
+ ENV["LC_ALL"] = old_lc_all
234
+ end
221
235
  end
222
236
 
223
237
  def extract_file(file, target)
@@ -378,4 +392,13 @@ private
378
392
  FileUtils.mv temp_file.path, full_path, :force => true
379
393
  end
380
394
 
395
+ def gcc_cmd
396
+ cc = ENV["CC"] || "gcc"
397
+ return cc.dup
398
+ end
399
+
400
+ def make_cmd
401
+ m = ENV['MAKE'] || ENV['make'] || 'make'
402
+ return m.dup
403
+ end
381
404
  end
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mini_portile
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
5
- prerelease:
4
+ version: 0.5.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Luis Lavena
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-07-07 00:00:00.000000000 Z
11
+ date: 2013-10-24 00:00:00.000000000 Z
13
12
  dependencies: []
14
13
  description: Simplistic port-like solution for developers. It provides a standard
15
14
  and simplified way to compile against dependency libraries without messing up your
@@ -25,12 +24,13 @@ files:
25
24
  - examples/Rakefile
26
25
  - lib/mini_portile.rb
27
26
  - Rakefile
28
- - README.rdoc
29
27
  - History.txt
30
28
  - LICENSE.txt
29
+ - README.rdoc
31
30
  homepage: http://github.com/luislavena/mini_portile
32
31
  licenses:
33
32
  - MIT
33
+ metadata: {}
34
34
  post_install_message:
35
35
  rdoc_options:
36
36
  - --main
@@ -40,21 +40,19 @@ rdoc_options:
40
40
  require_paths:
41
41
  - lib
42
42
  required_ruby_version: !ruby/object:Gem::Requirement
43
- none: false
44
43
  requirements:
45
- - - ! '>='
44
+ - - '>='
46
45
  - !ruby/object:Gem::Version
47
46
  version: 1.8.7
48
47
  required_rubygems_version: !ruby/object:Gem::Requirement
49
- none: false
50
48
  requirements:
51
- - - ! '>='
49
+ - - '>='
52
50
  - !ruby/object:Gem::Version
53
51
  version: 1.3.5
54
52
  requirements: []
55
53
  rubyforge_project:
56
- rubygems_version: 1.8.25
54
+ rubygems_version: 2.0.12
57
55
  signing_key:
58
- specification_version: 3
56
+ specification_version: 4
59
57
  summary: Simplistic port-like solution for developers
60
58
  test_files: []