diff --git a/boost-1.92.0-0.build.sh b/boost-1.92.0-0.build.sh new file mode 100755 index 0000000..6613e20 --- /dev/null +++ b/boost-1.92.0-0.build.sh @@ -0,0 +1,75 @@ +#! /bin/bash + +# COOKIE=$(mcookie|cut -c-8); grep -v V_GREP_ME $0 > /dev/shm/runme-$COOKIE.sh ; sleep 1; exec bash /dev/shm/runme-$COOKIE.sh +# TESTING=1 + +PKG=boost +VERSION=1.92.0 +VERSION_USCORED=1_92_0 +BUILD=0 +PYTHONPKG=python-3.14.6-2 + +PREFIX=/pkg/$PKG-$VERSION-$BUILD +if [ -n "$TESTING" ]; then PREFIX=/scratch/local2/$PKG-$VERSION-$BUILD ; fi + +PATH=/bin:/usr/bin:/usr/sbin:/usr/local/bin + +set -xe +umask 022 + +BUILD_TMPDIR=/scratch/local2/$PKG-$VERSION-$BUILD.build.tmp +test -d $BUILD_TMPDIR && ( chmod -R u+rwx $BUILD_TMPDIR || true ; rm -rf $BUILD_TMPDIR ) +mkdir -p $BUILD_TMPDIR/home +export TMPDIR=$BUILD_TMPDIR +export HOME=$BUILD_TMPDIR/home + +exec $PREFIX/profile <<-EOF + if [ -d $PREFIX/.compatlibs ]; then export LD_LIBRARY_PATH=$PREFIX/.compatlibs\${LD_LIBRARY_PATH:+:}\$LD_LIBRARY_PATH ; fi +EOF + +source $PREFIX/profile + +B2FLAGS="-j $(($(nproc)*4/5+1))" + +BUILDDIR=$PREFIX/build + +mkdir -p $BUILDDIR +cd $BUILDDIR + +# orig: https://archives.boost.io/release/1.92.0/source/boost_1_92_0.tar.gz +URL=https://beehive.molgen.mpg.de/7cd6dfc5bf3e8ef694808e5640411e5c/boost_1_92_0.tar.gz + +test -e boost_$VERSION_USCORED.tar.gz || wget --no-verbose $URL +# the md5 sum of the tarball is the path component of the beehive URL +echo "$(basename $(dirname $URL)) boost_$VERSION_USCORED.tar.gz" | md5sum -c - +test -d boost_$VERSION_USCORED || tar -xf boost_$VERSION_USCORED.tar.gz +cd boost_$VERSION_USCORED + +./bootstrap.sh \ + --prefix=${PREFIX} \ + --with-python=/pkg/$PYTHONPKG/bin/python3 + +./b2 \ + $B2FLAGS \ + --prefix=$PREFIX \ + --enable-shared \ + --without-mpi \ + install + +# someday I'll find out how to set LDFLAGS in boost +cd $PREFIX/lib +SOFOUND= +for SO in libboost_*.so.$VERSION ; do + test -e "$SO" || break + patchelf --set-rpath $PREFIX/lib "$SO" + SOFOUND=yes +done +if [ -z "$SOFOUND" ]; then + echo "$0: no libboost_*.so.$VERSION in $PREFIX/lib, rpath left unset" >&2 + exit 1 +fi + +exit