Class: LibarchiveBinary::LibexpatRecipe
- Inherits:
-
BaseRecipe
- Object
- MiniPortile
- BaseRecipe
- LibarchiveBinary::LibexpatRecipe
show all
- Defined in:
- lib/ffi-libarchive-binary/libexpat_recipe.rb
Constant Summary
collapse
- ROOT =
Pathname.new(File.expand_path("../..", __dir__))
Instance Method Summary
collapse
Methods inherited from BaseRecipe
#apple_arch_flag, #cflags, #ldflags, #message
Constructor Details
Returns a new instance of LibexpatRecipe.
9
10
11
12
13
14
15
16
17
18
|
# File 'lib/ffi-libarchive-binary/libexpat_recipe.rb', line 9
def initialize
super("libexpat", "2.6.4")
@files << {
url: "https://github.com/libexpat/libexpat/releases/download/R_2_6_4/expat-2.6.4.tar.gz",
sha256: "fd03b7172b3bd7427a3e7a812063f74754f24542429b634e0db6511b53fb2278",
}
@target = ROOT.join(@target).to_s
end
|
Instance Method Details
#checkpoint ⇒ Object
33
34
35
|
# File 'lib/ffi-libarchive-binary/libexpat_recipe.rb', line 33
def checkpoint
File.join(@target, "#{name}-#{version}-#{host}.installed")
end
|
27
28
29
30
31
|
# File 'lib/ffi-libarchive-binary/libexpat_recipe.rb', line 27
def configure
cmd = ["env", cflags(host), ldflags(host),
"./configure"] + computed_options
execute("configure", cmd)
end
|
20
21
22
23
24
25
|
# File 'lib/ffi-libarchive-binary/libexpat_recipe.rb', line 20
def configure_defaults
[
"--host=#{@host}", "--disable-shared", "--enable-static",
"--without-tests", "--without-examples"
]
end
|
#cook ⇒ Object
41
42
43
44
45
|
# File 'lib/ffi-libarchive-binary/libexpat_recipe.rb', line 41
def cook
super
FileUtils.touch(checkpoint)
end
|
#cook_if_not ⇒ Object
37
38
39
|
# File 'lib/ffi-libarchive-binary/libexpat_recipe.rb', line 37
def cook_if_not
cook unless File.exist?(checkpoint)
end
|