Sha256: 1ceeb13e049f71e34760579fa051a5625215a7f24f0524324a8fe40b98fc7153

Contents?: true

Size: 889 Bytes

Versions: 2

Compression:

Stored size: 889 Bytes

Contents

# frozen_string_literal: true

require_relative "base_recipe"

module LibarchiveBinary
  class XZRecipe < BaseRecipe
    def initialize
      super("xz")
    end

    def configure_defaults
      [
        "--host=#{@host}",
        "--disable-doc",      "--disable-xz",       "--with-pic",
        "--disable-xzdec",    "--disable-lzmadec",  "--disable-lzmainfo",
        "--disable-scripts",  "--disable-shared",   "--enable-static"
      ]
    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

2 entries across 2 versions & 1 rubygems

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