Class: LibarchiveBinary::XZRecipe
Instance Method Summary
collapse
Methods inherited from BaseRecipe
#apple_arch_flag, #cflags, #cross_compiler_env, #ldflags, #message
Constructor Details
Returns a new instance of XZRecipe.
7
8
9
|
# File 'lib/ffi-libarchive-binary/xz_recipe.rb', line 7
def initialize
super("xz")
end
|
Instance Method Details
#checkpoint ⇒ Object
28
29
30
|
# File 'lib/ffi-libarchive-binary/xz_recipe.rb', line 28
def checkpoint
File.join(@target, "#{name}-#{version}-#{host}.installed")
end
|
20
21
22
23
24
25
26
|
# File 'lib/ffi-libarchive-binary/xz_recipe.rb', line 20
def configure
env_vars = cross_compiler_env(host)
cmd = ["env"] + env_vars.map { |k, v| "#{k}=#{v}" } +
[cflags(host), ldflags(host), "./configure"] + computed_options
execute("configure", cmd)
end
|
11
12
13
14
15
16
17
18
|
# File 'lib/ffi-libarchive-binary/xz_recipe.rb', line 11
def configure_defaults
[
"--host=#{@host}",
"--disable-doc", "--disable-xz", "--with-pic",
"--disable-xzdec", "--disable-lzmadec", "--disable-lzmainfo",
"--disable-scripts", "--disable-shared", "--enable-static"
]
end
|
#cook ⇒ Object
36
37
38
39
40
|
# File 'lib/ffi-libarchive-binary/xz_recipe.rb', line 36
def cook
super
FileUtils.touch(checkpoint)
end
|
#cook_if_not ⇒ Object
32
33
34
|
# File 'lib/ffi-libarchive-binary/xz_recipe.rb', line 32
def cook_if_not
cook unless File.exist?(checkpoint)
end
|