mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-06 08:15:39 +08:00
Add ext-mbstring,ext-mbregex,onig
This commit is contained in:
22
src/Package/Extension/mbstring.php
Normal file
22
src/Package/Extension/mbstring.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Package\Extension;
|
||||
|
||||
use StaticPHP\Attribute\Package\CustomPhpConfigureArg;
|
||||
use StaticPHP\Attribute\Package\Extension;
|
||||
use StaticPHP\Package\PackageInstaller;
|
||||
|
||||
#[Extension('mbstring')]
|
||||
class mbstring
|
||||
{
|
||||
#[CustomPhpConfigureArg('Linux')]
|
||||
#[CustomPhpConfigureArg('Darwin')]
|
||||
public function getUnixConfigureArg(bool $shared, PackageInstaller $installer): string
|
||||
{
|
||||
$arg = '--enable-mbstring' . ($shared ? '=shared' : '');
|
||||
$arg .= $installer->isPackageResolved('ext-mbregex') === false ? ' --disable-mbregex' : ' --enable-mbregex';
|
||||
return $arg;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user