Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/pkg/ext/builtin-extensions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ ext-password-argon2:
type: php-extension
depends:
- libargon2
suggests:
- ext-openssl
php-extension:
os:
Expand Down
2 changes: 1 addition & 1 deletion config/pkg/lib/gettext-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ gettext-win:
source:
type: git
url: 'https://github.com/winlibs/gettext.git'
rev: master
rev: '0.18'
static-libs@windows:
- libintl_a.lib
6 changes: 5 additions & 1 deletion src/Package/Target/curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function buildWin(LibraryPackage $lib): void
->optionalPackage('zstd', ...cmake_boolean_args('CURL_ZSTD'))
->optionalPackage('brotli', ...cmake_boolean_args('CURL_BROTLI'))
->addConfigureArgs(
'-DBUILD_CURL_EXE=OFF',
'-DBUILD_CURL_EXE=ON',
'-DZSTD_LIBRARY=zstd_static.lib',
'-DBUILD_TESTING=OFF',
'-DBUILD_EXAMPLES=OFF',
Expand Down Expand Up @@ -81,6 +81,7 @@ public function build(LibraryPackage $lib): void
->addConfigureArgs(
'-DBUILD_CURL_EXE=ON',
'-DBUILD_LIBCURL_DOCS=OFF',
'-DOPENSSL_ROOT_DIR=' . BUILD_ROOT_PATH,
)
->build();

Expand All @@ -92,6 +93,9 @@ public function build(LibraryPackage $lib): void
if (str_contains(FileSystem::readFile($pc_path), '-lgssapi_krb5')) {
FileSystem::replaceFileRegex($pc_path, '/-lcom_err$/m', '-lcom_err -lkrb5support');
}
// FindThreads can put '-lpthread' into INTERFACE_LINK_LIBRARIES; curl's pc generator
// prepends '-l' to each entry, producing '-l-lpthread'. Strip the extra '-l'.
FileSystem::replaceFileRegex($pc_path, '/-l(-l\S+)/', '$1');
shell()->cd("{$lib->getLibDir()}/cmake/CURL/")
->exec("sed -ie 's|\"/lib/libcurl.a\"|\"{$lib->getLibDir()}/libcurl.a\"|g' CURLTargets-release.cmake");

Expand Down
1 change: 1 addition & 0 deletions src/StaticPHP/Util/FileSystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ public static function scanDirFiles(string $dir, bool $recursive = true, bool|st
*/
public static function getClassesPsr4(string $dir, string $base_namespace, mixed $rule = null, bool|string $return_path_value = false, bool $auto_require = false): array
{
$base_namespace = rtrim($base_namespace, '\\');
$classes = [];
$files = FileSystem::scanDirFiles($dir, true, true);
if ($files === false) {
Expand Down