Sha256: 885aa0d3e8a1e5f806e7b64c3b0c888bfbfef74517c57016f32f9a3ac53faee0

Contents?: true

Size: 793 Bytes

Versions: 10

Compression:

Stored size: 793 Bytes

Contents

# frozen_string_literal: true

require_relative "base_recipe"

module LibarchiveBinary
  class LibexpatRecipe < BaseRecipe
    def initialize
      super("libexpat")

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

    def configure_defaults
      [
        "--host=#{@host}",        "--disable-shared", "--enable-static",
        "--without-tests",        "--without-examples"
      ]
    end

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

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

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

    def cook
      super

      FileUtils.touch(checkpoint)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ffi-libarchive-binary-0.4.0 lib/ffi-libarchive-binary/libexpat_recipe.rb
ffi-libarchive-binary-0.4.0-x86_64-linux lib/ffi-libarchive-binary/libexpat_recipe.rb
ffi-libarchive-binary-0.4.0-x86_64-darwin lib/ffi-libarchive-binary/libexpat_recipe.rb
ffi-libarchive-binary-0.4.0-arm64-darwin lib/ffi-libarchive-binary/libexpat_recipe.rb
ffi-libarchive-binary-0.4.0-aarch64-linux lib/ffi-libarchive-binary/libexpat_recipe.rb
ffi-libarchive-binary-0.4.0.rc1 lib/ffi-libarchive-binary/libexpat_recipe.rb
ffi-libarchive-binary-0.4.0.rc1-x86_64-linux lib/ffi-libarchive-binary/libexpat_recipe.rb
ffi-libarchive-binary-0.4.0.rc1-x86_64-darwin lib/ffi-libarchive-binary/libexpat_recipe.rb
ffi-libarchive-binary-0.4.0.rc1-arm64-darwin lib/ffi-libarchive-binary/libexpat_recipe.rb
ffi-libarchive-binary-0.4.0.rc1-aarch64-linux lib/ffi-libarchive-binary/libexpat_recipe.rb