mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 05:14:52 +08:00
33 lines
887 B
PHP
33 lines
887 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)
|
|
->setEnv([
|
|
'CFLAGS' => $this->getLibExtraCFlags(),
|
|
'LDFLAGS' => $this->getLibExtraLdFlags(),
|
|
'LIBS' => $this->getLibExtraLibs(),
|
|
])
|
|
->execWithEnv('./configure --enable-static --disable-shared --enable-pic --prefix=')
|
|
->execWithEnv('make clean')
|
|
->execWithEnv("make -j{$this->builder->concurrency}")
|
|
->exec("make install DESTDIR={$destdir}");
|
|
$this->patchPkgconfPrefix(['oniguruma.pc']);
|
|
}
|
|
}
|