Sha256: 87fb06893f9e539c8353da9572ccf1e7113188480b987624897e71017a507821

Contents?: true

Size: 833 Bytes

Versions: 4

Compression:

Stored size: 833 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

4 entries across 4 versions & 1 rubygems

Version Path
ffi-libarchive-binary-0.4.0-x64-mingw32 lib/ffi-libarchive-binary/libexpat_recipe.rb
ffi-libarchive-binary-0.4.0-x64-mingw-ucrt lib/ffi-libarchive-binary/libexpat_recipe.rb
ffi-libarchive-binary-0.4.0.rc1-x64-mingw32 lib/ffi-libarchive-binary/libexpat_recipe.rb
ffi-libarchive-binary-0.4.0.rc1-x64-mingw-ucrt lib/ffi-libarchive-binary/libexpat_recipe.rb