mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
Add condition for ffi patch (#1050)
This commit is contained in:
commit
8a51d64685
@ -5,11 +5,21 @@ declare(strict_types=1);
|
||||
namespace SPC\builder\extension;
|
||||
|
||||
use SPC\builder\Extension;
|
||||
use SPC\builder\linux\SystemUtil;
|
||||
use SPC\store\SourcePatcher;
|
||||
use SPC\util\CustomExt;
|
||||
|
||||
#[CustomExt('ffi')]
|
||||
class ffi extends Extension
|
||||
{
|
||||
public function patchBeforeBuildconf(): bool
|
||||
{
|
||||
if (PHP_OS_FAMILY === 'Linux' && SystemUtil::getOSRelease()['dist'] === 'centos') {
|
||||
return SourcePatcher::patchFfiCentos7FixO3strncmp();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getUnixConfigureArg(bool $shared = false): string
|
||||
{
|
||||
return '--with-ffi' . ($shared ? '=shared' : '') . ' --enable-zend-signals';
|
||||
|
||||
@ -22,7 +22,7 @@ class SourcePatcher
|
||||
FileSystem::addSourceExtractHook('swoole', [__CLASS__, 'patchSwoole']);
|
||||
FileSystem::addSourceExtractHook('php-src', [__CLASS__, 'patchPhpLibxml212']);
|
||||
FileSystem::addSourceExtractHook('php-src', [__CLASS__, 'patchGDWin32']);
|
||||
FileSystem::addSourceExtractHook('php-src', [__CLASS__, 'patchFfiCentos7FixO3strncmp']);
|
||||
// FileSystem::addSourceExtractHook('php-src', [__CLASS__, 'patchFfiCentos7FixO3strncmp']);
|
||||
FileSystem::addSourceExtractHook('sqlsrv', [__CLASS__, 'patchSQLSRVWin32']);
|
||||
FileSystem::addSourceExtractHook('pdo_sqlsrv', [__CLASS__, 'patchSQLSRVWin32']);
|
||||
FileSystem::addSourceExtractHook('pdo_sqlsrv', [__CLASS__, 'patchSQLSRVPhp85']);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user