feat(gmssl): add patch for pbkdf2_hmac_sm3_genkey rename and update build process

This commit is contained in:
crazywhalecc
2026-06-22 16:44:44 +08:00
parent 38e01a9b88
commit db2d9a909f
2 changed files with 19 additions and 7 deletions

View File

@@ -45,13 +45,13 @@ class gmssl
->toStep(1)
->build();
// fix cmake_install.cmake install prefix (GmSSL overrides it internally)
$installCmake = "{$buildDir}\\cmake_install.cmake";
FileSystem::writeFile(
$installCmake,
'set(CMAKE_INSTALL_PREFIX "' . str_replace('\\', '/', $lib->getBuildRootPath()) . '")' . PHP_EOL . FileSystem::readFile($installCmake)
);
cmd()->cd($buildDir)->exec('nmake gmssl XCFLAGS=/MT');
cmd()->cd($buildDir)->exec('nmake install XCFLAGS=/MT');
$libPath = "{$lib->getBuildRootPath()}/lib";
$incPath = "{$lib->getBuildRootPath()}/include/gmssl";
FileSystem::createDir($libPath);
FileSystem::createDir($incPath);
FileSystem::copy("{$buildDir}\\bin\\gmssl.lib", "{$libPath}/gmssl.lib");
FileSystem::copyDir("{$lib->getSourceDir()}\\include\\gmssl", $incPath);
}
}