Sha256: 73833aaaee1c8429f4a673d65d3c0e515ec019e26ba220fe59feffc45e5dae2d

Contents?: true

Size: 1008 Bytes

Versions: 10

Compression:

Stored size: 1008 Bytes

Contents

require "mini_portile2"

module LibarchiveBinary
  # based on 
  class LibexpatRecipe < MiniPortile
    ROOT = Pathname.new(File.expand_path("../..", __dir__))

    def initialize
      super("libexpat", "2.4.1")

      @files << {
        url: "https://github.com/libexpat/libexpat/releases/download/R_2_4_1/expat-2.4.1.tar.gz",
        sha256: "a00ae8a6b96b63a3910ddc1100b1a7ef50dc26dceb65ced18ded31ab392f132b"
      }

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

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

    def configure
      cmd = ["env", "CFLAGS=-fPIC", "LDFLAGS=-fPIC", "./configure"] + computed_options
      execute("configure", cmd)
    end

    def checkpoint
      File.join(@target, "#{self.name}-#{self.version}-#{self.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.2.6 lib/ffi-libarchive-binary/libexpat_recipe.rb
ffi-libarchive-binary-0.2.6-x86_64-linux lib/ffi-libarchive-binary/libexpat_recipe.rb
ffi-libarchive-binary-0.2.6-x86_64-darwin lib/ffi-libarchive-binary/libexpat_recipe.rb
ffi-libarchive-binary-0.2.6-x86-linux lib/ffi-libarchive-binary/libexpat_recipe.rb
ffi-libarchive-binary-0.2.6-arm64-darwin lib/ffi-libarchive-binary/libexpat_recipe.rb
ffi-libarchive-binary-0.2.5 lib/ffi-libarchive-binary/libexpat_recipe.rb
ffi-libarchive-binary-0.2.5-x86_64-linux lib/ffi-libarchive-binary/libexpat_recipe.rb
ffi-libarchive-binary-0.2.5-x86_64-darwin lib/ffi-libarchive-binary/libexpat_recipe.rb
ffi-libarchive-binary-0.2.5-x86-linux lib/ffi-libarchive-binary/libexpat_recipe.rb
ffi-libarchive-binary-0.2.5-arm64-darwin lib/ffi-libarchive-binary/libexpat_recipe.rb