mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-21 15:55:36 +08:00
Adjust custom extension overrides for opentelemetry
This commit is contained in:
@@ -446,18 +446,11 @@
|
||||
]
|
||||
},
|
||||
"opentelemetry": {
|
||||
"notes": true,
|
||||
"support": {
|
||||
"Windows": "wip"
|
||||
"BSD": "wip"
|
||||
},
|
||||
"source": "opentelemetry",
|
||||
"unix-only": true,
|
||||
"ext-suggests": [
|
||||
"grpc",
|
||||
"protobuf",
|
||||
"ffi"
|
||||
],
|
||||
"type": "external"
|
||||
"type": "external",
|
||||
"source": "opentelemetry"
|
||||
},
|
||||
"parallel": {
|
||||
"support": {
|
||||
|
||||
@@ -5,7 +5,6 @@ declare(strict_types=1);
|
||||
namespace SPC\builder\extension;
|
||||
|
||||
use SPC\builder\Extension;
|
||||
use SPC\builder\windows\WindowsBuilder;
|
||||
use SPC\util\CustomExt;
|
||||
use SPC\util\GlobalEnvManager;
|
||||
|
||||
@@ -17,16 +16,10 @@ class opentelemetry extends Extension
|
||||
if ($this->builder->getPHPVersionID() < 80000 && getenv('SPC_SKIP_PHP_VERSION_CHECK') !== 'yes') {
|
||||
throw new \RuntimeException('The opentelemetry extension requires PHP 8.0 or later');
|
||||
}
|
||||
}
|
||||
|
||||
public function patchBeforeBuildconf(): bool
|
||||
{
|
||||
// soft link to the grpc source code
|
||||
if ($this->builder instanceof WindowsBuilder) {
|
||||
// not support windows yet
|
||||
if (PHP_OS_FAMILY === 'Windows') {
|
||||
throw new \RuntimeException('opentelemetry extension does not support windows yet');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function patchBeforeMake(): bool
|
||||
@@ -35,9 +28,4 @@ class opentelemetry extends Extension
|
||||
GlobalEnvManager::putenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS=' . getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS') . ' -Wno-strict-prototypes');
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getUnixConfigureArg(): string
|
||||
{
|
||||
return '--enable-opentelemetry=' . BUILD_ROOT_PATH . '/opentelemetry';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user