git: c014f9c79abb - main - databases/pecl-mongodb: update 1.12.0 -> 1.15.1, unbreak build

From: Kurt Jaeger <pi_at_FreeBSD.org>
Date: Wed, 08 Mar 2023 19:37:57 UTC
The branch main has been updated by pi:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c014f9c79abbe0b18f4505c037baa07ed3454987

commit c014f9c79abbe0b18f4505c037baa07ed3454987
Author:     Kurt Jaeger <pi@FreeBSD.org>
AuthorDate: 2023-03-08 19:32:11 +0000
Commit:     Kurt Jaeger <pi@FreeBSD.org>
CommitDate: 2023-03-08 19:37:42 +0000

    databases/pecl-mongodb: update 1.12.0 -> 1.15.1, unbreak build
    
    Relnotes:
            https://github.com/mongodb/mongo-php-driver/releases/tag/1.12.1
            https://github.com/mongodb/mongo-php-driver/releases/tag/1.13.0
            https://github.com/mongodb/mongo-php-driver/releases/tag/1.14.0
            https://github.com/mongodb/mongo-php-driver/releases/tag/1.14.1
            https://github.com/mongodb/mongo-php-driver/releases/tag/1.14.2
            https://github.com/mongodb/mongo-php-driver/releases/tag/1.15.0
            https://github.com/mongodb/mongo-php-driver/releases/tag/1.15.1
---
 databases/pecl-mongodb/Makefile                      |  2 +-
 databases/pecl-mongodb/distinfo                      |  6 +++---
 .../patch-src_libmongocrypt_src_mongocrypt-util.c    | 20 ++++++++++++++++++++
 .../patch-src_libmongocrypt_src_os__posix_os__dll.c  | 10 ++++++++++
 4 files changed, 34 insertions(+), 4 deletions(-)

diff --git a/databases/pecl-mongodb/Makefile b/databases/pecl-mongodb/Makefile
index f81e671aaf2a..d506d7711289 100644
--- a/databases/pecl-mongodb/Makefile
+++ b/databases/pecl-mongodb/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	mongodb
-PORTVERSION=	1.12.0
+PORTVERSION=	1.15.1
 CATEGORIES=	databases pear
 
 MAINTAINER=	pi@FreeBSD.org
diff --git a/databases/pecl-mongodb/distinfo b/databases/pecl-mongodb/distinfo
index db9db6f21d78..9ce185adbafe 100644
--- a/databases/pecl-mongodb/distinfo
+++ b/databases/pecl-mongodb/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1641670188
-SHA256 (PECL/mongodb-1.12.0.tgz) = 0d9f670b021288bb6c9b060979f191f1da773d729100673166f38b617e24317e
-SIZE (PECL/mongodb-1.12.0.tgz) = 1392375
+TIMESTAMP = 1678256312
+SHA256 (PECL/mongodb-1.15.1.tgz) = b2038e778d71f45cadb8c93a30eb548e5c2c1e4f832807a775ed516b7816b749
+SIZE (PECL/mongodb-1.15.1.tgz) = 1742236
diff --git a/databases/pecl-mongodb/files/patch-src_libmongocrypt_src_mongocrypt-util.c b/databases/pecl-mongodb/files/patch-src_libmongocrypt_src_mongocrypt-util.c
new file mode 100644
index 000000000000..0dd47a80bbe5
--- /dev/null
+++ b/databases/pecl-mongodb/files/patch-src_libmongocrypt_src_mongocrypt-util.c
@@ -0,0 +1,20 @@
+--- src/libmongocrypt/src/mongocrypt-util.c.orig	2023-02-09 10:59:51 UTC
++++ src/libmongocrypt/src/mongocrypt-util.c
+@@ -37,6 +37,8 @@
+ 
+ #include <errno.h>
+ 
++#define FreeBSD 1
++
+ #ifdef _WIN32
+ #include <windows.h>
+ #else
+@@ -78,7 +80,7 @@ current_module_path ()
+       }
+       free (path);
+    }
+-#elif defined(_GNU_SOURCE) || defined(_DARWIN_C_SOURCE)
++#elif defined(FreeBSD) || defined(_GNU_SOURCE) || defined(_DARWIN_C_SOURCE)
+    // Darwin/BSD/glibc define extensions for finding dynamic library info from
+    // the address of a symbol.
+    Dl_info info;
diff --git a/databases/pecl-mongodb/files/patch-src_libmongocrypt_src_os__posix_os__dll.c b/databases/pecl-mongodb/files/patch-src_libmongocrypt_src_os__posix_os__dll.c
new file mode 100644
index 000000000000..9f3537ad51bc
--- /dev/null
+++ b/databases/pecl-mongodb/files/patch-src_libmongocrypt_src_os__posix_os__dll.c
@@ -0,0 +1,10 @@
+--- src/libmongocrypt/src/os_posix/os_dll.c.orig	2023-02-09 10:59:51 UTC
++++ src/libmongocrypt/src/os_posix/os_dll.c
+@@ -17,6 +17,7 @@
+ 
+ #include "../mongocrypt-dll-private.h"
+ 
++#define _WIN32
+ #ifndef _WIN32
+ 
+ #include <assert.h>