diff --git a/devel/boost-all/compiled.mk b/devel/boost-all/compiled.mk index 6062ce1d7666..c81c2a006e58 100644 --- a/devel/boost-all/compiled.mk +++ b/devel/boost-all/compiled.mk @@ -1,61 +1,62 @@ USE_LDCONFIG= yes PKGMESSAGE= ${WRKDIR}/pkg-message MAKE_CMD?= bjam MAKEFILE= # MAKE_FLAGS= # ALL_TARGET= stage #USES+= compiler:c++17-lang USE_CXXSTD= gnu++17 PLIST_SUB+= BOOST_MAJOR_VER=${BOOST_MAJOR_VER} \ BOOST_MINOR_VER=${BOOST_MINOR_VER} \ BOOST_SHARED_LIB_VER=${BOOST_SHARED_LIB_VER} PKG_MESSAGE_FILE_THREADS= ${PORTSDIR}/devel/boost-all/pkg-message.threads PKG_MESSAGE_FILE_PYTHON= ${PORTSDIR}/devel/boost-all/pkg-message.python MAKE_ARGS= --layout=system \ --prefix=${PREFIX} \ -d2 # Our compiler-flags will be added AFTER those set by bjam. We remove # the optimization level, because Boost sets it itself (to -O3 in case # of gcc/g++): MAKE_ARGS+= cxxflags="${CXXFLAGS:N-O*}" cflags="${CFLAGS:N-O*}" MAKE_ARGS+= --toolset=${CHOSEN_COMPILER_TYPE} \ ${_MAKE_JOBS} DEBUG_MAKE_ARGS= debug DEBUG_MAKE_ARGS_OFF= release MAKE_ARGS+= threading=multi \ link=shared,static MAKE_ARGS+= optimization=speed OPTIMIZED_CFLAGS_MAKE_ARGS= inlining=full # ccache build fails when using precompiled headers, on a cached build. # # base gcc 4.2.1 fails when using precompiled headers on 11.0+ kernel. # https://lists.freebsd.org/pipermail/svn-src-all/2015-March/101722.html MAKE_ARGS+= pch=off .include .if ${OPSYS} == FreeBSD && \ ((${OSVERSION} >= 1500000 && ${OSVERSION} < 1500017) || \ - (${OSVERSION} >= 1400000 && ${OSVERSION} < 1400509) || \ - (${OSVERSION} >= 1300000 && ${OSVERSION} < 1303502)) + (${OSVERSION} >= 1400000 && ${OSVERSION} < 1400097)|| \ + (${OSVERSION} >= 1300000 && ${OSVERSION} < 1300137) || \ + ${PORT_OPTIONS:MLLVM_FROM_PORTS}) USES+= llvm:build CHOSEN_COMPILER_TYPE= clang .else USES+= compiler:c++17-lang .endif post-patch: .if defined(USE_BINUTILS) @${ECHO} "using ${CHOSEN_COMPILER_TYPE} : : ${CXX} : -B${LOCALBASE}/bin ;" >> ${WRKSRC}/tools/build/src/user-config.jam .else @${ECHO} "using ${CHOSEN_COMPILER_TYPE} : : ${CXX} ;" >> ${WRKSRC}/tools/build/src/user-config.jam .endif diff --git a/devel/boost-libs/Makefile b/devel/boost-libs/Makefile index 5ce2aa66d57f..34abe110d84d 100644 --- a/devel/boost-libs/Makefile +++ b/devel/boost-libs/Makefile @@ -1,62 +1,84 @@ PORTNAME= boost-libs PORTREVISION?= 0 COMMENT= Free portable C++ libraries (without Boost.Python) WWW= https://www.boost.org/ LICENSE= BSL LICENSE_FILE= ${WRKSRC}/LICENSE_1_0.txt BROKEN_sparc64= https://github.com/boostorg/context/commit/f2ef6326b6ed BUILD_DEPENDS+= bjam:devel/boost-jam -OPTIONS_DEFINE= DEBUG OPTIMIZED_CFLAGS +# Note about LLVM_FROM_PORTS option: +# Build of this port fails with assertion failure of compiler due to +# bug of LLVM/Clang in base system. The failure happens when all of +# following conditions are satisfied. +# * OSVERSION is included in either of following ranges. +# 1. 1500000 <= OSVERSION < 1500017 +# 2. 1400000 <= OSVERSION < 1400509 +# 3. 1300000 <= OSVERSION < 1303502 +# * Base system is built with WITH_LLVM_ASSERTIONS variable set. +# So if your base system fulfills them you need to use LLVM ports to +# build this port. +# By default WITH_LLVM_ASSERTIONS variable is set with -CURRENT but +# not with -STABLE and -RELEASE. So whereas most -CURRENT users face +# the build failure, few -STABLE and -RELEASE user faces it. +# Therefore by default this port uses LLVM from ports only if base +# system is -CURRENT and OSVERSION is included in above ranges. It +# make it possible for most -STABLE and -RELEASE users to avoid to +# build LLVM ports unnecessarily. But if someone uses -STABLE or +# -RELEASE built with WITH_LLVM_ASSERTIONS set, then he can't build +# this port successfully on such system. So provide LLVM_FROM_PORTS +# option as a last resort for him. +OPTIONS_DEFINE= DEBUG LLVM_FROM_PORTS OPTIMIZED_CFLAGS OPTIONS_MULTI= LOCALE OPTIONS_MULTI_LOCALE= ICONV ICU OPTIONS_DEFAULT= ICONV ICU ICONV_DESC= Boost.Locale with iconv encoding support ICU_DESC= Boost.Regex/Locale with ICU unicode support +LLVM_FROM_PORTS_DESC= Use LLVM from ports to build ICONV_USES= iconv ICONV_MAKE_ARGS= -sICONV_PATH=${ICONV_PREFIX} ICONV_MAKE_ARGS_OFF= boost.locale.iconv=off ICU_LIB_DEPENDS= libicuuc.so:devel/icu ICU_MAKE_ARGS= -sICU_PATH=${LOCALBASE} ICU_MAKE_ARGS_OFF= boost.locale.icu=off .include "${.CURDIR}/../boost-all/common.mk" .include "${.CURDIR}/../boost-all/compiled.mk" MAKE_ARGS+= --without-python MAKE_ARGS+= ${MAKE_ARGS_${CHOSEN_COMPILER_TYPE}} MAKE_ARGS_gcc= xdll-path=${_GCC_RUNTIME} ALL_TARGET= stage .include do-install: @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} \ ${MAKE_ARGS:NDESTDIR=*:S,^--prefix=,&${STAGEDIR},} ${INSTALL_TARGET} @${FIND} ${STAGEDIR}${PREFIX}/lib/cmake -type f -exec \ ${REINPLACE_CMD} -i '' -e 's,${STAGEDIR},,' {} + # For some reasons BJAM forget about the links @cd ${WRKSRC}/stage/ && ${FIND} lib -type l | ${PAX} -rw -p p ${STAGEDIR}${PREFIX} # display pkg-message post-install: @${TOUCH} ${PKGMESSAGE} @${CAT} ${PKG_MESSAGE_FILE_THREADS} >> ${PKGMESSAGE} @${ECHO_CMD} >> ${PKGMESSAGE} @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*.so @${REINPLACE_CMD} \ -e "s|%%LOCALBASE%%|${LOCALBASE}|g" \ -e "s|%%PYTHON_INCLUDEDIR%%|${PYTHON_INCLUDEDIR}|g" \ -e "s|%%PYTHON_LIBDIR%%|${PYTHON_LIBDIR}|g" \ -e "s|%%PYTHON_VERSION%%|${PYTHON_VERSION}|g" ${PKGMESSAGE} .include