From f21a77bcf78644f9027d1638cb6ce3b4700c9561 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Fri, 12 Apr 2024 00:35:55 +0800 Subject: [PATCH 1/4] add ext yac --- config/ext.json | 8 ++++++++ config/source.json | 10 ++++++++++ src/SPC/builder/extension/yac.php | 26 ++++++++++++++++++++++++++ src/globals/test-extensions.php | 2 +- 4 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 src/SPC/builder/extension/yac.php diff --git a/config/ext.json b/config/ext.json index e74f64af1..cd7a0defe 100644 --- a/config/ext.json +++ b/config/ext.json @@ -623,6 +623,14 @@ "dom" ] }, + "yac": { + "type": "external", + "source": "yac", + "arg-type": "custom", + "ext-depends": [ + "igbinary" + ] + }, "yaml": { "type": "external", "source": "yaml", diff --git a/config/source.json b/config/source.json index 6ed35f5de..870993476 100644 --- a/config/source.json +++ b/config/source.json @@ -673,6 +673,16 @@ "path": "COPYING" } }, + "yac": { + "type": "url", + "url": "https://pecl.php.net/get/yac", + "path": "php-src/ext/yac", + "filename": "yac.tgz", + "license": { + "type": "file", + "path": "LICENSE" + } + }, "yaml": { "type": "git", "path": "php-src/ext/yaml", diff --git a/src/SPC/builder/extension/yac.php b/src/SPC/builder/extension/yac.php new file mode 100644 index 000000000..a4152e428 --- /dev/null +++ b/src/SPC/builder/extension/yac.php @@ -0,0 +1,26 @@ + 'ds,simdjson', + 'Linux', 'Darwin' => 'yac', 'Windows' => 'mbstring,pdo_sqlite,mbregex,ffi,ds,simdjson', }; From 61edc422f0d695abaa08ec182f158eb000fb7f12 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Fri, 12 Apr 2024 01:18:13 +0800 Subject: [PATCH 2/4] enable yac for windows --- config/ext.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/ext.json b/config/ext.json index cd7a0defe..3476f33e7 100644 --- a/config/ext.json +++ b/config/ext.json @@ -626,8 +626,8 @@ "yac": { "type": "external", "source": "yac", - "arg-type": "custom", - "ext-depends": [ + "arg-type-unix": "custom", + "ext-depends-windows": [ "igbinary" ] }, From 38563d806a55f73efe1145644037c428a5ee7032 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Fri, 12 Apr 2024 01:20:05 +0800 Subject: [PATCH 3/4] enable yac test for windows --- src/globals/test-extensions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index 5d26454a5..07497e673 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -14,7 +14,7 @@ // If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`). $extensions = match (PHP_OS_FAMILY) { 'Linux', 'Darwin' => 'yac', - 'Windows' => 'mbstring,pdo_sqlite,mbregex,ffi,ds,simdjson', + 'Windows' => 'mbstring,pdo_sqlite,mbregex,yac', }; // If you want to test lib-suggests feature with extension, add them below (comma separated, example `libwebp,libavif`). From d812480215bb6b1a44daf9a40cc6b801b22dc2ce Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Fri, 12 Apr 2024 01:29:00 +0800 Subject: [PATCH 4/4] correct --- config/ext.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/ext.json b/config/ext.json index 3476f33e7..6d5765e57 100644 --- a/config/ext.json +++ b/config/ext.json @@ -627,7 +627,7 @@ "type": "external", "source": "yac", "arg-type-unix": "custom", - "ext-depends-windows": [ + "ext-depends-unix": [ "igbinary" ] },