boost/PKGBUILD

46 lines
1.5 KiB
Bash
Raw Permalink Normal View History

2024-05-03 10:56:57 +08:00
# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.
# Maintainer: Future Linux Team <future_linux@163.com>
pkgname=boost
2024-11-04 17:40:16 +08:00
pkgver=1.86.0
2024-05-03 10:56:57 +08:00
pkgrel=1
pkgdesc="Free peer-reviewed portable C++ source libraries"
arch=('x86_64')
url="https://www.boost.org"
2024-11-04 17:40:16 +08:00
license=('BSL-1.0')
2024-05-03 10:56:57 +08:00
depends=('icu' 'python' 'bzip2' 'zlib' 'zstd')
source=(https://github.com/boostorg/boost/releases/download/${pkgname}-${pkgver}/${pkgname}-${pkgver}-b2-nodocs.tar.xz)
2024-11-04 17:40:16 +08:00
sha256sums=(a4d99d032ab74c9c5e76eddcecc4489134282245fffa7e079c5804b92b45f51d)
2024-05-03 10:56:57 +08:00
build() {
2024-11-04 17:40:16 +08:00
cd ${pkgname}-${pkgver}
2024-05-03 10:56:57 +08:00
2024-11-04 17:40:16 +08:00
./bootstrap.sh \
--prefix=/usr \
--libdir=/usr/lib64 \
--with-python=python3 \
--with-icu \
--with-toolset=gcc \
--with-python-version="$(python3 -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')"
2024-05-03 10:56:57 +08:00
2024-11-04 17:40:16 +08:00
./b2 stage ${MAKEFLAGS} threading=multi link=shared runtime-link=shared toolset=gcc --cxxflags="${CXXFLAGS} ${LDFLAGS}"
2024-05-03 10:56:57 +08:00
}
package() {
2024-11-04 17:40:16 +08:00
cd ${pkgname}-${pkgver}
2024-05-03 10:56:57 +08:00
2024-11-04 17:40:16 +08:00
./b2 install \
threading=multi \
link=shared \
toolset=gcc \
runtime-link=shared \
cflags="${CPPFLAGS} ${CFLAGS} -fPIC -O3 -ffat-lto-objects" \
2024-05-03 10:56:57 +08:00
cxxflags="${CPPFLAGS} ${CXXFLAGS} -fPIC -O3 -ffat-lto-objects" \
linkflags="${LDFLAGS}" \
--prefix=${pkgdir}/usr \
--libdir=${pkgdir}/usr/lib64
}