diff --git a/security/botan3/Makefile b/security/botan3/Makefile index e79a686ca23f..1fcd76593800 100644 --- a/security/botan3/Makefile +++ b/security/botan3/Makefile @@ -1,96 +1,99 @@ PORTNAME= botan DISTVERSION= 3.3.0 CATEGORIES= security MASTER_SITES= http://botan.randombit.net/releases/ PKGNAMESUFFIX= ${_BOTANMAJOR} DISTNAME= Botan-${PORTVERSION} MAINTAINER= fluffy@FreeBSD.org COMMENT= Portable, easy to use and efficient C++ crypto library WWW= https://botan.randombit.net/ LICENSE= BSD2CLAUSE LICENSE_FILE= ${WRKSRC}/license.txt -BROKEN_FreeBSD_13= compilation fails: no member named 'find' in namespace 'std::ranges' - -LIB_DEPENDS= libboost_filesystem.so:devel/boost-libs +BUILD_DEPENDS= ${LOCALBASE}/include/boost/asio.hpp:devel/boost-libs USES= compiler:c++20-lang cpe gmake llvm:17 shebangfix tar:xz # llvm:17 fixes build failure, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279136 CPE_VENDOR= ${PORTNAME}_project USE_LDCONFIG= yes SHEBANG_GLOB= *.py HAS_CONFIGURE= yes CONFIGURE_SCRIPT= configure.py CONFIGURE_ARGS= --cc=${CHOSEN_COMPILER_TYPE} \ --prefix=${PREFIX:Q} \ --with-boost \ --with-bzip2 \ --with-external-includedir=${LOCALBASE}/include \ --with-external-libdir=${LOCALBASE}/lib \ --with-lzma \ --with-zlib \ --program-suffix=${_BOTANMAJOR} LDFLAGS+= -pthread DOCSDIR= ${LOCALBASE}/share/doc/${PORTNAME}-${PORTVERSION} _SOABIVER= 3 _BOTANMAJOR= ${DISTVERSION:S/./ /g:[1]} _SHLIBVER= ${DISTVERSION:S/./ /g:[2]} _SHLIBVERPATCH= ${DISTVERSION:S/./ /g:[3]} PLIST_SUB= SHLIBVER=${_SHLIBVER} \ SHLIBVERPATCH=${_SHLIBVERPATCH} \ SOABIVER=${_SOABIVER} \ BOTANMAJOR=${_BOTANMAJOR} PORTDOCS= * OPTIONS_DEFINE= DOCS MANPAGES PYTHON SQLITE3 OPTIONS_DEFAULT= MANPAGES OPTIONS_SUB= yes MANPAGES_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sphinx>=0:textproc/py-sphinx@${PY_FLAVOR} MANPAGES_CONFIGURE_WITH= sphinx PYTHON_USES= python PYTHON_USES_OFF= python:build PYTHON_CONFIGURE_ON= --with-python-versions=${PYTHON_VER} PYTHON_CONFIGURE_OFF= --no-install-python-module SQLITE3_USES= sqlite SQLITE3_CONFIGURE_WITH= sqlite3 .include .if ${ARCH} == aarch64 CONFIGURE_ARGS+= --cc-abi="-march=armv8-a+crypto" .elif ${ARCH:Mpowerpc64*} CONFIGURE_ARGS+= --cpu="ppc64" .endif .if ${ARCH} == i386 || ${ARCH} == amd64 PLIST_SUB+= HAS_RDRAND_RNG="" .else PLIST_SUB+= HAS_RDRAND_RNG="@comment " .endif .if ${ARCH} == i386 || ${ARCH} == amd64 || ${ARCH:Mpowerpc64*} PLIST_SUB+= HAS_PROCESSOR_RNG="" .else PLIST_SUB+= HAS_PROCESSOR_RNG="@comment " .endif #.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400091 || ( ${OSVERSION} >= 1302505 && ${OSVERSION} < 1400000 ) || ${OSVERSION} < 1300000 ) #USES+= llvm:max=15,min=14 #.endif +.if ${OPSYS} == FreeBSD && ( ( ${OSVERSION} >= 1400000 && ${OSVERSION} < 1400091 ) || ( ${OSVERSION} < 1302507 ) ) +# libc++ does not carry std::ranges::find, redirect to boost::range::find: +EXTRA_PATCHES+= ${FILESDIR}/extrapatch-src_tests_unit__x509.cpp +.endif + post-patch: @${REINPLACE_CMD} -e 's|^optimization_flags .*|optimization_flags "${CXXFLAGS}"|' \ ${WRKSRC}/src/build-data/cc/clang.txt post-install: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/botan${_BOTANMAJOR} ${STAGEDIR}${PREFIX}/lib/libbotan-${_BOTANMAJOR}.so.${_SOABIVER}.${_SHLIBVER}.${_SHLIBVERPATCH} .include diff --git a/security/botan3/files/extrapatch-src_tests_unit__x509.cpp b/security/botan3/files/extrapatch-src_tests_unit__x509.cpp new file mode 100644 index 000000000000..dfd4e13e9037 --- /dev/null +++ b/security/botan3/files/extrapatch-src_tests_unit__x509.cpp @@ -0,0 +1,38 @@ +--- src/tests/unit_x509.cpp.orig 2024-02-20 17:28:54 UTC ++++ src/tests/unit_x509.cpp +@@ -18,6 +18,8 @@ + #include + #include + #include ++ ++ #include + #endif + + namespace Botan_Tests { +@@ -627,7 +629,7 @@ Test::Result test_x509_encode_authority_info_access_ex + + for(const auto& ca_issuer : cert.ca_issuers()) { + result.confirm("CA issuer URI present in certificate", +- std::ranges::find(ca_issuers, ca_issuer) != ca_issuers.end()); ++ boost::range::find(ca_issuers, ca_issuer) != ca_issuers.end()); + } + + result.confirm("no OCSP url available", cert.ocsp_responder().empty()); +@@ -1400,7 +1402,7 @@ Test::Result test_x509_extensions(const Botan::Private + !cert_cdps->crl_distribution_urls().empty())) { + for(const auto& cdp : cert_cdps->distribution_points()) { + result.confirm("CDP URI present in self-signed certificate", +- std::ranges::find(cdp_urls, cdp.point().get_first_attribute("URI")) != cdp_urls.end()); ++ boost::range::find(cdp_urls, cdp.point().get_first_attribute("URI")) != cdp_urls.end()); + } + } + +@@ -1436,7 +1438,7 @@ Test::Result test_x509_extensions(const Botan::Private + !cert_cdps->crl_distribution_urls().empty())) { + for(const auto& cdp : cert_cdps->distribution_points()) { + result.confirm("CDP URI present in self-signed certificate", +- std::ranges::find(cdp_urls, cdp.point().get_first_attribute("URI")) != cdp_urls.end()); ++ boost::range::find(cdp_urls, cdp.point().get_first_attribute("URI")) != cdp_urls.end()); + } + } +