From e5efe54b91436f9ee1395d7311aa7c3d8f718545 Mon Sep 17 00:00:00 2001 From: Aapo Talvensaari Date: Sat, 19 May 2018 01:45:22 +0300 Subject: [PATCH] feat(*) add support for openresty-patches --- Formula/openresty.rb | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Formula/openresty.rb b/Formula/openresty.rb index 95d071f..1c6ff6c 100644 --- a/Formula/openresty.rb +++ b/Formula/openresty.rb @@ -1,9 +1,14 @@ class Openresty < Formula homepage "https://openresty.org/" + version = "1.13.6.1" + stable do - url "https://openresty.org/download/openresty-1.13.6.1.tar.gz" + url "https://openresty.org/download/openresty-#{version}.tar.gz" sha256 "d1246e6cfa81098eea56fb88693e980d3e6b8752afae686fab271519b81d696b" + resource "openresty-patches" do + url "https://github.com/Kong/openresty-patches.git", :using => :git, :shallow => false + end end depends_on "pcre" @@ -12,6 +17,13 @@ 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",