summaryrefslogtreecommitdiffstats
path: root/source/l/boost/boost.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/boost/boost.SlackBuild')
-rwxr-xr-xsource/l/boost/boost.SlackBuild69
1 files changed, 12 insertions, 57 deletions
diff --git a/source/l/boost/boost.SlackBuild b/source/l/boost/boost.SlackBuild
index 41e0ccbb8..a438ab808 100755
--- a/source/l/boost/boost.SlackBuild
+++ b/source/l/boost/boost.SlackBuild
@@ -2,7 +2,7 @@
# Copyright 2007, 2008, 2012 Eric Hameleers, Eindhoven, NL
# Copyright 2007-2008, 2013, 2014, 2017 Heinz Wiesinger, Amsterdam, NL
-# Copyright 2008, 2009, 2010, 2013, 2014, 2015, 2017, 2018, 2020 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2013, 2014, 2015, 2017, 2018, 2020, 2021, 2022, 2024 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -72,8 +72,7 @@ else
LIBDIRSUFFIX=""
fi
-PYTHON_VERSION=$(python -c 'import sys; print(sys.version[:3])')
-PYTHON3_VERSION=$(python3 -c 'import sys; print(sys.version[:3])')
+PYTHON3_VERSION=$(python3 -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))')
TMP=${TMP:-/tmp}
PKG=$TMP/package-boost
@@ -82,7 +81,8 @@ rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf boost_$VERSION
-tar xvf $CWD/boost_$VERSION.tar.?z || exit 1
+echo "Extracting $CWD/boost_$VERSION.tar.?z..."
+tar xf $CWD/boost_$VERSION.tar.?z || exit 1
cd boost_$VERSION || exit 1
chown -R root:root .
@@ -92,64 +92,19 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
-# First build bjam, the boost build system:
-./bootstrap.sh \
- --with-toolset=gcc \
- --with-icu \
- --with-python=/usr/bin/python2 || exit 1
-
-# # Next, we build boost using bjam
-./b2 \
- $NUMJOBS \
- --layout=system \
- --build-dir=build-python2 \
- --prefix=/usr \
- --libdir=/usr/lib$LIBDIRSUFFIX \
- --build-type=minimal \
- toolset=gcc \
- variant=release \
- debug-symbols=off \
- link=shared \
- threading=multi \
- runtime-link=shared \
- python=$PYTHON_VERSION \
- cflags="$SLKCFLAGS" \
- cxxflags="$SLKCFLAGS $EXTRA_CXXFLAGS" \
- stage || exit 1
-
-# # And then install boost..
-./b2 \
- $NUMJOBS \
- --layout=system \
- --build-dir=build-python2 \
- --prefix=$PKG/usr \
- --libdir=$PKG/usr/lib$LIBDIRSUFFIX \
- --build-type=minimal \
- toolset=gcc \
- variant=release \
- debug-symbols=off \
- link=shared \
- threading=multi \
- runtime-link=shared \
- python=$PYTHON_VERSION \
- cflags="$SLKCFLAGS" \
- cxxflags="$SLKCFLAGS $EXTRA_CXXFLAGS" \
- install || exit 1
-
-# one more run to build libboost_python3..
-sed -e '/using python/ s@;@: /usr/include/python${PYTHON_VERSION/3*/${PYTHON_VERSION}} ;@' \
- -i bootstrap.sh
+# Fix hardcorded python:
+zcat $CWD/boost.bootstrap.python3.diff.gz | patch -p1 --verbose || exit 1
+# First build bjam, the boost build system:
./bootstrap.sh \
--with-toolset=gcc \
- --with-icu \
- --with-python=/usr/bin/python3 \
- --with-libraries=python || exit 1
+ --with-python=/usr/bin/python3 || exit 1
+# Next, we build boost using bjam:
./b2 \
$NUMJOBS \
--layout=system \
- --build-dir=build-python3 \
+ --build-dir=tmp-build-directory \
--prefix=/usr \
--libdir=/usr/lib$LIBDIRSUFFIX \
--build-type=minimal \
@@ -164,10 +119,11 @@ sed -e '/using python/ s@;@: /usr/include/python${PYTHON_VERSION/3*/${PYTHON_VER
cxxflags="$SLKCFLAGS $EXTRA_CXXFLAGS" \
stage || exit 1
+# And then install boost:
./b2 \
$NUMJOBS \
--layout=system \
- --build-dir=build-python3 \
+ --build-dir=tmp-build-directory \
--prefix=$PKG/usr \
--libdir=$PKG/usr/lib$LIBDIRSUFFIX \
--build-type=minimal \
@@ -195,4 +151,3 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n /tmp/boost-$PKG_VERSION-$ARCH-$BUILD.txz
-