mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 13:24:51 +08:00
Add ext-curl
This commit is contained in:
parent
07fd1bcd03
commit
0548aba248
@ -11,6 +11,15 @@ ext-calendar:
|
||||
type: php-extension
|
||||
ext-ctype:
|
||||
type: php-extension
|
||||
ext-curl:
|
||||
type: php-extension
|
||||
depends:
|
||||
- curl
|
||||
depends@windows:
|
||||
- ext-zlib
|
||||
- ext-openssl
|
||||
php-extension:
|
||||
arg-type: with
|
||||
ext-mbregex:
|
||||
type: php-extension
|
||||
depends:
|
||||
|
||||
@ -55,6 +55,12 @@ class curl
|
||||
|
||||
// patch pkgconf
|
||||
$lib->patchPkgconfPrefix(['libcurl.pc']);
|
||||
// curl's CMake embeds krb5 link flags directly without following Requires.private chain,
|
||||
// so -lkrb5support (from mit-krb5.pc Libs.private) is missing from libcurl.pc.
|
||||
$pc_path = "{$lib->getLibDir()}/pkgconfig/libcurl.pc";
|
||||
if (str_contains(FileSystem::readFile($pc_path), '-lgssapi_krb5')) {
|
||||
FileSystem::replaceFileRegex($pc_path, '/-lcom_err$/m', '-lcom_err -lkrb5support');
|
||||
}
|
||||
shell()->cd("{$lib->getLibDir()}/cmake/CURL/")
|
||||
->exec("sed -ie 's|\"/lib/libcurl.a\"|\"{$lib->getLibDir()}/libcurl.a\"|g' CURLTargets-release.cmake");
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user