mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-04 15:25:41 +08:00
Use extra files instead of internal patch block for libyaml
This commit is contained in:
@@ -24,6 +24,7 @@ class SourcePatcher
|
||||
FileSystem::addSourceExtractHook('sqlsrv', [SourcePatcher::class, 'patchSQLSRVWin32']);
|
||||
FileSystem::addSourceExtractHook('pdo_sqlsrv', [SourcePatcher::class, 'patchSQLSRVWin32']);
|
||||
FileSystem::addSourceExtractHook('yaml', [SourcePatcher::class, 'patchYamlWin32']);
|
||||
FileSystem::addSourceExtractHook('libyaml', [SourcePatcher::class, 'patchLibYaml']);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -348,6 +349,18 @@ class SourcePatcher
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function patchLibYaml(string $name, string $target): bool
|
||||
{
|
||||
if (!file_exists("{$target}\\cmake\\config.h.in")) {
|
||||
FileSystem::createDir("{$target}\\cmake");
|
||||
copy(ROOT_DIR . '\src\globals\extra\libyaml_config.h.in', "{$target}\\cmake\\config.h.in");
|
||||
}
|
||||
if (!file_exists("{$target}\\YamlConfig.cmake.in")) {
|
||||
copy(ROOT_DIR . '\src\globals\extra\libyaml_YamlConfig.cmake.in', "{$target}\\YamlConfig.cmake.in");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Patch cli SAPI Makefile for Windows.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user