mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-12-29 21:32:22 +01:00
141 lines
3.5 KiB
Plaintext
141 lines
3.5 KiB
Plaintext
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
|
pkgname=boost
|
|
pkgver=1.62.0
|
|
_pkgver="${pkgver//./_}"
|
|
pkgrel=2
|
|
pkgdesc="Free peer-reviewed portable C++ source libraries"
|
|
url="http://www.boost.org/"
|
|
arch="all"
|
|
license="custom"
|
|
depends=""
|
|
depends_dev="linux-headers"
|
|
makedepends="$depends_dev python2-dev>=2.6 python3-dev flex bison bzip2-dev zlib-dev"
|
|
subpackages="$pkgname-dev $pkgname-doc"
|
|
source="http://downloads.sourceforge.net/$pkgname/${pkgname}_$_pkgver.tar.bz2
|
|
libressl.patch"
|
|
builddir="$srcdir/${pkgname}_${_pkgver}"
|
|
|
|
_libs="date_time
|
|
filesystem
|
|
graph
|
|
iostreams
|
|
math
|
|
prg_exec_monitor
|
|
program_options
|
|
python3
|
|
python
|
|
random
|
|
regex
|
|
serialization
|
|
signals
|
|
system
|
|
thread
|
|
unit_test_framework
|
|
wave
|
|
wserialization
|
|
"
|
|
for _lib in $_libs; do
|
|
subpackages="$subpackages $pkgname-$_lib:_boostlib"
|
|
done
|
|
|
|
prepare() {
|
|
default_prepare || return 1
|
|
|
|
cd "$builddir"
|
|
|
|
PY2_VERSION="$(_pyversion python2)"
|
|
PY3_VERSION="$(_pyversion python3)"
|
|
|
|
# create user-config.jam
|
|
cat > user-config.jam <<-__EOF__
|
|
|
|
using gcc : : $CC : <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;
|
|
using python : ${PY2_VERSION} : /usr/bin/python2 : /usr/include/python${PY2_VERSION} : /usr/lib ;
|
|
using python : ${PY3_VERSION} : /usr/bin/python3 : /usr/include/python${PY3_VERSION}m : /usr/lib ;
|
|
|
|
__EOF__
|
|
}
|
|
|
|
_options="--user-config=\"$builddir/user-config.jam\"
|
|
--prefix=\"$pkgdir/usr\"
|
|
release
|
|
debug-symbols=off
|
|
threading=single,multi
|
|
runtime-link=shared
|
|
link=shared,static
|
|
cflags=-fno-strict-aliasing
|
|
-sPYTHON_ROOT=/usr
|
|
-sPYTHON_VERSION=$PY2_VERSION
|
|
-sTOOLS=gcc
|
|
--layout=tagged
|
|
-q
|
|
-j${JOBS:-2}
|
|
"
|
|
|
|
case "$CARCH" in
|
|
armhf|aarch64) _boostarch=arm ;;
|
|
ppc64*) _boostarch=ppc ;;
|
|
*) _boostarch=$CARCH ;;
|
|
esac
|
|
_enginedir=tools/build/src/engine
|
|
|
|
build() {
|
|
export BOOST_ROOT="$builddir"
|
|
|
|
msg "Building bjam"
|
|
cd "$builddir"/$_enginedir
|
|
CC= ./build.sh cc || return 1
|
|
local _bjam="$PWD/bin.linux$_boostarch/bjam"
|
|
|
|
msg "Building bcp"
|
|
cd "$builddir"/tools/bcp
|
|
"$_bjam" -j${JOBS:-2} || return 1
|
|
|
|
msg "Building boost"
|
|
cd "$builddir"
|
|
"$_bjam" $_options
|
|
}
|
|
|
|
package() {
|
|
export BOOST_ROOT="$builddir"
|
|
cd "$builddir"
|
|
|
|
install -Dm755 $_enginedir/bin.linux${_boostarch}/bjam \
|
|
"$pkgdir"/usr/bin/bjam || return 1
|
|
|
|
install -Dm755 dist/bin/bcp "$pkgdir"/usr/bin/bcp || return 1
|
|
|
|
install -Dm644 LICENSE_1_0.txt \
|
|
"$pkgdir"/usr/share/licenses/$pkgname/LICENSE_1_0.txt || return 1
|
|
|
|
"$pkgdir"/usr/bin/bjam $_options \
|
|
--includedir="$pkgdir"/usr/include \
|
|
--libdir="$pkgdir"/usr/lib \
|
|
install || return 1
|
|
|
|
cd libs/python/pyste/install
|
|
python2 setup.py install --root="$pkgdir" || return 1
|
|
}
|
|
|
|
_boostlib() {
|
|
local name="${subpkgname#$pkgname-}"
|
|
pkgdesc="Boost $name library"
|
|
case "$name" in
|
|
python*) depends="$depends $name"
|
|
esac
|
|
|
|
mkdir -p "$subpkgdir"/usr/lib
|
|
mv "$pkgdir"/usr/lib/libboost_$name* "$subpkgdir"/usr/lib/
|
|
}
|
|
|
|
_pyversion() {
|
|
$1 -c 'import sys; print("%i.%i" % (sys.version_info.major, sys.version_info.minor))'
|
|
}
|
|
|
|
md5sums="21b799e5d35ba2beef75b225deaf199a boost_1_62_0.tar.bz2
|
|
b941ebae33e625fe0d08ff48502c11d0 libressl.patch"
|
|
sha256sums="a715dc2adff2d451719352b1e863d78cbb100a03f7ed76097c89b9016c59091e boost_1_62_0.tar.bz2
|
|
bb47222b596f0b3ef1b85470d29abac5f497295f4965dae4d207962d4e41e84f libressl.patch"
|
|
sha512sums="26f9bd25133e459e2e583cec7e0cbaf805de920a411dd1aa4e2b88091f6a6a9ea3642545da38fa3e7b8f44c336b8b909a4ce76db5502f7140fd62a1505e18e7c boost_1_62_0.tar.bz2
|
|
5804c344b5e5ece17811e744f1965c58840b6695a084dd09c23c9db380f3cbfbca201d6c595b5379bc12ff6f285794509799d28864df6037db6212c63adb2207 libressl.patch"
|