mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-12 11:25:35 +08:00
Allow xz build statically
This commit is contained in:
21
src/Package/Extension/xz.php
Normal file
21
src/Package/Extension/xz.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\Package\PhpExtensionPackage;
|
||||||
|
use StaticPHP\Util\FileSystem;
|
||||||
|
|
||||||
|
#[Extension('xz')]
|
||||||
|
class xz extends PhpExtensionPackage
|
||||||
|
{
|
||||||
|
#[BeforeStage('php', [php::class, 'buildconfForWindows'], 'ext-xz')]
|
||||||
|
public function patchBeforeBuildconf(): void
|
||||||
|
{
|
||||||
|
FileSystem::replaceFileStr($this->getSourceDir() . '/config.w32', 'true', 'PHP_XZ_SHARED');
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user