blob: ebaaad2407e2368e8f30522a65e50ad62977130c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
# Maintainer: NO1
pkgbase=boost1.69
pkgname=('boost1.69-libs' 'boost1.69')
pkgver=1.69.0
_boostver=${pkgver//./_}
pkgrel=13
pkgdesc='Free peer-reviewed portable C++ source libraries'
url='https://www.boost.org/'
arch=('i686' 'x86_64' 'aarch64' 'armv7h' 'armv6h')
license=('custom')
makedepends=('icu' 'python310' 'python-numpy' 'bzip2' 'zlib' 'openmpi' 'zstd' 'findutils')
source=(https://boostorg.jfrog.io/artifactory/main/release/${pkgver}/source/boost_${_boostver}.tar.bz2)
sha256sums=('8f32d4617390d1c2d16f26a27ab60d97807b35440d45891fa340fc2648b04406')
build() {
export _stagedir="${srcdir}/stagedir"
local JOBS="$(sed -e 's/.*\(-j *[0-9]\+\).*/\1/' <<< ${MAKEFLAGS})"
cd boost_${_boostver}
#Fix compatibility with python 3.10
sed -i '0,/_Py_fopen/s//fopen/' libs/python/src/exec.cpp
#Revert comparing unsigned to zero fix.
sed -i 's/#if PTHREAD_STACK_MIN > 0/#ifdef PTHREAD_STACK_MIN/g' boost/thread/pthread/thread_data.hpp
./bootstrap.sh \
--with-toolset=gcc \
--with-icu \
--with-python=/usr/bin/python3.10 \
_bindir="bin.linuxx86"
[[ "${CARCH}" = "x86_64" ]] && _bindir="bin.linuxx86_64"
install -Dm755 tools/build/src/engine/$_bindir/b2 "${_stagedir}"/bin/b2
# Support for OpenMPI
echo "using mpi ;" >> project-config.jam
# boostbook is needed by quickbook
install -dm755 "${_stagedir}"/share/boostbook
cp -a tools/boostbook/{xsl,dtd} "${_stagedir}"/share/boostbook/
# default "minimal" install: "release link=shared,static
# runtime-link=shared threading=single,multi"
# --layout=tagged will add the "-mt" suffix for multithreaded libraries
# and installs includes in /usr/include/boost.
# --layout=system no longer adds the -mt suffix for multi-threaded libs.
# install to ${_stagedir} in preparation for split packaging
"${_stagedir}"/bin/b2 \
variant=release \
debug-symbols=off \
threading=multi \
runtime-link=shared \
link=shared,static \
toolset=gcc \
python=3.10 \
cflags="${CPPFLAGS} ${CFLAGS} -fPIC -O3" \
cxxflags="${CPPFLAGS} ${CXXFLAGS} -std=c++14 -fPIC -O3" \
linkflags="${LDFLAGS}" \
--layout=system \
${JOBS} \
\
--prefix="${_stagedir}" \
install
}
package_boost1.69() {
pkgdesc+=' - development headers'
depends=("boost1.69-libs")
optdepends=('python: for python bindings')
options=('staticlibs')
install -dm755 "${pkgdir}"/opt/boost1.69
cp -a "${_stagedir}"/{bin,include,share} "${pkgdir}"/opt/boost1.69
install -d "${pkgdir}"/opt/boost1.69/lib
cp -a "${_stagedir}"/lib/*.a "${pkgdir}"/opt/boost1.69/lib/
install -Dm644 "${srcdir}/"boost_${_boostver}/LICENSE_1_0.txt \
"${pkgdir}"/opt/boost1.69/share/licenses/boost/LICENSE_1_0.txt
ln -s /opt/boost1.69/bin/b2 "$pkgdir"/opt/boost1.69/bin/bjam
}
package_boost1.69-libs() {
pkgdesc+=' - runtime libraries'
depends=('bzip2' 'zlib' 'icu' 'zstd')
optdepends=('openmpi: for mpi support')
install -dm755 "${pkgdir}"/opt/boost1.69
cp -a "${_stagedir}"/lib "${pkgdir}"/opt/boost1.69
rm "${pkgdir}"/opt/boost1.69/lib/*.a
# https://github.com/boostorg/python/issues/203#issuecomment-391477685
for _lib in python numpy; do
ln -srL "${pkgdir}"/opt/boost1.69/lib/libboost_${_lib}310.so
done
install -Dm644 "${srcdir}/"boost_${_boostver}/LICENSE_1_0.txt \
"${pkgdir}"/opt/boost1.69/share/licenses/boost-libs/LICENSE_1_0.txt
mkdir -p "${pkgdir}"/etc/ld.so.conf.d
echo "/opt/boost1.69/lib" > "${pkgdir}"/etc/ld.so.conf.d/boost1.69.conf
}
|