mini_portile 0.4.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/History.txt +5 -0
  2. data/README.rdoc +3 -3
  3. data/Rakefile +1 -1
  4. data/lib/mini_portile.rb +11 -1
  5. metadata +2 -2
@@ -1,3 +1,8 @@
1
+ === 0.5.0 / 2012-11-17
2
+
3
+ * Enhancements:
4
+ * Allow patching extracted files using `git apply`. [metaskills]
5
+
1
6
  === 0.4.1 / 2012-10-24
2
7
 
3
8
  * Bugfixes:
@@ -54,9 +54,9 @@ quick example:
54
54
  recipe.cook
55
55
  recipe.activate
56
56
 
57
- That's all. <tt>cook</tt> will download, extract, configure and compile the
58
- library into a namespaced structure. <tt>activate</tt> ensures GCC find this
59
- library and prefers it over a system-wide installation.
57
+ That's all. <tt>cook</tt> will download, extract, patch, configure and compile
58
+ the library into a namespaced structure. <tt>activate</tt> ensures GCC find
59
+ this library and prefers it over a system-wide installation.
60
60
 
61
61
  === Structure
62
62
 
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.4.1"
7
+ s.version = "0.5.0"
8
8
  s.platform = Gem::Platform::RUBY
9
9
 
10
10
  # description and details
@@ -8,13 +8,14 @@ require 'digest/md5'
8
8
  class MiniPortile
9
9
  attr_reader :name, :version, :original_host
10
10
  attr_writer :configure_options
11
- attr_accessor :host, :files, :target, :logger
11
+ attr_accessor :host, :files, :patch_files, :target, :logger
12
12
 
13
13
  def initialize(name, version)
14
14
  @name = name
15
15
  @version = version
16
16
  @target = 'ports'
17
17
  @files = []
18
+ @patch_files = []
18
19
  @logger = STDOUT
19
20
 
20
21
  @original_host = @host = detect_host
@@ -34,6 +35,14 @@ class MiniPortile
34
35
  end
35
36
  end
36
37
 
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}))
43
+ end
44
+ end
45
+
37
46
  def configure_options
38
47
  @configure_options ||= configure_defaults
39
48
  end
@@ -87,6 +96,7 @@ class MiniPortile
87
96
  def cook
88
97
  download unless downloaded?
89
98
  extract
99
+ patch
90
100
  configure unless configured?
91
101
  compile
92
102
  install unless installed?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mini_portile
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-25 00:00:00.000000000 Z
12
+ date: 2012-11-17 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Simplistic port-like solution for developers. It provides a standard
15
15
  and simplified way to compile against dependency libraries without messing up your