2023-04-29 18:59:47 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace SPC\builder\unix\library;
|
|
|
|
|
|
|
|
|
|
trait libiconv
|
|
|
|
|
{
|
2023-08-20 19:51:45 +08:00
|
|
|
protected function build(): void
|
2023-04-29 18:59:47 +08:00
|
|
|
{
|
2025-06-09 11:12:34 +08:00
|
|
|
shell()->cd($this->source_dir)->initializeEnv($this)
|
2025-06-09 10:24:06 +08:00
|
|
|
->exec(
|
2023-10-23 00:37:28 +08:00
|
|
|
'./configure ' .
|
2023-04-29 18:59:47 +08:00
|
|
|
'--enable-static ' .
|
|
|
|
|
'--disable-shared ' .
|
2025-05-31 14:35:59 +07:00
|
|
|
'--enable-pic ' .
|
2024-08-11 21:22:16 +08:00
|
|
|
'--enable-extra-encodings ' .
|
2023-04-29 18:59:47 +08:00
|
|
|
'--prefix='
|
|
|
|
|
)
|
2025-06-09 10:24:06 +08:00
|
|
|
->exec('make clean')
|
|
|
|
|
->exec("make -j{$this->builder->concurrency}")
|
2025-06-09 14:38:45 +07:00
|
|
|
->exec('make install DESTDIR=' . BUILD_ROOT_PATH);
|
2024-07-08 13:27:03 +08:00
|
|
|
|
2025-05-20 23:16:36 +07:00
|
|
|
$this->patchLaDependencyPrefix(['libiconv.la']);
|
2023-04-29 18:59:47 +08:00
|
|
|
}
|
|
|
|
|
}
|