-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
) * PHPC-2011: Bump libmongocrypt to 1.3.0 * PHPC-2011: Bump libmongoc to 1.20.0 * Script to update submodule sources in config.m4 and config.w32
- Loading branch information
Showing
9 changed files
with
75 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
AC_C_BIGENDIAN | ||
if test "x$ac_cv_c_bigendian" = "xyes"; then | ||
PHP_MONGODB_BUNDLED_CFLAGS="$PHP_MONGODB_BUNDLED_CFLAGS -DKMS_MESSAGE_BIG_ENDIAN=1" | ||
else | ||
PHP_MONGODB_BUNDLED_CFLAGS="$PHP_MONGODB_BUNDLED_CFLAGS -DKMS_MESSAGE_LITTLE_ENDIAN=1" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
|
||
$cmd = "find %s -maxdepth 1 -name '*.c' -print0 | cut -sz -d / -f %d- | sort -dz | tr '\\000' ' '"; | ||
|
||
$vars = [ | ||
'PHP_MONGODB_COMMON_SOURCES' => 'src/libmongoc/src/common', | ||
'PHP_MONGODB_KMS_MESSAGE_SOURCES' => 'src/libmongoc/src/kms-message/src', | ||
'PHP_MONGODB_BSON_SOURCES' => 'src/libmongoc/src/libbson/src/bson', | ||
'PHP_MONGODB_JSONSL_SOURCES' => 'src/libmongoc/src/libbson/src/jsonsl', | ||
'PHP_MONGODB_MONGOC_SOURCES' => 'src/libmongoc/src/libmongoc/src/mongoc', | ||
'PHP_MONGODB_ZLIB_SOURCES' => 'src/libmongoc/src/zlib-1.2.11', | ||
'PHP_MONGODB_MONGOCRYPT_SOURCES' => 'src/libmongocrypt/src', | ||
'PHP_MONGODB_MONGOCRYPT_CRYPTO_SOURCES' => 'src/libmongocrypt/src/crypto', | ||
'PHP_MONGODB_MONGOCRYPT_OS_POSIX_SOURCES' => 'src/libmongocrypt/src/os_posix', | ||
'PHP_MONGODB_MONGOCRYPT_OS_WIN_SOURCES' => 'src/libmongocrypt/src/os_win', | ||
'PHP_MONGODB_MONGOCRYPT_KMS_MESSAGE_SOURCES' => 'src/libmongocrypt/kms-message/src', | ||
]; | ||
|
||
$patterns = []; | ||
$replacements = []; | ||
|
||
foreach ($vars as $var => $path) { | ||
$cutNth = 2 + substr_count($path, '/'); | ||
|
||
$files = trim(shell_exec(sprintf($cmd, $path, $cutNth))); | ||
|
||
$patterns[] = sprintf('/(%s=")([^"]*)(";?)/', $var); | ||
$replacements[] = '$1' . $files . '$3'; | ||
} | ||
|
||
$files = [ | ||
realpath(__DIR__ . '/../config.m4') => count($patterns), | ||
// config.w32 does not use PHP_MONGODB_ZLIB_SOURCES (PHPC-1111) | ||
realpath(__DIR__ . '/../config.w32') => count($patterns) - 1, | ||
]; | ||
|
||
foreach ($files as $file => $expectedCount) { | ||
$replaced = preg_replace($patterns, $replacements, file_get_contents($file), 1, $count); | ||
|
||
if ($count !== $expectedCount) { | ||
fprintf(STDERR, "Skipping %s: Expected %d replacements but only matched %d\n", basename($file), $expectedCount, $count); | ||
continue; | ||
} | ||
|
||
printf("Updated %s\n", basename($file)); | ||
file_put_contents($file, $replaced); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.2.1 | ||
1.3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.11.1-20211103+gitb93e345178 | ||
1.20.0 |
Submodule libmongocrypt
updated
146 files