summaryrefslogtreecommitdiffstats
path: root/main/boost/APKBUILD
blob: db6f0c55052dc0e5d0184cfa3c31f91f1b0fc34a (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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=boost
pkgver=1.55.0

_x=${pkgver%%.*}	# strip .y.z
_y=${pkgver%.*}		# strip .z
_y=${_y#*.}		# strip x.
_z=${pkgver##*.}	# strip x.y.
_ver=${_x}_${_y}_${_z}

pkgrel=0
pkgdesc="Free peer-reviewed portable C++ source libraries"
url="http://www.boost.org/"
arch="all"
license="custom"
depends=
makedepends="python-dev>=2.6 flex bison bzip2-dev zlib-dev"
subpackages="$pkgname-dev $pkgname-doc
$pkgname-date_time
$pkgname-filesystem
$pkgname-graph
$pkgname-iostreams
$pkgname-math
$pkgname-prg_exec_monitor
$pkgname-program_options
$pkgname-python:py
$pkgname-random
$pkgname-regex
$pkgname-serialization
$pkgname-signals
$pkgname-system
$pkgname-thread
$pkgname-unit_test_framework
$pkgname-wave
$pkgname-wserialization
"
source="http://downloads.sourceforge.net/$pkgname/${pkgname}_$_ver.tar.gz
	stdint.patch
	"

_builddir="$srcdir"/${pkgname}_${_ver}
prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir/$i" || return 1;;
		esac
	done

	# create user-config.jam
	cat > user-config.jam <<__EOF__

using gcc : : $CC : <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;

__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=2.6
	-sTOOLS=gcc
	--layout=tagged
	-q
	-j${JOBS:-2}
"

_boostarch=${CARCH/armhf/arm}

build() {
	msg "Building bjam"
	export BOOST_ROOT="$_builddir"
	cd "$_builddir"/tools/build/v2/engine
	CC= ./build.sh cc || return 1
	_bindir="$PWD/bin.linux$_boostarch"
	_bjam="$_bindir"/bjam

	msg "Building bcp"
	cd "${_builddir}"/tools/bcp
	"${_bjam}" -j${JOBS:-2} || return 1

	msg "Building boost"
	cd "$_builddir"
	"${_bjam}" $_options
}

package() {
	cd "$_builddir"
	export BOOST_ROOT="$_builddir"
	local _bindir="$_builddir"/tools/build/v2/engine/bin.linux${_boostarch}
	install -m755 -d "$pkgdir"/usr/bin
	install -m755 ${_bindir}/bjam "$pkgdir"/usr/bin/bjam || return 1
	install -m755 "$srcdir"/${pkgname}_${_ver}/dist/bin/bcp \
		"$pkgdir"/usr/bin/bcp || return 1
	_bjam="$pkgdir"/usr/bin/bjam
	"${_bjam}" $_options \
		--includedir="$pkgdir"/usr/include \
		--libdir="$pkgdir"/usr/lib \
		install || return 1

	cd "$srcdir"/${pkgname}_${_ver}/libs/python/pyste/install
	python setup.py install --root="$pkgdir" || return 1
	install -m755 -d "$pkgdir"/usr/share/licenses/$pkgname
	install -m644 "$srcdir"/${pkgname}_${_ver}/LICENSE_1_0.txt \
		"$pkgdir"/usr/share/licenses/$pkgname/ || return 1
}

_mvlib() {
	pkgdesc="Boost $1 library"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libboost_$1* "$subpkgdir"/usr/lib/
}

date_time() { _mvlib date_time; }
filesystem() { _mvlib filesystem; }
graph() { _mvlib graph; }
iostreams() { _mvlib iostreams; }
math() { _mvlib math; }
prg_exec_monitor() { _mvlib prg_exec_monitor; }
program_options() { _mvlib program_options; }
py() { _mvlib python; }
random() { _mvlib random; }
regex() { _mvlib regex; }
serialization() { _mvlib serialization; }
signals() { _mvlib signals; }
system() { _mvlib system; }
thread() { _mvlib thread; }
unit_test_framework() { _mvlib unit_test_framework; }
wave() { _mvlib wave; }
wserialization() { _mvlib wserialization; }


md5sums="93780777cfbf999a600f62883bd54b17  boost_1_55_0.tar.gz
44d1879459159367448967a2c43c36d1  stdint.patch"
sha256sums="19c4305cd6669f2216260258802a7abc73c1624758294b2cad209d45cc13a767  boost_1_55_0.tar.gz
b48f6ba5ffbc04c88dedb6b6639d2870a8f0901693d762f5c8d2e912d8ab47a6  stdint.patch"
sha512sums="71a64f2ed495f639ace2aba2b0623d372edfe18ccbff5211ed56dce05a726b5d4eb7efd7fc77bfdf070131ffa3db764a90049c819f5c1b0bda287816a333367e  boost_1_55_0.tar.gz
b964488c9c74d89a55480b3a0078d4e7a19df91c9a7ba9ea2695142b54335191a3c0fbb004893c03b498bc270680403e1ba3681eb94ef4407a70f0727aa66c0a  stdint.patch"