mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-08 09:25:35 +08:00
patch before make for uv fix
This commit is contained in:
@@ -400,7 +400,7 @@ class Extension
|
|||||||
->exec(BUILD_BIN_PATH . '/phpize');
|
->exec(BUILD_BIN_PATH . '/phpize');
|
||||||
|
|
||||||
if ($this->patchBeforeSharedConfigure()) {
|
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)
|
shell()->cd($this->source_dir)
|
||||||
@@ -419,7 +419,7 @@ class Extension
|
|||||||
);
|
);
|
||||||
|
|
||||||
if ($this->patchBeforeSharedMake()) {
|
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)
|
shell()->cd($this->source_dir)
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ class uv extends Extension
|
|||||||
|
|
||||||
public function patchBeforeSharedMake(): bool
|
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;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,8 +61,7 @@ class LinuxToolCheckList
|
|||||||
|
|
||||||
$required = match ($distro['dist']) {
|
$required = match ($distro['dist']) {
|
||||||
'alpine' => self::TOOLS_ALPINE,
|
'alpine' => self::TOOLS_ALPINE,
|
||||||
'redhat' => self::TOOLS_RHEL,
|
'redhat', 'centos' => self::TOOLS_RHEL,
|
||||||
'centos' => array_merge(self::TOOLS_RHEL, ['perl-IPC-Cmd']),
|
|
||||||
'arch' => self::TOOLS_ARCH,
|
'arch' => self::TOOLS_ARCH,
|
||||||
default => self::TOOLS_DEBIAN,
|
default => self::TOOLS_DEBIAN,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user