aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2024-01-16 11:45:17 +0000
committerDimitry Andric <dim@FreeBSD.org>2024-02-01 19:02:03 +0000
commitbfdc368a6edddc2c8c305e60dd89c96d7ecb7fc2 (patch)
tree3d525356850d5a76f0d9e8b86a6c6eee67111f9f
parentd24795b1f4c70759c3d742be64eb3349a071185e (diff)
downloadports-bfdc368a6edddc2c8c305e60dd89c96d7ecb7fc2.tar.gz
ports-bfdc368a6edddc2c8c305e60dd89c96d7ecb7fc2.zip
databases/mysql80-server: fix build with clang 16
Similar to bug 272295, building databases/mysql80-server with clang 16 or higher can result in an error: /wrkdirs/usr/ports/databases/mysql80-server/work/mysql-8.0.35/boost/boost_1_77_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 'udt_builtin_mixture_enum' [-Wenum-constexpr-conversion] 73 | typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (value - 1)) ) prior; | ^ /wrkdirs/usr/ports/databases/mysql80-server/work/mysql-8.0.35/boost/boost_1_77_0/boost/mpl/aux_/static_cast.hpp:24:47: note: expanded from macro 'BOOST_MPL_AUX_STATIC_CAST' 24 | # define BOOST_MPL_AUX_STATIC_CAST(T, expr) static_cast<T>(expr) | ^ This is because the vendored copy of boost in mysql80-server is using undefined behavior in a possibly constexpr context. Fix this by unconditionally enabling the "boost workaround" for aux wrapper value types in integral_wrapper.hpp. PR: 276749 Approved by: joneum (maintainer) MFH: 2024Q1
-rw-r--r--databases/mysql80-server/Makefile2
-rw-r--r--databases/mysql80-server/files/patch-boost_boost__1__77__0_boost_mpl_aux___integral__wrapper.hpp11
2 files changed, 12 insertions, 1 deletions
diff --git a/databases/mysql80-server/Makefile b/databases/mysql80-server/Makefile
index e4bd7f2a9758..8053ff41f708 100644
--- a/databases/mysql80-server/Makefile
+++ b/databases/mysql80-server/Makefile
@@ -1,6 +1,6 @@
PORTNAME?= mysql
PORTVERSION= 8.0.35
-PORTREVISION?= 0
+PORTREVISION?= 1
CATEGORIES= databases
MASTER_SITES= MYSQL/MySQL-8.0
PKGNAMESUFFIX?= 80-server
diff --git a/databases/mysql80-server/files/patch-boost_boost__1__77__0_boost_mpl_aux___integral__wrapper.hpp b/databases/mysql80-server/files/patch-boost_boost__1__77__0_boost_mpl_aux___integral__wrapper.hpp
new file mode 100644
index 000000000000..66c430a4346f
--- /dev/null
+++ b/databases/mysql80-server/files/patch-boost_boost__1__77__0_boost_mpl_aux___integral__wrapper.hpp
@@ -0,0 +1,11 @@
+--- boost/boost_1_77_0/boost/mpl/aux_/integral_wrapper.hpp.orig 2021-08-05 09:42:13 UTC
++++ boost/boost_1_77_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)));