From b898a4e8e9d4816362505cc2f674f142404669d3 Mon Sep 17 00:00:00 2001 From: schnetter Date: Mon, 28 Sep 2009 18:20:08 +0000 Subject: Add thorn containing the GSL library git-svn-id: http://svn.cactuscode.org/projects/ExternalLibraries/GSL/trunk@2 9e23cc15-e5c8-4d65-9080-beda90ea645b --- GSL.sh | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++ README | 22 +++++++++++++ configuration.ccl | 8 +++++ dist/gsl-1.12.tar.gz | Bin 0 -> 2924732 bytes interface.ccl | 3 ++ param.ccl | 1 + schedule.ccl | 1 + src/make.code.defn | 7 +++++ 8 files changed, 127 insertions(+) create mode 100644 GSL.sh create mode 100644 README create mode 100644 configuration.ccl create mode 100644 dist/gsl-1.12.tar.gz create mode 100644 interface.ccl create mode 100644 param.ccl create mode 100644 schedule.ccl create mode 100644 src/make.code.defn diff --git a/GSL.sh b/GSL.sh new file mode 100644 index 0000000..9bdbfad --- /dev/null +++ b/GSL.sh @@ -0,0 +1,85 @@ +#! /bin/bash + +################################################################################ +# Prepare +################################################################################ + +# Set up shell +set -x # Output commands +set -e # Abort on errors + +# Set locations +NAME=gsl-1.12 +SRCDIR=$(dirname $0) +INSTALL_DIR=${SCRATCH_BUILD} +GSL_DIR=${INSTALL_DIR}/${NAME} + +# Clean up environment +unset LIBS + + + +################################################################################ +# Build +################################################################################ + +( + exec >&2 # Redirect stdout to stderr + set -x # Output commands + set -e # Abort on errors + cd ${INSTALL_DIR} + if [ -e done-${NAME} -a done-${NAME} -nt ${SRCDIR}/dist/${NAME}.tar.gz ]; then + echo "GSL: The enclosed GSL library has already been built; doing nothing" + else + echo "GSL: Building enclosed GSL library" + + echo "GSL: Unpacking archive..." + rm -rf build-${NAME} + mkdir build-${NAME} + pushd build-${NAME} + # Should we use gtar or tar? + TAR=$(gtar --help > /dev/null 2> /dev/null && echo gtar || echo tar) + ${TAR} xzf ${SRCDIR}/dist/${NAME}.tar.gz + popd + + echo "GSL: Configuring..." + rm -rf ${NAME} + mkdir ${NAME} + pushd build-${NAME}/${NAME} + ./configure --prefix=${GSL_DIR} + + echo "GSL: Building..." + make + + echo "GSL: Installing..." + make install + popd + + : > done-${NAME} + echo "GSL: Done." + fi +) + + + +################################################################################ +# Configure Cactus +################################################################################ + +# Set options +GSL_INC_DIRS="${GSL_DIR}/include" +GSL_LIB_DIRS="${GSL_DIR}/lib" +GSL_LIBS='gsl gslcblas' + +# Pass options to Cactus +echo "BEGIN MAKE_DEFINITION" +echo "HAVE_GSL = 1" +echo "GSL_DIR = ${GSL_DIR}" +echo "GSL_INC_DIRS = ${GSL_INC_DIRS}" +echo "GSL_LIB_DIRS = ${GSL_LIB_DIRS}" +echo "GSL_LIBS = ${GSL_LIBS}" +echo "END MAKE_DEFINITION" + +echo 'INCLUDE_DIRECTORY $(GSL_INC_DIRS)' +echo 'LIBRARY_DIRECTORY $(GSL_LIB_DIRS)' +echo 'LIBRARY $(GSL_LIBS)' diff --git a/README b/README new file mode 100644 index 0000000..ac5f7bc --- /dev/null +++ b/README @@ -0,0 +1,22 @@ +Cactus Code Thorn GSL +Author(s) : Erik Schnetter +Maintainer(s): Cactus team +Licence : GPL +-------------------------------------------------------------------------- + +1. Purpose + +Distribute the GNU Scientific Library; see +. + + + +From the web site: + +The GNU Scientific Library (GSL) is a numerical library for C and C++ +programmers. It is free software under the GNU General Public +License. + +The library provides a wide range of mathematical routines such as +random number generators, special functions and least-squares fitting. +There are over 1000 functions in total with an extensive test suite. diff --git a/configuration.ccl b/configuration.ccl new file mode 100644 index 0000000..13ff6f4 --- /dev/null +++ b/configuration.ccl @@ -0,0 +1,8 @@ +# Configuration definitions for thorn GSL +# $Header$ + +PROVIDES GSL +{ + SCRIPT GSL.sh + LANG bash +} diff --git a/dist/gsl-1.12.tar.gz b/dist/gsl-1.12.tar.gz new file mode 100644 index 0000000..01d3577 Binary files /dev/null and b/dist/gsl-1.12.tar.gz differ diff --git a/interface.ccl b/interface.ccl new file mode 100644 index 0000000..d4f9312 --- /dev/null +++ b/interface.ccl @@ -0,0 +1,3 @@ +# Interface definition for thorn GSL + +IMPLEMENTS: GSL diff --git a/param.ccl b/param.ccl new file mode 100644 index 0000000..fc02c04 --- /dev/null +++ b/param.ccl @@ -0,0 +1 @@ +# Parameter definitions for thorn GSL diff --git a/schedule.ccl b/schedule.ccl new file mode 100644 index 0000000..65301e7 --- /dev/null +++ b/schedule.ccl @@ -0,0 +1 @@ +# Schedule definitions for thorn GSL diff --git a/src/make.code.defn b/src/make.code.defn new file mode 100644 index 0000000..2f14a8d --- /dev/null +++ b/src/make.code.defn @@ -0,0 +1,7 @@ +# Main make.code.defn file for thorn GSL + +# Source files in this directory +SRCS = + +# Subdirectories containing source files +SUBDIRS = -- cgit v1.2.3