--- Makefile.orig 2023-03-23 03:15:02.351796000 +0700 +++ Makefile 2023-03-23 07:39:04.238367000 +0700 @@ -1,6 +1,7 @@ PORTNAME= xtrabackup PORTVERSION= 8.0.31 DISTVERSIONSUFFIX= -24 +PORTREVISION= 1 CATEGORIES= databases MASTER_SITES= https://github.com/percona/percona-xtrabackup/archive/:percona \ SF/boost/boost/${BOOST_VERSION}:boost @@ -16,7 +17,6 @@ LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= protobuf>=3.0:devel/protobuf \ - rapidjson>=1.1.0:devel/rapidjson \ libevent>=2.1:devel/libevent \ ncurses>=6.3:devel/ncurses LIB_DEPENDS= libcurl.so:ftp/curl \ @@ -36,7 +36,7 @@ -DWITHOUT_COMPONENT_KEYRING_KMIP:STRING=yes \ -DWITH_VERSION_CHECK=false -.for component in EDITLINE ICU LIBEVENT PROTOBUF RAPIDJSON ZSTD +.for component in EDITLINE ICU LIBEVENT PROTOBUF ZSTD CMAKE_ARGS+= -DWITH_${component}:STRING=system .endfor @@ -65,7 +65,15 @@ CXXFLAGS+= -malign-double .endif -KEEP_EXTRA= lz4 robin-hood-hashing zlib +KEEP_EXTRA= lz4 rapidjson robin-hood-hashing zlib + +# This fixes an order of includes to make it use headers of bundled boost-libs +# even when incompatible version installed in building environment. +BOOSTFIX= client plugin sql unittest + +post-patch: + cd ${WRKSRC} && ${FIND} ${BOOSTFIX} -name CMakeLists.txt |\ + ${XARGS} ${REINPLACE_CMD} '/^INCLUDE_DIRECTORIES.*BOOST_INCLUDE_DIR/s/SYSTEM //' pre-configure: .for dir in ${KEEP_EXTRA}