mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-06 08:15:39 +08:00
add ssh2 support
This commit is contained in:
@@ -85,6 +85,9 @@ class SourcePatcher
|
||||
if ($readline = $builder->getExt('readline')) {
|
||||
$patch[] = ['readline patch', '/-lncurses/', $readline->getLibFilesString()];
|
||||
}
|
||||
if ($ssh2 = $builder->getExt('ssh2')) {
|
||||
$patch[] = ['ssh2 patch', '/-lssh2/', $ssh2->getLibFilesString()];
|
||||
}
|
||||
$patch[] = ['disable capstone', '/have_capstone="yes"/', 'have_capstone="no"'];
|
||||
foreach ($patch as $item) {
|
||||
logger()->info('Patching configure: ' . $item[0]);
|
||||
@@ -110,6 +113,16 @@ class SourcePatcher
|
||||
}
|
||||
}
|
||||
|
||||
public static function patchUnixSsh2(): void
|
||||
{
|
||||
FileSystem::replaceFile(
|
||||
SOURCE_PATH . '/php-src/configure',
|
||||
REPLACE_FILE_STR,
|
||||
'-lssh2',
|
||||
BUILD_LIB_PATH . '/libssh2.a'
|
||||
);
|
||||
}
|
||||
|
||||
public static function patchCurlMacOS(): void
|
||||
{
|
||||
FileSystem::replaceFile(
|
||||
|
||||
Reference in New Issue
Block a user