36 lines
926 B
PHP
Raw Normal View History

<?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
{
2025-06-09 14:48:05 +07:00
shell()->cd($this->source_dir)->initializeEnv($this)
->exec(
'./configure ' .
'--enable-static ' .
'--disable-shared ' .
'--enable-pic ' .
'--disable-scripts ' .
'--disable-doc ' .
'--with-libiconv ' .
'--prefix='
)
2025-06-09 14:48:05 +07:00
->exec('make clean')
->exec("make -j{$this->builder->concurrency}")
->exec('make install DESTDIR=' . BUILD_ROOT_PATH);
$this->patchPkgconfPrefix(['liblzma.pc']);
2025-06-06 14:26:06 +07:00
$this->patchLaDependencyPrefix(['liblzma.la']);
}
}