use non-static suffix for brotli

This commit is contained in:
crazywhalecc
2024-01-07 10:54:49 +08:00
committed by Jerry Ma
parent 6562bc200c
commit d4eb199504
2 changed files with 7 additions and 11 deletions

View File

@@ -27,11 +27,7 @@ trait brotli
->exec("cmake --build . -j {$this->builder->concurrency}")
->exec('make install DESTDIR=' . BUILD_ROOT_PATH);
$this->patchPkgconfPrefix(['libbrotlicommon.pc', 'libbrotlidec.pc', 'libbrotlienc.pc']);
shell()->cd(BUILD_ROOT_PATH . '/lib')
->exec('cp libbrotlicommon.a libbrotlicommon-static.a')
->exec('ln -sf libbrotlicommon.a libbrotli.a')
->exec('cp libbrotlidec.a libbrotlidec-static.a')
->exec('cp libbrotlienc.a libbrotlienc-static.a');
shell()->cd(BUILD_ROOT_PATH . '/lib')->exec('ln -sf libbrotlicommon.a libbrotli.a');
foreach (FileSystem::scanDirFiles(BUILD_ROOT_PATH . '/lib/', false, true) as $filename) {
if (str_starts_with($filename, 'libbrotli') && (str_contains($filename, '.so') || str_ends_with($filename, '.dylib'))) {
unlink(BUILD_ROOT_PATH . '/lib/' . $filename);