mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-07 00:35:41 +08:00
Add ext-uv and libuv support on Windows
This commit is contained in:
@@ -24,6 +24,21 @@ class uv extends PhpExtensionPackage
|
||||
}
|
||||
}
|
||||
|
||||
#[BeforeStage('php', [php::class, 'buildconfForWindows'], 'ext-uv')]
|
||||
public function patchBeforeBuild(): void
|
||||
{
|
||||
FileSystem::replaceFileStr(
|
||||
"{$this->getSourceDir()}/php_uv.c",
|
||||
'#if !defined(PHP_WIN32) || defined(HAVE_SOCKET)',
|
||||
'#if !defined(PHP_WIN32) || (defined(HAVE_SOCKETS) && !defined(COMPILE_DL_SOCKETS))',
|
||||
);
|
||||
FileSystem::replaceFileStr(
|
||||
"{$this->getSourceDir()}/config.w32",
|
||||
'CHECK_LIB("Ws2_32.lib","uv", PHP_UV);',
|
||||
"CHECK_LIB(\"Ws2_32.lib\",\"uv\" , PHP_UV);\n\tCHECK_LIB(\"dbghelp.lib\",\"uv\", PHP_UV);",
|
||||
);
|
||||
}
|
||||
|
||||
#[BeforeStage('ext-uv', [PhpExtensionPackage::class, 'makeForUnix'])]
|
||||
public function patchBeforeSharedMake(PhpExtensionPackage $pkg): bool
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user