mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 13:24:51 +08:00
patch before make for uv fix
This commit is contained in:
parent
be0b98c467
commit
3f92df0865
@ -400,7 +400,7 @@ class Extension
|
||||
->exec(BUILD_BIN_PATH . '/phpize');
|
||||
|
||||
if ($this->patchBeforeSharedConfigure()) {
|
||||
logger()->info('ext [ . ' . $this->getName() . '] patching before shared configure');
|
||||
logger()->info('ext [' . $this->getName() . '] patching before shared configure');
|
||||
}
|
||||
|
||||
shell()->cd($this->source_dir)
|
||||
@ -419,7 +419,7 @@ class Extension
|
||||
);
|
||||
|
||||
if ($this->patchBeforeSharedMake()) {
|
||||
logger()->info('ext [ . ' . $this->getName() . '] patching before shared make');
|
||||
logger()->info('ext [' . $this->getName() . '] patching before shared make');
|
||||
}
|
||||
|
||||
shell()->cd($this->source_dir)
|
||||
|
||||
@ -21,10 +21,10 @@ class uv extends Extension
|
||||
|
||||
public function patchBeforeSharedMake(): bool
|
||||
{
|
||||
if (PHP_OS_FAMILY !== 'Linux' || php_uname('m') !== 'aarch64' || SystemUtil::getLibcVersionIfExists() > '2.17') {
|
||||
if (PHP_OS_FAMILY !== 'Linux' || GNU_ARCH !== 'aarch64') {
|
||||
return false;
|
||||
}
|
||||
FileSystem::replaceFileRegex($this->source_dir . '/Makefile', '/^(LDFLAGS =.*)$/', '$1 -luv -ldl -lrt -pthread');
|
||||
FileSystem::replaceFileRegex($this->source_dir . '/Makefile', '/^(LDFLAGS =.*)$/m', '$1 -luv -ldl -lrt -pthread');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -61,8 +61,7 @@ class LinuxToolCheckList
|
||||
|
||||
$required = match ($distro['dist']) {
|
||||
'alpine' => self::TOOLS_ALPINE,
|
||||
'redhat' => self::TOOLS_RHEL,
|
||||
'centos' => array_merge(self::TOOLS_RHEL, ['perl-IPC-Cmd']),
|
||||
'redhat', 'centos' => self::TOOLS_RHEL,
|
||||
'arch' => self::TOOLS_ARCH,
|
||||
default => self::TOOLS_DEBIAN,
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user