mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-13 20:05:35 +08:00
Add ext-curl
This commit is contained in:
@@ -11,6 +11,15 @@ ext-calendar:
|
|||||||
type: php-extension
|
type: php-extension
|
||||||
ext-ctype:
|
ext-ctype:
|
||||||
type: php-extension
|
type: php-extension
|
||||||
|
ext-curl:
|
||||||
|
type: php-extension
|
||||||
|
depends:
|
||||||
|
- curl
|
||||||
|
depends@windows:
|
||||||
|
- ext-zlib
|
||||||
|
- ext-openssl
|
||||||
|
php-extension:
|
||||||
|
arg-type: with
|
||||||
ext-mbregex:
|
ext-mbregex:
|
||||||
type: php-extension
|
type: php-extension
|
||||||
depends:
|
depends:
|
||||||
|
|||||||
@@ -55,6 +55,12 @@ class curl
|
|||||||
|
|
||||||
// patch pkgconf
|
// patch pkgconf
|
||||||
$lib->patchPkgconfPrefix(['libcurl.pc']);
|
$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/")
|
shell()->cd("{$lib->getLibDir()}/cmake/CURL/")
|
||||||
->exec("sed -ie 's|\"/lib/libcurl.a\"|\"{$lib->getLibDir()}/libcurl.a\"|g' CURLTargets-release.cmake");
|
->exec("sed -ie 's|\"/lib/libcurl.a\"|\"{$lib->getLibDir()}/libcurl.a\"|g' CURLTargets-release.cmake");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user