Browse Source

Add boost

master
Ray Burgemeestre 5 years ago
parent
commit
2b4240d841
1 changed files with 35 additions and 0 deletions
  1. +35
    -0
      boost/Makefile

+ 35
- 0
boost/Makefile View File

@@ -0,0 +1,35 @@
SHELL:=/bin/bash

boost:
wget "https://dl.bintray.com/boostorg/release/1.68.0/source/boost_1_68_0.tar.bz2"
tar -xvf boost_1_68_0.tar.bz2
bash ../ubuntu1804.sh make impl
make package

impl:
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-7 40
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-7 40
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-7 40
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-7 40
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-7 40
pushd boost_1_68_0 && \
mkdir -p target && \
CXX=$$(which c++) ./bootstrap.sh --prefix=$$PWD/target/ --with-toolset=clang && \
./b2 clean && \
./b2 --prefix=/usr/local/src/starcry/boost_1_68_0/target/ toolset=clang cxxflags="-stdlib=libc++" linkflags="-stdlib=libc++" || true
# ^ ||true because with clang I saw a few libraries not compile correctly, we can ignore those.

package:
rm -rf out
mkdir -p out/opt/cppse/build/boost/include
cp -prv boost/boost_1_68_0/stage/lib out/opt/cppse/build/boost/
cp -prv boost/boost_1_68_0/boost/* out/opt/cppse/build/boost/include/
rm -rf boost_1.0_amd64.deb
docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:18.04 fpm -s dir -t deb -n boost --license MPL2 --maintainer "Ray Burgemeestre <ray@cppse.nl>" --description "boost - build dependency" --url "https://github.com/liballeg/boost.git" --deb-generate-changes -C /src/out

clean:
rm -rf boost_1_68_0
rm -rf out

shell:
FLAGS="-i --privileged" bash ../ubuntu1804.sh /bin/bash

Loading…
Cancel
Save