From 12a32bc59a89b1a844f61e5e54f33f22846ffc5f Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Sat, 28 Mar 2020 14:28:56 +0100 Subject: [PATCH] python-3.7.6: Use array for BOOST_VERSION Store the variants of BOOST_VERSION in an array instead of in a space seperated string to avoid parsing it over and over. --- python-3.7.6-0.build.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/python-3.7.6-0.build.sh b/python-3.7.6-0.build.sh index 4713509..78ea19a 100755 --- a/python-3.7.6-0.build.sh +++ b/python-3.7.6-0.build.sh @@ -242,15 +242,15 @@ pip3 install --prefix=$PREFIX multiqc #boost for pycuda ( . ${PREFIX}/profile - BOOST_VERSION="1.72.0 1_72_0" - BOOST_SRC=https://dl.bintray.com/boostorg/release/$( echo $BOOST_VERSION | cut -d" " -f1 )/source/boost_$( echo $BOOST_VERSION | cut -d" " -f2 ).tar.gz + BOOST_VERSION=(1.72.0 1_72_0) + BOOST_SRC=https://dl.bintray.com/boostorg/release/${BOOST_VERSION[0]}/source/boost_${BOOST_VERSION[1]}.tar.gz PKGCFLAGS="-O2 -fPIC" cd $BUILDDIR - test -e boost_$( echo $BOOST_VERSION | cut -d" " -f2 ).tar.gz || wget $BOOST_SRC - test -d boost-$( echo $BOOST_VERSION | cut -d" " -f1 ) || mkdir boost-$( echo $BOOST_VERSION | cut -d" " -f1 ) && tar -xf boost_$( echo $BOOST_VERSION | cut -d" " -f2 ).tar.gz -C boost-$( echo $BOOST_VERSION | cut -d" " -f1 ) --strip-components=1 + test -e boost_${BOOST_VERSION[1]}.tar.gz || wget $BOOST_SRC + test -d boost-${BOOST_VERSION[0]} || mkdir boost-${BOOST_VERSION[0]} && tar -xf boost_${BOOST_VERSION[1]}.tar.gz -C boost-${BOOST_VERSION[0]} --strip-components=1 - cd boost-$( echo $BOOST_VERSION | cut -d" " -f1 ) + cd boost-${BOOST_VERSION[0]} sed -e "/using python/ s|;|: ${PREFIX}/include/python${PYTHONVER}m ;|" \ -i bootstrap.sh