-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #309 from mariux64/add-boost-1.86.0-0
boost: install version 1.86
- Loading branch information
Showing
1 changed file
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#! /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.86.0 | ||
VERSION_USCORED=1_86_0 | ||
BUILD=0 | ||
PYTHONPKG=python-3.11.7-1 | ||
|
||
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 </dev/null | ||
|
||
mkdir -p $PREFIX | ||
cat >$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.86.0/source/boost_1_86_0.tar.gz | ||
test -e boost_$VERSION_USCORED.tar.gz || wget --no-verbose https://beehive.molgen.mpg.de/ac857d73bb754b718a039830b07b9624/boost_1_86_0.tar.gz | ||
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 | ||
for SO in *$VERSION ; do | ||
patchelf --set-rpath $PREFIX/lib $SO | ||
done | ||
|
||
exit |