Skip to content

Commit 93a3590

Browse files
committed
factor grpc extension out to ext-grpc, keep library for now, even though unused
1 parent 5ef4623 commit 93a3590

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

config/ext.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@
232232
"BSD": "wip"
233233
},
234234
"type": "external",
235-
"source": "grpc",
235+
"source": "ext-grpc",
236236
"arg-type-unix": "enable-path",
237237
"cpp-extension": true,
238238
"lib-depends": [

config/source.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,18 @@
151151
"path": "LICENSE"
152152
}
153153
},
154+
"ext-grpc": {
155+
"type": "url",
156+
"url": "https://pecl.php.net/get/grpc",
157+
"path": "php-src/ext/grpc",
158+
"filename": "grpc.tgz",
159+
"license": {
160+
"type": "file",
161+
"path": [
162+
"LICENSE"
163+
]
164+
}
165+
},
154166
"ext-imagick": {
155167
"type": "url",
156168
"url": "https://pecl.php.net/get/imagick",

src/SPC/builder/extension/grpc.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,6 @@ public function patchBeforeBuildconf(): bool
2121
if ($this->builder instanceof WindowsBuilder) {
2222
throw new ValidationException('grpc extension does not support windows yet');
2323
}
24-
if (file_exists(SOURCE_PATH . '/php-src/ext/grpc')) {
25-
return false;
26-
}
27-
// soft link to the grpc source code
28-
if (is_dir($this->source_dir . '/src/php/ext/grpc')) {
29-
shell()->exec('ln -s ' . $this->source_dir . '/src/php/ext/grpc ' . SOURCE_PATH . '/php-src/ext/grpc');
30-
} else {
31-
throw new ValidationException('Cannot find grpc source code in ' . $this->source_dir . '/src/php/ext/grpc');
32-
}
3324
if (SPCTarget::getTargetOS() === 'Darwin') {
3425
FileSystem::replaceFileRegex(
3526
SOURCE_PATH . '/php-src/ext/grpc/config.m4',

0 commit comments

Comments
 (0)