From f7e5e4fbf673f738833b25fc39711106a361e429 Mon Sep 17 00:00:00 2001 From: Rahil Bhimjiani Date: Fri, 29 Mar 2024 13:25:11 +0530 Subject: [PATCH] dev-php/pecl-brotli: Brotli compression extension for PHP What? * brotli is widely used compression in web (better than gzip), so is PHP. PHP applications (i.e. w3 total cache) use this extension to compress http responses on-the-fly. * Features live ebuild * Compatible with php versions currently available in tree * Links with app-arch/brotli Why (in ::gentoo)? * I don't have any strong reason for it to be in ::gentoo. It can be in ::guru too. * It is not a standalone application or package but the extension to already established PHP ecosystem. * There are already 200+ dev-php/\* packages including extensions like this one in ::gentoo. * Alpine and freebsd have already packaged it https://repology.org/project/php:brotli/ indicates that package is trusted by other downstreams as well. Signed-off-by: Rahil Bhimjiani Closes: https://github.com/gentoo/gentoo/pull/35978 Signed-off-by: Sam James --- dev-php/pecl-brotli/Manifest | 1 + dev-php/pecl-brotli/metadata.xml | 17 +++++++++ dev-php/pecl-brotli/pecl-brotli-0.15.0.ebuild | 35 +++++++++++++++++++ dev-php/pecl-brotli/pecl-brotli-9999.ebuild | 35 +++++++++++++++++++ 4 files changed, 88 insertions(+) create mode 100644 dev-php/pecl-brotli/Manifest create mode 100644 dev-php/pecl-brotli/metadata.xml create mode 100644 dev-php/pecl-brotli/pecl-brotli-0.15.0.ebuild create mode 100644 dev-php/pecl-brotli/pecl-brotli-9999.ebuild diff --git a/dev-php/pecl-brotli/Manifest b/dev-php/pecl-brotli/Manifest new file mode 100644 index 0000000000000..0fce687535d50 --- /dev/null +++ b/dev-php/pecl-brotli/Manifest @@ -0,0 +1 @@ +DIST pecl-brotli-0.15.0.tgz 468436 BLAKE2B 865f1e970157ac1fead313e63133c74b48ef8fc1d916ea1efbba74186f6ba2b9c3e93b67f842df40b3399713c5bef3d62a15dda0f626a0c9a3b0a956c763a9eb SHA512 0e3be424eace7ed50f67dac780fa55c0fa6da1265676cea12588d8713ec6636936379a543bde48f7b30054aeda038200a3f650259e2da589f642447125b32e6a diff --git a/dev-php/pecl-brotli/metadata.xml b/dev-php/pecl-brotli/metadata.xml new file mode 100644 index 0000000000000..dca5b6092a4e0 --- /dev/null +++ b/dev-php/pecl-brotli/metadata.xml @@ -0,0 +1,17 @@ + + + + + me@rahil.rocks + Rahil Bhimjiani + + + proxy-maint@gentoo.org + Proxy Maintainers + + + kjdev/php-ext-brotli + https://github.com/kjdev/php-ext-brotli/issues + https://github.com/kjdev/php-ext-brotli/blob/master/README.md + + diff --git a/dev-php/pecl-brotli/pecl-brotli-0.15.0.ebuild b/dev-php/pecl-brotli/pecl-brotli-0.15.0.ebuild new file mode 100644 index 0000000000000..837566cf855ea --- /dev/null +++ b/dev-php/pecl-brotli/pecl-brotli-0.15.0.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +USE_PHP="php8-1 php8-2 php8-3" + +inherit php-ext-pecl-r3 + +unset SRC_URI +PHP_EXT_PECL_PKG_V="${PHP_EXT_PECL_PKG}-${PV/_/}" + +if [[ ${PV} == 9999* ]]; then + EGIT_REPO_URI="https://github.com/kjdev/php-ext-brotli.git" + EGIT_CHECKOUT_DIR="${WORKDIR}/${PHP_EXT_PECL_PKG_V}" + EGIT_SUBMODULES=() + inherit git-r3 +else + SRC_URI="https://pecl.php.net/get/${PHP_EXT_PECL_PKG_V}.tgz -> ${P}.tgz" + KEYWORDS="~amd64" +fi + +DESCRIPTION="Brotli compression extension for PHP" +HOMEPAGE+=" https://github.com/kjdev/php-ext-brotli" + +LICENSE="MIT" +SLOT="0" + +RDEPEND="app-arch/brotli" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PHP_EXT_ECONF_ARGS=( + --with-libbrotli +) diff --git a/dev-php/pecl-brotli/pecl-brotli-9999.ebuild b/dev-php/pecl-brotli/pecl-brotli-9999.ebuild new file mode 100644 index 0000000000000..837566cf855ea --- /dev/null +++ b/dev-php/pecl-brotli/pecl-brotli-9999.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +USE_PHP="php8-1 php8-2 php8-3" + +inherit php-ext-pecl-r3 + +unset SRC_URI +PHP_EXT_PECL_PKG_V="${PHP_EXT_PECL_PKG}-${PV/_/}" + +if [[ ${PV} == 9999* ]]; then + EGIT_REPO_URI="https://github.com/kjdev/php-ext-brotli.git" + EGIT_CHECKOUT_DIR="${WORKDIR}/${PHP_EXT_PECL_PKG_V}" + EGIT_SUBMODULES=() + inherit git-r3 +else + SRC_URI="https://pecl.php.net/get/${PHP_EXT_PECL_PKG_V}.tgz -> ${P}.tgz" + KEYWORDS="~amd64" +fi + +DESCRIPTION="Brotli compression extension for PHP" +HOMEPAGE+=" https://github.com/kjdev/php-ext-brotli" + +LICENSE="MIT" +SLOT="0" + +RDEPEND="app-arch/brotli" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PHP_EXT_ECONF_ARGS=( + --with-libbrotli +)