add lz4 extension

This commit is contained in:
DubbleClick 2025-06-05 11:33:51 +07:00
parent ab4e0bc406
commit 3420f6ca42
3 changed files with 45 additions and 0 deletions

View File

@ -323,6 +323,18 @@
"openssl"
]
},
"lz4": {
"support": {
"Windows": "wip",
"BSD": "wip"
},
"type": "external",
"source": "ext-lz4",
"arg-type": "custom",
"lib-depends": [
"liblz4"
]
},
"libxml": {
"support": {
"BSD": "wip"

View File

@ -161,6 +161,17 @@
]
}
},
"ext-lz4": {
"type": "ghtagtar",
"repo": "kjdev/php-ext-lz4",
"path": "php-src/ext/lz4",
"license": {
"type": "file",
"path": [
"LICENSE"
]
}
},
"ext-memcache": {
"type": "url",
"url": "https://pecl.php.net/get/memcache",

View File

@ -0,0 +1,22 @@
<?php
declare(strict_types=1);
namespace SPC\builder\extension;
use SPC\builder\Extension;
use SPC\util\CustomExt;
#[CustomExt('lz4')]
class lz4 extends Extension
{
public function getUnixConfigureArg(bool $shared = false): string
{
return '--enable-lz4 --with-lz4-includedir=' . BUILD_ROOT_PATH;
}
public function getWindowsConfigureArg(): string
{
return '--enable-lz4';
}
}