patch before make for uv fix

This commit is contained in:
DubbleClick 2025-06-20 15:57:16 +07:00
parent be0b98c467
commit 3f92df0865
3 changed files with 5 additions and 6 deletions

View File

@ -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)

View File

@ -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;
}
}

View File

@ -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,
};