mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 12:54:52 +08:00
simplify back to --enable, it actually supports paths :O
This commit is contained in:
parent
cfda1e93a0
commit
3ca7c15208
@ -233,7 +233,7 @@
|
|||||||
},
|
},
|
||||||
"type": "external",
|
"type": "external",
|
||||||
"source": "grpc",
|
"source": "grpc",
|
||||||
"arg-type-unix": "with-prefix",
|
"arg-type-unix": "custom",
|
||||||
"cpp-extension": true,
|
"cpp-extension": true,
|
||||||
"lib-depends": [
|
"lib-depends": [
|
||||||
"grpc"
|
"grpc"
|
||||||
|
|||||||
@ -193,6 +193,7 @@
|
|||||||
"openssl",
|
"openssl",
|
||||||
"libcares"
|
"libcares"
|
||||||
],
|
],
|
||||||
|
"provide-pre-built": true,
|
||||||
"frameworks": [
|
"frameworks": [
|
||||||
"CoreFoundation"
|
"CoreFoundation"
|
||||||
]
|
]
|
||||||
|
|||||||
@ -28,7 +28,6 @@ class grpc extends Extension
|
|||||||
} else {
|
} else {
|
||||||
throw new \RuntimeException('Cannot find grpc source code');
|
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') {
|
if (SPCTarget::getTargetOS() === 'Darwin') {
|
||||||
FileSystem::replaceFileRegex(
|
FileSystem::replaceFileRegex(
|
||||||
SOURCE_PATH . '/php-src/ext/grpc/config.m4',
|
SOURCE_PATH . '/php-src/ext/grpc/config.m4',
|
||||||
@ -46,6 +45,11 @@ class grpc extends Extension
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getUnixConfigureArg(bool $shared = false): string
|
||||||
|
{
|
||||||
|
return '--enable-grpc=' . ($shared ? 'shared' : '') . BUILD_ROOT_PATH;
|
||||||
|
}
|
||||||
|
|
||||||
public function patchBeforeMake(): bool
|
public function patchBeforeMake(): bool
|
||||||
{
|
{
|
||||||
$extra_libs = trim(getenv('SPC_EXTRA_LIBS'));
|
$extra_libs = trim(getenv('SPC_EXTRA_LIBS'));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user