diff options
author | Eric Hameleers <alien@slackware.com> | 2009-05-14 19:34:24 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2009-05-14 19:34:24 +0000 |
commit | 0dd3b754f1e56b3ec4ac39232229b0ee2b57719e (patch) | |
tree | fcd524eaec8a426999c5dada683a61b325ece89f /boost | |
parent | 36d7eda61bad2434e39979e2b48d6e75971d614b (diff) | |
download | asb-0dd3b754f1e56b3ec4ac39232229b0ee2b57719e.tar.gz asb-0dd3b754f1e56b3ec4ac39232229b0ee2b57719e.tar.xz |
Updated to 1.38.0
Diffstat (limited to 'boost')
-rwxr-xr-x | boost/build/boost.SlackBuild | 109 |
1 files changed, 49 insertions, 60 deletions
diff --git a/boost/build/boost.SlackBuild b/boost/build/boost.SlackBuild index ecdf9a1f..0f843292 100755 --- a/boost/build/boost.SlackBuild +++ b/boost/build/boost.SlackBuild @@ -41,8 +41,10 @@ # No longer add the bjam binary to the package. # 1.35.0-1: 09/may/2008 by Eric Hameleers <alien@slackware.com> # * Update. +# 1.38.0-1: 14/may/2009 by Eric Hameleers <alien@slackware.com> +# * Update. # -# Run 'sh boost.SlackBuild --cleanup' to build a Slackware package. +# Run 'sh boost.SlackBuild' to build a Slackware package. # The package (.tgz) plus descriptive .txt file are created in /tmp . # Install using 'installpkg'. # @@ -51,10 +53,11 @@ # Set initial variables: PRGNAM=boost -VERSION=${VERSION:-1.35.0} +VERSION=${VERSION:-1.38.0} SRCVER=$(echo ${VERSION} | tr '.' '_') ARCH=${ARCH:-i486} BUILD=${BUILD:-1} +NUMJOBS=${NUMJOBS:-" -j4 "} TAG=${TAG:-alien} # This is the python we build against: @@ -85,21 +88,8 @@ trap 'echo "$0 FAILED at line $LINENO!" | tee $OUTPUT/error-${PRGNAM}.log' ERR set -u P1=${1:-1} -# Parallel compilation support: -JOBS=${JOBS:-3} - -# Slackware 11 and up need other option (gcc > 3.3.x) -if [ $(gcc -dumpversion | tr -d '.' |cut -c 1-2) -gt 33 ]; then - MOPT=tune -else - MOPT=cpu -fi - case "$ARCH" in - i386) SLKCFLAGS="-O2 -march=i386 -m${MOPT}=i686" - SLKLDFLAGS=""; LIBDIRSUFFIX="" - ;; - i486) SLKCFLAGS="-O2 -march=i486 -m${MOPT}=i686" + i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686" SLKLDFLAGS=""; LIBDIRSUFFIX="" ;; s390) SLKCFLAGS="-O2" @@ -155,11 +145,7 @@ echo "++" cd $TMP/tmp-$PRGNAM echo "Extracting the source archive(s) for $PRGNAM..." -if $(file ${SOURCE} | grep -q ": bzip2"); then - tar -xjvf ${SOURCE} -elif $(file ${SOURCE} | grep -q ": gzip"); then - tar -xzvf ${SOURCE} -fi +tar -xvf ${SOURCE} mv ${PRGNAM}_${SRCVER} ${PRGNAM}-${VERSION} cd ${PRGNAM}-${VERSION} chown -R root:root . @@ -170,55 +156,72 @@ export LDFLAGS="$SLKLDFLAGS" export CFLAGS="$SLKCFLAGS" export CXXFLAGS="$SLKCFLAGS" +# Apply Hotfixes from: +# http://svn.boost.org/trac/boost/wiki/ReleasePractices/HotFixes +# +# (none currently for this $VERSION) + # First build bjam, the boost build system: -( cd tools/jam/src - # Was different prior to Slackware 12.1: - #gcc ./build.sh gcc \ - CFLAGS="$SLKCFLAGS -fno-strict-aliasing" CC=gcc ./build.sh cc \ - 2>&1 | tee $OUTPUT/make-${PRGNAM}.log -) || exit $? +cd tools/jam/src +CFLAGS="$SLKCFLAGS -fno-strict-aliasing" CC=gcc ./build.sh cc \ + 2>&1 | tee $OUTPUT/make-${PRGNAM}.log +cd - BJAM=$(find tools/jam/src/ -name bjam -a -type f) # Create build subdirectory mkdir obj +# Change the build options from 'minimal' to what we want, since adding +# "-sBUILD=<optimization>speed <inlining>full <threading>single/multi +# <link>shared <runtime-link>shared" to $BJAM command no longer seems to work. +FLAGS="<threading>multi <threading>single <optimization>speed <inlining>full" +sed -i "s/ <threading>multi/ $FLAGS/" Jamroot +# Disable static libraries ( the only software that *requires* the static libs, +# is Microsoft's CW compiler (CW or Comega is an experimental language which +# extends C# ) +sed -i "s/<link>shared <link>static/<link>shared/" Jamroot + # Next, we build boost using bjam echo "Building boost now..." $BJAM \ release \ - "-sBUILD=<optimization>speed <inlining>full <threading>single/multi <link>shared <runtime-link>shared" \ - "-sNO_COMPRESSION=0" "-sZLIB_INCLUDE=/usr/include" "-sZLIB_LIBPATH=/usr/lib" \ - "-sBZIP2_INCLUDE=/usr/include" "-sBZIP2_LIBPATH=/usr/lib" \ - "-sEXPAT_INCLUDE=/usr/include" "-sEXPAT_LIBPATH=/usr/lib" \ - --toolset=gcc --layout=system --builddir=obj \ + "-sNO_COMPRESSION=0" \ + "-sZLIB_INCLUDE=/usr/include" \ + "-sZLIB_LIBPATH=/usr/lib${LIBDIRSUFFIX}" \ + "-sBZIP2_INCLUDE=/usr/include" \ + "-sBZIP2_LIBPATH=/usr/lib${LIBDIRSUFFIX}" \ + "-sEXPAT_INCLUDE=/usr/include" \ + "-sEXPAT_LIBPATH=/usr/lib${LIBDIRSUFFIX}" \ + --toolset=gcc \ + --layout=system \ + --builddir=obj \ --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --build-type=minimal \ $PYTHON_FLAGS \ stage \ -j${JOBS} \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}.log # And then install boost.. -mkdir -p $PKG/usr/{lib,include} +mkdir -p $PKG/usr/{lib${LIBDIRSUFFIX},include} echo "Installing boost now..." $BJAM \ release \ - --toolset=gcc --layout=system --builddir=obj \ + "-sEXPAT_INCLUDE=/usr/include" \ + "-sEXPAT_LIBPATH=/usr/lib${LIBDIRSUFFIX}" \ + --toolset=gcc \ + --layout=system \ + --builddir=obj \ --prefix=$PKG/usr \ - "-sEXPAT_INCLUDE=/usr/include" "-sEXPAT_LIBPATH=/usr/lib" \ + --libdir=$PKG/usr/lib${LIBDIRSUFFIX} \ + --build-type=minimal \ $PYTHON_FLAGS \ - install \ - 2>&1 | tee $OUTPUT/install-${PRGNAM}.log + install -# Install the bjam binary (we no longer do that, -# as it may clobber another boost.bjam or boost.build package): -#cp -a $BJAM $PKG/usr/bin - -## Move incorrectly installed include files -if [ -d $PKG/usr/include/${PRGNAM}_${SRCVER} ]; then - mv $PKG/usr/include/${PRGNAM}_${SRCVER}/boost $PKG/usr/include/ - rmdir $PKG/usr/include/${PRGNAM}_${SRCVER} -fi +find $PKG | xargs file | grep -e "executable" -e "shared object" \ + | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null # Add documentation: mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION @@ -226,18 +229,9 @@ cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true cp -a $SRCDIR/$(basename $0) $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild find $PKG/usr/doc -type f -exec chmod 644 {} \; -# Strip binaries: -cd $PKG -find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -cd - - # Add a package description: mkdir -p $PKG/install cat $SRCDIR/slack-desc > $PKG/install/slack-desc -if [ -f $SRCDIR/doinst.sh ]; then - cat $SRCDIR/doinst.sh >> $PKG/install/doinst.sh -fi # Build the package: cd $PKG @@ -247,8 +241,3 @@ md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz > ${PRGNAM}-${VERSION}-${ cd - cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt -# Clean up the extra stuff: -if [ "$P1" = "--cleanup" ]; then - rm -rf $TMP/tmp-$PRGNAM - rm -rf $PKG -fi |