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

@ -34,7 +34,7 @@
},
"bz2": {
"type": "builtin",
"arg-type-unix": "with-prefix",
"arg-type-unix": "with-path",
"arg-type-windows": "with",
"lib-depends": [
"bzip2"
@ -185,7 +185,7 @@
"BSD": "wip"
},
"type": "builtin",
"arg-type": "with-prefix",
"arg-type": "with-path",
"lib-depends": [
"gettext"
]
@ -211,7 +211,7 @@
"BSD": "wip"
},
"type": "builtin",
"arg-type": "with-prefix",
"arg-type": "with-path",
"lib-depends": [
"gmp"
]
@ -233,7 +233,7 @@
},
"type": "external",
"source": "grpc",
"arg-type-unix": "custom",
"arg-type-unix": "enable-path",
"cpp-extension": true,
"lib-depends": [
"grpc"
@ -244,7 +244,7 @@
"BSD": "wip"
},
"type": "builtin",
"arg-type": "with-prefix",
"arg-type": "with-path",
"arg-type-windows": "with",
"lib-depends-unix": [
"libiconv"
@ -320,7 +320,7 @@
"BSD": "wip"
},
"type": "builtin",
"arg-type": "with-prefix",
"arg-type": "with-path",
"lib-depends": [
"ldap"
],
@ -529,7 +529,7 @@
},
"notes": true,
"type": "builtin",
"arg-type": "with-prefix",
"arg-type": "with-path",
"lib-depends": [
"libargon2"
]
@ -571,7 +571,7 @@
"BSD": "wip"
},
"type": "builtin",
"arg-type": "with-prefix",
"arg-type": "with-path",
"arg-type-windows": "custom",
"ext-depends": [
"pdo",
@ -674,7 +674,7 @@
"BSD": "wip"
},
"type": "builtin",
"arg-type": "with-prefix",
"arg-type": "with-path",
"lib-depends": [
"readline"
],
@ -785,7 +785,7 @@
"BSD": "wip"
},
"type": "builtin",
"arg-type": "with-prefix",
"arg-type": "with-path",
"arg-type-windows": "with",
"lib-depends": [
"sqlite"
@ -811,7 +811,7 @@
},
"type": "external",
"source": "ext-ssh2",
"arg-type": "with-prefix",
"arg-type": "with-path",
"arg-type-windows": "with",
"lib-depends": [
"libssh2"
@ -937,7 +937,7 @@
"BSD": "wip"
},
"type": "builtin",
"arg-type": "with-prefix",
"arg-type": "with-path",
"lib-depends": [
"tidy"
]
@ -953,7 +953,7 @@
},
"type": "external",
"source": "ext-uuid",
"arg-type": "with-prefix",
"arg-type": "with-path",
"lib-depends": [
"libuuid"
]
@ -965,7 +965,7 @@
},
"type": "external",
"source": "ext-uv",
"arg-type": "with-prefix",
"arg-type": "with-path",
"lib-depends": [
"libuv"
],
@ -1067,7 +1067,7 @@
"BSD": "wip"
},
"type": "builtin",
"arg-type": "with-prefix",
"arg-type": "with-path",
"lib-depends": [
"libxslt"
],
@ -1104,7 +1104,7 @@
},
"type": "external",
"source": "yaml",
"arg-type-unix": "with-prefix",
"arg-type-unix": "with-path",
"arg-type-windows": "with",
"lib-depends": [
"libyaml"
@ -1115,7 +1115,7 @@
"BSD": "wip"
},
"type": "builtin",
"arg-type": "with-prefix",
"arg-type": "with-path",
"arg-type-windows": "enable",
"lib-depends-unix": [
"libzip"

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'));