mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-07 16:55:38 +08:00
refactor to pkg-config and add some add-on libs for gd
This commit is contained in:
28
src/SPC/builder/unix/library/libavif.php
Normal file
28
src/SPC/builder/unix/library/libavif.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SPC\builder\unix\library;
|
||||
|
||||
use SPC\store\FileSystem;
|
||||
|
||||
trait libavif
|
||||
{
|
||||
protected function build()
|
||||
{
|
||||
// CMake needs a clean build directory
|
||||
FileSystem::resetDir($this->source_dir . '/build');
|
||||
// Start build
|
||||
shell()->cd($this->source_dir . '/build')
|
||||
->exec(
|
||||
"{$this->builder->configure_env} cmake " .
|
||||
$this->builder->makeCmakeArgs() . ' ' .
|
||||
'-DBUILD_SHARED_LIBS=OFF ' .
|
||||
'..'
|
||||
)
|
||||
->exec("cmake --build . -j {$this->builder->concurrency}")
|
||||
->exec('make install DESTDIR=' . BUILD_ROOT_PATH);
|
||||
// patch pkgconfig
|
||||
$this->patchPkgconfPrefix(['libavif.pc']);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user