diff options
author | Adam Lukomski <aw.lukomski@gmail.com> | 2017-05-22 14:50:29 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-05-27 07:30:43 +0700 |
commit | 3446e1de786580294d259e478e36ae2e6738dbee (patch) | |
tree | 9b3f951583ac023424c6d3c3b19b2bf623d5cea2 /libraries/simbody | |
parent | dcc7ebdb46660a188f9e7300317f0ba0771b48cb (diff) |
libraries/simbody: Added (multibody physics API).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/simbody')
-rw-r--r-- | libraries/simbody/README | 10 | ||||
-rw-r--r-- | libraries/simbody/simbody.SlackBuild | 99 | ||||
-rw-r--r-- | libraries/simbody/simbody.info | 10 | ||||
-rw-r--r-- | libraries/simbody/slack-desc | 19 |
4 files changed, 138 insertions, 0 deletions
diff --git a/libraries/simbody/README b/libraries/simbody/README new file mode 100644 index 0000000000000..51edbf1903503 --- /dev/null +++ b/libraries/simbody/README @@ -0,0 +1,10 @@ +Simbody is a high-performance, open-source toolkit for science- and +engineering-quality simulation of articulated mechanisms, including +biomechanical structures such as human and animal skeletons, mechanical +systems like robots, vehicles, and machines, and anything else that +can be described as a set of rigid bodies interconnected by joints, +influenced by forces and motions, and restricted by constraints. + +Simbody includes a multibody dynamics library for modeling motion +in generalized/internal coordinates in O(n) time. This is sometimes +called a Featherstone-style physics engine. diff --git a/libraries/simbody/simbody.SlackBuild b/libraries/simbody/simbody.SlackBuild new file mode 100644 index 0000000000000..98b3081fc588e --- /dev/null +++ b/libraries/simbody/simbody.SlackBuild @@ -0,0 +1,99 @@ +#!/bin/sh + +# Slackware build script for simbody + +# Copyright 2017 Adam Lukomski <aw.lukomski@gmail.com> +# 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. + +PRGNAM=simbody +SRCNAM=Simbody +DIRNAM=simbody-Simbody-3.5.4 +VERSION=${VERSION:-3.5.4} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $DIRNAM +tar xvf $CWD/$PRGNAM-$SRCNAM-$VERSION.tar.gz +cd $DIRNAM +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +# Move all docs to the correct location +sed -i "s|doc/simbody|doc/simbody-$VERSION|" CMakeLists.txt + +mkdir -p build +cd build + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_DATAROOTDIR="/usr" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install DESTDIR=$PKG +cd .. + +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 +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/libraries/simbody/simbody.info b/libraries/simbody/simbody.info new file mode 100644 index 0000000000000..80321b21d8a07 --- /dev/null +++ b/libraries/simbody/simbody.info @@ -0,0 +1,10 @@ +PRGNAM="simbody" +VERSION="3.5.4" +HOMEPAGE="https://simtk.org/projects/simbody" +DOWNLOAD="https://github.com/simbody/simbody/archive/Simbody-3.5.4/simbody-Simbody-3.5.4.tar.gz" +MD5SUM="74f9afe6ac596cac79179ece7281c20c" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="lapack" +MAINTAINER="Adam Lukomski" +EMAIL="aw.lukomski@gmail.com" diff --git a/libraries/simbody/slack-desc b/libraries/simbody/slack-desc new file mode 100644 index 0000000000000..53bb724fa5fd8 --- /dev/null +++ b/libraries/simbody/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +simbody: simbody (multibody physics API) +simbody: +simbody: Simbody is a high-performance, open-source toolkit for science- and +simbody: engineering-quality simulation of articulated mechanisms, including +simbody: biomechanical structures such as human and animal skeletons, +simbody: mechanical systems like robots, vehicles, and machines, and anything +simbody: else that can be described as a set of rigid bodies interconnected +simbody: by joints, influenced by forces and motions, and restricted +simbody: by constraints. +simbody: +simbody: |