Skip to content

Commit 2ac5438

Browse files
committed
libheif and libde265 report dependency on -lc++ instead of -lstdc++
1 parent 76b36ce commit 2ac5438

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/SPC/builder/unix/library/libde265.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use SPC\exception\FileSystemException;
88
use SPC\exception\RuntimeException;
9+
use SPC\store\FileSystem;
910
use SPC\util\executor\UnixCMakeExecutor;
1011

1112
trait libde265
@@ -19,6 +20,11 @@ protected function build(): void
1920
UnixCMakeExecutor::create($this)
2021
->addConfigureArgs('-DENABLE_SDL=OFF')
2122
->build();
23+
24+
if (PHP_OS_FAMILY === 'Linux') {
25+
$libheifpc = realpath(BUILD_LIB_PATH . '/pkgconfig/libheif.pc');
26+
FileSystem::replaceFileStr($libheifpc, '-lc++', '-lstdc++');
27+
}
2228
$this->patchPkgconfPrefix(['libde265.pc']);
2329
}
2430
}

src/SPC/builder/unix/library/libheif.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ protected function build(): void
4040
'-DENABLE_PLUGIN_LOADING=OFF',
4141
)
4242
->build();
43+
if (PHP_OS_FAMILY === 'Linux') {
44+
$libheifpc = realpath(BUILD_LIB_PATH . '/pkgconfig/libheif.pc');
45+
FileSystem::replaceFileStr($libheifpc, '-lc++', '-lstdc++');
46+
}
4347
$this->patchPkgconfPrefix(['libheif.pc']);
4448
}
4549
}

0 commit comments

Comments
 (0)