simplify back to --enable, it actually supports paths :O

This commit is contained in:
DubbleClick
2025-07-22 18:21:33 +07:00
parent cfda1e93a0
commit 3ca7c15208
3 changed files with 7 additions and 2 deletions

View File

@@ -28,7 +28,6 @@ class grpc extends Extension
} else {
throw new \RuntimeException('Cannot find grpc source code');
}
FileSystem::replaceFileStr(SOURCE_PATH . '/php-src/ext/grpc/config.m4', 'PHP_ARG_ENABLE(grpc,', 'PHP_ARG_WITH(grpc,');
if (SPCTarget::getTargetOS() === 'Darwin') {
FileSystem::replaceFileRegex(
SOURCE_PATH . '/php-src/ext/grpc/config.m4',
@@ -46,6 +45,11 @@ class grpc extends Extension
return true;
}
public function getUnixConfigureArg(bool $shared = false): string
{
return '--enable-grpc=' . ($shared ? 'shared' : '') . BUILD_ROOT_PATH;
}
public function patchBeforeMake(): bool
{
$extra_libs = trim(getenv('SPC_EXTRA_LIBS'));