testing/php85-pecl-brotli: add patch for alpha3

Ref https://github.com/kjdev/php-ext-brotli/pull/76
This commit is contained in:
Andy Postnikov 2025-07-30 17:29:06 +02:00
parent 1ea0399039
commit cb54be6765
No known key found for this signature in database
2 changed files with 30 additions and 2 deletions

View File

@ -3,7 +3,7 @@
pkgname=php85-pecl-brotli
_extname=brotli
pkgver=0.18.0
pkgrel=0
pkgrel=1
pkgdesc="Brotli Extension for PHP 8.5 PECL"
url="https://github.com/kjdev/php-ext-brotli"
arch="all"
@ -13,7 +13,8 @@ _php=php$_phpv
depends="$_php-common"
makedepends="$_php-dev $_php-pecl-apcu brotli-dev"
checkdepends="$_php-cgi"
source="php-pecl-$_extname-$pkgver.tgz::https://pecl.php.net/get/$_extname-$pkgver.tgz"
source="php-pecl-$_extname-$pkgver.tgz::https://pecl.php.net/get/$_extname-$pkgver.tgz
fix-smart-string.patch"
builddir="$srcdir/$_extname-$pkgver"
provides="$_php-brotli=$pkgver-r$pkgrel" # for backward compatibility
@ -48,4 +49,5 @@ package() {
sha512sums="
291e20ef2f7408386d8684145b5645e56900183844204416c0f58bb005adc78a24e7f0f9d1d69b83a3477b2e6157c1e907010e1a3170ad25cdf8057ae8ab6939 php-pecl-brotli-0.18.0.tgz
aff63feaa7e78c969f49a50ad6de34cc5f6b6b366c9f1a7a9aa39d9d914f5efefd239559318c06f5d701c3bb5ed16b6db3408bc12ec1f4c2553b4337142d6d0c fix-smart-string.patch
"

View File

@ -0,0 +1,26 @@
Patch-Source: https://github.com/kjdev/php-ext-brotli/pull/76/commits/aac82ce0275f4ec71c86c8a17a763a9f6b5a4045
From aac82ce0275f4ec71c86c8a17a763a9f6b5a4045 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Wed, 30 Jul 2025 12:38:27 +0200
Subject: [PATCH] use Zend/zend_smart_string.h
---
brotli.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/brotli.c b/brotli.c
index 16c300b..84e2ab4 100644
--- a/brotli.c
+++ b/brotli.c
@@ -10,7 +10,11 @@
#include <ext/standard/base64.h>
#include <ext/standard/file.h>
#include <ext/standard/info.h>
+#if PHP_VERSION_ID < 70200
#include <ext/standard/php_smart_string.h>
+#else
+#include <Zend/zend_smart_string.h>
+#endif
#if defined(HAVE_APCU_SUPPORT)
#include <ext/standard/php_var.h>
#include <ext/apcu/apc_serializer.h>