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';
|
|
|
|
|
|
2023-08-20 19:51:45 +08:00
|
|
|
protected function build(): void
|
2023-06-02 11:47:11 +02:00
|
|
|
{
|
2023-10-16 14:14:19 +02:00
|
|
|
$cppflags = 'CPPFLAGS="-DU_CHARSET_IS_UTF8=1 -DU_USING_ICU_NAMESPACE=1 -DU_STATIC_IMPLEMENTATION=1"';
|
|
|
|
|
$cxxflags = 'CXXFLAGS="-std=c++11"';
|
|
|
|
|
$ldflags = 'LDFLAGS="-static"';
|
2023-06-02 11:47:11 +02:00
|
|
|
shell()->cd($this->source_dir . '/source')
|
2023-06-02 20:26:19 +08:00
|
|
|
->exec(
|
2023-10-16 14:14:19 +02:00
|
|
|
"{$this->builder->configure_env} {$cppflags} {$cxxflags} {$ldflags} " .
|
|
|
|
|
'./runConfigureICU Linux ' .
|
2023-06-02 20:26:19 +08:00
|
|
|
'--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 ' .
|
2023-10-16 14:14:19 +02:00
|
|
|
'--prefix=' . BUILD_ROOT_PATH
|
2023-06-02 20:26:19 +08:00
|
|
|
)
|
2023-06-02 11:47:11 +02:00
|
|
|
->exec('make clean')
|
|
|
|
|
->exec("make -j{$this->builder->concurrency}")
|
|
|
|
|
->exec('make install');
|
|
|
|
|
}
|
|
|
|
|
}
|