-
-
Notifications
You must be signed in to change notification settings - Fork 47
/
ast@8.4.rb
36 lines (32 loc) · 1.52 KB
/
ast@8.4.rb
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
# typed: true
# frozen_string_literal: true
require File.expand_path("../Abstract/abstract-php-extension", __dir__)
# Class for Ast Extension
class AstAT84 < AbstractPhpExtension
init
desc "Ast PHP extension"
homepage "https://github.com/nikic/php-ast"
url "https://pecl.php.net/get/ast-1.1.1.tgz"
sha256 "0c55e09a4da43b9cc1da72ecb4ae892941f73e157b73d46326bc6a5ed7fc44b1"
head "https://github.com/nikic/php-ast.git", branch: "master"
license "BSD-3-Clause"
bottle do
root_url "https://ghcr.io/v2/shivammathur/extensions"
rebuild 2
sha256 cellar: :any_skip_relocation, arm64_sonoma: "e89920f1f6313da5ac33938c79ca181cf21036d498d2316e6f3617b2773f353a"
sha256 cellar: :any_skip_relocation, arm64_ventura: "7be0349d0d7722dd640fc77033f28ff371e4ec07073c4a21663782967661d031"
sha256 cellar: :any_skip_relocation, arm64_monterey: "4446fc33e684fc1798e0ed60e3c8dcb7bdd0bb7337148cf6d0d22d6e1eb56f85"
sha256 cellar: :any_skip_relocation, ventura: "2a2ad9208ad1fae51ebf5eeb4144f0f52baabe581bf21ef23b746b5bbbde8080"
sha256 cellar: :any_skip_relocation, monterey: "6b1d18dc99818161880eccf380ffd1aa2ccfd0a4b06ff29a7a6d3abe0102ec75"
sha256 cellar: :any_skip_relocation, x86_64_linux: "b7ebee1d81147805146d51a8183a35207713f1ecd75459b7aa466d9d9d6b10c4"
end
def install
Dir.chdir "ast-#{version}"
safe_phpize
system "./configure", "--prefix=#{prefix}", phpconfig, "--enable-ast"
system "make"
prefix.install "modules/#{extension}.so"
write_config_file
add_include_files
end
end