Merge pull request #126351 from etu/php-extensions-updates

php.extensions: Updates to multiple extensions
This commit is contained in:
Elis Hirwing 2021-06-13 11:29:40 +02:00 committed by GitHub
commit 0b24426212
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 45 additions and 109 deletions

View file

@ -1,36 +0,0 @@
From 58237e64fa77ec5cdec658b3295f71ec899175fa Mon Sep 17 00:00:00 2001
From: Maximilian Bosch <maximilian@mbosch.me>
Date: Sat, 5 Oct 2019 13:47:59 +0200
Subject: [PATCH] Fix timeouts in libcouchbase testsuite
Nix-specific patch. Basically
https://github.com/couchbase/libcouchbase/commit/b272f6ab88be523bbcf9d5c4252d07fccb023fe5, but
rebased onto 2.10.4.
---
src/ssl/ssl_e.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/ssl/ssl_e.c b/src/ssl/ssl_e.c
index f4506cf..734a3e6 100644
--- a/src/ssl/ssl_e.c
+++ b/src/ssl/ssl_e.c
@@ -210,10 +210,16 @@ flush_ssl_data(lcbio_ESSL *es)
* calls. While we could have done this inline with the send() call this
* would make future optimization more difficult. */
GT_WRITE_DONE:
+#if !LCB_CAN_OPTIMIZE_SSL_BIO
+ BIO_get_mem_ptr(es->wbio, &wmb);
+#endif
while (wmb->length > (size_t)tmp_len) {
char dummy[4096];
unsigned to_read = MINIMUM(wmb->length-tmp_len, sizeof dummy);
BIO_read(es->wbio, dummy, to_read);
+#if !LCB_CAN_OPTIMIZE_SSL_BIO
+ BIO_get_mem_ptr(es->wbio, &wmb);
+#endif
}
BIO_clear_retry_flags(es->wbio);
return 0;
--
2.23.0

View file

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "libcouchbase";
version = "2.10.4";
version = "3.1.3";
src = fetchFromGitHub {
owner = "couchbase";
repo = "libcouchbase";
rev = version;
sha256 = "1yfmcx65aqd5l87scha6kmm2s38n85ci3gg0h6qfs16s3jfi6bw7";
sha256 = "16mafxkdbns33yjyc2p3j2iajjpyq0zp66wpjir2qj1w3kgggcw8";
};
cmakeFlags = [ "-DLCB_NO_MOCK=ON" ];
@ -19,8 +19,6 @@ stdenv.mkDerivation rec {
# Running tests in parallel does not work
enableParallelChecking = false;
patches = [ ./0001-Fix-timeouts-in-libcouchbase-testsuite.patch ];
doCheck = !stdenv.isDarwin;
meta = with lib; {

View file

@ -3,8 +3,8 @@
buildPecl {
pname = "ast";
version = "1.0.10";
sha256 = "13s5r1szd80g1mqickghdd38mvjkwss221322mmbrykcfgp4fs30";
version = "1.0.12";
sha256 = "1mcfx989yrakixlsx2d8v6kyxawfwhig4mra9ccpjasfhad0d31x";
meta = with lib; {
description = "Exposes the abstract syntax tree generated by PHP";

View file

@ -1,7 +1,7 @@
{ lib, buildPecl, fetchFromGitHub, writeText, libcouchbase, zlib, php }:
{ lib, buildPecl, fetchFromGitHub, writeText, libcouchbase, zlib, php, substituteAll }:
let
pname = "couchbase";
version = "2.6.2";
version = "3.1.2";
in
buildPecl {
inherit pname version;
@ -10,38 +10,19 @@ buildPecl {
owner = "couchbase";
repo = "php-couchbase";
rev = "v${version}";
sha256 = "0ymrymnz91qg9b2ns044qg46wc65dffhxx402wpx1b5cj2vr4ma3";
sha256 = "0zm2jm5lzjjqlhkiivm4v5gr4286pwqaf5nar1ga816hhwnyhj42";
};
configureFlags = [ "--with-couchbase" ];
buildInputs = [ libcouchbase zlib ];
internalDeps = lib.optionals (lib.versionOlder php.version "8.0") [ php.extensions.json ];
peclDeps = [ php.extensions.igbinary ];
patches = [
(writeText "php-couchbase.patch" ''
--- a/config.m4
+++ b/config.m4
@@ -9,7 +9,7 @@ if test "$PHP_COUCHBASE" != "no"; then
LIBCOUCHBASE_DIR=$PHP_COUCHBASE
else
AC_MSG_CHECKING(for libcouchbase in default path)
- for i in /usr/local /usr; do
+ for i in ${libcouchbase}; do
if test -r $i/include/libcouchbase/couchbase.h; then
LIBCOUCHBASE_DIR=$i
AC_MSG_RESULT(found in $i)
@@ -154,6 +154,8 @@ COUCHBASE_FILES=" \
igbinary_inc_path="$phpincludedir"
elif test -f "$phpincludedir/ext/igbinary/igbinary.h"; then
igbinary_inc_path="$phpincludedir"
+ elif test -f "${php.extensions.igbinary.dev}/include/ext/igbinary/igbinary.h"; then
+ igbinary_inc_path="${php.extensions.igbinary.dev}/include"
fi
if test "$igbinary_inc_path" = ""; then
AC_MSG_WARN([Cannot find igbinary.h])
'')
(substituteAll {
src = ./libcouchbase.patch;
inherit libcouchbase;
})
];
meta = with lib; {
@ -49,6 +30,5 @@ buildPecl {
license = licenses.asl20;
homepage = "https://docs.couchbase.com/php-sdk/current/project-docs/sdk-release-notes.html";
maintainers = teams.php.members;
broken = versionAtLeast php.version "8.0";
};
}

View file

@ -0,0 +1,11 @@
--- a/config.m4
+++ b/config.m4
@@ -28,7 +28,7 @@ if test "$PHP_COUCHBASE" != "no"; then
dnl fallback on standard directory
else
- for i in /usr/local /usr; do
+ for i in @libcouchbase@; do
if test -r $i/include/libcouchbase/couchbase.h; then
LIBCOUCHBASE_DIR=$i
AC_MSG_RESULT(found in $i)

View file

@ -2,8 +2,8 @@
buildPecl {
pname = "event";
version = "3.0.2";
sha256 = "1ws4l014z52vb23xbsfj6viwkf7fmh462af639xgbp0n6syf77dq";
version = "3.0.4";
sha256 = "13yb3zvlx43cncawymiwbqyz8gzpq1g03vd0xjlw9vz75b4mwn1x";
configureFlags = [
"--with-event-libevent-dir=${libevent.dev}"

View file

@ -3,8 +3,8 @@
buildPecl {
pname = "igbinary";
version = "3.2.1";
sha256 = "sha256-YBYgz/07PlWWIAmcBWm4xCR/Ap7BitwCBr8m+ONXU9s=";
version = "3.2.2";
sha256 = "0321pb0298fa67qwj5nhhabkjiaxna5mag15ljyrqzpivimvny92";
configureFlags = [ "--enable-igbinary" ];
makeFlags = [ "phpincludedir=$(dev)/include" ];

View file

@ -1,7 +1,7 @@
{ buildPecl, lib, fetchFromGitHub, libmaxminddb }:
let
pname = "maxminddb";
version = "1.10.0";
version = "1.10.1";
in
buildPecl {
inherit pname version;
@ -10,7 +10,7 @@ buildPecl {
owner = "maxmind";
repo = "MaxMind-DB-Reader-php";
rev = "v${version}";
sha256 = "sha256-2SnajDdO5uAYcuVpEbOuFlZzMxwo/EqFtUSr9XxT0KQ=";
sha256 = "1m5y733x4ykldi1pym54mdahfwfnwy2r1n6fnndwi8jz9px9pa5k";
};
buildInputs = [ libmaxminddb ];

View file

@ -4,8 +4,8 @@
buildPecl {
pname = "mongodb";
version = "1.9.0";
sha256 = "16mbw3p80qxsj86nmjbfch8wv6jaq8wbz4rlpmixvhj9nwbp37hs";
version = "1.9.1";
sha256 = "1mzyssy2a89grw7rwmh0x22lql377nmnqlcv9piam1c32qiwxlg9";
nativeBuildInputs = [ pkg-config ];
buildInputs = [

View file

@ -3,8 +3,8 @@
buildPecl {
pname = "pcov";
version = "1.0.8";
sha256 = "sha256-6rbniyxLIHPW/e+eWZN1qS8F1rOB7ld1N8JKUS1geRQ=";
version = "1.0.9";
sha256 = "0q2ig5lxzpwz3qgr05wcyh5jzhfxlygkv6nj6jagkhiialng2710";
buildInputs = [ pcre2 ];

View file

@ -1,14 +1,14 @@
{ buildPecl, lib, fetchFromGitHub, php }:
{ buildPecl, lib, fetchFromGitHub }:
buildPecl {
pname = "pinba";
version = "1.1.2-dev";
version = "1.1.2";
src = fetchFromGitHub {
owner = "tony2001";
repo = "pinba_extension";
rev = "edbc313f1b4fb8407bf7d5acf63fbb0359c7fb2e";
sha256 = "02sljqm6griw8ccqavl23f7w1hp2zflcv24lpf00k6pyrn9cwx80";
rev = "RELEASE_1_1_2";
sha256 = "0wqcqq6sb51wiawa37hbd1h9dbvmyyndzdvz87xqji7lpr9vn8jy";
};
meta = with lib; {

View file

@ -1,30 +1,13 @@
{ buildPecl, lib, pcre2, fetchpatch }:
{ buildPecl, lib, pcre2 }:
buildPecl {
pname = "protobuf";
version = "3.14.0";
sha256 = "1ldc4s28hq61cfg8l4c06pgicj0ng7k37f28a0dnnbs7xkr7cibd";
version = "3.17.2";
sha256 = "0i4npj4sl8ihkzxc6m3vv3nlqk952z9bfwnrk90a9yakw5gfhlz5";
buildInputs = [ pcre2 ];
patches = [
# TODO: remove with next update
(fetchpatch {
url = "https://github.com/protocolbuffers/protobuf/commit/823f351448f7c432bed40b89ee3309e0a94c1855.patch";
sha256 = "sha256-ozHtO8s9zvmh/+wBEge3Yn3n0pbpR3dAojJcuAg/G3s=";
stripLen = 4;
includes = [
"array.c"
"def.c"
"map.c"
"message.c"
"protobuf.h"
"wkt.inc"
];
})
];
meta = with lib; {
description = ''
Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data.

View file

@ -3,8 +3,8 @@
buildPecl {
pname = "redis";
version = "5.3.3";
sha256 = "sha256-N3iRYeFkzVIjmjDJojjaYf7FyDlc2sOFtu2PDFD9kvA=";
version = "5.3.4";
sha256 = "1k5l7xxb06rlwq9jbmbbr03pc74d75vgv7h5bqjkbwan6dphafab";
internalDeps = with php.extensions; [
session

View file

@ -3,8 +3,8 @@
buildPecl {
pname = "swoole";
version = "4.6.4";
sha256 = "0hgndnn27q7fbsb0nw6bfdg0kyy5di9vrmf7g53jc6lsnf73ha31";
version = "4.6.7";
sha256 = "107wp403z8skkqrcm240vyyy6wqx5a4v2bqhlshlknyi14r2v165";
buildInputs = [ valgrind pcre2 ];
internalDeps = lib.optionals (lib.versionOlder php.version "7.4") [ php.extensions.hash ];

View file

@ -3,8 +3,8 @@
buildPecl {
pname = "xdebug";
version = "3.0.3";
sha256 = "sha256-5yZagVGOOX+XLcki50bRpIRTcXf/SJVDUWfRCeKTJDI=";
version = "3.0.4";
sha256 = "1bvjmnx9bcfq4ikp02kiqg0f7ccgx4mkmz5d7g6v0d263x4r0wmj";
doCheck = true;
checkTarget = "test";