git: cc81b511cad3 - main - databases/mongodb44: fix build with llvm16
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 30 Jun 2023 20:27:35 UTC
The branch main has been updated by ronald:
URL: https://cgit.FreeBSD.org/ports/commit/?id=cc81b511cad32a95051cb8272b3a98f98fce9313
commit cc81b511cad32a95051cb8272b3a98f98fce9313
Author: Ronald Klop <ronald@FreeBSD.org>
AuthorDate: 2023-06-30 20:22:14 +0000
Commit: Ronald Klop <ronald@FreeBSD.org>
CommitDate: 2023-06-30 20:27:15 +0000
databases/mongodb44: fix build with llvm16
_HAS_AUTO_PTR_ETC=0 fixes:
In file included from src/third_party/boost-1.70.0/boost/functional/hash.hpp:6:
src/third_party/boost-1.70.0/boost/container_hash/hash.hpp:130:33: error: no template named 'unary_function' in namespace 'std'; did you mean '__unary_function'?
struct hash_base : std::unary_function<T, std::size_t> {};
~~~~~^~~~~~~~~~~~~~
__unary_function
/usr/include/c++/v1/__functional/unary_function.h:46:1: note: '__unary_function' declared here
using __unary_function = __unary_function_keep_layout_base<_Arg, _Result>;
And "#if 1" fixes:
In file included from src/third_party/boost-1.70.0/boost/mpl/integral_c.hpp:32:
src/third_party/boost-1.70.0/boost/mpl/aux_/integral_wrapper.hpp:73:31: error: integer value -1 is outside the valid range of values [0, 3] for the enumeration type 'lock_access_mode' [-Wenum-constexpr-conversion]
typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (value - 1)) ) prior;
PR: 272295
---
databases/mongodb44/Makefile | 2 ++
...__party_boost-1.70.0_boost_mpl_aux___integral__wrapper.hpp | 11 +++++++++++
2 files changed, 13 insertions(+)
diff --git a/databases/mongodb44/Makefile b/databases/mongodb44/Makefile
index cc061ee0b445..98b3a8722753 100644
--- a/databases/mongodb44/Makefile
+++ b/databases/mongodb44/Makefile
@@ -30,6 +30,8 @@ LIB_DEPENDS= libpcre.so:devel/pcre \
USES= compiler:c++17-lang cpe python:build scons
USE_RC_SUBR= mongod
+CFLAGS+= -D_HAS_AUTO_PTR_ETC=0
+
PORTSCOUT= limit:^4\.4\.
CONFLICTS_INSTALL= mongodb[0-9][0-9] # etc/mongodb.conf.sample
diff --git a/databases/mongodb44/files/patch-src_third__party_boost-1.70.0_boost_mpl_aux___integral__wrapper.hpp b/databases/mongodb44/files/patch-src_third__party_boost-1.70.0_boost_mpl_aux___integral__wrapper.hpp
new file mode 100644
index 000000000000..fc5562f61763
--- /dev/null
+++ b/databases/mongodb44/files/patch-src_third__party_boost-1.70.0_boost_mpl_aux___integral__wrapper.hpp
@@ -0,0 +1,11 @@
+--- src/third_party/boost-1.70.0/boost/mpl/aux_/integral_wrapper.hpp.orig 2023-06-29 10:06:20 UTC
++++ src/third_party/boost-1.70.0/boost/mpl/aux_/integral_wrapper.hpp
+@@ -56,7 +56,7 @@ struct AUX_WRAPPER_NAME
+ // have to #ifdef here: some compilers don't like the 'N + 1' form (MSVC),
+ // while some other don't like 'value + 1' (Borland), and some don't like
+ // either
+-#if BOOST_WORKAROUND(__EDG_VERSION__, <= 243)
++#if 1 //BOOST_WORKAROUND(__EDG_VERSION__, <= 243)
+ private:
+ BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, next_value = BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N + 1)));
+ BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, prior_value = BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N - 1)));