UmVirt LFS Package info

DB commit: c78e95157185199cceff370fa5b5f1dd2a1be2fa
APP commit: cac3f2066a9a05955b29d720b9b9b14f534d21c2

libboost

Boost provides a set of free peer-reviewed portable C++ source libraries. It includes libraries for linear algebra, pseudorandom number generation, multithreading, image processing, regular expressions and unit testing.

Package info

Codename: libboost
Source file: boost_1_72_0.tar.bz2
Source directory: boost_1_72_0
Package URL: https://umvirt.com/linux/downloads/0.1/packages/b/boost_1_72_0.tar.bz2
Package md5-checksum URL: https://umvirt.com/linux/downloads/0.1/packages/b/boost_1_72_0.tar.bz2.md5sum
Dependances: python3, python2, which, icu, python3-numpy, zstd.
Dependance of: alembic, openvdb, FreeCAD, clucene, openshadinglanguage, inkscape, blender, libreoffice.
Patches: *** NO PATCHES FOUND ***
Addons: *** NO ADDONS FOUND ***
Nestings *** NO NESTINGS FOUND ***
Configuration script:
#

Build script:
#LFS BUGFIX: 3.7m in /usr/include not 3.7.
ln -s /usr/include/python3.7m /usr/include/python3.7

mkdir stagedir

./bootstrap.sh --with-toolset=gcc --with-icu --with-python=/usr/bin/python2

   install -Dm755 tools/build/src/engine/b2 stagedir/bin/b2

   # Support for OpenMPI
   echo "using mpi ;" >> project-config.jam

   # boostbook is needed by quickbook
   install -dm755 stagedir/share/boostbook
   cp -a tools/boostbook/{xsl,dtd} stagedir/share/boostbook/

   # default "minimal" install: "release link=shared,static
   # runtime-link=shared threading=single,multi"
   # --layout=tagged will add the "-mt" suffix for multithreaded libraries
   # and installs includes in /usr/include/boost.
   # --layout=system no longer adds the -mt suffix for multi-threaded libs.
   # install to ${_stagedir} in preparation for split packaging
   stagedir/bin/b2 \
      variant=release \
      debug-symbols=off \
      threading=multi \
      runtime-link=shared \
      link=shared,static \
      toolset=gcc \
      python=2.7 \
      cflags="${CPPFLAGS} ${CFLAGS} -fPIC -O3" \
      cxxflags="${CPPFLAGS} ${CXXFLAGS} -std=c++14 -fPIC -O3" \
      \
      --layout=system \
      \
      \
      --prefix="$(pwd)/stagedir" \
      install

   # because b2 in boost 1.62.0 doesn't seem to respect python parameter, we
   # need another run for liboost_python3.so

   ./bootstrap.sh \
     --with-toolset=gcc \
     --with-icu \
     --with-python=/usr/bin/python3 \
     --with-libraries=python

   stagedir/bin/b2 clean
   stagedir/bin/b2 \
      variant=release \
      debug-symbols=off \
      threading=multi \
      runtime-link=shared \
      link=shared,static \
      toolset=gcc \
      python=3.7 \
      cflags="${CPPFLAGS} ${CFLAGS} -fPIC -O3" \
      cxxflags="${CPPFLAGS} ${CXXFLAGS} -std=c++14 -fPIC -O3" \
      \
      --layout=system \
      \
      \
      --prefix="$(pwd)/stagedir/python3" \
      --with-python \
      install

Install script:
#boost
cp -a stagedir/{bin,include,share} /usr
cp -a stagedir/lib/*.a /usr/lib/
cp -a stagedir/lib/cmake /usr/lib/

install -Dm644 stagedir/python3/lib/libboost_*.a /usr/lib/
cp -a stagedir/python3/lib/cmake/* /usr/lib/cmake/
ln -s /usr/bin/b2 /usr/bin/bjam

#boostlib
cp -a stagedir/lib /usr
cp -a stagedir/python3/lib/libboost_* /usr/lib

# https://github.com/boostorg/python/issues/203#issuecomment-391477685
  for _lib in python numpy; do
     ln -srL /usr/lib/libboost_\${_lib}{27,}.so
     ln -srL /usr/lib/libboost_\${_lib}3{7,}.so
   done


Comments:

  1. Updated version. Instructions from Arch Linux
  2. Bugfix: Symlink to fix python3.7 support error