change --with-prefix to --with-path, add --enable-path (yes, grpc uses that...)

This commit is contained in:
DubbleClick
2025-07-22 18:29:58 +07:00
parent 3ca7c15208
commit 9172c39a26
3 changed files with 20 additions and 24 deletions

View File

@@ -86,10 +86,11 @@ class Extension
$_name = str_replace('_', '-', $this->name);
return match ($arg_type = Config::getExt($this->name, 'arg-type', 'enable')) {
'enable' => '--enable-' . $_name . ($shared ? '=shared' : '') . ' ',
'enable-path' => '--enable-' . $_name . '=' . ($shared ? 'shared,' : '') . BUILD_ROOT_PATH . ' ',
'with' => '--with-' . $_name . ($shared ? '=shared' : '') . ' ',
'with-prefix' => '--with-' . $_name . '=' . ($shared ? 'shared,' : '') . '"' . BUILD_ROOT_PATH . '" ',
'with-path' => '--with-' . $_name . '=' . ($shared ? 'shared,' : '') . BUILD_ROOT_PATH . ' ',
'none', 'custom' => '',
default => throw new WrongUsageException("argType does not accept {$arg_type}, use [enable/with/with-prefix] ."),
default => throw new WrongUsageException("argType does not accept {$arg_type}, use [enable/with/with-path] ."),
};
}

View File

@@ -45,11 +45,6 @@ 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'));