mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 05:14:52 +08:00
Add ext-trader
This commit is contained in:
parent
bfb6fcd436
commit
deef11c86a
14
config/pkg/ext/ext-trader.yml
Normal file
14
config/pkg/ext/ext-trader.yml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
ext-trader:
|
||||||
|
type: php-extension
|
||||||
|
artifact:
|
||||||
|
source:
|
||||||
|
type: pecl
|
||||||
|
name: trader
|
||||||
|
metadata:
|
||||||
|
license-files: [LICENSE]
|
||||||
|
license: BSD-2-Clause
|
||||||
|
php-extension:
|
||||||
|
support:
|
||||||
|
BSD: wip
|
||||||
|
Windows: wip
|
||||||
|
arg-type: enable
|
||||||
23
src/Package/Extension/trader.php
Normal file
23
src/Package/Extension/trader.php
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Package\Extension;
|
||||||
|
|
||||||
|
use Package\Target\php;
|
||||||
|
use StaticPHP\Attribute\Package\BeforeStage;
|
||||||
|
use StaticPHP\Attribute\Package\Extension;
|
||||||
|
use StaticPHP\Package\PackageInstaller;
|
||||||
|
use StaticPHP\Package\PhpExtensionPackage;
|
||||||
|
use StaticPHP\Util\FileSystem;
|
||||||
|
|
||||||
|
#[Extension('trader')]
|
||||||
|
class trader extends PhpExtensionPackage
|
||||||
|
{
|
||||||
|
#[BeforeStage('php', [php::class, 'buildconfForUnix'], 'ext-trader')]
|
||||||
|
public function patchBeforeBuildconf(PackageInstaller $installer): bool
|
||||||
|
{
|
||||||
|
FileSystem::replaceFileStr("{$this->getSourceDir()}/config.m4", 'PHP_TA', 'PHP_TRADER');
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user