Fix libyaml patch slashes (#499)

* Fix libyaml patch slashes

* Add tests for libyaml

* Rename due to linux is case-sensitive
This commit is contained in:
Jerry Ma 2024-07-04 23:59:56 +08:00 committed by GitHub
parent 3e077543a7
commit 72a3c01b31
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 6 deletions

View File

@ -351,12 +351,12 @@ class SourcePatcher
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}/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");
if (!file_exists("{$target}/YamlConfig.cmake.in")) {
copy(ROOT_DIR . '/src/globals/extra/libyaml_yamlConfig.cmake.in', "{$target}/yamlConfig.cmake.in");
}
return true;
}

View File

@ -19,7 +19,7 @@ $upx = true;
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
$extensions = match (PHP_OS_FAMILY) {
'Linux', 'Darwin' => 'sockets',
'Linux', 'Darwin' => 'sockets,yaml',
'Windows' => 'mbstring,pdo_sqlite,mbregex,bz2,sqlsrv,pdo_sqlsrv,yaml,zip,rar,apcu,swow',
};