mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
28 lines
750 B
PHP
28 lines
750 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
namespace SPC\builder\unix\library;
|
||
|
|
|
||
|
|
trait xz
|
||
|
|
{
|
||
|
|
public function build()
|
||
|
|
{
|
||
|
|
shell()->cd($this->source_dir)
|
||
|
|
->exec(
|
||
|
|
"{$this->builder->configure_env} ./configure " .
|
||
|
|
'--enable-static ' .
|
||
|
|
'--disable-shared ' .
|
||
|
|
"--host={$this->builder->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']);
|
||
|
|
}
|
||
|
|
}
|