Class: LibarchiveBinary::Libxml2Recipe

Inherits:
BaseRecipe
  • Object
show all
Defined in:
lib/ffi-libarchive-binary/libxml2_recipe.rb

Instance Method Summary collapse

Methods inherited from BaseRecipe

#apple_arch_flag, #cflags, #cross_compiler_env, #ldflags, #message

Constructor Details

#initializeLibxml2Recipe

Returns a new instance of Libxml2Recipe.



7
8
9
10
11
# File 'lib/ffi-libarchive-binary/libxml2_recipe.rb', line 7

def initialize
  super("libxml2")

  @target = ROOT.join(@target).to_s
end

Instance Method Details

#checkpointObject



41
42
43
# File 'lib/ffi-libarchive-binary/libxml2_recipe.rb', line 41

def checkpoint
  File.join(@target, "#{name}-#{version}-#{host}.installed")
end

#configureObject



35
36
37
38
39
# File 'lib/ffi-libarchive-binary/libxml2_recipe.rb', line 35

def configure
  cmd = ["env", cflags(host), ldflags(host),
         "./configure"] + computed_options
  execute("configure", cmd)
end

#configure_defaultsObject



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/ffi-libarchive-binary/libxml2_recipe.rb', line 13

def configure_defaults
  [
    "--host=#{@host}",
    "--disable-dependency-tracking",
    "--without-python",
    "--without-lzma",
    "--without-zlib",
    "--without-iconv",
    "--without-icu",
    "--without-debug",
    "--without-threads",
    "--without-modules",
    "--without-catalog",
    "--without-docbook",
    "--without-legacy",
    "--without-http",
    "--without-ftp",
    "--enable-static",
    "--disable-shared"
  ]
end

#cookObject



49
50
51
52
53
# File 'lib/ffi-libarchive-binary/libxml2_recipe.rb', line 49

def cook
  super

  FileUtils.touch(checkpoint)
end

#cook_if_notObject



45
46
47
# File 'lib/ffi-libarchive-binary/libxml2_recipe.rb', line 45

def cook_if_not
  cook unless File.exist?(checkpoint)
end