mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
35 lines
896 B
PHP
35 lines
896 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace SPC\builder\unix\library;
|
|
|
|
use SPC\exception\FileSystemException;
|
|
use SPC\exception\RuntimeException;
|
|
|
|
trait xz
|
|
{
|
|
/**
|
|
* @throws RuntimeException
|
|
* @throws FileSystemException
|
|
*/
|
|
public function build(): void
|
|
{
|
|
shell()->cd($this->source_dir)
|
|
->exec(
|
|
'./configure ' .
|
|
'--enable-static ' .
|
|
'--disable-shared ' .
|
|
"--host={$this->builder->getOption('gnu-arch')}-unknown-linux " .
|
|
'--disable-scripts ' .
|
|
'--disable-doc ' .
|
|
'--with-libiconv ' .
|
|
'--prefix='
|
|
)
|
|
->exec('make clean')
|
|
->exec("make -j{$this->builder->concurrency}")
|
|
->exec('make install DESTDIR=' . BUILD_ROOT_PATH);
|
|
$this->patchPkgconfPrefix(['liblzma.pc']);
|
|
}
|
|
}
|