mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-03 14:55:39 +08:00
29 lines
647 B
PHP
29 lines
647 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace SPC\builder\unix\library;
|
|
|
|
trait libiconv
|
|
{
|
|
protected function build(): void
|
|
{
|
|
[,,$destdir] = SEPARATED_PATH;
|
|
|
|
shell()->cd($this->source_dir)
|
|
->exec(
|
|
'./configure ' .
|
|
'--enable-static ' .
|
|
'--disable-shared ' .
|
|
'--prefix='
|
|
)
|
|
->exec('make clean')
|
|
->exec("make -j{$this->builder->concurrency}")
|
|
->exec('make install DESTDIR=' . $destdir);
|
|
|
|
if (file_exists(BUILD_BIN_PATH . '/iconv')) {
|
|
unlink(BUILD_BIN_PATH . '/iconv');
|
|
}
|
|
}
|
|
}
|