1+ #! /bin/bash
2+
3+ # Compile dependencies that cannot be acquired via the official repositories
4+
5+ mkdir -p ${INSTALL_PATH}
6+
7+ # # Compile Thrift
8+ CXXFLAGS_OLD=$CXXFLAGS
9+ LDFLAGS_OLD=$LDFLAGS
10+ export CXXFLAGS=" $CXXFLAGS -I/opt/homebrew/include"
11+ export LDFLAGS=" $LDFLAGS -L/opt/homebrew/lib"
12+ export CXXFLAGS=" $CXXFLAGS -Wno-error"
13+
14+ tar -xvf ${DOWNLOAD_PATH} /thrift-0.16.0.tar.gz
15+ cd thrift-0.16.0
16+ ./configure --prefix=${INSTALL_PATH} /thrift --silent --without-python \
17+ --enable-libtool-lock --enable-tutorial=no --enable-tests=no \
18+ --with-libevent --with-zlib --without-nodejs --without-lua \
19+ --without-ruby --without-csharp --without-erlang --without-perl \
20+ --without-php --without-php_extension --without-dart \
21+ --without-haskell --without-go --without-rs --without-haxe \
22+ --without-dotnetcore --without-d --without-qt4 --without-qt5 \
23+ --without-java --without-swift \
24+ --with-openssl=/opt/homebrew/opt/openssl
25+
26+ make install -j $( nproc)
27+
28+ export CXXFLAGS=$CXXFLAGS_OLD
29+ export LDFLAGS=$LDFLAGS_OLD
30+
31+ # # Compile build2
32+
33+ sh " ${DOWNLOAD_PATH} /install_latest_build2.sh" ${INSTALL_PATH} /build2
34+
35+ # # Compile libodb runtime libraries
36+ mkdir -p ${DOWNLOAD_PATH} /libodb
37+ cd ${DOWNLOAD_PATH} /libodb
38+ ${INSTALL_PATH} /build2/bin/bpkg create --quiet --jobs $( nproc) cc \
39+ config.cxx=g++ \
40+ config.cc.coptions=-O3 \
41+ config.bin.rpath=${INSTALL_PATH} /odb/lib \
42+ config.install.root=${INSTALL_PATH} /odb
43+
44+ # ## Getting the source
45+ ${INSTALL_PATH} /build2/bin/bpkg add https://pkg.cppget.org/1/beta --trust-yes
46+ ${INSTALL_PATH} /build2/bin/bpkg fetch --trust-yes
47+
48+ # ## Building ODB runtime library
49+ ${INSTALL_PATH} /build2/bin/bpkg build libodb --yes
50+ ${INSTALL_PATH} /build2/bin/bpkg build libodb-sqlite --yes
51+ ${INSTALL_PATH} /build2/bin/bpkg build libodb-pgsql --yes
52+ ${INSTALL_PATH} /build2/bin/bpkg install --all --recursive
53+
54+ # # Compile odb compiler
55+ mkdir -p ${DOWNLOAD_PATH} /odb
56+ cd ${DOWNLOAD_PATH} /odb
57+ bpkg create --quiet --jobs $( nproc) cc \
58+ config.cxx=g++-13 \
59+ config.cc.poptions=-I/opt/homebrew/include \
60+ config.cc.coptions=-O3 \
61+ config.bin.rpath=${INSTALL_PATH} /odb/lib \
62+ config.install.root=${INSTALL_PATH} /odb
63+
64+ # ## Getting the source
65+ bpkg add https://pkg.cppget.org/1/beta --trust-yes
66+ bpkg fetch --trust-yes
67+
68+ # ## Building ODB Compiler
69+ bpkg build odb --yes
70+ bpkg install odb
0 commit comments