Skip to content

Commit

Permalink
boost: update to 1.87.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MehdiChinoune committed Dec 14, 2024
1 parent 2af1aa3 commit da4f4c3
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 31 deletions.
37 changes: 37 additions & 0 deletions mingw-w64-boost/0003-fix-build-context-with-CMake-on-arm64.patch
Original file line number Diff line number Diff line change
@@ -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()
17 changes: 0 additions & 17 deletions mingw-w64-boost/0011-support-numpy-2.patch

This file was deleted.

26 changes: 12 additions & 14 deletions mingw-w64-boost/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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() {
Expand All @@ -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() {
Expand All @@ -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
Expand All @@ -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

Expand All @@ -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}

Expand Down

0 comments on commit da4f4c3

Please sign in to comment.