Commit 214f98fc authored by gsell's avatar gsell
Browse files

Merge branch 'master' of gitorious.psi.ch:pmodules/src

parents 575704d8 21e9b972
...@@ -307,6 +307,37 @@ em.cleanup_env() { ...@@ -307,6 +307,37 @@ em.cleanup_env() {
} }
#
# find tarball
# $1: download directory
# $2: name without version
# $3: version
#
function find_tarball() {
local -r dir=$1
local -r name=$2
local -r version=$3
TARBALL=""
local ext
for ext in tar tar.gz tgz tar.bz2 tar.xz; do
local fname="${dir}/${name}-${OS}-${version}.${ext}"
if [[ -r "${fname}" ]]; then
TARBALL="${fname}"
break
fi
local fname="${dir}/${name}-${version}.${ext}"
if [[ -r "${fname}" ]]; then
TARBALL="${fname}"
break
fi
done
if [[ -z ${TARBALL} ]]; then
error "tar-ball for $P/$V not found."
exit 43
fi
}
#setup module specific environment #setup module specific environment
function _setup_env2() { function _setup_env2() {
if [[ -z ${MODULE_FAMILY} ]]; then if [[ -z ${MODULE_FAMILY} ]]; then
...@@ -456,19 +487,7 @@ function _setup_env2() { ...@@ -456,19 +487,7 @@ function _setup_env2() {
DOCDIR="${PREFIX}/share/doc/$P" DOCDIR="${PREFIX}/share/doc/$P"
# set tar-ball and flags for tar # set tar-ball and flags for tar
TARBALL="${BUILD_DOWNLOADSDIR}/${P/_serial}" find_tarball "${BUILD_DOWNLOADSDIR}" "${P/_serial}" "${V}"
if [[ -r "${TARBALL}-${V}.tar.gz" ]]; then
TARBALL+="-${V}.tar.gz"
elif [[ -r "${TARBALL}-${OS}-${V}.tar.gz" ]]; then
TARBALL+="-${OS}-${V}.tar.gz"
elif [[ -r "${TARBALL}-${V}.tar.bz2" ]]; then
TARBALL+="-${V}.tar.bz2"
elif [[ -r "${TARBALL}-${OS}-${V}.tar.bz2" ]]; then
TARBALL+="-${OS}-${V}.tar.bz2"
else
error "tar-ball for $P/$V not found."
exit 43
fi
} }
...@@ -500,19 +519,8 @@ function _setup_env2_bootstrap() { ...@@ -500,19 +519,8 @@ function _setup_env2_bootstrap() {
DOCDIR="${PREFIX}/share/doc/$P" DOCDIR="${PREFIX}/share/doc/$P"
# set tar-ball and flags for tar # set tar-ball and flags for tar
TARBALL="${BUILD_DOWNLOADSDIR}/${P/_serial}" find_tarball "${BUILD_DOWNLOADSDIR}" "${P/_serial}" "${V}"
if [[ -r "${TARBALL}-${V}.tar.gz" ]]; then
TARBALL+="-${V}.tar.gz"
elif [[ -r "${TARBALL}-${OS}-${V}.tar.gz" ]]; then
TARBALL+="-${OS}-${V}.tar.gz"
elif [[ -r "${TARBALL}-${V}.tar.bz2" ]]; then
TARBALL+="-${V}.tar.bz2"
elif [[ -r "${TARBALL}-${OS}-${V}.tar.bz2" ]]; then
TARBALL+="-${OS}-${V}.tar.bz2"
else
error "tar-ball for $P/$V not found."
exit 43
fi
C_INCLUDE_PATH="${PREFIX}/include" C_INCLUDE_PATH="${PREFIX}/include"
CPLUS_INCLUDE_PATH="${PREFIX}/include" CPLUS_INCLUDE_PATH="${PREFIX}/include"
CPP_INCLUDE_PATH="${PREFIX}/include" CPP_INCLUDE_PATH="${PREFIX}/include"
......
...@@ -124,7 +124,7 @@ save_env() { ...@@ -124,7 +124,7 @@ save_env() {
s+="$( typeset -p $1 );" s+="$( typeset -p $1 );"
shift shift
done done
echo export PMODULES_ENV=$( base64 <<< "$s" ) echo export PMODULES_ENV=$( "${PMODULES_HOME}/bin/base64" --wrap=0 <<< "$s" )
} }
#module purge #module purge
......
...@@ -37,7 +37,7 @@ save_env() { ...@@ -37,7 +37,7 @@ save_env() {
s+="$( typeset -p $1 );" s+="$( typeset -p $1 );"
shift shift
done done
echo export PMODULES_ENV=$( base64 <<< "$s" ) echo export PMODULES_ENV=$( "${PMODULES_HOME}/bin/base64" --wrap=0 <<< "$s" )
} }
export_env() { export_env() {
...@@ -425,14 +425,12 @@ get_release() { ...@@ -425,14 +425,12 @@ get_release() {
: ${PMODULES_DEFINED_RELEASES:=':unstable:stable:deprecated:'} : ${PMODULES_DEFINED_RELEASES:=':unstable:stable:deprecated:'}
declare used_releases=":${USED_RELEASES}:"
is_release() { is_release() {
[[ ${PMODULES_DEFINED_RELEASES} =~ :$1: ]] [[ ${PMODULES_DEFINED_RELEASES} =~ :$1: ]]
} }
is_used_release() { is_used_release() {
[[ ${used_releases} =~ :$1: ]] [[ ":${USED_RELEASES}:" =~ :$1: ]]
} }
declare used_families=":${PMODULES_USED_GROUPS}:" declare used_families=":${PMODULES_USED_GROUPS}:"
...@@ -992,7 +990,7 @@ subcommand_use() { ...@@ -992,7 +990,7 @@ subcommand_use() {
done done
info "\nUsed releases:" info "\nUsed releases:"
for r in ${used_releases//:/ }; do for r in ${USED_RELEASES//:/ }; do
info "\t${r}" info "\t${r}"
done done
info "\nUnused releases:" info "\nUnused releases:"
...@@ -1435,7 +1433,7 @@ subcommand_initclear() { ...@@ -1435,7 +1433,7 @@ subcommand_initclear() {
} }
if [[ -n ${PMODULES_ENV} ]]; then if [[ -n ${PMODULES_ENV} ]]; then
eval "$(base64 -D <<< "${PMODULES_ENV}" 2>/dev/null)" eval "$("${PMODULES_HOME}/bin/base64" -d <<< "${PMODULES_ENV}" 2>/dev/null)"
fi fi
case $1 in case $1 in
......
...@@ -8,11 +8,12 @@ source "${BOOTSTRAP_DIR}/Pmodules_version.conf" ...@@ -8,11 +8,12 @@ source "${BOOTSTRAP_DIR}/Pmodules_version.conf"
unset PMODULES_HOME unset PMODULES_HOME
source "/opt/psi/config/environment.bash" source "/opt/psi/config/environment.bash"
${BOOTSTRAP_DIR}/gettext/build --bootstrap || { echo "compiling 'gettext' failed!"; exit 1; } ${BOOTSTRAP_DIR}/coreutils/build --bootstrap || { echo "compiling 'coreutils' failed!"; exit 1; }
${BOOTSTRAP_DIR}/getopt/build --bootstrap || { echo "compiling 'getopt' failed!"; exit 1; } ${BOOTSTRAP_DIR}/gettext/build --bootstrap || { echo "compiling 'gettext' failed!"; exit 1; }
${BOOTSTRAP_DIR}/dialog/build --bootstrap || { echo "compiling 'dialog' failed!"; exit 1; } ${BOOTSTRAP_DIR}/getopt/build --bootstrap || { echo "compiling 'getopt' failed!"; exit 1; }
${BOOTSTRAP_DIR}/bash/build --bootstrap || { echo "compiling 'bash' failed!"; exit 1; } ${BOOTSTRAP_DIR}/dialog/build --bootstrap || { echo "compiling 'dialog' failed!"; exit 1; }
${BOOTSTRAP_DIR}/Tcl/build --bootstrap || { echo "compiling 'Tcl' failed!"; exit 1; } ${BOOTSTRAP_DIR}/bash/build --bootstrap || { echo "compiling 'bash' failed!"; exit 1; }
${BOOTSTRAP_DIR}/Tcl/build --bootstrap || { echo "compiling 'Tcl' failed!"; exit 1; }
# we have to remove the init directory - otherwise the next build will fail... # we have to remove the init directory - otherwise the next build will fail...
rm -rf "${PMODULES_HOME}/init" rm -rf "${PMODULES_HOME}/init"
......
#!/bin/bash
source "$(dirname $0)/../../../lib/libem.bash"
function em.configure() {
"${MODULE_SRCDIR}"/configure \
--prefix="${PREFIX}" \
|| exit 1
}
em.add_to_family 'Tools'
em.make_all
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment