mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 21:04:52 +08:00
- Introduced DirDiff class for tracking directory file changes. - Updated ConsoleApplication to use addCommand for build targets. - Enhanced PackageBuilder with methods for deploying binaries and extracting debug info. - Improved package installation logic to support shared extensions. - Added readline extension with patching for static builds.
25 lines
655 B
PHP
25 lines
655 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Package\Library;
|
|
|
|
use StaticPHP\Attribute\Package\AfterStage;
|
|
use StaticPHP\Attribute\Package\Library;
|
|
use StaticPHP\Attribute\PatchDescription;
|
|
use StaticPHP\Runtime\SystemTarget;
|
|
use StaticPHP\Util\FileSystem;
|
|
|
|
#[Library('imap')]
|
|
class imap
|
|
{
|
|
#[AfterStage('php', 'patch-embed-scripts')]
|
|
#[PatchDescription('Fix missing -lcrypt in php-config libs on glibc systems')]
|
|
public function afterPatchScripts(): void
|
|
{
|
|
if (SystemTarget::getLibc() === 'glibc') {
|
|
FileSystem::replaceFileRegex(BUILD_BIN_PATH . '/php-config', '/^libs="(.*)"$/m', 'libs="$1 -lcrypt"');
|
|
}
|
|
}
|
|
}
|