Adjust custom extension overrides for opentelemetry

This commit is contained in:
crazywhalecc
2025-02-06 11:38:11 +08:00
parent 5a84a2ad9f
commit 715e4d00e7
2 changed files with 4 additions and 23 deletions

View File

@@ -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": {

View File

@@ -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';
}
}