mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-20 13:54:52 +08:00
Add ext-opentelemetry
This commit is contained in:
parent
371a1af572
commit
528469514b
9
config/pkg/ext/ext-opentelemetry.yml
Normal file
9
config/pkg/ext/ext-opentelemetry.yml
Normal file
@ -0,0 +1,9 @@
|
||||
ext-opentelemetry:
|
||||
type: php-extension
|
||||
artifact:
|
||||
source:
|
||||
type: pecl
|
||||
name: opentelemetry
|
||||
metadata:
|
||||
license-files: [LICENSE]
|
||||
license: Apache-2.0
|
||||
21
src/Package/Extension/opentelemetry.php
Normal file
21
src/Package/Extension/opentelemetry.php
Normal 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');
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user