mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 21:04:52 +08:00
33 lines
798 B
PHP
33 lines
798 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace SPC\builder\unix\library;
|
|
|
|
use SPC\exception\FileSystemException;
|
|
use SPC\exception\RuntimeException;
|
|
|
|
trait readline
|
|
{
|
|
/**
|
|
* @throws RuntimeException
|
|
* @throws FileSystemException
|
|
*/
|
|
protected function build(): void
|
|
{
|
|
shell()->cd($this->source_dir)
|
|
->exec(
|
|
'./configure ' .
|
|
'--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);
|
|
$this->patchPkgconfPrefix(['readline.pc']);
|
|
}
|
|
}
|