2024-04-22 09:58:08 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace SPC\builder\extension;
|
|
|
|
|
|
|
|
|
|
use SPC\builder\Extension;
|
2025-06-10 19:06:07 +08:00
|
|
|
use SPC\builder\windows\WindowsBuilder;
|
2024-04-22 09:58:08 +02:00
|
|
|
use SPC\store\FileSystem;
|
|
|
|
|
use SPC\util\CustomExt;
|
|
|
|
|
|
|
|
|
|
#[CustomExt('intl')]
|
|
|
|
|
class intl extends Extension
|
|
|
|
|
{
|
|
|
|
|
public function patchBeforeBuildconf(): bool
|
|
|
|
|
{
|
2025-06-10 19:06:07 +08:00
|
|
|
if ($this->builder instanceof WindowsBuilder) {
|
|
|
|
|
FileSystem::replaceFileStr(
|
|
|
|
|
SOURCE_PATH . '/php-src/ext/intl/config.w32',
|
|
|
|
|
'EXTENSION("intl", "php_intl.c intl_convert.c intl_convertcpp.cpp intl_error.c ", true,',
|
|
|
|
|
'EXTENSION("intl", "php_intl.c intl_convert.c intl_convertcpp.cpp intl_error.c ", PHP_INTL_SHARED,'
|
|
|
|
|
);
|
2025-06-25 10:28:45 +07:00
|
|
|
return true;
|
2024-04-22 09:58:08 +02:00
|
|
|
}
|
2025-06-25 10:28:45 +07:00
|
|
|
return false;
|
2024-04-22 09:58:08 +02:00
|
|
|
}
|
2025-05-18 21:48:43 +07:00
|
|
|
|
2025-06-20 17:11:52 +07:00
|
|
|
public function patchBeforeSharedPhpize(): bool
|
2025-05-18 21:48:43 +07:00
|
|
|
{
|
|
|
|
|
return $this->patchBeforeBuildconf();
|
2024-04-22 09:58:08 +02:00
|
|
|
}
|
|
|
|
|
}
|