initial commit

This commit is contained in:
2014-04-18 22:58:13 +02:00
commit 1671b3026f
50 changed files with 1313 additions and 0 deletions

38
scripts/H5hut.build Executable file
View File

@@ -0,0 +1,38 @@
#!/bin/bash
source "$(dirname $0)/../lib/libem.bash"
function em.configure() {
( cd "${EM_SRCDIR}" && ./autogen.sh )
"${EM_SRCDIR}"/configure \
--prefix="${PREFIX}" \
--enable-parallel \
--enable-debug \
--enable-vtkconverter \
--with-hdf5=$HDF5_PREFIX \
--with-pic \
|| exit 1
}
function em.build() {
make -C src
make -C tools
}
function em.install() {
make -C src install
make -C tools install
}
function em.install_doc() {
install -m 0444 \
AUTHORS \
COPYING \
"${DOCDIR}"
}
em.add_to_family 'hdf5'
em.set_runtime_dependencies "${COMPILER}" "${MPI}" 'hdf5'
em.set_build_dependencies "autoconf" "automake" "libtool" "${COMPILER}" "${MPI}" "vtk" "hdf5"
em.make_all

30
scripts/H5hut_serial.build Executable file
View File

@@ -0,0 +1,30 @@
#!/bin/bash
source "$(dirname $0)/../lib/libem.bash"
function em.configure() {
(cd "${EM_SRCDIR}" && ./autogen.sh)
"${EM_SRCDIR}"/configure \
--prefix="${PREFIX}" \
--enable-debug \
--enable-vtkconverter \
--with-hdf5="${HDF5_SERIAL_PREFIX}" \
--with-pic \
|| exit 1
}
function em.build() {
make -C src
make -C tools
}
function em.install() {
make -C src install
make -C tools install
}
em.add_to_family 'hdf5_serial'
em.set_runtime_dependencies "${COMPILER}" 'hdf5_serial'
em.set_build_dependencies "autoconf" "automake" "libtool" "${COMPILER}" "vtk" "hdf5_serial"
em.make_all

35
scripts/H5root.build Executable file
View File

@@ -0,0 +1,35 @@
#!/bin/bash
source $(dirname $0)/../lib/libem.bash
ROOT='root'
HDF5='hdf5'
H5HUT='H5hut'
H5HUT_VERSION="${H5HUT_VERSION}"
function em.pre_configure() {
./autogen.sh
}
function em.configure() {
"${EM_SRCDIR}"/configure \
--prefix="${PREFIX}" \
--enable-h5hut \
--enable-hdf5 \
--enable-root \
--with-pic
}
em.set_group "alternatives.d/compiler" "${COMPILER}/${COMPILER_VERSION}"
em.set_dependencies \
"root/${ROOT_VERSION}"
em.load_build_dependencies \
"autoconf/${AUTOCONF_VERSION}" \
"automake/${AUTOMAKE_VERSION}" \
"libtool/${LIBTOOL_VERSION}" \
"${COMPILER}/${COMPILER_VERSION}" \
"${HDF5}/${HDF5_VERSION}" \
"${H5HUT}/${H5HUT_VERSION}" \
"${ROOT}/${ROOT_VERSION}"
em.make_all

20
scripts/Modules.build Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
source "$(dirname $0)/../config/environment.bash"
source "$(dirname $0)/../lib/libem.bash"
function em.configure() {
"${EM_SRCDIR}"/configure \
--prefix="${EM_BINDIR}/core" \
--with-module-path="${EM_MODULEROOT_PATH}" \
|| exit 1
}
# fake module command
module() {
:
}
# use system gcc to compile
declare -rx CC=gcc
em.make_all

19
scripts/OPAL.build Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
source "$(dirname $0)/../lib/libem.bash"
function em.configure() {
cmake \
-DCMAKE_INSTALL_PREFIX="${PREFIX}" \
-DCMAKE_BUILD_TYPE=RELEASE \
-DENABLE_ML_SOLVER=TRUE \
"${EM_SRCDIR}"
}
em.add_to_family 'core'
em.load_family 'hdf5'
em.set_runtime_dependencies "${COMPILER}" "${MPI}"
em.set_build_dependencies 'cmake' "${COMPILER}" "${MPI}" 'hdf5' 'H5hut' 'trilinos' 'ippl' 'gsl'
em.make_all

14
scripts/Python.build Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
source "$(dirname $0)/../lib/libem.bash"
function em.configure() {
"${EM_SRCDIR}"/configure \
--prefix="${PREFIX}" \
|| exit 1
}
em.set_build_dependencies "${COMPILER}"
em.set_env
em.make_all

28
scripts/autoconf.build Executable file
View File

@@ -0,0 +1,28 @@
#!/bin/bash
source "$(dirname $0)/../lib/libem.bash"
function em.configure() {
"${EM_SRCDIR}"/configure \
--prefix="${PREFIX}" \
|| exit 1
}
function em.install_doc() {
install -m 0444 \
AUTHORS \
COPYING \
COPYING.EXCEPTION \
COPYINGv3 \
NEWS \
README \
THANKS \
"${DOCDIR}"
}
# use system gcc to compile
declare -rx CC=gcc
em.set_build_dependencies "m4"
em.make_all

28
scripts/automake.build Executable file
View File

@@ -0,0 +1,28 @@
#!/bin/bash
source "$(dirname $0)/../lib/libem.bash"
function em.configure() {
"${EM_SRCDIR}"/configure \
--prefix="${PREFIX}" \
|| exit 1
}
function em.install_doc() {
install -m 0444 \
AUTHORS \
COPYING \
ChangeLog \
HACKING \
NEWS \
README \
THANKS \
"${DOCDIR}"
}
# use system gcc to compile
declare -rx CC=gcc
em.set_build_dependencies "m4" "autoconf"
em.make_all

12
scripts/cmake.build Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
source "$(dirname $0)/../lib/libem.bash"
function em.configure() {
"${EM_SRCDIR}/bootstrap" --prefix="${PREFIX}"
}
em.add_to_family 'core'
em.set_build_dependencies "${COMPILER}"
em.make_all

33
scripts/emacs.build Executable file
View File

@@ -0,0 +1,33 @@
#!/bin/bash
source "$(dirname $0)/../lib/libem.bash"
build_dependencies="${COMPILER}"
case ${OS} in
Darwin )
configure_args='--with-ns'
build_dependencies=''
CC=''
CXX=''
COMPILER=''
COMPILER_VERSION=''
function em.post_install() {
mkdir -p "${PREFIX}"
cp -rv "${EM_BUILDDIR}"/nextstep/Emacs.app "${PREFIX}"
}
;;
*)
;;
esac
function em.configure() {
"${EM_SRCDIR}"/configure \
--prefix="${PREFIX}" \
${configure_args} \
|| exit 1
}
em.set_build_dependencies ${build_dependencies}
em.make_all

31
scripts/gcc.build Executable file
View File

@@ -0,0 +1,31 @@
#!/bin/bash
source "$(dirname $0)/../lib/libem.bash"
function em.configure() {
"${EM_SRCDIR}"/configure \
--prefix="${PREFIX}" \
--enable-languages=c,c++,objc,obj-c++,lto,fortran \
--with-gmp="${GMP_PREFIX}" \
--with-mpfr="${MPFR_PREFIX}" \
--with-mpc="${MPC_PREFIX}" \
--enable-lto \
--disable-multilib \
--with-pkgversion="PSI Environment Module $COMPILER $COMPILER_VERSION" \
|| exit 1
}
function em.install_doc() {
install -m 0444 \
COPYING* \
NEWS \
README \
"${DOCDIR}"
}
# use system gcc to compile
declare -rx CC=gcc
em.set_build_dependencies "gmp" "mpfr" "mpc"
em.make_all

17
scripts/gmp.build Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
source "$(dirname $0)/../lib/libem.bash"
function em.configure() {
"${EM_SRCDIR}"/configure \
--prefix="${PREFIX}" \
--disable-shared \
|| exit 1
}
# use system gcc to compile
declare -rx CC=gcc
declare -rx CPP=/usr/bin/cpp
em.make_all

24
scripts/gnuplot.build Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
source "$(dirname $0)/../lib/libem.bash"
function em.configure() {
"${EM_SRCDIR}"/configure \
--prefix="${PREFIX}" \
--with-gif=no \
--with-tiff=no \
|| exit 1
}
function em.install_doc() {
install -m 0444 \
Copyright \
ChangeLog \
NEWS \
README \
README.1ST \
"${DOCDIR}"
}
em.set_build_dependencies "${COMPILER}"
em.make_all

27
scripts/gsl.build Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
source "$(dirname $0)/../lib/libem.bash"
function em.configure() {
"${EM_SRCDIR}"/configure \
--prefix="${PREFIX}" \
|| exit 1
}
function em.install_doc() {
install -m 0444 \
AUTHORS \
BUGS \
COPYING \
ChangeLog \
INSTALL \
NEWS \
README \
THANKS \
TODO \
"${DOCDIR}"
}
em.add_to_family "compiler"
em.set_build_dependencies "${COMPILER}"
em.make_all

29
scripts/hdf5.build Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/bash
source "$(dirname $0)/../lib/libem.bash"
function em.configure() {
"${EM_SRCDIR}"/configure \
--prefix="${PREFIX}" \
--enable-shared \
--enable-parallel \
--enable-cxx \
--enable-unsupported \
--with-pic \
|| exit 1
}
function em.install_doc() {
install -m 0444 \
ACKNOWLEDGMENTS \
COPYING \
MANIFEST \
README.txt \
"${DOCDIR}"
}
em.add_to_family "mpi"
em.set_runtime_dependencies "${COMPILER}" "${MPI}"
em.set_build_dependencies "${COMPILER}" "${MPI}"
em.make_all

18
scripts/hdf5_serial.build Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
source "$(dirname $0)/../lib/libem.bash"
function em.configure() {
"${EM_SRCDIR}"/configure \
--prefix="${PREFIX}" \
--enable-shared \
--enable-cxx \
--enable-unsupported \
--with-pic \
|| exit 1
}
em.set_family "compiler"
em.set_build_dependencies "${COMPILER}"
em.make_all

26
scripts/ippl.build Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
source "$(dirname $0)/../lib/libem.bash"
function em.configure() {
rm -f CMakeCache.txt
cmake \
-DCMAKE_BUILD_TYPE=RELEASE \
-DCMAKE_INSTALL_PREFIX="${PREFIX}" \
"${EM_SRCDIR}" \
|| exit 1
}
function em.install_doc() {
install -m 0444 \
LICENSE \
README \
"${DOCDIR}"
}
em.add_to_family "mpi"
em.set_runtime_dependencies "${MPI}"
em.set_build_dependencies "cmake" "${COMPILER}" "${MPI}"
em.make_all

26
scripts/libtool.build Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
source "$(dirname $0)/../lib/libem.bash"
function em.configure() {
"${EM_SRCDIR}"/configure \
--prefix="${PREFIX}" \
|| exit 1
}
function em.install_doc() {
install -m 0444 \
AUTHORS \
COPYING \
NEWS \
README \
THANKS \
"${DOCDIR}"
}
# use system gcc to compile
declare -rx CC=gcc
em.set_build_dependencies "autoconf" "automake"
em.make_all

14
scripts/m4.build Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
source "$(dirname $0)/../lib/libem.bash"
function em.configure() {
"${EM_SRCDIR}"/configure \
--prefix="${PREFIX}" \
|| exit 1
}
# use system gcc to compile
declare -rx CC=gcc
em.make_all

54
scripts/mathlib.build Executable file
View File

@@ -0,0 +1,54 @@
#!/bin/bash
source "$(dirname $0)/../lib/libem.bash"
function em.configure() {
:
}
function em.build() {
cd "${EM_SRCDIR}"
install -m 0755 -d "${PREFIX}/include"
install -m 0755 -d "${PREFIX}/lib"
install -m 0755 -d "${DOCDIR}/lapack"
(
cp make.inc.blas BLAS/make.inc
cd BLAS
make -e -j3 || exit 1
install -m 0644 libblas.a "${PREFIX}/lib" || exit 1
) || exit 1
(
cp make.inc.cblas CBLAS/Makefile.in
cd CBLAS
make -e || exit 1
install -m 0644 include/* "${PREFIX}/include" || exit 1
install -m 0644 lib/* "${PREFIX}/lib" || exit 1
) || exit 1
(
cp make.inc.lapack lapack/make.inc
cd lapack
make -e -j3 || exit 1
make -e -j3 lapackelib || exit 1
install -m 0644 lapacke/include/* "${PREFIX}/include" || exit 1
install -m 0644 lib*.a "${PREFIX}/lib" || exit 1
install -m 0444 README LICENSE "${DOCDIR}/lapack"
) || exit 1
}
function em.install() {
:
}
function em.install_doc() {
:
}
em.add_to_family "compiler"
em.set_runtime_dependencies "${COMPILER}"
em.set_build_dependencies "${COMPILER}"
em.make_all

19
scripts/mpc.build Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
source "$(dirname $0)/../lib/libem.bash"
function em.configure() {
"${EM_SRCDIR}"/configure \
--prefix="${PREFIX}" \
--with-gmp=$GMP_PREFIX \
--with-mpfr=$MPFR_PREFIX \
--disable-shared \
|| exit 1
}
# use system gcc to compile
declare -rx CC=gcc
em.set_build_dependencies "gmp" "mpfr"
em.make_all

17
scripts/mpfr.build Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
source "$(dirname $0)/../lib/libem.bash"
function em.configure() {
"${EM_SRCDIR}"/configure \
--prefix="${PREFIX}" \
--with-gmp=$GMP_PREFIX \
--disable-shared \
|| exit 1
}
# use system gcc to compile
declare -rx CC=gcc
em.set_build_dependencies "gmp"
em.make_all

29
scripts/openmpi.build Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/bash
source "$(dirname $0)/../lib/libem.bash"
function em.configure() {
"${EM_SRCDIR}"/configure \
--prefix="${PREFIX}" \
--enable-mpi-cxx \
--enable-mpi-cxx-seek \
--enable-mpi-f90 \
--enable-mpi-profile \
--enable-shared \
--enable-smp-locks \
|| exit 1
}
function em.install_doc() {
install -m 0444 \
AUTHORS \
LICENSE \
NEWS \
README \
"${DOCDIR}"
}
em.add_to_family "compiler"
em.set_runtime_dependencies "${COMPILER}"
em.set_build_dependencies "${COMPILER}"
em.make_all

56
scripts/parmetis.build Executable file
View File

@@ -0,0 +1,56 @@
#!/bin/bash
source "$(dirname $0)/../lib/libem.bash"
function em.configure() {
: # nothing to configure
}
function em.build() {
local -ri MAJOR_VERSION=${V%%.*}
if (( MAJOR_VERSION == 3 )) ; then
cd "${EM_SRCDIR}"
make -e -j3 || exit 1
mkdir -p $PREFIX/include/metis
mkdir -p $PREFIX/lib
cp *.h $PREFIX/include
cp METISLib/*.h $PREFIX/include/metis
cp lib*.a $PREFIX/lib
elif (( MAJOR_VERSION == 4 )); then
cd "${EM_SRCDIR}"
make config prefix=$PREFIX || exit 1
make -j3 || exit 1
make install
LIBMETIS_A=$(find . -name libmetis.a)
METIS_H=$(find . -name metis.h)
install -m 0644 $METIS_H $PREFIX/include
install -m 0644 $LIBMETIS_A $PREFIX/lib
else
die 42 "Unsupported version: $V"
fi
}
function em.install() {
:
}
function em.install_doc() {
install -m 0444 \
CHANGES \
INSTALL \
LICENSE.txt \
README \
VERSION \
"${DOCDIR}"
}
em.add_to_family "mpi"
em.set_runtime_dependencies "${MPI}"
em.set_build_dependencies "${COMPILER}" "${MPI}"
em.make_all

67
scripts/root.build Executable file
View File

@@ -0,0 +1,67 @@
#!/bin/bash
source "$(dirname $0)/../lib/libem.bash"
case ${OS} in
Darwin )
# cocoa doesn't work with GCC!?
#config_args='--enable-cocoa --disable-x11'
config_args='--with-finkdir=/opt/X11 --disable-cocoa'
;;
*)
;;
esac
function em.configure() {
"${EM_SRCDIR}"/configure \
--disable-python \
--disable-mysql \
--disable-ldap \
--enable-fftw3 \
--with-cc=${CC} \
--with-cxx=${CXX} \
--with-f77=${F77} \
--with-ld=${CXX} \
${config_args} \
|| exit 1
}
function em.install() {
make clean
rm -f Makefile
rm -rf config.*
rm -rf core
rm -rf io
rm -rf math
rm -rf net
rm -rf hist
rm -rf tree
rm -rf graf2d
rm -rf graf3d
rm -rf gui
rm -rf html
rm -rf montecarlo
rm -rf geom
rm -rf proof
rm -rf sql
rm -rf misc
rm -rf test
rm -rf tmva
rm -rf tutorials
rm -rf rootx
mkdir -p share
mv man share
mkdir -p "${PREFIX}"
cp -rv * "${PREFIX}"
mkdir -p "${DOCDIR}"
mv "${PREFIX}/LICENSE" "${DOCDIR}"
mv "${PREFIX}/README" "${DOCDIR}"
}
em.add_to_family "compiler"
em.set_runtime_dependencies "${COMPILER}"
em.set_build_dependencies "${COMPILER}"
em.make_all

12
scripts/toolchain.build Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
declare -r SCRIPTS_DIR=$(dirname $0)
bash "${SCRIPTS_DIR}/m4.build" "$@" || exit 1
bash "${SCRIPTS_DIR}/autoconf.build" "$@" || exit 1
bash "${SCRIPTS_DIR}/automake.build" "$@" || exit 2
bash "${SCRIPTS_DIR}/libtool.build" "$@" || exit 3
bash "${SCRIPTS_DIR}/gmp.build" "$@" || exit 4
bash "${SCRIPTS_DIR}/mpfr.build" "$@" || exit 5
bash "${SCRIPTS_DIR}/mpc.build" "$@" || exit 6
bash "${SCRIPTS_DIR}/gcc.build" "$@" || exit 7

78
scripts/trilinos.build Executable file
View File

@@ -0,0 +1,78 @@
#!/bin/bash
source "$(dirname $0)/../lib/libem.bash"
declare -rx AR=ar
function em.configure() {
BLAS_PREFIX=$MATHLIB_PREFIX
LAPACK_PREFIX=$MATHLIB_PREFIX
PARMETIS_INCLUDE_DIRS=$PARMETIS_PREFIX/include
PARMETIS_LIBRARIES=$PARMETIS_PREFIX/lib/libparmetis.a
METIS_INCLUDE_DIRS=$PARMETIS_PREFIX/include/metis
METIS_LIBRARIES=$PARMETIS_PREFIX/lib/libmetis.a
BLAS_INCLUDE_DIRS="$BLAS_PREFIX/include"
BLAS_LIBRARY_DIRS="$BLAS_PREFIX/lib"
BLAS_LIBRARY_NAMES="blas"
LAPACK_INCLUDE_DIRS="$LAPACK_PREFIX/include"
LAPACK_LIBRARY_DIRS="$LAPACK_PREFIX/lib"
LAPACK_LIBRARY_NAMES="lapacke;lapack"
cmake \
--prefix=$PREFIX \
-DCMAKE_INSTALL_PREFIX:PATH=$PREFIX \
-DCMAKE_CXX_FLAGS:STRING="-DMPICH_IGNORE_CXX_SEEK -fPIC" \
-DCMAKE_C_FLAGS:STRING="-DMPICH_IGNORE_CXX_SEEK -fPIC" \
-DCMAKE_Fortran_FLAGS:STRING="-fPIC" \
-D CMAKE_BUILD_TYPE:STRING=DEBUG \
-D TPL_ENABLE_QT:BOOL=OFF \
-D TPL_ENABLE_MPI:BOOL=ON \
-D TPL_ENABLE_BLAS:BOOL=ON \
-D TPL_ENABLE_LAPACK:BOOL=ON \
-D TPL_ENABLE_METIS:BOOL=ON \
-D TPL_ENABLE_ParMETIS:BOOL=ON \
-D BLAS_LIBRARY_DIRS:PATH="$BLAS_LIBRARY_DIRS" \
-D BLAS_INCLUDE_DIRS:PATH="$BLAS_LIBRARY_DIRS" \
-D BLAS_LIBRARY_NAMES:STRING="$BLAS_LIBRARY_NAMES" \
-D LAPACK_LIBRARY_DIRS:PATH="$LAPACK_LIBRARY_DIRS" \
-D LAPACK_INCLUDE_DIRS:PATH="$LAPACK_INCLUDE_DIRS" \
-D LAPACK_LIBRARY_NAMES:STRING="$LAPACK_LIBRARY_NAMES" \
-D TPL_METIS_INCLUDE_DIRS:PATH=$METIS_INCLUDE_DIRS \
-D TPL_METIS_LIBRARIES:PATH=$METIS_LIBRARIES \
-D TPL_ParMETIS_INCLUDE_DIRS:PATH=$PARMETIS_INCLUDE_DIRS \
-D TPL_ParMETIS_LIBRARIES:PATH=$PARMETIS_LIBRARIES \
-D Trilinos_ENABLE_Amesos:BOOL=ON \
-D Trilinos_ENABLE_AztecOO:BOOL=ON \
-D Trilinos_ENABLE_Belos:BOOL=ON \
-D Trilinos_ENABLE_Epetra:BOOL=ON \
-D Trilinos_ENABLE_EpetraExt:BOOL=ON \
-D Trilinos_ENABLE_Galeri:BOOL=ON \
-D Trilinos_ENABLE_Ifpack:BOOL=ON \
-D Trilinos_ENABLE_Isorropia:BOOL=ON \
-D Trilinos_ENABLE_ML:BOOL=ON \
-D Trilinos_ENABLE_NOX:BOOL=ON \
-D Trilinos_ENABLE_Optika:BOOL=OFF \
-D Trilinos_ENABLE_Teuchos:BOOL=ON \
-D Trilinos_ENABLE_Tpetra:BOOL=ON \
-D Trilinos_ENABLE_TESTS:BOOL=OFF \
"${EM_SRCDIR}" || exit 1
}
function em.install_doc() {
install -m 0444 \
Copyright.txt \
LICENSE \
README \
RELEASE_NOTES \
"${DOCDIR}"
}
em.add_to_family "mpi"
em.set_runtime_dependencies "${MPI}"
em.set_build_dependencies "cmake" "${COMPILER}" "${MPI}" "hdf5" "mathlib" "parmetis"
em.make_all

33
scripts/vtk.build Executable file
View File

@@ -0,0 +1,33 @@
#!/bin/bash
#
# Notes:
# On Mac OS X VTK does not compile out of the box with self-compiled GCC.
# grep vor "long-branch" and "pascal-string" in the cmake configuration
# and remove these strings.
#
source "$(dirname $0)/../lib/libem.bash"
case ${OS} in
Darwin )
em.pre_configure() {
# for the time being: on Mac OS X we need GL/gl.h from MacPorts:
append_path C_INLCUDE_PATH '/opt/local/include'
append_path CPLUS_INCLUDE_PATH '/opt/local/include'
}
;;
esac
function em.configure() {
cmake -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX \
-DVTK_INSTALL_INCLUDE_DIR:PATH=include \
-DVTK_INSTALL_LIB_DIR:PATH=lib \
-DVTK_USE_COCOA:BOOL=OFF \
"${EM_SRCDIR}"
}
em.add_to_family "compiler"
em.set_runtime_dependencies "${COMPILER}"
em.set_build_dependencies "cmake" "${COMPILER}"
em.make_all