Add ext-opentelemetry

This commit is contained in:
crazywhalecc 2026-03-12 15:38:56 +08:00
parent 371a1af572
commit 528469514b
No known key found for this signature in database
GPG Key ID: 1F4BDD59391F2680
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,9 @@
ext-opentelemetry:
type: php-extension
artifact:
source:
type: pecl
name: opentelemetry
metadata:
license-files: [LICENSE]
license: Apache-2.0

View File

@ -0,0 +1,21 @@
<?php
declare(strict_types=1);
namespace Package\Extension;
use Package\Target\php;
use StaticPHP\Attribute\Package\BeforeStage;
use StaticPHP\Attribute\Package\Extension;
use StaticPHP\Util\GlobalEnvManager;
#[Extension('opentelemetry')]
class opentelemetry
{
#[BeforeStage('php', [php::class, 'makeForUnix'], 'ext-opentelemetry')]
public function patchBeforeMake(): void
{
// add -Wno-strict-prototypes
GlobalEnvManager::putenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS=' . getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS') . ' -Wno-strict-prototypes');
}
}