git: f646a017a4a2 - main - devel/ice: Fix build with Berkeley DB 18.x

From: Yasuhiro Kimura <yasu_at_FreeBSD.org>
Date: Fri, 01 Apr 2022 05:34:18 UTC
The branch main has been updated by yasu:

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

commit f646a017a4a2c3a9fa7f7f8ca7287fd5e2962d55
Author:     Yasuhiro Kimura <yasu@FreeBSD.org>
AuthorDate: 2022-03-30 08:40:31 +0000
Commit:     Yasuhiro Kimura <yasu@FreeBSD.org>
CommitDate: 2022-04-01 05:32:59 +0000

    devel/ice: Fix build with Berkeley DB 18.x
    
    PR:             262930
    Tested by:      grembo
    Approved by:    grembo (maintainer)
---
 devel/ice/Makefile                                         |  4 ++--
 devel/ice/files/patch-cpp_src_FreezeScript_DumpDB.cpp      | 11 +++++++++++
 devel/ice/files/patch-cpp_src_FreezeScript_Util.cpp        | 11 +++++++++++
 devel/ice/files/patch-cpp_src_FreezeScript_transformdb.cpp | 13 +++++++++++++
 devel/ice/files/patch-cpp_src_Freeze_SharedDbEnv.cpp       | 11 +++++++++++
 5 files changed, 48 insertions(+), 2 deletions(-)

diff --git a/devel/ice/Makefile b/devel/ice/Makefile
index 567c23f2eb9c..9dea5da8d9ca 100644
--- a/devel/ice/Makefile
+++ b/devel/ice/Makefile
@@ -2,6 +2,7 @@
 
 PORTNAME=		Ice
 PORTVERSION=		3.6.5
+PORTREVISION=		1
 DISTVERSIONPREFIX=	v
 CATEGORIES=		devel
 
@@ -27,8 +28,7 @@ PLIST_SUB+=		LIB_VERSION="${PORTVERSION}" LIB_VRS="${LIB_VRS}"
 
 OPTIONS_DEFINE?=	DEBUG TEST
 
-USES+=			bdb:5 iconv gmake
-INVALID_BDB_VER=	48 6
+USES+=			bdb iconv gmake
 USE_LDCONFIG=		yes
 BUILD_WRKSRC?=		${WRKSRC}/cpp
 INSTALL_WRKSRC?=	${WRKSRC}/cpp
diff --git a/devel/ice/files/patch-cpp_src_FreezeScript_DumpDB.cpp b/devel/ice/files/patch-cpp_src_FreezeScript_DumpDB.cpp
new file mode 100644
index 000000000000..8dbb4aafc795
--- /dev/null
+++ b/devel/ice/files/patch-cpp_src_FreezeScript_DumpDB.cpp
@@ -0,0 +1,11 @@
+--- cpp/src/FreezeScript/DumpDB.cpp.orig	2022-03-31 17:50:52 UTC
++++ cpp/src/FreezeScript/DumpDB.cpp
+@@ -481,7 +481,7 @@ run(const Ice::StringSeq& originalArgs, const Ice::Com
+     FreezeScript::ObjectFactoryPtr objectFactory = new FreezeScript::ObjectFactory;
+     communicator->addObjectFactory(objectFactory, "");
+ 
+-    DbEnv dbEnv(0);
++    DbEnv dbEnv((u_int32_t)0);
+     DbTxn* txn = 0;
+     Freeze::ConnectionPtr connection;
+     int status = EXIT_SUCCESS;
diff --git a/devel/ice/files/patch-cpp_src_FreezeScript_Util.cpp b/devel/ice/files/patch-cpp_src_FreezeScript_Util.cpp
new file mode 100644
index 000000000000..5f07e6b89577
--- /dev/null
+++ b/devel/ice/files/patch-cpp_src_FreezeScript_Util.cpp
@@ -0,0 +1,11 @@
+--- cpp/src/FreezeScript/Util.cpp.orig	2019-08-12 19:54:18 UTC
++++ cpp/src/FreezeScript/Util.cpp
+@@ -209,7 +209,7 @@ FreezeScript::readCatalog(const Ice::CommunicatorPtr& 
+ {
+     CatalogDataMap result;
+ 
+-    DbEnv dbEnv(0);
++    DbEnv dbEnv((u_int32_t)0);
+     try
+     {
+ #ifdef _WIN32
diff --git a/devel/ice/files/patch-cpp_src_FreezeScript_transformdb.cpp b/devel/ice/files/patch-cpp_src_FreezeScript_transformdb.cpp
new file mode 100644
index 000000000000..f9d288b7467b
--- /dev/null
+++ b/devel/ice/files/patch-cpp_src_FreezeScript_transformdb.cpp
@@ -0,0 +1,13 @@
+--- cpp/src/FreezeScript/transformdb.cpp.orig	2022-03-31 17:41:42 UTC
++++ cpp/src/FreezeScript/transformdb.cpp
+@@ -766,8 +766,8 @@ run(const Ice::StringSeq& originalArgs, const Ice::Com
+     //
+     // Transform the database.
+     //
+-    DbEnv dbEnv(0);
+-    DbEnv dbEnvNew(0);
++    DbEnv dbEnv((u_int32_t)0);
++    DbEnv dbEnvNew((u_int32_t)0);
+     Freeze::TransactionPtr txNew;
+     Freeze::ConnectionPtr connection;
+     Freeze::ConnectionPtr connectionNew;
diff --git a/devel/ice/files/patch-cpp_src_Freeze_SharedDbEnv.cpp b/devel/ice/files/patch-cpp_src_Freeze_SharedDbEnv.cpp
new file mode 100644
index 000000000000..aee511c4fb54
--- /dev/null
+++ b/devel/ice/files/patch-cpp_src_Freeze_SharedDbEnv.cpp
@@ -0,0 +1,11 @@
+--- cpp/src/Freeze/SharedDbEnv.cpp.orig	2019-08-12 19:54:18 UTC
++++ cpp/src/Freeze/SharedDbEnv.cpp
+@@ -530,7 +530,7 @@ Freeze::SharedDbEnv::SharedDbEnv(const std::string& en
+     {
+         if(_env == 0)
+         {
+-            _envHolder.reset(new DbEnv(0));
++            _envHolder.reset(new DbEnv((u_int32_t)0));
+             _env = _envHolder.get();
+ 
+             if(_trace >= 1)