Skip to content

Commit 8116e88

Browse files
committed
fix lerc build (needs -lstdc++)
1 parent be0dbcd commit 8116e88

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use SPC\exception\RuntimeException;
99
use SPC\store\FileSystem;
1010
use SPC\util\executor\UnixAutoconfExecutor;
11+
use SPC\util\SPCTarget;
1112

1213
trait libtiff
1314
{
@@ -17,7 +18,9 @@ trait libtiff
1718
*/
1819
protected function build(): void
1920
{
21+
$libcpp = SPCTarget::getTargetOS() === 'Darwin' ? '-lc++' : '-lstdc++';
2022
FileSystem::replaceFileStr($this->source_dir . '/configure', '-lwebp', '-lwebp -lsharpyuv');
23+
FileSystem::replaceFileStr($this->source_dir . '/configure', '-l"$lerc_lib_name"', '-l"$lerc_lib_name" ' . $libcpp);
2124
UnixAutoconfExecutor::create($this)
2225
->configure(
2326
// zlib deps
@@ -31,6 +34,8 @@ protected function build(): void
3134
'--disable-old-jpeg',
3235
'--disable-jpeg12',
3336
'--disable-libdeflate',
37+
'--disable-tools',
38+
'--disable-contrib',
3439
'--disable-cxx',
3540
'--without-x',
3641
)

0 commit comments

Comments
 (0)