# Template file for 'boost' pkgname=boost version=1.82.0 revision=2 build_style=meta hostmakedepends="which bzip2-devel icu-devel python3-devel pkg-config openmpi" makedepends="zlib-devel bzip2-devel icu-devel python3-devel liblzma-devel libzstd-devel openmpi-devel" checkdepends="openssl-devel libpng-devel libjpeg-turbo-devel" short_desc="Free peer-reviewed portable C++ source libraries" maintainer="John " license="BSL-1.0" homepage="https://www.boost.org/" distfiles="https://boostorg.jfrog.io/artifactory/main/release/${version%.rc*}/source/boost_${version//./_}.tar.bz2" checksum=a6e1ab9b0860e6a2881dd7b21fe9f737a095e5f33a3a874afc6a345228597ee6 python_version=3 # please do NOT delete below lines, # upgrade boost requires patching a lot of software, # which requires months of planning if [ "${version%beta*}" != "$version" ]; then _version=${version/beta/b} distfiles="https://boostorg.jfrog.io/artifactory/main/beta/${version%.rc*}/source/boost_${_version//./_}.tar.bz2" fi replaces="libboost_program_options1.80>=0 libboost_math_c99f1.80>=0 libboost_stacktrace_basic1.80>=0 libboost_stacktrace_noop1.80>=0 libboost_iostreams1.80>=0 libboost_math_tr1l1.80>=0 libboost_filesystem1.80>=0 libboost_chrono1.80>=0 libboost_math_tr1f1.80>=0 libboost_wave1.80>=0 libboost_graph1.80>=0 libboost_locale1.80>=0 libboost_regex1.80>=0 libboost_fiber1.80>=0 libboost_type_erasure1.80>=0 libboost_coroutine1.80>=0 libboost_atomic1.80>=0 libboost_prg_exec_monitor1.80>=0 libboost_math_c991.80>=0 boost-python3-1.80>=0 libboost_log_setup1.80>=0 libboost_json1.80>=0 libboost_timer1.80>=0 libboost_system1.80>=0 libboost_unit_test_framework1.80>=0 libboost_serialization1.80>=0 libboost_math_tr11.80>=0 libboost_math_c99l1.80>=0 boost-python1.80>=0 libboost_contract1.80>=0 libboost_date_time1.80>=0 libboost_log1.80>=0 libboost_random1.80>=0 libboost_thread1.80>=0 libboost_container1.80>=0 libboost_wserialization1.80>=0 libboost_context1.80>=0 libboost_stacktrace_addr2line1.80>=0" subpackages="libboost_program_options libboost_math_c99f libboost_stacktrace_basic libboost_stacktrace_noop libboost_iostreams libboost_filesystem libboost_url libboost_chrono libboost_math_tr1f libboost_wave libboost_graph libboost_graph_parallel libboost_locale libboost_regex libboost_fiber libboost_type_erasure libboost_coroutine libboost_atomic libboost_prg_exec_monitor libboost_math_c99 boost-python3 libboost_log_setup boost-devel libboost_json libboost_timer libboost_system libboost_unit_test_framework libboost_serialization libboost_math_tr1 boost-build libboost_contract libboost_nowide libboost_mpi libboost_mpi-python3 libboost_date_time libboost_log libboost_random libboost_thread libboost_container libboost_wserialization libboost_context" # on glibc ppc, boost.math disables long double stuff because of # non-ieee754-conforming long double type (IBM double-double) # # this does not affect musl (where long double is 64-bit) # case "$XBPS_TARGET_MACHINE" in ppc64le|ppc64|ppc|ppcle) ;; *) subpackages+=" libboost_math_c99l libboost_math_tr1l";; esac if [ -z "$CROSS_BUILD" ]; then subpackages+=" libboost_stacktrace_addr2line" fi if [ "$XBPS_TARGET_LIBC" = musl ]; then makedepends+=" libucontext-devel" LDFLAGS+=" -lucontext" fi case "$XBPS_TARGET_MACHINE" in i686*|x86_64*|ppc64le) makedepends+=" libquadmath-devel" ;; esac case "$XBPS_TARGET_MACHINE" in i686*) _arch=x86; _abi=sysv ;; x86_64*) _arch=x86; _abi=sysv ;; arm*) _arch=arm; _abi=aapcs ;; aarch64*) _arch=arm; _abi=aapcs ;; mips*) _arch=mips32r2; _abi=o32 ;; ppc*) _arch=power; _abi=sysv ;; esac do_build() { # bootstrap.sh will reset CXX and CXXFLAGS (L229) ./bootstrap.sh --with-toolset=gcc \ --prefix=${DESTDIR}/usr --with-python=/usr/bin/python3 \ --with-python-root=${XBPS_CROSS_BASE}/usr ( # Rebuild bjam for target cd tools/build/src/engine CXXFLAGS="$CXXFLAGS -fdebug-prefix-map=$PWD=." # toolset gcc will force gcc -x c++ -O2 -s # toolset cxx will use CXX and CXXFLAGS CXX_VERSION_OPT=--version ./build.sh cxx ) cat > user-config.jam <<-__EOF using gcc : : ${CXX} : "${CXXFLAGS}" "${LDFLAGS}" "off" ; using mpi ; using python : ${py3_ver} : /usr/bin/python3 : ${XBPS_CROSS_BASE}/${py3_inc} : ${XBPS_CROSS_BASE}/${py3_lib} ; __EOF ./b2 ${makejobs} \ --user-config=${wrksrc}/user-config.jam \ --toolset=gcc abi=${_abi} architecture=${_arch} \ python=${py3_ver} release \ cxxflags="${CXXFLAGS}" linkflags="${LDFLAGS}" \ threading=multi runtime-link=shared link=shared,static } do_check() { local _testcase _component local _fail="" # https://github.com/boostorg/contract/issues/30 _fail+=" contract" # requires clang rm -f libs/hana/test/experimental/type_name.cpp # https://github.com/open-mpi/ompi/issues/7330 export OMPI_MCA_plm_rsh_agent= # Seems to fail on everything but x86_64, # because of floating point comparision if [ "$XBPS_TARGET_LIBC" != x86_64 ]; then _fail+=" geometry" fi # required by boost::math mkdir -p .temps for _testcase in libs/gil/test/ libs/*/test/; do _testcase=${_testcase%/test/} _component=${_testcase#libs/} case " $_fail " in *" $_component "*) continue ;; esac _component="boost::$_component" msg_normal "Testing: $_component\n" ./b2 $_testcase \ --user-config=${wrksrc}/user-config.jam \ --toolset=gcc abi=${_abi} architecture=${_arch} \ python=${py3_ver} release warnings-as-errors=off \ cxxflags="${CXXFLAGS}" linkflags="${LDFLAGS}" \ threading=multi || msg_error "do_check: ${_component}: failure\n" done } do_install() { # Install headers/libs ./b2 --prefix=${DESTDIR}/usr abi=${_abi} architecture=${_arch} \ --user-config=${wrksrc}/user-config.jam \ cxxflags="${CXXFLAGS}" linkflags="${LDFLAGS}" \ python=${py3_ver} release \ threading=multi runtime-link=shared link=shared,static \ install # Install Boost.Build stuff. # XXX: make bjam a compat symlink to b2 vbin tools/build/src/engine/b2 ln -sf b2 "$DESTDIR/usr/bin/bjam" vmkdir usr/share rm -rf ${DESTDIR}/usr/share/b2 cp -a ${wrksrc}/tools/build ${DESTDIR}/usr/share/b2 find ${DESTDIR}/usr/share/b2 \ -type f -name \*.orig -exec rm -f {} \; rm -rf ${DESTDIR}/usr/share/b2/src/engine/bootstrap rm -rf ${DESTDIR}/usr/share/b2/src/engine/{b2,bjam} cat <<-'EOF' >${wrksrc}/site-config.jam # System wide configuration file for Boost.Build.' # using gcc ; EOF cd $wrksrc vconf site-config.jam # license, not required for binary distribution vlicense LICENSE_1_0.txt } boost-python3_package() { depends="python3" shlib_requires="libpython${py3_ver}${py3_abiver}.so.1.0" short_desc+=" - Python3 bindings" pkg_install() { vmove "usr/lib/libboost_python3*.so.*" } } boost-build_package() { depends="boost" conf_files="/etc/site-config.jam" short_desc+=" - Boost.Build utility and framework" provides="boost-jam-${version}_${revision}" replaces="boost-jam<${version}_${revision}" pkg_install() { vmove usr/bin/b2 vmove usr/bin/bjam vmove usr/share/b2 vmove etc/site-config.jam } } boost-devel_package() { noverifyrdeps=yes depends="boost ${subpackages/boost-devel}" short_desc+=" - development files" pkg_install() { vmove usr/include vmove usr/lib/cmake vmove "usr/lib/*.a" vmove "usr/lib/*.so" } } libboost_atomic_package() { short_desc+=" - libboost_atomic" pkg_install() { vmove usr/lib/libboost_atomic.so.* } } libboost_chrono_package() { short_desc+=" - libboost_chrono" pkg_install() { vmove usr/lib/libboost_chrono.so.* } } libboost_container_package() { short_desc+=" - libboost_container" pkg_install() { vmove usr/lib/libboost_container.so.* } } libboost_context_package() { short_desc+=" - libboost_context" pkg_install() { vmove usr/lib/libboost_context.so.* } } libboost_contract_package() { short_desc+=" - libboost_contract" pkg_install() { vmove usr/lib/libboost_contract.so.* } } libboost_coroutine_package() { short_desc+=" - libboost_coroutine" pkg_install() { vmove usr/lib/libboost_coroutine.so.* } } libboost_date_time_package() { short_desc+=" - libboost_date_time" pkg_install() { vmove usr/lib/libboost_date_time.so.* } } libboost_fiber_package() { short_desc+=" - libboost_fiber" pkg_install() { vmove usr/lib/libboost_fiber.so.* } } libboost_filesystem_package() { short_desc+=" - libboost_filesystem" pkg_install() { vmove usr/lib/libboost_filesystem.so.* } } libboost_graph_package() { short_desc+=" - libboost_graph" pkg_install() { vmove usr/lib/libboost_graph.so.* } } libboost_graph_parallel_package() { short_desc+=" - libboost_graph_parallel" pkg_install() { vmove usr/lib/libboost_graph_parallel.so.* } } libboost_iostreams_package() { short_desc+=" - libboost_iostreams" pkg_install() { vmove usr/lib/libboost_iostreams.so.* } } libboost_locale_package() { short_desc+=" - libboost_locale" pkg_install() { vmove usr/lib/libboost_locale.so.* } } libboost_log_package() { short_desc+=" - libboost_log" pkg_install() { vmove usr/lib/libboost_log.so.* } } libboost_log_setup_package() { short_desc+=" - libboost_log_setup" pkg_install() { vmove usr/lib/libboost_log_setup.so.* } } libboost_math_c99_package() { short_desc+=" - libboost_math_c99" pkg_install() { vmove usr/lib/libboost_math_c99.so.* } } libboost_math_c99f_package() { short_desc+=" - libboost_math_c99f" pkg_install() { vmove usr/lib/libboost_math_c99f.so.* } } libboost_math_c99l_package() { short_desc+=" - libboost_math_c99l" pkg_install() { vmove usr/lib/libboost_math_c99l.so.* } } libboost_json_package() { short_desc+=" - libboost_json" pkg_install() { vmove usr/lib/libboost_json.so.* } } libboost_math_tr1_package() { short_desc+=" - libboost_math_tr1" pkg_install() { vmove usr/lib/libboost_math_tr1.so.* } } libboost_math_tr1f_package() { short_desc+=" - libboost_math_tr1f" pkg_install() { vmove usr/lib/libboost_math_tr1f.so.* } } libboost_math_tr1l_package() { short_desc+=" - libboost_math_tr1l" pkg_install() { vmove usr/lib/libboost_math_tr1l.so.* } } libboost_mpi_package() { short_desc+=" - libboost_mpi" pkg_install() { vmove usr/lib/libboost_mpi.so.* } } libboost_mpi-python3_package() { short_desc+=" - libboost_mpi - Python 3 bindings" shlib_requires="libpython${py3_ver}${py3_abiver}.so.1.0" pkg_install() { vmove usr/lib/libboost_mpi_python3*.so.* vmove usr/lib/boost-python${py3_ver}/mpi.so } } libboost_nowide_package() { short_desc+=" - libboost_nowide" pkg_install() { vmove usr/lib/libboost_nowide.so.* } } libboost_prg_exec_monitor_package() { short_desc+=" - libboost_prg_exec_monitor" pkg_install() { vmove usr/lib/libboost_prg_exec_monitor.so.* } } libboost_program_options_package() { short_desc+=" - libboost_program_options" pkg_install() { vmove usr/lib/libboost_program_options.so.* } } libboost_random_package() { short_desc+=" - libboost_random" pkg_install() { vmove usr/lib/libboost_random.so.* } } libboost_regex_package() { short_desc+=" - libboost_regex" pkg_install() { vmove usr/lib/libboost_regex.so.* } } libboost_serialization_package() { short_desc+=" - libboost_serialization" pkg_install() { vmove usr/lib/libboost_serialization.so.* } } libboost_stacktrace_addr2line_package() { short_desc+=" - libboost_stacktrace_addr2line" pkg_install() { vmove usr/lib/libboost_stacktrace_addr2line.so.* } } libboost_stacktrace_basic_package() { short_desc+=" - libboost_stacktrace_basic" pkg_install() { vmove usr/lib/libboost_stacktrace_basic.so.* } } libboost_stacktrace_noop_package() { short_desc+=" - libboost_stacktrace_noop" pkg_install() { vmove usr/lib/libboost_stacktrace_noop.so.* } } libboost_sync_package() { short_desc+=" - libboost_sync" pkg_install() { vmove usr/lib/libboost_sync.so.* } } libboost_system_package() { short_desc+=" - libboost_system" pkg_install() { vmove usr/lib/libboost_system.so.* } } libboost_thread_package() { short_desc+=" - libboost_thread" pkg_install() { vmove usr/lib/libboost_thread.so.* } } libboost_timer_package() { short_desc+=" - libboost_timer" pkg_install() { vmove usr/lib/libboost_timer.so.* } } libboost_type_erasure_package() { short_desc+=" - libboost_type_erasure" pkg_install() { vmove usr/lib/libboost_type_erasure.so.* } } libboost_unit_test_framework_package() { short_desc+=" - libboost_unit_test_framework" pkg_install() { vmove usr/lib/libboost_unit_test_framework.so.* } } libboost_url_package() { short_desc+=" - libboost_url" pkg_install() { vmove usr/lib/libboost_url.so.* } } libboost_wave_package() { short_desc+=" - libboost_wave" pkg_install() { vmove usr/lib/libboost_wave.so.* } } libboost_wserialization_package() { short_desc+=" - libboost_wserialization" pkg_install() { vmove usr/lib/libboost_wserialization.so.* } }