Sha256: ec623dc1d6ee0ab99fe95f562a0e0d66970a0c6c4124c38127d5f8e357c29b8b

Contents?: true

Size: 566 Bytes

Versions: 46

Compression:

Stored size: 566 Bytes

Contents

module PkgForge
  ##
  # Add patch methods to Forge
  class Forge
    attr_writer :patches

    Contract None => ArrayOf[String]
    def patches
      @patches ||= []
    end

    private

    Contract None => nil
    def patch_source!
      patches.each do |patch|
        run_local "patch -d #{tmpdir(:build)} -p1 < patches/#{patch}"
      end
      nil
    end
  end

  module DSL
    ##
    # Add patch methods to Forge DSL
    class Forge
      Contract String => nil
      def patch(file)
        @forge.patches << file
        nil
      end
    end
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
pkgforge-0.12.3 lib/pkgforge/components/patch.rb
pkgforge-0.12.1 lib/pkgforge/components/patch.rb
pkgforge-0.12.0 lib/pkgforge/components/patch.rb
pkgforge-0.11.0 lib/pkgforge/components/patch.rb
pkgforge-0.10.0 lib/pkgforge/components/patch.rb
pkgforge-0.9.3 lib/pkgforge/components/patch.rb
pkgforge-0.9.2 lib/pkgforge/components/patch.rb
pkgforge-0.9.1 lib/pkgforge/components/patch.rb
pkgforge-0.9.0 lib/pkgforge/components/patch.rb
pkgforge-0.8.4 lib/pkgforge/components/patch.rb
pkgforge-0.8.3 lib/pkgforge/components/patch.rb
pkgforge-0.8.1 lib/pkgforge/components/patch.rb
pkgforge-0.8.0 lib/pkgforge/components/patch.rb
pkgforge-0.6.10 lib/pkgforge/components/patch.rb
pkgforge-0.6.9 lib/pkgforge/components/patch.rb
pkgforge-0.6.8 lib/pkgforge/components/patch.rb
pkgforge-0.6.7 lib/pkgforge/components/patch.rb
pkgforge-0.6.6 lib/pkgforge/components/patch.rb
pkgforge-0.6.5 lib/pkgforge/components/patch.rb
pkgforge-0.6.4 lib/pkgforge/components/patch.rb