diff options
author | Jože Zobec <jozze.zepl@gmail.com> | 2012-12-16 21:20:05 +0100 |
---|---|---|
committer | Matteo Bernardini <ponce@slackbuilds.org> | 2012-12-16 21:21:08 +0100 |
commit | 74c90f7fee112da2cdf4e216c4ba47b69c98cef4 (patch) | |
tree | f717aee65ee78b5ad769ebce1c633f9a2b356c67 /libraries/mathgl | |
parent | ad7e92f4e1ad51631a8e08f65e32e5045779dea8 (diff) |
libraries/mathgl: Added (scientific data visualization library).
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'libraries/mathgl')
-rw-r--r-- | libraries/mathgl/README | 21 | ||||
-rw-r--r-- | libraries/mathgl/mathgl.SlackBuild | 125 | ||||
-rw-r--r-- | libraries/mathgl/mathgl.info | 10 | ||||
-rw-r--r-- | libraries/mathgl/slack-desc | 19 |
4 files changed, 175 insertions, 0 deletions
diff --git a/libraries/mathgl/README b/libraries/mathgl/README new file mode 100644 index 0000000000000..586e464aed919 --- /dev/null +++ b/libraries/mathgl/README @@ -0,0 +1,21 @@ +MathGL - library for scientific data visualization. + +MathGL is a library for making high-quality scientific graphics under +Linux and Windows. It is useful for fast data plotting and data proc- +essing of large data arrays. Supports working in window and console +modes and for easy embedding into other programs. Has a large and +still growing set of graphics. + +It can be compiled with several different options, however, since with +basic Slackware installation most of them are already present, only +three optional configuration flags are present, and represent optional +dependencies: GSL -- GNU Scientific Library, GNU Octave (a Matlab +clone) and openmpi, all of which are accessible on slackbuilds.org. + +GSL=yes (for GSL support, needs gsl) +OCTAVE=yes (for Octave support, needs octave) +OPENMPI=yes (for Open MPI support, needs openmpi) + +add the ones needed when launching the slackbuilds, like + + GSL=yes OCTAVE=yes ./mathgl.SlackBuild diff --git a/libraries/mathgl/mathgl.SlackBuild b/libraries/mathgl/mathgl.SlackBuild new file mode 100644 index 0000000000000..79dfdba1b5104 --- /dev/null +++ b/libraries/mathgl/mathgl.SlackBuild @@ -0,0 +1,125 @@ +#!/bin/bash + +# Slackware build script for MathGL + +# Written by Jože Zobec <jozze.zepl@gmail.com> + +# 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=mathgl +VERSION=${VERSION:-2.0.3} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +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" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +# GSL support +if [[ ${GSL:-no} = "no" ]]; then + GSL_FLAG="NO" +else + GSL_FLAG="YES" +fi + +# Octave support +if [[ ${OCTAVE:-no} = "no" ]]; then + OCTAVE_FLAG="NO" +else + OCTAVE_FLAG="YES" +fi + +# Open MPI support +if [[ ${OPENMPI:-no} = "no" ]]; then + OPENMPI_FLAG="NO" +else + OPENMPI_FLAG="YES" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvzf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +mkdir -p build +cd build + cmake -D CMAKE_C_FLAGS="$SLKCFLAGS" \ + -D CMAKE_CXX_FLAGS="$SLKCFLAGS" \ + -D CMAKE_INSTALL_PREFIX:PATH=/usr \ + -D enable-doc:BOOL=OFF \ + -D enable-double:BOOL=ON \ + -D enable-gif:BOOL=ON \ + -D enable-png:BOOL=ON \ + -D enable-jpeg:BOOL=ON \ + -D enable-pdf:BOOL=ON \ + -D enable-gsl:BOOL=$GSL_FLAG \ + -D enable-lgpl:BOOL=ON \ + -D enable-qt:BOOL=ON \ + -D enable-mpi:BOOL=$OPENMPI_FLAG \ + -D enable-python:BOOL=ON \ + -D enable-pthread:BOOL=ON \ + -D enable-octave:BOOL=$OCTAVE_FLAG \ + -D enable-opengl:BOOL=ON \ + -D enable-wx:BOOL=ON \ + -D CMAKE_BUILD_TYPE:STRING=$ARCH-slackware-linux .. -L + 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 + +cp -a \ + AUTHORS COPYING COPYING_LGPL INSTALL README README_V2 todo.txt 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 + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/libraries/mathgl/mathgl.info b/libraries/mathgl/mathgl.info new file mode 100644 index 0000000000000..44a7f2b8a2c55 --- /dev/null +++ b/libraries/mathgl/mathgl.info @@ -0,0 +1,10 @@ +PRGNAM="mathgl" +VERSION="2.0.3" +HOMEPAGE="http://mathgl.sourceforge.net" +DOWNLOAD="http://downloads.sourceforge.net/mathgl/mathgl-2.0.3.tar.gz" +MD5SUM="37b7857594dd17306d34475afec87aa5" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="wxPython" +MAINTAINER="Jože Zobec" +EMAIL="jozze.zepl@gmail.com" diff --git a/libraries/mathgl/slack-desc b/libraries/mathgl/slack-desc new file mode 100644 index 0000000000000..699a09b7032b2 --- /dev/null +++ b/libraries/mathgl/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 ':'. + + |-----handy-ruler------------------------------------------------------| +mathgl: MathGL - library for scientific data visualization. +mathgl: +mathgl: MathGL is a library for making high-quality scientific graphics under +mathgl: Linux and Windows. It is useful for fast data plotting and data proc- +mathgl: essing of large data arrays. Supports working in window and console +mathgl: modes and for easy embedding into other programs. Has a large and +mathgl: still growing set of graphics. +mathgl: +mathgl: Homepage: mathgl.sourceforge.net +mathgl: +mathgl: |