mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +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"
|
||||
},
|
||||
"type": "external",
|
||||
"source": "grpc",
|
||||
"source": "ext-grpc",
|
||||
"arg-type-unix": "enable-path",
|
||||
"cpp-extension": true,
|
||||
"lib-depends": [
|
||||
|
||||
@ -151,6 +151,18 @@
|
||||
"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": {
|
||||
"type": "url",
|
||||
"url": "https://pecl.php.net/get/imagick",
|
||||
|
||||
@ -21,15 +21,6 @@ class grpc extends Extension
|
||||
if ($this->builder instanceof WindowsBuilder) {
|
||||
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') {
|
||||
FileSystem::replaceFileRegex(
|
||||
SOURCE_PATH . '/php-src/ext/grpc/config.m4',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user