Fix ngtcp2 and libheif build missing lib bug

This commit is contained in:
crazywhalecc
2025-06-10 15:37:39 +08:00
committed by Jerry Ma
parent 11f21304f9
commit da45aa7f15
3 changed files with 21 additions and 18 deletions

View File

@@ -4,24 +4,9 @@ declare(strict_types=1);
namespace SPC\builder\macos\library;
use SPC\store\FileSystem;
class libheif extends MacOSLibraryBase
{
use \SPC\builder\unix\library\libheif;
public const NAME = 'libheif';
public function patchBeforeBuild(): bool
{
if (!str_contains(file_get_contents($this->source_dir . '/CMakeLists.txt'), 'libbrotlienc')) {
FileSystem::replaceFileStr(
$this->source_dir . '/CMakeLists.txt',
'list(APPEND REQUIRES_PRIVATE "libbrotlidec")',
'list(APPEND REQUIRES_PRIVATE "libbrotlidec")' . "\n" . ' list(APPEND REQUIRES_PRIVATE "libbrotlienc")'
);
return true;
}
return false;
}
}