mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-05 15:55:39 +08:00
Fix static linux cli -a not working issue
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user