mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
add ssh2 support
This commit is contained in:
parent
7527f9f099
commit
a329445701
@ -302,6 +302,14 @@
|
|||||||
"sqlite"
|
"sqlite"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"ssh2": {
|
||||||
|
"type": "external",
|
||||||
|
"source": "ext-ssh2",
|
||||||
|
"arg-type": "with-prefix",
|
||||||
|
"lib-depends": [
|
||||||
|
"libssh2"
|
||||||
|
]
|
||||||
|
},
|
||||||
"swoole": {
|
"swoole": {
|
||||||
"type": "external",
|
"type": "external",
|
||||||
"source": "swoole",
|
"source": "swoole",
|
||||||
|
|||||||
@ -61,6 +61,16 @@
|
|||||||
"path": "LICENSE"
|
"path": "LICENSE"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"ext-ssh2": {
|
||||||
|
"type": "url",
|
||||||
|
"url": "http://pecl.php.net/get/ssh2",
|
||||||
|
"path": "php-src/ext/ssh2",
|
||||||
|
"filename": "ssh2.tgz",
|
||||||
|
"license": {
|
||||||
|
"type": "file",
|
||||||
|
"path": "LICENSE"
|
||||||
|
}
|
||||||
|
},
|
||||||
"ext-zstd": {
|
"ext-zstd": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"path": "php-src/ext/zstd",
|
"path": "php-src/ext/zstd",
|
||||||
|
|||||||
@ -85,6 +85,9 @@ class SourcePatcher
|
|||||||
if ($readline = $builder->getExt('readline')) {
|
if ($readline = $builder->getExt('readline')) {
|
||||||
$patch[] = ['readline patch', '/-lncurses/', $readline->getLibFilesString()];
|
$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"'];
|
$patch[] = ['disable capstone', '/have_capstone="yes"/', 'have_capstone="no"'];
|
||||||
foreach ($patch as $item) {
|
foreach ($patch as $item) {
|
||||||
logger()->info('Patching configure: ' . $item[0]);
|
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
|
public static function patchCurlMacOS(): void
|
||||||
{
|
{
|
||||||
FileSystem::replaceFile(
|
FileSystem::replaceFile(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user