Mercurial > vanilla
comparison lib/boost/boost.sh @ 696:f30dfd412657
lib/boost: initial import, closes #1103
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 01 Aug 2019 18:49:55 +0200 |
parents | |
children | a133976e0783 |
comparison
equal
deleted
inserted
replaced
695:3eaeab150bc4 | 696:f30dfd412657 |
---|---|
1 #!/bin/sh | |
2 # | |
3 # Copyright (c) 2019 David Demelier <markand@malikania.fr> | |
4 # | |
5 # Permission to use, copy, modify, and/or distribute this software for any | |
6 # purpose with or without fee is hereby granted, provided that the above | |
7 # copyright notice and this permission notice appear in all copies. | |
8 # | |
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
16 # | |
17 | |
18 PKGNAME=boost | |
19 PKGVERSION=1.70.0 | |
20 _VERSION=$(echo $PKGVERSION | tr "." "_") | |
21 PKGREVISION=1 | |
22 PKGLICENSE="peer-reviewed C++ libraries" | |
23 PKGSUMMARY="short summary" | |
24 PKGDOWNLOAD="https://dl.bintray.com/boostorg/release/$PKGVERSION/source/${PKGNAME}_$_VERSION.tar.gz" | |
25 PKGDEPENDS="" | |
26 PKGOPTIONS="ICU PYTHON" | |
27 | |
28 : ${CXX:=clang++} | |
29 : ${CXXFLAGS:=-O2} | |
30 : ${LDFLAGS:=} | |
31 : ${ICU:=yes} | |
32 : ${PYTHON:=yes} | |
33 | |
34 if [ -n "$CXXFLAGS" ]; then | |
35 with_cxxflags="cxxflags=\"$CXXFLAGS\"" | |
36 fi | |
37 | |
38 if [ -n "$LDFLAGS" ]; then | |
39 with_linkflags="linkflags=\"$LDFLAGS\"" | |
40 fi | |
41 | |
42 if [ "$ICU" = "yes" ]; then | |
43 PKGDEPENDS="lib/icu $PKGDEPENDS" | |
44 with_bootstrap_icu="--with-icu" | |
45 else | |
46 with_bootstrap_icu="--without-icu" | |
47 with_icu="--without-icu" | |
48 fi | |
49 | |
50 if [ "$PYTHON" = "yes" ]; then | |
51 PKGDEPENDS="python/python $PKGDEPENDS" | |
52 with_bootstrap_python="--with-python=/bin/python" | |
53 else | |
54 with_python="--without-python" | |
55 fi | |
56 | |
57 case "$CXX" in | |
58 "clang++") | |
59 with_toolset="clang" | |
60 ;; | |
61 "g++") | |
62 with_toolset="g++" | |
63 ;; | |
64 esac | |
65 | |
66 build() | |
67 { | |
68 rm -rf ${PKGNAME}_$_VERSION | |
69 tar xvf ${PKGNAME}_$_VERSION.tar.gz | |
70 cd ${PKGNAME}_$_VERSION | |
71 | |
72 touch user-config.jam | |
73 | |
74 if [ "$PYTHON" = "yes" ]; then | |
75 echo "using python : 3.7 : /bin/python : /include/python3.7m : : : : ;" >> user-config.jam | |
76 fi | |
77 | |
78 ./bootstrap.sh \ | |
79 --with-toolset=$with_toolset \ | |
80 $with_bootstrap_icu \ | |
81 $with_bootstrap_python | |
82 | |
83 # --layout=system: generate simple libraries names (no suffixes). | |
84 ./b2 \ | |
85 --user-config=user-config.jam \ | |
86 --layout=system \ | |
87 --prefix=$DESTDIR \ | |
88 link=shared \ | |
89 debug-symbols=off \ | |
90 runtime-link=shared \ | |
91 threading=multi \ | |
92 variant=release \ | |
93 toolset=$with_toolset \ | |
94 $with_cxxflags \ | |
95 $with_linkflags \ | |
96 $with_python \ | |
97 $with_icu \ | |
98 install | |
99 | |
100 cd .. | |
101 rm -rf ${PKGNAME}_$_VERSION | |
102 } |