diff --git a/mingw-w64-boost/0003-fix-build-context-with-CMake-on-arm64.patch b/mingw-w64-boost/0003-fix-build-context-with-CMake-on-arm64.patch new file mode 100644 index 0000000000000..5ee396ad20459 --- /dev/null +++ b/mingw-w64-boost/0003-fix-build-context-with-CMake-on-arm64.patch @@ -0,0 +1,37 @@ +--- a/libs/context/CMakeLists.txt ++++ b/libs/context/CMakeLists.txt +@@ -89,18 +89,21 @@ + else() + set(_default_asm masm) + endif() ++elseif( CMAKE_CXX_COMPILER_ID STREQUAL Clang AND BOOST_CONTEXT_ARCHITECTURE STREQUAL arm64 AND WIN32 ) ++ set(_default_asm armclang) + else() + set(_default_asm gas) + endif() + +-set(BOOST_CONTEXT_ASSEMBLER "${_default_asm}" CACHE STRING "Boost.Context assembler (masm, gas, armasm)") +-set_property(CACHE BOOST_CONTEXT_ASSEMBLER PROPERTY STRINGS masm gas armasm) ++set(BOOST_CONTEXT_ASSEMBLER "${_default_asm}" CACHE STRING "Boost.Context assembler (masm, gas, armasm, armclang)") ++set_property(CACHE BOOST_CONTEXT_ASSEMBLER PROPERTY STRINGS masm gas armasm armclang) + + unset(_default_asm) + + ## Assembler source suffix +- +-if(BOOST_CONTEXT_BINARY_FORMAT STREQUAL pe) ++if(BOOST_CONTEXT_ASSEMBLER STREQUAL armclang) ++ set(_default_ext .S) ++elseif(BOOST_CONTEXT_BINARY_FORMAT STREQUAL pe) + set(_default_ext .asm) + elseif(BOOST_CONTEXT_ASSEMBLER STREQUAL gas) + set(_default_ext .S) +@@ -135,7 +138,7 @@ + # Enable the right assembler + + if(BOOST_CONTEXT_IMPLEMENTATION STREQUAL "fcontext") +- if(BOOST_CONTEXT_ASSEMBLER STREQUAL gas) ++ if(BOOST_CONTEXT_ASSEMBLER STREQUAL gas OR BOOST_CONTEXT_ASSEMBLER STREQUAL armclang) + if(CMAKE_CXX_PLATFORM_ID MATCHES "Cygwin") + enable_language(ASM-ATT) + else() diff --git a/mingw-w64-boost/0011-support-numpy-2.patch b/mingw-w64-boost/0011-support-numpy-2.patch deleted file mode 100644 index f430637347cc2..0000000000000 --- a/mingw-w64-boost/0011-support-numpy-2.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/libs/python/src/numpy/dtype.cpp -+++ b/libs/python/src/numpy/dtype.cpp -@@ -98,7 +98,13 @@ - return python::detail::new_reference(reinterpret_cast(obj)); - } - --int dtype::get_itemsize() const { return reinterpret_cast(ptr())->elsize;} -+int dtype::get_itemsize() const { -+#if NPY_ABI_VERSION < 0x02000000 -+ return reinterpret_cast(ptr())->elsize; -+#else -+ return PyDataType_ELSIZE(reinterpret_cast(ptr())); -+#endif -+} - - bool equivalent(dtype const & a, dtype const & b) { - // On Windows x64, the behaviour described on diff --git a/mingw-w64-boost/PKGBUILD b/mingw-w64-boost/PKGBUILD index defbe5dc2cfa3..893d6be087919 100644 --- a/mingw-w64-boost/PKGBUILD +++ b/mingw-w64-boost/PKGBUILD @@ -4,8 +4,8 @@ _realname=boost pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}" "${MINGW_PACKAGE_PREFIX}-${_realname}-libs") -pkgver=1.86.0 -pkgrel=7 +pkgver=1.87.0 +pkgrel=1 pkgdesc="Free peer-reviewed portable C++ source libraries" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64') @@ -31,13 +31,13 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cc" source=(https://github.com/boostorg/boost/releases/download/boost-${pkgver}/boost-${pkgver}-cmake.tar.xz 0001-Fix-building-with-cmake-on-MINGW.patch 0002-No-Arch-in-library-name-tag.patch - boost-1.63.0-python-test-PyImport_AppendInittab.patch - 0011-support-numpy-2.patch) -sha256sums=('2c5ec5edcdff47ff55e27ed9560b0a0b94b07bd07ed9928b476150e16b0efc57' + 0003-fix-build-context-with-CMake-on-arm64.patch + boost-1.63.0-python-test-PyImport_AppendInittab.patch) +sha256sums=('7da75f171837577a52bbf217e17f8ea576c7c246e4594d617bfde7fafd408be5' 'abc6c78a252165df1de504d854d942eb486d88f06a6423d8b99dfec6ab138170' 'ee45d199c0e578a8d670ee6c6fa46466a53a02690c94f9221c67bbc9ab3387dc' - 'b22196b6415f5e1c0fe56b49a12ea7c20073b15a5f31907f363c7be38d70d628' - '61b1ad6c2ca16e9f99a4705a2526d2e9594f51e6e7df6f11d5f358b70e26dc01') + 'ac6f996db2d5e2e5870b1a2d26c3b7d022f09d5be94945451d90875e8d4ecda4' + 'b22196b6415f5e1c0fe56b49a12ea7c20073b15a5f31907f363c7be38d70d628') # Helper macros to help make tasks easier # apply_patch_with_msg() { @@ -58,7 +58,7 @@ prepare() { apply_patch_with_msg \ 0001-Fix-building-with-cmake-on-MINGW.patch \ 0002-No-Arch-in-library-name-tag.patch \ - 0011-support-numpy-2.patch + 0003-fix-build-context-with-CMake-on-arm64.patch } build() { @@ -69,12 +69,6 @@ build() { _extra_config+=("-DCMAKE_BUILD_TYPE=Debug") fi - if [[ "${CARCH}" == "aarch64" ]]; then - # boost context does not yet have an implementation for Windows ARM64 - # coroutine and fiber depend on context - _extra_config+=("-DBOOST_EXCLUDE_LIBRARIES='context;cobalt;log;process;coroutine;fiber'") - fi - if [[ "${CARCH}" != "i686" ]]; then _extra_config+=('-DBOOST_ENABLE_PYTHON=ON') fi @@ -86,7 +80,9 @@ build() { "${_extra_config[@]}" \ -DBUILD_SHARED_LIBS="OFF" \ -DBOOST_INSTALL_LAYOUT=tagged \ + -DBOOST_STACKTRACE_ENABLE_FROM_EXCEPTION=OFF \ -DPython_EXECUTABLE=${MINGW_PREFIX}/bin/python \ + -DBUILD_TESTING=OFF \ -S ${_realname}-${pkgver} \ -B build-${MSYSTEM}-static @@ -99,7 +95,9 @@ build() { "${_extra_config[@]}" \ -DBUILD_SHARED_LIBS="ON" \ -DBOOST_INSTALL_LAYOUT=tagged \ + -DBOOST_STACKTRACE_ENABLE_FROM_EXCEPTION=OFF \ -DPython_EXECUTABLE=${MINGW_PREFIX}/bin/python \ + -DBUILD_TESTING=OFF \ -S ${_realname}-${pkgver} \ -B build-${MSYSTEM}