diff options
author | Niels Horn <niels.horn@gmail.com> | 2010-05-15 21:14:10 -0500 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-16 22:24:37 -0500 |
commit | 37d49bcd70b81988c3581e337bed0e9ba76a940d (patch) | |
tree | 8bfc0360005608431c1d50c225c30c5118fa8450 /graphics/FreeCAD/FreeCAD.SlackBuild | |
parent | d3de65af683d179e35bb5bcf004b22bfff6adba6 (diff) | |
download | slackbuilds-37d49bcd70b81988c3581e337bed0e9ba76a940d.tar.gz |
graphics/FreeCAD: Added (a 3D CAD modeler).
Diffstat (limited to 'graphics/FreeCAD/FreeCAD.SlackBuild')
-rw-r--r-- | graphics/FreeCAD/FreeCAD.SlackBuild | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/graphics/FreeCAD/FreeCAD.SlackBuild b/graphics/FreeCAD/FreeCAD.SlackBuild new file mode 100644 index 0000000000..a9c9ae9205 --- /dev/null +++ b/graphics/FreeCAD/FreeCAD.SlackBuild @@ -0,0 +1,84 @@ +#!/bin/sh + +# Slackware build script for FreeCAD +# Maintained by Niels Horn <niels.horn@gmail.com> +# revision date: 2010/05/05 + +PRGNAM=FreeCAD +VERSION=0.9.2646 +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +SRCVERSION=${VERSION}.5 + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +fi + +set -e # Exit on most errors + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$SRCVERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +# For newer boost versions (as in Slackware -current since 2009/12/17), +# correct names of libs (w/o -mt) +#patch -p1 < $CWD/boost_current.patch + +./autogen.sh + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/opt/$PRGNAM \ + --libdir=/opt/$PRGNAM/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --with-occ-lib=/usr/lib${LIBDIRSUFFIX} \ + --with-occ-include=/usr/include/OpenCASCADE \ + --with-qt4-dir=$QT4DIR \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +# Move icon & copy desktop file +mkdir -p $PKG/usr/share/{applications,pixmaps} +mv $PKG/opt/$PRGNAM/share/FCIcon.xpm $PKG/usr/share/pixmaps/ +cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + README.Linux ChangeLog.txt \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |