33 lines
820 B
PHP
Raw Normal View History

2023-04-30 15:04:50 +08:00
<?php
declare(strict_types=1);
namespace SPC\builder\unix\library;
use SPC\exception\FileSystemException;
use SPC\exception\RuntimeException;
2023-04-30 15:04:50 +08:00
trait readline
{
/**
* @throws RuntimeException
* @throws FileSystemException
*/
protected function build(): void
2023-04-30 15:04:50 +08:00
{
2025-06-09 11:12:34 +08:00
shell()->cd($this->source_dir)->initializeEnv($this)
->exec(
'./configure ' .
2023-04-30 15:04:50 +08:00
'--enable-static=yes ' .
'--enable-shared=no ' .
'--prefix= ' .
'--with-curses ' .
'--enable-multibyte=yes'
)
->exec('make clean')
->exec("make -j{$this->builder->concurrency}")
->exec('make install DESTDIR=' . BUILD_ROOT_PATH);
2023-04-30 15:04:50 +08:00
$this->patchPkgconfPrefix(['readline.pc']);
}
}