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
|
|
|
{
|
|
|
|
|
[,,$destdir] = SEPARATED_PATH;
|
|
|
|
|
|
|
|
|
|
shell()->cd($this->source_dir)
|
|
|
|
|
->exec(
|
2023-10-23 00:37:28 +08:00
|
|
|
'./configure ' .
|
2023-04-29 18:59:47 +08:00
|
|
|
'--enable-static ' .
|
|
|
|
|
'--disable-shared ' .
|
|
|
|
|
'--prefix='
|
|
|
|
|
)
|
|
|
|
|
->exec('make clean')
|
|
|
|
|
->exec("make -j{$this->builder->concurrency}")
|
|
|
|
|
->exec('make install DESTDIR=' . $destdir);
|
2024-07-08 13:27:03 +08:00
|
|
|
|
|
|
|
|
if (file_exists(BUILD_BIN_PATH . '/iconv')) {
|
|
|
|
|
unlink(BUILD_BIN_PATH . '/iconv');
|
|
|
|
|
}
|
2023-04-29 18:59:47 +08:00
|
|
|
}
|
|
|
|
|
}
|