From 72a3c01b31934810595b8b5cb3bb6ccd8745ae78 Mon Sep 17 00:00:00 2001 From: Jerry Ma Date: Thu, 4 Jul 2024 23:59:56 +0800 Subject: [PATCH] Fix libyaml patch slashes (#499) * Fix libyaml patch slashes * Add tests for libyaml * Rename due to linux is case-sensitive --- src/SPC/store/SourcePatcher.php | 10 +++++----- ...YamlConfig.cmake.in => libyaml_yamlConfig.cmake.in} | 0 src/globals/test-extensions.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) rename src/globals/extra/{libyaml_YamlConfig.cmake.in => libyaml_yamlConfig.cmake.in} (100%) diff --git a/src/SPC/store/SourcePatcher.php b/src/SPC/store/SourcePatcher.php index 0eb530c4..0ba1c0a5 100644 --- a/src/SPC/store/SourcePatcher.php +++ b/src/SPC/store/SourcePatcher.php @@ -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; } diff --git a/src/globals/extra/libyaml_YamlConfig.cmake.in b/src/globals/extra/libyaml_yamlConfig.cmake.in similarity index 100% rename from src/globals/extra/libyaml_YamlConfig.cmake.in rename to src/globals/extra/libyaml_yamlConfig.cmake.in diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index 3da17498..08bfb8fa 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -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', };