Fix static linux cli -a not working issue

This commit is contained in:
crazywhalecc
2025-09-07 14:10:28 +08:00
parent 4bc30b0b6f
commit bd815d4ea2
3 changed files with 34 additions and 1 deletions

View File

@@ -38,7 +38,7 @@ trait ncurses
->make();
$final = FileSystem::scanDirFiles(BUILD_BIN_PATH, relative: true);
// Remove the new files
$new_files = array_diff($final, $filelist);
$new_files = array_diff($final, $filelist ?: []);
foreach ($new_files as $file) {
@unlink(BUILD_BIN_PATH . '/' . $file);
}

View File

@@ -23,6 +23,7 @@ class SourcePatcher
FileSystem::addSourceExtractHook('php-src', [__CLASS__, 'patchPhpLibxml212']);
FileSystem::addSourceExtractHook('php-src', [__CLASS__, 'patchGDWin32']);
FileSystem::addSourceExtractHook('php-src', [__CLASS__, 'patchFfiCentos7FixO3strncmp']);
FileSystem::addSourceExtractHook('php-src', [__CLASS__, 'patchStaticReadline']);
FileSystem::addSourceExtractHook('sqlsrv', [__CLASS__, 'patchSQLSRVWin32']);
FileSystem::addSourceExtractHook('pdo_sqlsrv', [__CLASS__, 'patchSQLSRVWin32']);
FileSystem::addSourceExtractHook('yaml', [__CLASS__, 'patchYamlWin32']);
@@ -500,6 +501,12 @@ class SourcePatcher
return true;
}
public static function patchStaticReadline(): bool
{
self::patchFile('musl_static_readline.patch', SOURCE_PATH . '/php-src');
return true;
}
public static function patchPkgConfigForGcc15(): bool
{
self::patchFile('pkg-config_gcc15.patch', SOURCE_PATH . '/pkg-config');