2023-06-02 11:47:11 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace SPC\builder\linux\library;
|
|
|
|
|
|
|
|
|
|
class icu extends LinuxLibraryBase
|
|
|
|
|
{
|
|
|
|
|
public const NAME = 'icu';
|
|
|
|
|
|
|
|
|
|
protected function build()
|
|
|
|
|
{
|
|
|
|
|
$root = BUILD_ROOT_PATH;
|
2023-06-02 20:26:19 +08:00
|
|
|
$cppflag = 'CPPFLAGS="-DU_CHARSET_IS_UTF8=1 -DU_USING_ICU_NAMESPACE=1 -DU_STATIC_IMPLEMENTATION=1"';
|
2023-06-02 11:47:11 +02:00
|
|
|
shell()->cd($this->source_dir . '/source')
|
2023-06-02 20:26:19 +08:00
|
|
|
->exec(
|
|
|
|
|
"{$this->builder->configure_env} {$cppflag} ./runConfigureICU Linux " .
|
|
|
|
|
'--enable-static ' .
|
|
|
|
|
'--disable-shared ' .
|
|
|
|
|
'--with-data-packaging=static ' .
|
|
|
|
|
'--enable-release=yes ' .
|
|
|
|
|
'--enable-extras=yes ' .
|
|
|
|
|
'--enable-icuio=yes ' .
|
|
|
|
|
'--enable-dyload=no ' .
|
|
|
|
|
'--enable-tools=yes ' .
|
|
|
|
|
'--enable-tests=no ' .
|
|
|
|
|
'--enable-samples=no ' .
|
|
|
|
|
"--prefix={$root}"
|
|
|
|
|
)
|
2023-06-02 11:47:11 +02:00
|
|
|
->exec('make clean')
|
|
|
|
|
->exec("make -j{$this->builder->concurrency}")
|
|
|
|
|
->exec('make install');
|
|
|
|
|
}
|
|
|
|
|
}
|