On 2020/01/28 23:18, Kurt Mosiejczuk wrote: > I just ran this on my speedy amd64 test machine and it built to completion. > It also packaged up. I haven't run any further tests though.
Thanks. i386 bulk is a couple of hours away from finishing with no fallout yet (and I really don't expect any now), if someone would like to commit it it's ok sthen@. Diff reattached for convenience, no changes though. Index: Makefile =================================================================== RCS file: /cvs/ports/devel/boost/Makefile,v retrieving revision 1.91 diff -u -p -r1.91 Makefile --- Makefile 27 Nov 2019 05:17:35 -0000 1.91 +++ Makefile 29 Jan 2020 21:24:43 -0000 @@ -11,14 +11,14 @@ VERSION= 1.66.0 DISTNAME= boost_${VERSION:S/./_/g} PKGNAME-main= boost-${VERSION} PKGNAME-md= boost-md-${VERSION} -REVISION-main= 8 +REVISION-main= 9 REVISION-md= 3 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=boost/} EXTRACT_SUFX= .tar.bz2 FIX_EXTRACT_PERMISSIONS = Yes -SO_VERSION= 9.0 +SO_VERSION= 10.0 BOOST_LIBS= boost_atomic-mt \ boost_chrono-mt boost_chrono \ boost_container-mt boost_container \ @@ -40,6 +40,7 @@ BOOST_LIBS= boost_atomic-mt \ boost_python-mt boost_python \ boost_python3-mt boost_python3 \ boost_numpy boost_numpy-mt \ + boost_numpy3 boost_numpy3-mt \ boost_random-mt boost_random \ boost_regex-mt boost_regex \ boost_serialization-mt boost_serialization \ @@ -84,9 +85,10 @@ MULTI_PACKAGES= -main -md MODULES= lang/python MODPY_RUNDEP= No -BUILD_DEPENDS+= lang/python/${MODPY_DEFAULT_VERSION_2} \ - lang/python/${MODPY_DEFAULT_VERSION_3} \ - math/py-numpy +# extras needed until py2 support can be removed +BUILD_DEPENDS+= math/py-numpy \ + math/py-numpy,python3 \ + lang/python/${MODPY_DEFAULT_VERSION_3} LIB_DEPENDS= archivers/bzip2 \ textproc/icu4c @@ -136,6 +138,16 @@ PY2_BOOTSTRAP= --with-python=${LOCALBASE PY3_BOOTSTRAP= --with-python=${LOCALBASE}/bin/python${MODPY_DEFAULT_VERSION_3} \ --with-python-version=${MODPY_DEFAULT_VERSION_3} \ +PY2_INC= ${LOCALBASE}/include/python${MODPY_DEFAULT_VERSION_2} + +# XXX defensive; py3.7 has an 'm' suffix but this is removed in 3.8 +PY3_INC= ${LOCALBASE}/include/python${MODPY_DEFAULT_VERSION_3:S/3.7/3.7m/} +# can revert to this after default is switched: +#PY3_INC= ${LOCALBASE}/include/python${MODPY_DEFAULT_VERSION_3} + +# temporary dir to stash libs when rebuilding with py2 +PY3_DIR= ${WRKDIR}/lib.py3 + # python.port.mk makes assumptions about an empty CONFIGURE_STYLE CONFIGURE_STYLE= none @@ -153,37 +165,50 @@ pre-configure: do-configure: echo "using ${TOOLSET} : : ${CXX} ;" >>${WRKSRC}/tools/build/user-config.jam - @${SUBST_CMD} ${WRKSRC}/Jamroot - @cd ${WRKSRC}/libs/config && \ + ${SUBST_CMD} ${WRKSRC}/Jamroot + cd ${WRKSRC}/libs/config && \ ${SETENV} ${CONFIGURE_ENV} /bin/sh ./configure - @cd ${WRKSRC}/tools/build/src/engine && \ + cd ${WRKSRC}/tools/build/src/engine && \ ${SETENV} CC="${CC}" CFLAGS="${CFLAGS}" /bin/sh ./build.sh cc && \ cp bin.openbsd*/b2 bin.openbsd*/bjam ${WRKSRC} - @cd ${WRKSRC} && chmod -R a+x ./ && \ - /bin/sh ./bootstrap.sh ${BOOTSTRAP} # b2 doesn't seem to respect python parameter, we need to run twice with -# separate python environments +# separate python environments. when we remove py2 support later, bootstrap +# can move back to the configure stage and avoid the build/rm/rebuild dance.. do-build: - export ${MAKE_ENV}; \ - cd ${WRKSRC} && chmod -R a+x ./ && \ - /bin/sh ./bootstrap.sh ${BOOTSTRAP} ${PY2_BOOTSTRAP} && \ - ./b2 ${BJAM_CONFIG} python=${MODPY_DEFAULT_VERSION_2} && \ - /bin/sh ./bootstrap.sh ${BOOTSTRAP} ${PY3_BOOTSTRAP} && \ - ./b2 ${BJAM_CONFIG} python=${MODPY_DEFAULT_VERSION_3}\ + # First run of bootstrap/b2, setup for py3 environment: + sed 's;\(using python.*PYTHON_ROOT\).*;\1 : ${PY3_INC} \;;' \ + < ${WRKSRC}/bootstrap.sh > ${WRKSRC}/bootstrap.sh.tmp + cd ${WRKSRC} && export ${MAKE_ENV} && \ + /bin/sh ./bootstrap.sh.tmp ${BOOTSTRAP} ${PY3_BOOTSTRAP} && \ + ./b2 ${BJAM_CONFIG} --with-python python=${MODPY_DEFAULT_VERSION_3} + # Stash py3 libs in temporary dir: + mkdir ${PY3_DIR} + mv ${WRKSRC}/stage/lib/lib*python3* ${PY3_DIR} + mv ${WRKSRC}/stage/lib/lib*numpy3* ${PY3_DIR} + # Remove py3 .o files to force python recompilation: + rm ${WRKSRC}/project-config.jam + find ${WRKSRC}/bin.v2/libs/python -name "*.o" -type f -delete + # Second run of bootstrap/b2, setup for py2 environment: + sed 's;\(using python.*PYTHON_ROOT\).*;\1 : ${PY2_INC} \;;' \ + < ${WRKSRC}/bootstrap.sh > ${WRKSRC}/bootstrap.sh.tmp + cd ${WRKSRC} && export ${MAKE_ENV} && \ + /bin/sh ./bootstrap.sh.tmp ${BOOTSTRAP} ${PY2_BOOTSTRAP} && \ + ./b2 ${BJAM_CONFIG} python=${MODPY_DEFAULT_VERSION_2} do-install: # Libs and includes: ${INSTALL_DATA} ${WRKSRC}/stage/lib/lib!(*.so) ${PREFIX}/lib - @cd ${WRKSRC} && \ + ${INSTALL_DATA} ${PY3_DIR}/lib!(*.so) ${PREFIX}/lib + cd ${WRKSRC} && \ find boost -type d -exec ${INSTALL_DATA_DIR} ${PREFIX}/include/{} \; - @cd ${WRKSRC} && \ + cd ${WRKSRC} && \ find boost ! -name \*.orig -type f -exec ${INSTALL_DATA} {} ${PREFIX}/include/{} \; # boost-build: ${INSTALL_PROGRAM} ${WRKSRC}/tools/build/src/engine/bin.*/{b2,bjam} \ ${PREFIX}/bin ${INSTALL_DATA_DIR} ${PREFIX}/share/boost-build - @cd ${WRKSRC}/tools/build/src && \ + cd ${WRKSRC}/tools/build/src && \ pax -r -w -p pm -s ':^./engine.*$$::' \ -s ':^.*\.orig$$::' . ${PREFIX}/share/boost-build ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/boost-build Index: patches/patch-libs_python_src_converter_builtin_converters_cpp =================================================================== RCS file: patches/patch-libs_python_src_converter_builtin_converters_cpp diff -N patches/patch-libs_python_src_converter_builtin_converters_cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-libs_python_src_converter_builtin_converters_cpp 29 Jan 2020 21:24:43 -0000 @@ -0,0 +1,31 @@ +$OpenBSD$ + +From 660487c43fde76f3e64f1cb2e644500da92fe582 Mon Sep 17 00:00:00 2001 +From: Bernhard Rosenkraenzer <b...@lindev.ch> +Date: Fri, 9 Feb 2018 18:20:30 +0100 +Subject: [PATCH] Fix build with Python 3.7 + +Python 3.7 changes the return type of _PyUnicode_AsString() +from void* to const char* -- causing the build of boost-python +to fail. + +Index: libs/python/src/converter/builtin_converters.cpp +--- libs/python/src/converter/builtin_converters.cpp.orig ++++ libs/python/src/converter/builtin_converters.cpp +@@ -45,10 +45,15 @@ namespace + { + return PyString_Check(obj) ? PyString_AsString(obj) : 0; + } +-#else ++#elif PY_VERSION_HEX < 0x03070000 + void* convert_to_cstring(PyObject* obj) + { + return PyUnicode_Check(obj) ? _PyUnicode_AsString(obj) : 0; ++ } ++#else ++ void* convert_to_cstring(PyObject* obj) ++ { ++ return PyUnicode_Check(obj) ? const_cast<void*>(reinterpret_cast<const void*>(_PyUnicode_AsString(obj))) : 0; + } + #endif + Index: pkg/PLIST-main =================================================================== RCS file: /cvs/ports/devel/boost/pkg/PLIST-main,v retrieving revision 1.7 diff -u -p -r1.7 PLIST-main --- pkg/PLIST-main 3 Jan 2019 07:29:58 -0000 1.7 +++ pkg/PLIST-main 29 Jan 2020 21:24:43 -0000 @@ -14036,129 +14036,133 @@ include/boost/xpressive/xpressive_dynami include/boost/xpressive/xpressive_fwd.hpp include/boost/xpressive/xpressive_static.hpp include/boost/xpressive/xpressive_typeof.hpp -lib/libboost_atomic-mt.a +@static-lib lib/libboost_atomic-mt.a @lib lib/libboost_atomic-mt.so.${LIBboost_atomic-mt_VERSION} -lib/libboost_chrono-mt.a +@static-lib lib/libboost_chrono-mt.a @lib lib/libboost_chrono-mt.so.${LIBboost_chrono-mt_VERSION} -lib/libboost_chrono.a +@static-lib lib/libboost_chrono.a @lib lib/libboost_chrono.so.${LIBboost_chrono_VERSION} -lib/libboost_container-mt.a +@static-lib lib/libboost_container-mt.a @lib lib/libboost_container-mt.so.${LIBboost_container-mt_VERSION} -lib/libboost_container.a +@static-lib lib/libboost_container.a @lib lib/libboost_container.so.${LIBboost_container_VERSION} -lib/libboost_date_time-mt.a +@static-lib lib/libboost_date_time-mt.a @lib lib/libboost_date_time-mt.so.${LIBboost_date_time-mt_VERSION} -lib/libboost_date_time.a +@static-lib lib/libboost_date_time.a @lib lib/libboost_date_time.so.${LIBboost_date_time_VERSION} -lib/libboost_exception-mt.a -lib/libboost_exception.a -lib/libboost_filesystem-mt.a +@static-lib lib/libboost_exception-mt.a +@static-lib lib/libboost_exception.a +@static-lib lib/libboost_filesystem-mt.a @lib lib/libboost_filesystem-mt.so.${LIBboost_filesystem-mt_VERSION} -lib/libboost_filesystem.a +@static-lib lib/libboost_filesystem.a @lib lib/libboost_filesystem.so.${LIBboost_filesystem_VERSION} -lib/libboost_graph-mt.a +@static-lib lib/libboost_graph-mt.a @lib lib/libboost_graph-mt.so.${LIBboost_graph-mt_VERSION} -lib/libboost_graph.a +@static-lib lib/libboost_graph.a @lib lib/libboost_graph.so.${LIBboost_graph_VERSION} -lib/libboost_iostreams-mt.a +@static-lib lib/libboost_iostreams-mt.a @lib lib/libboost_iostreams-mt.so.${LIBboost_iostreams-mt_VERSION} -lib/libboost_iostreams.a +@static-lib lib/libboost_iostreams.a @lib lib/libboost_iostreams.so.${LIBboost_iostreams_VERSION} -lib/libboost_locale-mt.a +@static-lib lib/libboost_locale-mt.a @lib lib/libboost_locale-mt.so.${LIBboost_locale-mt_VERSION} -lib/libboost_log-mt.a +@static-lib lib/libboost_log-mt.a @lib lib/libboost_log-mt.so.${LIBboost_log-mt_VERSION} -lib/libboost_log.a +@static-lib lib/libboost_log.a @lib lib/libboost_log.so.${LIBboost_log_VERSION} -lib/libboost_log_setup-mt.a +@static-lib lib/libboost_log_setup-mt.a @lib lib/libboost_log_setup-mt.so.${LIBboost_log_setup-mt_VERSION} -lib/libboost_log_setup.a +@static-lib lib/libboost_log_setup.a @lib lib/libboost_log_setup.so.${LIBboost_log_setup_VERSION} -lib/libboost_math_c99-mt.a +@static-lib lib/libboost_math_c99-mt.a @lib lib/libboost_math_c99-mt.so.${LIBboost_math_c99-mt_VERSION} -lib/libboost_math_c99.a +@static-lib lib/libboost_math_c99.a @lib lib/libboost_math_c99.so.${LIBboost_math_c99_VERSION} -lib/libboost_math_c99f-mt.a +@static-lib lib/libboost_math_c99f-mt.a @lib lib/libboost_math_c99f-mt.so.${LIBboost_math_c99f-mt_VERSION} -lib/libboost_math_c99f.a +@static-lib lib/libboost_math_c99f.a @lib lib/libboost_math_c99f.so.${LIBboost_math_c99f_VERSION} -lib/libboost_math_c99l-mt.a +@static-lib lib/libboost_math_c99l-mt.a @lib lib/libboost_math_c99l-mt.so.${LIBboost_math_c99l-mt_VERSION} -lib/libboost_math_c99l.a +@static-lib lib/libboost_math_c99l.a @lib lib/libboost_math_c99l.so.${LIBboost_math_c99l_VERSION} -lib/libboost_math_tr1-mt.a +@static-lib lib/libboost_math_tr1-mt.a @lib lib/libboost_math_tr1-mt.so.${LIBboost_math_tr1-mt_VERSION} -lib/libboost_math_tr1.a +@static-lib lib/libboost_math_tr1.a @lib lib/libboost_math_tr1.so.${LIBboost_math_tr1_VERSION} -lib/libboost_math_tr1f-mt.a +@static-lib lib/libboost_math_tr1f-mt.a @lib lib/libboost_math_tr1f-mt.so.${LIBboost_math_tr1f-mt_VERSION} -lib/libboost_math_tr1f.a +@static-lib lib/libboost_math_tr1f.a @lib lib/libboost_math_tr1f.so.${LIBboost_math_tr1f_VERSION} -lib/libboost_math_tr1l-mt.a +@static-lib lib/libboost_math_tr1l-mt.a @lib lib/libboost_math_tr1l-mt.so.${LIBboost_math_tr1l-mt_VERSION} -lib/libboost_math_tr1l.a +@static-lib lib/libboost_math_tr1l.a @lib lib/libboost_math_tr1l.so.${LIBboost_math_tr1l_VERSION} -lib/libboost_num${MODPY_PY_PREFIX}mt.a -@lib lib/libboost_num${MODPY_PY_PREFIX}mt.so.${LIBboost_numpy-mt_VERSION} -lib/libboost_numpy.a +@static-lib lib/libboost_num${MODPY_PY_PREFIX}mt.a +@lib lib/libboost_num${MODPY_PY_PREFIX}mt.so.${LIBboost_num${MODPY_PY_PREFIX}mt_VERSION} +@static-lib lib/libboost_numpy.a @lib lib/libboost_numpy.so.${LIBboost_numpy_VERSION} -lib/libboost_prg_exec_monitor-mt.a +@static-lib lib/libboost_numpy3-mt.a +@lib lib/libboost_numpy3-mt.so.${LIBboost_numpy3-mt_VERSION} +@static-lib lib/libboost_numpy3.a +@lib lib/libboost_numpy3.so.${LIBboost_numpy3_VERSION} +@static-lib lib/libboost_prg_exec_monitor-mt.a @lib lib/libboost_prg_exec_monitor-mt.so.${LIBboost_prg_exec_monitor-mt_VERSION} -lib/libboost_prg_exec_monitor.a +@static-lib lib/libboost_prg_exec_monitor.a @lib lib/libboost_prg_exec_monitor.so.${LIBboost_prg_exec_monitor_VERSION} -lib/libboost_program_options-mt.a +@static-lib lib/libboost_program_options-mt.a @lib lib/libboost_program_options-mt.so.${LIBboost_program_options-mt_VERSION} -lib/libboost_program_options.a +@static-lib lib/libboost_program_options.a @lib lib/libboost_program_options.so.${LIBboost_program_options_VERSION} -lib/libboost_python-mt.a +@static-lib lib/libboost_python-mt.a @lib lib/libboost_python-mt.so.${LIBboost_python-mt_VERSION} -lib/libboost_python.a +@static-lib lib/libboost_python.a @lib lib/libboost_python.so.${LIBboost_python_VERSION} -lib/libboost_python3-mt.a +@static-lib lib/libboost_python3-mt.a @lib lib/libboost_python3-mt.so.${LIBboost_python3-mt_VERSION} -lib/libboost_python3.a +@static-lib lib/libboost_python3.a @lib lib/libboost_python3.so.${LIBboost_python3_VERSION} -lib/libboost_random-mt.a +@static-lib lib/libboost_random-mt.a @lib lib/libboost_random-mt.so.${LIBboost_random-mt_VERSION} -lib/libboost_random.a +@static-lib lib/libboost_random.a @lib lib/libboost_random.so.${LIBboost_random_VERSION} -lib/libboost_regex-mt.a +@static-lib lib/libboost_regex-mt.a @lib lib/libboost_regex-mt.so.${LIBboost_regex-mt_VERSION} -lib/libboost_regex.a +@static-lib lib/libboost_regex.a @lib lib/libboost_regex.so.${LIBboost_regex_VERSION} -lib/libboost_serialization-mt.a +@static-lib lib/libboost_serialization-mt.a @lib lib/libboost_serialization-mt.so.${LIBboost_serialization-mt_VERSION} -lib/libboost_serialization.a +@static-lib lib/libboost_serialization.a @lib lib/libboost_serialization.so.${LIBboost_serialization_VERSION} -lib/libboost_signals-mt.a +@static-lib lib/libboost_signals-mt.a @lib lib/libboost_signals-mt.so.${LIBboost_signals-mt_VERSION} -lib/libboost_signals.a +@static-lib lib/libboost_signals.a @lib lib/libboost_signals.so.${LIBboost_signals_VERSION} -lib/libboost_system-mt.a +@static-lib lib/libboost_system-mt.a @lib lib/libboost_system-mt.so.${LIBboost_system-mt_VERSION} -lib/libboost_system.a +@static-lib lib/libboost_system.a @lib lib/libboost_system.so.${LIBboost_system_VERSION} -lib/libboost_test_exec_monitor-mt.a -lib/libboost_test_exec_monitor.a -lib/libboost_thread-mt.a +@static-lib lib/libboost_test_exec_monitor-mt.a +@static-lib lib/libboost_test_exec_monitor.a +@static-lib lib/libboost_thread-mt.a @lib lib/libboost_thread-mt.so.${LIBboost_thread-mt_VERSION} -lib/libboost_timer-mt.a +@static-lib lib/libboost_timer-mt.a @lib lib/libboost_timer-mt.so.${LIBboost_timer-mt_VERSION} -lib/libboost_timer.a +@static-lib lib/libboost_timer.a @lib lib/libboost_timer.so.${LIBboost_timer_VERSION} -lib/libboost_type_erasure-mt.a +@static-lib lib/libboost_type_erasure-mt.a @lib lib/libboost_type_erasure-mt.so.${LIBboost_type_erasure-mt_VERSION} -lib/libboost_type_erasure.a +@static-lib lib/libboost_type_erasure.a @lib lib/libboost_type_erasure.so.${LIBboost_type_erasure_VERSION} -lib/libboost_unit_test_framework-mt.a +@static-lib lib/libboost_unit_test_framework-mt.a @lib lib/libboost_unit_test_framework-mt.so.${LIBboost_unit_test_framework-mt_VERSION} -lib/libboost_unit_test_framework.a +@static-lib lib/libboost_unit_test_framework.a @lib lib/libboost_unit_test_framework.so.${LIBboost_unit_test_framework_VERSION} -lib/libboost_wave-mt.a +@static-lib lib/libboost_wave-mt.a @lib lib/libboost_wave-mt.so.${LIBboost_wave-mt_VERSION} -lib/libboost_wserialization-mt.a +@static-lib lib/libboost_wserialization-mt.a @lib lib/libboost_wserialization-mt.so.${LIBboost_wserialization-mt_VERSION} -lib/libboost_wserialization.a +@static-lib lib/libboost_wserialization.a @lib lib/libboost_wserialization.so.${LIBboost_wserialization_VERSION} share/boost-build/ share/boost-build/__init__.py Index: pkg/PLIST-md =================================================================== RCS file: /cvs/ports/devel/boost/pkg/PLIST-md,v retrieving revision 1.1 diff -u -p -r1.1 PLIST-md --- pkg/PLIST-md 13 Dec 2018 19:52:46 -0000 1.1 +++ pkg/PLIST-md 29 Jan 2020 21:24:43 -0000 @@ -1,21 +1,21 @@ @comment $OpenBSD: PLIST-md,v 1.1 2018/12/13 19:52:46 sthen Exp $ -lib/libboost_context-mt.a +@static-lib lib/libboost_context-mt.a @lib lib/libboost_context-mt.so.${LIBboost_context-mt_VERSION} -lib/libboost_coroutine-mt.a +@static-lib lib/libboost_coroutine-mt.a @lib lib/libboost_coroutine-mt.so.${LIBboost_coroutine-mt_VERSION} -lib/libboost_coroutine.a +@static-lib lib/libboost_coroutine.a @lib lib/libboost_coroutine.so.${LIBboost_coroutine_VERSION} -lib/libboost_fiber-mt.a +@static-lib lib/libboost_fiber-mt.a @lib lib/libboost_fiber-mt.so.${LIBboost_fiber-mt_VERSION} -lib/libboost_stacktrace_addr2line-mt.a +@static-lib lib/libboost_stacktrace_addr2line-mt.a @lib lib/libboost_stacktrace_addr2line-mt.so.${LIBboost_stacktrace_addr2line-mt_VERSION} -lib/libboost_stacktrace_addr2line.a +@static-lib lib/libboost_stacktrace_addr2line.a @lib lib/libboost_stacktrace_addr2line.so.${LIBboost_stacktrace_addr2line_VERSION} -lib/libboost_stacktrace_basic-mt.a +@static-lib lib/libboost_stacktrace_basic-mt.a @lib lib/libboost_stacktrace_basic-mt.so.${LIBboost_stacktrace_basic-mt_VERSION} -lib/libboost_stacktrace_basic.a +@static-lib lib/libboost_stacktrace_basic.a @lib lib/libboost_stacktrace_basic.so.${LIBboost_stacktrace_basic_VERSION} -lib/libboost_stacktrace_noop-mt.a +@static-lib lib/libboost_stacktrace_noop-mt.a @lib lib/libboost_stacktrace_noop-mt.so.${LIBboost_stacktrace_noop-mt_VERSION} -lib/libboost_stacktrace_noop.a +@static-lib lib/libboost_stacktrace_noop.a @lib lib/libboost_stacktrace_noop.so.${LIBboost_stacktrace_noop_VERSION}