From 7de069684f8317ae8b4cce741aebba84b760e4d4 Mon Sep 17 00:00:00 2001 From: Soner Sayakci Date: Wed, 28 Aug 2024 21:26:31 +0200 Subject: [PATCH] feat: add zstd --- Formula/zstd@8.3.rb | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Formula/zstd@8.3.rb diff --git a/Formula/zstd@8.3.rb b/Formula/zstd@8.3.rb new file mode 100644 index 000000000..062f0a2e3 --- /dev/null +++ b/Formula/zstd@8.3.rb @@ -0,0 +1,27 @@ +# typed: true +# frozen_string_literal: true + +require File.expand_path("../Abstract/abstract-php-extension", __dir__) + +# Class for Zstd Extension +class ZstdAT83 < AbstractPhpExtension + init + desc "Zstd Extension for PHP" + homepage "https://github.com/kjdev/php-ext-zstd" + url "https://pecl.php.net/get/zstd-0.13.3.tgz" + sha256 "e4dfa6e5501736f2f5dbfedd33b214c0c47fa98708f0a7d8c65baa95fd6d7e06" + head "https://github.com/kjdev/php-ext-zstd.git", branch: "master" + license "MIT" + + depends_on "zstd" + + def install + Dir.chdir "zstd-#{version}" + safe_phpize + system "./configure", "--prefix=#{prefix}", "--with-libzstd", phpconfig + system "make" + prefix.install "modules/#{extension}.so" + write_config_file + add_include_files + end +end