APP=boost
VERSION=1_69_0
BUILD=1sml
HOMEPAGE='https://www.boost.org/'
REQUIRES="bzip2 zlib findutils python3 icu xz"
DESC="Huge collection of free peer-reviewed portable C++ source libraries"

build() {
  mkandenterbuilddir
  rm -rf "$APP"_"$VERSION"

  tar xf $SRCDIR/"$APP"_"$VERSION".tar.?z*
  cd "$APP"_"$VERSION" 
  chown -R root.root .

  patch -p1 < $SRCDIR/boost-execinfo.patch

  unset CXX
  # Also symlink <toolchain>-gcc-6.3.0 to gcc-6.3.0 and <toolchain>-g++ to g++-6.3.0

  CC="$CC" \
  ./bootstrap.sh \
    --prefix="$PKG" \

  ./b2 -j3 toolset=gcc-foo -d+2 stage threading=multi link=shared || true
  ./b2 -j3 -d+2 install threading=multi link=shared || true

  cp LICENSE_1_0.txt $PKGDOCS/LICENSE

  mkfinalpkg
}

SHA512SUMS="
d0e9bb858c44880d56c0291afef6a1b011a62f659a2d8f58dcb6147ea0899f9157bd8db3097896618fee0116847ebeac78b6d0f0fec8a92c3469500828bbe552  boost_1_69_0.tar.bz2
16d8d072adb9073f240e3f7ff73591d3867681c4ba47f6f9f7d064e367b45a97e1f757ff01e489d0d834382670f9e9658755754d0e0dce62b08e6045c1f8605a  boost-execinfo.patch
"
