forked from shivammathur/homebrew-extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
executable file
·52 lines (47 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# typed: false
# frozen_string_literal: true
require File.expand_path("../Abstract/abstract-php-extension", __dir__)
# Class for Pecl_http Extension
class PeclHttpAT72 < AbstractPhpExtension
init
desc "Pecl_http PHP extension"
homepage "https://github.com/m6w6/ext-http"
url "https://pecl.php.net/get/pecl_http-3.2.4.tgz"
sha256 "37354ff7680b9b9839da8b908fff88227af7f6746c2611c873493af41d54f033"
head "https://github.com/m6w6/ext-http.git"
license "BSD-2-Clause"
revision 1
bottle do
root_url "https://ghcr.io/v2/shivammathur/extensions"
sha256 arm64_big_sur: "cf2076c94079f25ad9e6b919e12090c77bb7aa3ff8485010f1e84b26c02eed83"
sha256 big_sur: "fca7812038a374fb5df4443437c3a3077e5468ca70e89d6a7f05913647f24eef"
sha256 catalina: "ae339c723848981a454ea37c2c1d6a41295b82f9536f6452b6bc1dd37b7fa510"
end
depends_on "brotli"
depends_on "curl"
depends_on "icu4c"
depends_on "libevent"
depends_on "libidn2"
depends_on "shivammathur/extensions/[email protected]"
depends_on "shivammathur/extensions/[email protected]"
def install
args = %W[
--with-http
--with-http-libicu-dir=#{Formula["icu4c"].opt_prefix}
--with-http-zlib-dir=#{MacOS.sdk_path_if_needed}/usr
]
extra_includes = %W[
-I#{Formula["shivammathur/extensions/[email protected]"].opt_include}/php
-I#{Formula["shivammathur/extensions/[email protected]"].opt_include}/php
]
ENV["EXTRA_INCLUDES"] = extra_includes * " "
Dir.chdir "pecl_http-#{version}"
inreplace "src/php_http_api.h", "ext/raphf", "ext/[email protected]"
inreplace "src/php_http_api.h", "ext/propro", "ext/[email protected]"
safe_phpize
system "./configure", "--prefix=#{prefix}", phpconfig, *args
system "make"
prefix.install "modules/#{extension}.so"
write_config_file
end
end