2023-04-29 18:59:47 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace SPC\builder\unix\library;
|
|
|
|
|
|
2025-06-09 01:07:30 +08:00
|
|
|
use SPC\builder\unix\executor\UnixCMakeExecutor;
|
2023-08-20 19:51:45 +08:00
|
|
|
use SPC\exception\FileSystemException;
|
|
|
|
|
use SPC\exception\RuntimeException;
|
|
|
|
|
use SPC\exception\WrongUsageException;
|
2023-04-29 18:59:47 +08:00
|
|
|
|
|
|
|
|
trait libavif
|
|
|
|
|
{
|
2023-08-20 19:51:45 +08:00
|
|
|
/**
|
|
|
|
|
* @throws FileSystemException
|
|
|
|
|
* @throws RuntimeException
|
|
|
|
|
* @throws WrongUsageException
|
|
|
|
|
*/
|
|
|
|
|
protected function build(): void
|
2023-04-29 18:59:47 +08:00
|
|
|
{
|
2025-06-09 01:07:30 +08:00
|
|
|
UnixCMakeExecutor::create($this)
|
|
|
|
|
->addConfigureArgs('-DAVIF_LIBYUV=OFF')
|
|
|
|
|
->build();
|
2023-04-29 18:59:47 +08:00
|
|
|
// patch pkgconfig
|
|
|
|
|
$this->patchPkgconfPrefix(['libavif.pc']);
|
2023-05-10 02:04:08 +08:00
|
|
|
$this->cleanLaFiles();
|
2023-04-29 18:59:47 +08:00
|
|
|
}
|
|
|
|
|
}
|