summaryrefslogtreecommitdiff
path: root/user/boost
diff options
context:
space:
mode:
Diffstat (limited to 'user/boost')
-rw-r--r--user/boost/APKBUILD72
-rw-r--r--user/boost/boost-1.57.0-python-abi_letters.patch62
-rw-r--r--user/boost/boost-1.57.0-python-libpython_dep.patch13
-rw-r--r--user/boost/dual-python.patch27
-rw-r--r--user/boost/python-311-fix-enum.patch39
-rw-r--r--user/boost/python-311-fix-open.patch22
6 files changed, 101 insertions, 134 deletions
diff --git a/user/boost/APKBUILD b/user/boost/APKBUILD
index 31045eea4..9e8e7f9f0 100644
--- a/user/boost/APKBUILD
+++ b/user/boost/APKBUILD
@@ -1,29 +1,30 @@
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
-# Maintainer:
+# Maintainer: Zach van Rijn <me@zv.io>
pkgname=boost
-pkgver=1.69.0
+pkgver=1.79.0
_pkgver=$(printf '%s' "$pkgver" | tr . _)
-pkgrel=0
+pkgrel=1
pkgdesc="Free peer-reviewed portable C++ source libraries"
url="https://www.boost.org/"
arch="all"
license="BSL-1.0"
-options="!check" # No test suite.
depends=""
depends_dev="linux-headers"
makedepends="$depends_dev byacc bzip2-dev flex python3-dev xz-dev zlib-dev
zstd-dev"
subpackages="$pkgname-dev $pkgname-doc"
-source="http://downloads.sourceforge.net/$pkgname/${pkgname}_$_pkgver.tar.bz2
- boost-1.57.0-python-abi_letters.patch
- boost-1.57.0-python-libpython_dep.patch
+source="https://boostorg.jfrog.io/artifactory/main/release/${pkgver}/source/${pkgname}_${_pkgver}.tar.bz2
+ python-311-fix-enum.patch
+ python-311-fix-open.patch
"
+
builddir="$srcdir/${pkgname}_${_pkgver}"
_libs="
atomic
chrono
container
+ context
contract
coroutine
date_time
@@ -31,56 +32,57 @@ _libs="
filesystem
graph
iostreams
+ json
+ locale
+ log_setup
+ log
math
+ nowide
prg_exec_monitor
program_options
python3
random
regex
serialization
+ stacktrace_basic
+ stacktrace_noop
system
thread
+ timer
+ type_erasure
unit_test_framework
wave
wserialization
"
for _lib in $_libs; do
- subpackages="$subpackages $pkgname-$_lib:_boostlib"
+ subpackages="$subpackages $pkgname-${_lib}:_boostlib"
done
prepare() {
default_prepare
PY3_VERSION="$(_pyversion python3)"
- abiflags=$(python3-config --abiflags)
-
+ abiflags="$(python3-config --abiflags)"
# create user-config.jam
cat > user-config.jam <<-__EOF__
- using gcc : : $CC : <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;
- using python : ${PY3_VERSION} : /usr/bin/python3 : /usr/include/python${PY3_VERSION}m : : : : $abiflags ;
+ using gcc : : $CC : <cxxflags>"$CXXFLAGS" <linkflags>"$LDFLAGS" ;
+ using python : ${PY3_VERSION} : /usr/bin/python3 : /usr/include/python${PY3_VERSION}${abiflags} : "$(python3-config --libs)" : : $abiflags ;
__EOF__
}
case "$CARCH" in
- armhf|armv7|aarch64) _boostarch=arm ;;
- ppc64*) _boostarch=ppc ;;
- s390x) _boostarch=s390 ;;
- pmmx) _boostarch=x86 ;;
- *) _boostarch=$CARCH ;;
+ s390x)
+ _options_s390="--without-coroutine --without-coroutine2" ;;
esac
_enginedir=tools/build/src/engine
-_bjam="${builddir}/$_enginedir/bin.linux${_boostarch}/bjam"
-[ "$_boostarch" = "s390" ] && _bjam="${builddir}/$_enginedir/bin.linux390/bjam" && \
- _options_s390="--without-coroutine --without-coroutine2"
+_bjam="${builddir}/$_enginedir/bjam"
-# context is broken on at least s390 and sparc
_options="--user-config=\"$builddir/user-config.jam\"
--prefix=\"$pkgdir/usr\"
release
- debug-symbols=off
runtime-link=shared
link=shared,static
cflags=-fno-strict-aliasing
@@ -88,7 +90,7 @@ _options="--user-config=\"$builddir/user-config.jam\"
-sTOOLS=gcc
--layout=system
-q
- --without-context
+ --without-mpi
-j${JOBS:-2}
${_options_s390}
"
@@ -98,7 +100,7 @@ build() {
msg "Building bjam"
cd "$builddir"/$_enginedir
- CC= ./build.sh cc
+ CC= ./build.sh gcc
msg "Building bcp"
cd "$builddir"/tools/bcp
@@ -109,6 +111,12 @@ build() {
"$_bjam" $_options
}
+check() {
+ cd "$builddir"/tools/build/test
+
+ PATH="${_bjam%/*}:$PATH" python3 test_all.py --default-bjam
+}
+
package() {
export BOOST_ROOT="$builddir"
@@ -127,20 +135,20 @@ package() {
}
_boostlib() {
- local name="${subpkgname#$pkgname-}"
- pkgdesc="Boost $name library"
- case "$name" in
- python*) depends="$depends $name"
+ libname="${subpkgname#$pkgname-}"
+ pkgdesc="Boost library - $libname"
+ case "$subpkgname" in
+ boost-python3) depends="$depends python3"
esac
mkdir -p "$subpkgdir"/usr/lib
- mv "$pkgdir"/usr/lib/libboost_$name* "$subpkgdir"/usr/lib/
+ mv "$pkgdir"/usr/lib/libboost_$libname* "$subpkgdir"/usr/lib/
}
_pyversion() {
$1 -c 'import sys; print("%i.%i" % (sys.version_info.major, sys.version_info.minor))'
}
-sha512sums="d0e9bb858c44880d56c0291afef6a1b011a62f659a2d8f58dcb6147ea0899f9157bd8db3097896618fee0116847ebeac78b6d0f0fec8a92c3469500828bbe552 boost_1_69_0.tar.bz2
-d96d4d37394a31764ed817d0bc4a99cffa68a75ff1ecfd4417b9e1e5ae2c31a96ed24f948c6f2758ffdac01328d2402c4cf0d33a37107e4f5f721e636daebd66 boost-1.57.0-python-abi_letters.patch
-132c4b62815d605c2d3c9038427fa4f422612a33711d47b2862f2311516af8a371d6b75bf078a7bffe20be863f8d21fb9fe74dc1a1bac3a10d061e9768ec3e02 boost-1.57.0-python-libpython_dep.patch"
+sha512sums="70909e0561c213d10a1fdd692f9ae7b293d3cdc63e925bdc207da9e9bba6e86474341100e7ee5de6d94f9561196b1a3a1597055a7b7382babf8931131170a312 boost_1_79_0.tar.bz2
+04b9bcbd37cf660450aa4ff27b32db514d669caa378a25158d6d1e71ef0b42ea097e9dfda01774fbe80487db0f80d809d10b42e5ebc464f9faff02379bead98d python-311-fix-enum.patch
+4b517dc36719e4e4666d32822a65e650496f9ec534232ae96500538bf8182ce72e08bda3786a598330babda1bc169afa9b38fbc9d5a63d2dc633c03ba428a060 python-311-fix-open.patch"
diff --git a/user/boost/boost-1.57.0-python-abi_letters.patch b/user/boost/boost-1.57.0-python-abi_letters.patch
deleted file mode 100644
index 7df3ee704..000000000
--- a/user/boost/boost-1.57.0-python-abi_letters.patch
+++ /dev/null
@@ -1,62 +0,0 @@
---- boost_1_57_0/tools/build/src/tools/python.jam 2013-05-21 06:14:18.000000000 +0200
-+++ boost_1_55_0/tools/build/src/tools/python.jam 2014-05-29 19:09:12.115413877 +0200
-@@ -94,7 +94,7 @@ feature.feature pythonpath : : free opti
- # using python : 2.3 : /usr/local/bin/python ;
- #
- rule init ( version ? : cmd-or-prefix ? : includes * : libraries ?
-- : condition * : extension-suffix ? )
-+ : condition * : extension-suffix ? : abi-letters ? )
- {
- project.push-current $(.project) ;
-
-@@ -107,7 +107,7 @@ rule init ( version ? : cmd-or-prefix ?
- }
- }
-
-- configure $(version) : $(cmd-or-prefix) : $(includes) : $(libraries) : $(condition) : $(extension-suffix) ;
-+ configure $(version) : $(cmd-or-prefix) : $(includes) : $(libraries) : $(condition) : $(extension-suffix) : $(abi-letters) ;
-
- project.pop-current ;
- }
-@@ -653,7 +653,7 @@ local rule system-library-dependencies (
-
- # Declare a target to represent Python's library.
- #
--local rule declare-libpython-target ( version ? : requirements * )
-+local rule declare-libpython-target ( version ? : requirements * : abi-letters ? )
- {
- # Compute the representation of Python version in the name of Python's
- # library file.
-@@ -677,13 +677,13 @@ local rule declare-libpython-target ( ve
- }
-
- # Declare it.
-- lib python.lib : : <name>python$(lib-version) $(requirements) ;
-+ lib python.lib : : <name>python$(lib-version)$(abi-letters) $(requirements) ;
- }
-
-
- # Implementation of init.
- local rule configure ( version ? : cmd-or-prefix ? : includes * : libraries ? :
-- condition * : extension-suffix ? )
-+ condition * : extension-suffix ? : abi-letters ? )
- {
- local prefix ;
- local exec-prefix ;
-@@ -699,6 +699,7 @@ local rule configure ( version ? : cmd-o
- extension-suffix ?= _d ;
- }
- extension-suffix ?= "" ;
-+ abi-letters ?= "" ;
-
- # Normalize and dissect any version number.
- local major-minor ;
-@@ -922,7 +923,7 @@ local rule configure ( version ? : cmd-o
- }
- else
- {
-- declare-libpython-target $(version) : $(target-requirements) ;
-+ declare-libpython-target $(version) : $(target-requirements) : $(abi-letters) ;
-
- # This is an evil hack. On, Windows, when Python is embedded, nothing
- # seems to set up sys.path to include Python's standard library
diff --git a/user/boost/boost-1.57.0-python-libpython_dep.patch b/user/boost/boost-1.57.0-python-libpython_dep.patch
deleted file mode 100644
index 57bfc2677..000000000
--- a/user/boost/boost-1.57.0-python-libpython_dep.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: boost_1_57_0/tools/build/src/tools/python.jam
-===================================================================
---- boost_1_57_0/tools/build/src/tools/python.jam (revision 50406)
-+++ boost_1_57_0/tools/build/src/tools/python.jam (working copy)
-@@ -994,7 +994,7 @@
- else
- {
- alias python_for_extensions
-- :
-+ : python
- : $(target-requirements)
- :
- : $(usage-requirements)
diff --git a/user/boost/dual-python.patch b/user/boost/dual-python.patch
deleted file mode 100644
index 6a0647888..000000000
--- a/user/boost/dual-python.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff --git a/tools/build/src/tools/python.jam b/tools/build/src/tools/python.jam
-index cbd6419..0c29df6 100644
---- a/tools/build/src/tools/python.jam
-+++ b/tools/build/src/tools/python.jam
-@@ -907,14 +907,14 @@ local rule configure ( version ? : cmd-or-prefix ? : includes * : libraries ? :
- # for a particular target OS as the default. This makes it so that we can
- # select a python interpreter with only knowledge of the target OS. And hence
- # can configure different Pythons based on the target OS only.
-- local toolset-requirements = [ toolset.requirements ] ;
-- local toolset-target-os-requirements
-- = [ property.evaluate-conditionals-in-context
-- [ $(toolset-requirements).raw ] : <target-os>$(target-os) ] ;
-- if ! <python> in $(toolset-target-os-requirements:G)
-- {
-- toolset.add-requirements <target-os>$(target-os):<python>$(version:E=default) ;
-- }
-+# local toolset-requirements = [ toolset.requirements ] ;
-+# local toolset-target-os-requirements
-+# = [ property.evaluate-conditionals-in-context
-+# [ $(toolset-requirements).raw ] : <target-os>$(target-os) ] ;
-+# if ! <python> in $(toolset-target-os-requirements:G)
-+# {
-+# toolset.add-requirements <target-os>$(target-os):<python>$(version:E=default) ;
-+# }
-
- # Register the right suffix for extensions.
- register-extension-suffix $(extension-suffix) : $(target-requirements) ;
diff --git a/user/boost/python-311-fix-enum.patch b/user/boost/python-311-fix-enum.patch
new file mode 100644
index 000000000..02e0cf2c7
--- /dev/null
+++ b/user/boost/python-311-fix-enum.patch
@@ -0,0 +1,39 @@
+https://github.com/boostorg/python/pull/385
+
+Patch modified to include 'libs/python/' prefix.
+
+From ae5da2a7e8f1111757d8a474095486a5b22aa12d Mon Sep 17 00:00:00 2001
+From: Victor Stinner <vstinner@python.org>
+Date: Mon, 25 Apr 2022 10:51:46 +0200
+Subject: [PATCH] Fix enum_type_object type on Python 3.11
+
+The enum_type_object type inherits from PyLong_Type which is not tracked
+by the GC. Instances doesn't have to be tracked by the GC: remove the
+Py_TPFLAGS_HAVE_GC flag.
+
+The Python C API documentation says:
+
+ "To create a container type, the tp_flags field of the type object
+ must include the Py_TPFLAGS_HAVE_GC and provide an implementation of
+ the tp_traverse handler."
+
+https://docs.python.org/dev/c-api/gcsupport.html
+
+The new exception was introduced in Python 3.11 by:
+https://github.com/python/cpython/issues/88429
+---
+ src/object/enum.cpp | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/src/object/enum.cpp b/src/object/enum.cpp
+index 293e705899..5753b32e07 100644
+--- a/libs/python/src/object/enum.cpp
++++ b/libs/python/src/object/enum.cpp
+@@ -113,7 +113,6 @@ static PyTypeObject enum_type_object = {
+ #if PY_VERSION_HEX < 0x03000000
+ | Py_TPFLAGS_CHECKTYPES
+ #endif
+- | Py_TPFLAGS_HAVE_GC
+ | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /* tp_doc */
+ 0, /* tp_traverse */
diff --git a/user/boost/python-311-fix-open.patch b/user/boost/python-311-fix-open.patch
new file mode 100644
index 000000000..4d238d3a2
--- /dev/null
+++ b/user/boost/python-311-fix-open.patch
@@ -0,0 +1,22 @@
+https://docs.python.org/3/whatsnew/3.11.html#porting-to-python-3-11
+
+open(), io.open(), codecs.open() and fileinput.FileInput no
+longer accept 'U' (“universal newline”) in the file mode.
+
+In Python 3, “universal newline” mode is used by default
+whenever a file is opened in text mode, and the 'U' flag
+has been deprecated since Python 3.3. The newline parameter
+to these functions controls how universal newlines work.
+
+diff -ur a/tools/build/test/BoostBuild.py b/tools/build/test/BoostBuild.py
+--- a/tools/build/test/BoostBuild.py 2022-11-27 10:51:49.323319793 -0600
++++ b/tools/build/test/BoostBuild.py 2022-11-27 10:52:31.636168392 -0600
+@@ -579,8 +579,6 @@
+ openMode = "r"
+ if binary:
+ openMode += "b"
+- else:
+- openMode += "U"
+ f = open(name, openMode)
+ result = f.read()
+ f.close()