Skip to content
This repository has been archived by the owner on Apr 7, 2023. It is now read-only.

Commit

Permalink
feat(openresty) apply Kong/openresty-patches on install
Browse files Browse the repository at this point in the history
  • Loading branch information
bungle authored and thibaultcha committed May 22, 2018
1 parent 81e0cc4 commit 61dc477
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions Formula/openresty.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
class Openresty < Formula
homepage "https://openresty.org/"
version = "1.13.6.1"
sha_sum = "d1246e6cfa81098eea56fb88693e980d3e6b8752afae686fab271519b81d696b"

stable do
url "https://openresty.org/download/openresty-1.13.6.1.tar.gz"
sha256 "d1246e6cfa81098eea56fb88693e980d3e6b8752afae686fab271519b81d696b"
url "https://openresty.org/download/openresty-#{version}.tar.gz"
sha256 sha_sum

resource "openresty-patches" do
url "https://github.com/Kong/openresty-patches.git", :using => :git, :shallow => false
end
end

depends_on "pcre"
Expand All @@ -12,6 +18,12 @@ class Openresty < Formula
option "with-debug", "Compile with support for debug logging but without proper gdb debugging symbols"

def install
resource("openresty-patches").stage do
Dir["#{pwd}/patches/#{version}/*.patch"].each do |f|
system "cd", buildpath/"bundle", "&&", "patch", "-p1", "<", f
end
end

args = [
"--prefix=#{prefix}",
"--with-ipv6",
Expand Down

0 comments on commit 61dc477

Please sign in to comment.