fix ncurses

This commit is contained in:
DubbleClick 2025-07-01 18:09:17 +07:00
parent d275d6cc69
commit a6d68b9ecf
2 changed files with 3 additions and 2 deletions

View File

@ -194,7 +194,7 @@ class SystemUtil
/** /**
* Get libc version string from ldd * Get libc version string from ldd
*/ */
public static function getLibcVersionIfExists(string $libc): ?string public static function getLibcVersionIfExists(?string $libc = null): ?string
{ {
if (self::$libc_version !== null) { if (self::$libc_version !== null) {
return self::$libc_version; return self::$libc_version;

View File

@ -6,6 +6,7 @@ namespace SPC\builder\unix\library;
use SPC\store\FileSystem; use SPC\store\FileSystem;
use SPC\util\executor\UnixAutoconfExecutor; use SPC\util\executor\UnixAutoconfExecutor;
use SPC\util\SPCTarget;
trait ncurses trait ncurses
{ {
@ -15,7 +16,7 @@ trait ncurses
UnixAutoconfExecutor::create($this) UnixAutoconfExecutor::create($this)
->appendEnv([ ->appendEnv([
'LDFLAGS' => getenv('SPC_LIBC') === 'musl' ? '-static' : '', 'LDFLAGS' => SPCTarget::isStatic() ? '-static' : '',
]) ])
->configure( ->configure(
'--enable-overwrite', '--enable-overwrite',