diff options
author | David Spencer <baildon.research@googlemail.com> | 2015-11-18 19:17:43 +0000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-01-17 09:40:16 +0700 |
commit | 83338749ef84c6ba7e3f26851ece7867d7f7df57 (patch) | |
tree | 972742567ef4c90e1c16b45bfe5c8e1cbe8447cb | |
parent | 1b44b838f623b9c848321bda83b526563b2a1aef (diff) | |
download | slackbuilds-83338749ef84c6ba7e3f26851ece7867d7f7df57.tar.gz |
academic/labplot2: Fixed build with gcc-5.2.0.
Use SBo standard cmake template to add -fpermissive more easily.
Signed-off-by: David Spencer <baildon.research@googlemail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | academic/labplot2/labplot2.SlackBuild | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/academic/labplot2/labplot2.SlackBuild b/academic/labplot2/labplot2.SlackBuild index 052e3324cf..ca807e8da1 100644 --- a/academic/labplot2/labplot2.SlackBuild +++ b/academic/labplot2/labplot2.SlackBuild @@ -24,11 +24,17 @@ PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686"; SLKLDFLAGS=""; LIBDIRSUFFIX=""; CHOST=i486 + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686"; SLKLDFLAGS=""; LIBDIRSUFFIX=""; CHOST=i486 + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC"; SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64" + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" fi set -e @@ -46,19 +52,21 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -./compile +# Use -fpermissive to fix build failure with gcc-5.2.0 +mkdir -p build +cd build + cmake \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -fpermissive" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_SUFFIX=${LIBDIRSUFFIX} \ + -DMAN_INSTALL_DIR=/usr/man \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install DESTDIR=$PKG +cd .. -( cd build/ -cmake ./ -DCMAKE_INSTALL_PREFIX=/usr -cmake ./ -DCMAKE_BUILD_TYPE=Release -make install DESTDIR=$PKG -) - -( 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 -find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs strip -g 2> /dev/null || true -) +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a AUTHORS ChangeLog COPYING INSTALL README $PKG/usr/doc/$PRGNAM-$VERSION |