mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 12:54:52 +08:00
factor grpc extension out to ext-grpc, keep library for now, even though unused
This commit is contained in:
parent
5ef4623051
commit
93a35908de
@ -232,7 +232,7 @@
|
|||||||
"BSD": "wip"
|
"BSD": "wip"
|
||||||
},
|
},
|
||||||
"type": "external",
|
"type": "external",
|
||||||
"source": "grpc",
|
"source": "ext-grpc",
|
||||||
"arg-type-unix": "enable-path",
|
"arg-type-unix": "enable-path",
|
||||||
"cpp-extension": true,
|
"cpp-extension": true,
|
||||||
"lib-depends": [
|
"lib-depends": [
|
||||||
|
|||||||
@ -151,6 +151,18 @@
|
|||||||
"path": "LICENSE"
|
"path": "LICENSE"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"ext-grpc": {
|
||||||
|
"type": "url",
|
||||||
|
"url": "https://pecl.php.net/get/grpc",
|
||||||
|
"path": "php-src/ext/grpc",
|
||||||
|
"filename": "grpc.tgz",
|
||||||
|
"license": {
|
||||||
|
"type": "file",
|
||||||
|
"path": [
|
||||||
|
"LICENSE"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"ext-imagick": {
|
"ext-imagick": {
|
||||||
"type": "url",
|
"type": "url",
|
||||||
"url": "https://pecl.php.net/get/imagick",
|
"url": "https://pecl.php.net/get/imagick",
|
||||||
|
|||||||
@ -21,15 +21,6 @@ class grpc extends Extension
|
|||||||
if ($this->builder instanceof WindowsBuilder) {
|
if ($this->builder instanceof WindowsBuilder) {
|
||||||
throw new ValidationException('grpc extension does not support windows yet');
|
throw new ValidationException('grpc extension does not support windows yet');
|
||||||
}
|
}
|
||||||
if (file_exists(SOURCE_PATH . '/php-src/ext/grpc')) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
// soft link to the grpc source code
|
|
||||||
if (is_dir($this->source_dir . '/src/php/ext/grpc')) {
|
|
||||||
shell()->exec('ln -s ' . $this->source_dir . '/src/php/ext/grpc ' . SOURCE_PATH . '/php-src/ext/grpc');
|
|
||||||
} else {
|
|
||||||
throw new ValidationException('Cannot find grpc source code in ' . $this->source_dir . '/src/php/ext/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',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user