mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-05 07:45:39 +08:00
33 lines
780 B
PHP
33 lines
780 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace SPC\builder\unix\library;
|
|
|
|
use SPC\exception\FileSystemException;
|
|
use SPC\exception\RuntimeException;
|
|
|
|
trait onig
|
|
{
|
|
/**
|
|
* @throws FileSystemException
|
|
* @throws RuntimeException
|
|
*/
|
|
protected function build(): void
|
|
{
|
|
[,,$destdir] = SEPARATED_PATH;
|
|
|
|
shell()->cd($this->source_dir)
|
|
->exec(
|
|
"{$this->builder->configure_env} " . ' ./configure ' .
|
|
'--enable-static ' .
|
|
'--disable-shared ' .
|
|
'--prefix='
|
|
)
|
|
->exec('make clean')
|
|
->exec("make -j{$this->builder->concurrency}")
|
|
->exec("make install DESTDIR={$destdir}");
|
|
$this->patchPkgconfPrefix(['oniguruma.pc']);
|
|
}
|
|
}
|