-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy pathboost.yaml
More file actions
102 lines (94 loc) · 2.93 KB
/
boost.yaml
File metadata and controls
102 lines (94 loc) · 2.93 KB
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
extends: [base_package]
dependencies:
when platform == 'linux':
build: [bzip2, mpi, zlib, patchelf, {{build_with}}]
when platform != 'linux':
build: [bzip2, mpi, zlib, {{build_with}}]
sources:
- key: tar.bz2:tad2lulfm3cx7v2pwurhmtqlcnfixptl
url: http://downloads.sourceforge.net/boost/boost_1_65_1.tar.bz2
build_stages:
- name: bootstrap
after: prologue
handler: bash
bash: |
./bootstrap.sh --with-toolset={{toolset}} --prefix=${ARTIFACT}
- name: set-address_model
before: bjam
handler: bash
bash: |
address_model={{address_model}}
if [ -z ${address_model} ]; then
address_model=$(getconf LONG_BIT)
fi
- name: bjam
after: bootstrap
handler: bash
when platform != 'Cygwin':
bash: |
echo "using mpi ;" > user-config.jam
./bjam -q \
toolset={{toolset}} \
address-model=${address_model} \
-j ${HASHDIST_CPU_COUNT} \
--user-config=user-config.jam \
--build-dir=_build\
link=shared \
install \
-sNO_BZIP2=0 \
-sBZIP2_BINARY=bz2 \
-sBZIP2_INCLUDE=${BZIP2_DIR}/include \
-sBZIP2_LIBPATH=${BZIP2_DIR}/lib \
-sNO_ZLIB=0 \
-sZLIB_BINARY=z \
-sZLIB_INCLUDE=${ZLIB_DIR}/include \
-sZLIB_LIBPATH=${ZLIB_DIR}/lib
when platform == 'Cygwin':
bash: |
./bjam -q \
toolset={{toolset}} \
address-model=${address_model} \
-j ${HASHDIST_CPU_COUNT} \
--without-context \
--without-coroutine \
--without-mpi \
--without-python \
--build-dir=_build\
link=shared \
install \
-sNO_BZIP2=0 \
-sBZIP2_BINARY=bz2 \
-sBZIP2_INCLUDE=${BZIP2_DIR}/include \
-sBZIP2_LIBPATH=${BZIP2_DIR}/lib \
-sNO_ZLIB=0 \
-sZLIB_BINARY=z \
-sZLIB_INCLUDE=${ZLIB_DIR}/include \
-sZLIB_LIBPATH=${ZLIB_DIR}/lib
- when: platform == 'linux'
name: rpath_fix
after: bjam
handler: bash
bash: |
for lib in ${ARTIFACT}/lib/*.so.*; do
${PATCHELF} --set-rpath ${ARTIFACT}/lib:${BZIP2_DIR}/lib:${ZLIB_DIR}/lib ${lib}
done
- when: platform == 'Darwin'
name: rpath_fix
after: bjam
handler: bash
bash: |
for boostlib in ${ARTIFACT}/lib/libboost_*.dylib; do
install_name_tool -add_rpath @loader_path ${boostlib}
install_name_tool -id @rpath/$(basename ${boostlib}) ${boostlib}
otool -L ${boostlib} | while read line; do
set +e # do not fail on grep below
lib=$(echo $line | sed 's/\(libboost_.*\.dylib\).*/\1/' | grep ^libboost_)
set -e
if [ ! -z ${lib} ]; then
install_name_tool -change ${lib} @rpath/${lib} ${boostlib}
fi
done
done
when_build_dependency:
- set: BOOST_MULTITHREADED
value: "OFF"