diff options
Diffstat (limited to '1095.patch')
-rw-r--r-- | 1095.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/1095.patch b/1095.patch new file mode 100644 index 0000000..2f82487 --- /dev/null +++ b/1095.patch @@ -0,0 +1,44 @@ +From 71a86ccd0c6338a18aced544cd798593d7ad93ea Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Tue, 4 Feb 2020 16:47:47 +0100 +Subject: [PATCH] Fix build with system libraries + +--- + config.m4 | 10 +++++----- + php_phongo.c | 2 +- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/config.m4 b/config.m4 +index 39e0627b..e00ceb44 100644 +--- a/config.m4 ++++ b/config.m4 +@@ -257,11 +257,11 @@ if test "$PHP_MONGODB" != "no"; then + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + AC_MSG_CHECKING(for libmongocrypt) + +- if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libmongocrypt-1.0; then +- if $PKG_CONFIG libmongocrypt-1.0 --atleast-version 1.0.1; then +- PHP_MONGODB_MONGOCRYPT_CFLAGS=`$PKG_CONFIG libmongocrypt-1.0 --cflags` +- PHP_MONGODB_MONGOCRYPT_LIBS=`$PKG_CONFIG libmongocrypt-1.0 --libs` +- PHP_MONGODB_MONGOCRYPT_VERSION=`$PKG_CONFIG libmongocrypt-1.0 --modversion` ++ if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libmongocrypt; then ++ if $PKG_CONFIG libmongocrypt --atleast-version 1.0.1; then ++ PHP_MONGODB_MONGOCRYPT_CFLAGS=`$PKG_CONFIG libmongocrypt --cflags` ++ PHP_MONGODB_MONGOCRYPT_LIBS=`$PKG_CONFIG libmongocrypt --libs` ++ PHP_MONGODB_MONGOCRYPT_VERSION=`$PKG_CONFIG libmongocrypt --modversion` + AC_MSG_RESULT(version $PHP_MONGODB_MONGOCRYPT_VERSION found) + + PHP_MONGODB_CFLAGS="$PHP_MONGODB_CFLAGS $PHP_MONGODB_MONGOCRYPT_CFLAGS" +diff --git a/php_phongo.c b/php_phongo.c +index ef3600b8..83f5dfd4 100644 +--- a/php_phongo.c ++++ b/php_phongo.c +@@ -3924,7 +3924,7 @@ PHP_MINFO_FUNCTION(mongodb) + #ifdef MONGOC_ENABLE_CLIENT_SIDE_ENCRYPTION + #ifdef HAVE_SYSTEM_LIBMONGOCRYPT + php_info_print_table_row(2, "libmongocrypt headers version", MONGOCRYPT_VERSION); +- php_info_print_table_row(2, "libmongocrypt library version", mongocrypt_version()); ++ php_info_print_table_row(2, "libmongocrypt library version", mongocrypt_version(NULL)); + #else + php_info_print_table_row(2, "libmongocrypt bundled version", MONGOCRYPT_VERSION); + #endif |