Skip to content

Commit a6d68b9

Browse files
committed
fix ncurses
1 parent d275d6c commit a6d68b9

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/SPC/builder/linux/SystemUtil.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ public static function getSupportedDistros(): array
194194
/**
195195
* Get libc version string from ldd
196196
*/
197-
public static function getLibcVersionIfExists(string $libc): ?string
197+
public static function getLibcVersionIfExists(?string $libc = null): ?string
198198
{
199199
if (self::$libc_version !== null) {
200200
return self::$libc_version;

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use SPC\store\FileSystem;
88
use SPC\util\executor\UnixAutoconfExecutor;
9+
use SPC\util\SPCTarget;
910

1011
trait ncurses
1112
{
@@ -15,7 +16,7 @@ protected function build(): void
1516

1617
UnixAutoconfExecutor::create($this)
1718
->appendEnv([
18-
'LDFLAGS' => getenv('SPC_LIBC') === 'musl' ? '-static' : '',
19+
'LDFLAGS' => SPCTarget::isStatic() ? '-static' : '',
1920
])
2021
->configure(
2122
'--enable-overwrite',

0 commit comments

Comments
 (0)