Skip to content

Commit b898a4e

Browse files
author
schnetter
committed
Add thorn containing the GSL library
git-svn-id: http://svn.cactuscode.org/projects/ExternalLibraries/GSL/trunk@2 9e23cc15-e5c8-4d65-9080-beda90ea645b
1 parent 776fc43 commit b898a4e

File tree

8 files changed

+127
-0
lines changed

8 files changed

+127
-0
lines changed

GSL.sh

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
#! /bin/bash
2+
3+
################################################################################
4+
# Prepare
5+
################################################################################
6+
7+
# Set up shell
8+
set -x # Output commands
9+
set -e # Abort on errors
10+
11+
# Set locations
12+
NAME=gsl-1.12
13+
SRCDIR=$(dirname $0)
14+
INSTALL_DIR=${SCRATCH_BUILD}
15+
GSL_DIR=${INSTALL_DIR}/${NAME}
16+
17+
# Clean up environment
18+
unset LIBS
19+
20+
21+
22+
################################################################################
23+
# Build
24+
################################################################################
25+
26+
(
27+
exec >&2 # Redirect stdout to stderr
28+
set -x # Output commands
29+
set -e # Abort on errors
30+
cd ${INSTALL_DIR}
31+
if [ -e done-${NAME} -a done-${NAME} -nt ${SRCDIR}/dist/${NAME}.tar.gz ]; then
32+
echo "GSL: The enclosed GSL library has already been built; doing nothing"
33+
else
34+
echo "GSL: Building enclosed GSL library"
35+
36+
echo "GSL: Unpacking archive..."
37+
rm -rf build-${NAME}
38+
mkdir build-${NAME}
39+
pushd build-${NAME}
40+
# Should we use gtar or tar?
41+
TAR=$(gtar --help > /dev/null 2> /dev/null && echo gtar || echo tar)
42+
${TAR} xzf ${SRCDIR}/dist/${NAME}.tar.gz
43+
popd
44+
45+
echo "GSL: Configuring..."
46+
rm -rf ${NAME}
47+
mkdir ${NAME}
48+
pushd build-${NAME}/${NAME}
49+
./configure --prefix=${GSL_DIR}
50+
51+
echo "GSL: Building..."
52+
make
53+
54+
echo "GSL: Installing..."
55+
make install
56+
popd
57+
58+
: > done-${NAME}
59+
echo "GSL: Done."
60+
fi
61+
)
62+
63+
64+
65+
################################################################################
66+
# Configure Cactus
67+
################################################################################
68+
69+
# Set options
70+
GSL_INC_DIRS="${GSL_DIR}/include"
71+
GSL_LIB_DIRS="${GSL_DIR}/lib"
72+
GSL_LIBS='gsl gslcblas'
73+
74+
# Pass options to Cactus
75+
echo "BEGIN MAKE_DEFINITION"
76+
echo "HAVE_GSL = 1"
77+
echo "GSL_DIR = ${GSL_DIR}"
78+
echo "GSL_INC_DIRS = ${GSL_INC_DIRS}"
79+
echo "GSL_LIB_DIRS = ${GSL_LIB_DIRS}"
80+
echo "GSL_LIBS = ${GSL_LIBS}"
81+
echo "END MAKE_DEFINITION"
82+
83+
echo 'INCLUDE_DIRECTORY $(GSL_INC_DIRS)'
84+
echo 'LIBRARY_DIRECTORY $(GSL_LIB_DIRS)'
85+
echo 'LIBRARY $(GSL_LIBS)'

README

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Cactus Code Thorn GSL
2+
Author(s) : Erik Schnetter
3+
Maintainer(s): Cactus team
4+
Licence : GPL
5+
--------------------------------------------------------------------------
6+
7+
1. Purpose
8+
9+
Distribute the GNU Scientific Library; see
10+
<http://www.gnu.org/software/gsl/>.
11+
12+
13+
14+
From the web site:
15+
16+
The GNU Scientific Library (GSL) is a numerical library for C and C++
17+
programmers. It is free software under the GNU General Public
18+
License.
19+
20+
The library provides a wide range of mathematical routines such as
21+
random number generators, special functions and least-squares fitting.
22+
There are over 1000 functions in total with an extensive test suite.

configuration.ccl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Configuration definitions for thorn GSL
2+
# $Header$
3+
4+
PROVIDES GSL
5+
{
6+
SCRIPT GSL.sh
7+
LANG bash
8+
}

dist/gsl-1.12.tar.gz

2.79 MB
Binary file not shown.

interface.ccl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Interface definition for thorn GSL
2+
3+
IMPLEMENTS: GSL

param.ccl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Parameter definitions for thorn GSL

schedule.ccl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Schedule definitions for thorn GSL

src/make.code.defn

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Main make.code.defn file for thorn GSL
2+
3+
# Source files in this directory
4+
SRCS =
5+
6+
# Subdirectories containing source files
7+
SUBDIRS =

0 commit comments

Comments
 (0)