Class: LibarchiveBinary::OpensslRecipe

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

Instance Method Summary collapse

Methods inherited from BaseRecipe

#apple_arch_flag, #cflags, #ldflags, #message

Constructor Details

#initializeOpensslRecipe

Returns a new instance of OpensslRecipe.



17
18
19
# File 'lib/ffi-libarchive-binary/openssl_recipe.rb', line 17

def initialize
  super("openssl")
end

Instance Method Details

#checkpointObject



34
35
36
# File 'lib/ffi-libarchive-binary/openssl_recipe.rb', line 34

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

#configureObject



21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/ffi-libarchive-binary/openssl_recipe.rb', line 21

def configure
  os_compiler = OS_COMPILERS[@host]
  common_opts = ["--openssldir=#{ROOT}/ports/SSL", "no-tests", "no-shared"] +
    computed_options.grep(/--prefix/)
  cmd = if os_compiler.nil?
          message("OpensslRecipe: guessing with 'config' for '#{@host}'\n")
          ENV_CMD + ["./config"] + common_opts
        else
          ENV_CMD + ["./Configure"] + common_opts + [os_compiler]
        end
  execute("configure", cmd)
end

#cookObject



42
43
44
45
46
# File 'lib/ffi-libarchive-binary/openssl_recipe.rb', line 42

def cook
  super

  FileUtils.touch(checkpoint)
end

#cook_if_notObject



38
39
40
# File 'lib/ffi-libarchive-binary/openssl_recipe.rb', line 38

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