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": {
|
"opentelemetry": {
|
||||||
"notes": true,
|
|
||||||
"support": {
|
"support": {
|
||||||
"Windows": "wip"
|
"BSD": "wip"
|
||||||
},
|
},
|
||||||
"source": "opentelemetry",
|
"type": "external",
|
||||||
"unix-only": true,
|
"source": "opentelemetry"
|
||||||
"ext-suggests": [
|
|
||||||
"grpc",
|
|
||||||
"protobuf",
|
|
||||||
"ffi"
|
|
||||||
],
|
|
||||||
"type": "external"
|
|
||||||
},
|
},
|
||||||
"parallel": {
|
"parallel": {
|
||||||
"support": {
|
"support": {
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ declare(strict_types=1);
|
|||||||
namespace SPC\builder\extension;
|
namespace SPC\builder\extension;
|
||||||
|
|
||||||
use SPC\builder\Extension;
|
use SPC\builder\Extension;
|
||||||
use SPC\builder\windows\WindowsBuilder;
|
|
||||||
use SPC\util\CustomExt;
|
use SPC\util\CustomExt;
|
||||||
use SPC\util\GlobalEnvManager;
|
use SPC\util\GlobalEnvManager;
|
||||||
|
|
||||||
@@ -17,16 +16,10 @@ class opentelemetry extends Extension
|
|||||||
if ($this->builder->getPHPVersionID() < 80000 && getenv('SPC_SKIP_PHP_VERSION_CHECK') !== 'yes') {
|
if ($this->builder->getPHPVersionID() < 80000 && getenv('SPC_SKIP_PHP_VERSION_CHECK') !== 'yes') {
|
||||||
throw new \RuntimeException('The opentelemetry extension requires PHP 8.0 or later');
|
throw new \RuntimeException('The opentelemetry extension requires PHP 8.0 or later');
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public function patchBeforeBuildconf(): bool
|
if (PHP_OS_FAMILY === 'Windows') {
|
||||||
{
|
|
||||||
// soft link to the grpc source code
|
|
||||||
if ($this->builder instanceof WindowsBuilder) {
|
|
||||||
// not support windows yet
|
|
||||||
throw new \RuntimeException('opentelemetry extension does not support windows yet');
|
throw new \RuntimeException('opentelemetry extension does not support windows yet');
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function patchBeforeMake(): bool
|
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');
|
GlobalEnvManager::putenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS=' . getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS') . ' -Wno-strict-prototypes');
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getUnixConfigureArg(): string
|
|
||||||
{
|
|
||||||
return '--enable-opentelemetry=' . BUILD_ROOT_PATH . '/opentelemetry';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user