diff options
author | Niels Horn <niels.horn@gmail.com> | 2011-09-05 21:35:52 -0400 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2011-09-05 23:03:04 -0500 |
commit | c43d1ff3f1d6f69febba34e560f4846909117225 (patch) | |
tree | 74744b70119e90db4347bcfd31d8a0ca26bd44b1 /graphics/OpenCASCADE/OpenCASCADE.SlackBuild | |
parent | 467955089191daafece9f0a8e4406dd31ced9abd (diff) |
graphics/OpenCASCADE: Updated for version 6.5.1.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'graphics/OpenCASCADE/OpenCASCADE.SlackBuild')
-rw-r--r-- | graphics/OpenCASCADE/OpenCASCADE.SlackBuild | 67 |
1 files changed, 46 insertions, 21 deletions
diff --git a/graphics/OpenCASCADE/OpenCASCADE.SlackBuild b/graphics/OpenCASCADE/OpenCASCADE.SlackBuild index abd13e95e96f7..aef6eeeabc904 100644 --- a/graphics/OpenCASCADE/OpenCASCADE.SlackBuild +++ b/graphics/OpenCASCADE/OpenCASCADE.SlackBuild @@ -2,21 +2,40 @@ # Slackware build script for OpenCASCADE # With some inspiration from the Arch PKGBUILD script -# revision date: 2010/04/26 + +# Copyright 2010-2011 Niels Horn, Rio de Janeiro, RJ, Brazil +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# revision date: 2011/08/10 PRGNAM=OpenCASCADE -VERSION=6.3.0 +VERSION=${VERSION:-6.5.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} -SRCVERSION=_src +SRCVERSION=$( echo $VERSION | sed "s/\.//g" ) -# Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i486 ;; arm*) ARCH=arm ;; - # Unless $ARCH is already set, use uname -m for all other archs: *) ARCH=$( uname -m ) ;; esac fi @@ -40,31 +59,30 @@ else LIBDIRSUFFIX="" fi -set -e # Exit on most errors +set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf ${PRGNAM}${VERSION} -tar xvf $CWD/${PRGNAM}${SRCVERSION}.tgz -cd ${PRGNAM}${VERSION} +rm -rf $PRGNAM-$VERSION +# Source untars in current directory... +mkdir $PRGNAM-$VERSION +cd $PRGNAM-$VERSION +tar xvf $CWD/${PRGNAM}${SRCVERSION}.tar.gz chown -R root:root . chmod -R u+w,go+r-w,a-s . -# Apply Service Pack 6 from http://www.salome-platform.org/ -patch -p1 < $CWD/opencascade-6.3.0sp6.diff +# Patch source for newer gcc versions +# (avoids "not declared in this scope" errors) +patch -p1 < $CWD/newgcc.patch -# Apply patch from debian to correct the release number of the libraries -patch -p1 < $CWD/lib-release.patch +# Fix for newer fgtl versions +# (thanks to the guys from openSUSE) +patch -p1 < $CWD/fix-ftgl-includes.patch # Change to the directory where we'll build from cd ros -# Set correct location for libraries -sed \ - -e "s|/lib /usr/lib|/lib${LIBDIRSUFFIX} /usr/lib${LIBDIRSUFFIX}|g" \ - -i aclocal.m4 - autoreconf -f -i CFLAGS="$SLKCFLAGS" \ @@ -84,7 +102,7 @@ CXXFLAGS="$SLKCFLAGS" \ # Change the resulting Makefile so that we can use DESTDIR sed -e "s|\$(prefix)|\$(DESTDIR)\$(prefix)|g" -i Makefile -make +make make install DESTDIR=$PKG cd .. @@ -100,7 +118,7 @@ mkdir -p $PKG/usr/src/$PRGNAM mv config.h src/$PRGNAM/ cd src for d in *; do - if [ "$d" != "$PRGNAM" ]; then + if [ "$d" != "$PRGNAM" ]; then mv $d $PRGNAM/ fi done @@ -118,10 +136,17 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ README LICENSE ros/README.txt \ - doc/Overview doc/ReferenceDocumentation \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +# If you want *all* documentation in the package, use INSTALL_FULL_DOCS=yes +# but be warned: we're talking about ~ 600MB of documentation... +if [ "${INSTALL_FULL_DOCS:-no}" = "yes" ]; then + cp -a \ + doc/* \ + $PKG/usr/doc/$PRGNAM-$VERSION +fi + mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc |