Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Pmodules
buildblocks
Commits
214f98fc
Commit
214f98fc
authored
May 06, 2015
by
gsell
Browse files
Merge branch 'master' of gitorious.psi.ch:pmodules/src
parents
575704d8
21e9b972
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
38 deletions
+57
-38
lib/libem.bash
lib/libem.bash
+34
-26
scripts/Bootstrap/Pmodules/bash
scripts/Bootstrap/Pmodules/bash
+1
-1
scripts/Bootstrap/Pmodules/modulecmd.in
scripts/Bootstrap/Pmodules/modulecmd.in
+4
-6
scripts/Bootstrap/compile_pmodules.sh
scripts/Bootstrap/compile_pmodules.sh
+6
-5
scripts/Bootstrap/coreutils/build
scripts/Bootstrap/coreutils/build
+12
-0
No files found.
lib/libem.bash
View file @
214f98fc
...
...
@@ -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
function
_setup_env2
()
{
if
[[
-z
${
MODULE_FAMILY
}
]]
;
then
...
...
@@ -456,19 +487,7 @@ function _setup_env2() {
DOCDIR
=
"
${
PREFIX
}
/share/doc/
$P
"
# set tar-ball and flags for tar
TARBALL
=
"
${
BUILD_DOWNLOADSDIR
}
/
${
P
/_serial
}
"
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
find_tarball
"
${
BUILD_DOWNLOADSDIR
}
"
"
${
P
/_serial
}
"
"
${
V
}
"
}
...
...
@@ -500,19 +519,8 @@ function _setup_env2_bootstrap() {
DOCDIR
=
"
${
PREFIX
}
/share/doc/
$P
"
# set tar-ball and flags for tar
TARBALL
=
"
${
BUILD_DOWNLOADSDIR
}
/
${
P
/_serial
}
"
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
find_tarball
"
${
BUILD_DOWNLOADSDIR
}
"
"
${
P
/_serial
}
"
"
${
V
}
"
C_INCLUDE_PATH
=
"
${
PREFIX
}
/include"
CPLUS_INCLUDE_PATH
=
"
${
PREFIX
}
/include"
CPP_INCLUDE_PATH
=
"
${
PREFIX
}
/include"
...
...
scripts/Bootstrap/Pmodules/bash
View file @
214f98fc
...
...
@@ -124,7 +124,7 @@ save_env() {
s+
=
"
$(
typeset
-p
$1
)
;"
shift
done
echo export
PMODULES_ENV
=
$(
base64
<<<
"
$s
"
)
echo export
PMODULES_ENV
=
$(
"
${
PMODULES_HOME
}
/bin/base64"
--wrap
=
0
<<<
"
$s
"
)
}
#module purge
...
...
scripts/Bootstrap/Pmodules/modulecmd.in
View file @
214f98fc
...
...
@@ -37,7 +37,7 @@ save_env() {
s+
=
"
$(
typeset
-p
$1
)
;"
shift
done
echo export
PMODULES_ENV
=
$(
base64
<<<
"
$s
"
)
echo export
PMODULES_ENV
=
$(
"
${
PMODULES_HOME
}
/bin/base64"
--wrap
=
0
<<<
"
$s
"
)
}
export_env
()
{
...
...
@@ -425,14 +425,12 @@ get_release() {
:
${
PMODULES_DEFINED_RELEASES
:
=
':unstable:stable:deprecated:'
}
declare
used_releases
=
":
${
USED_RELEASES
}
:"
is_release
()
{
[[
${
PMODULES_DEFINED_RELEASES
}
=
~ :
$1
:
]]
}
is_used_release
()
{
[[
${
used_releases
}
=
~ :
$1
:
]]
[[
":
${
USED_RELEASES
}
:"
=
~ :
$1
:
]]
}
declare
used_families
=
":
${
PMODULES_USED_GROUPS
}
:"
...
...
@@ -992,7 +990,7 @@ subcommand_use() {
done
info
"
\n
Used releases:"
for
r
in
${
used_releases
//
:/
}
;
do
for
r
in
${
USED_RELEASES
//
:/
}
;
do
info
"
\t
${
r
}
"
done
info
"
\n
Unused releases:"
...
...
@@ -1435,7 +1433,7 @@ subcommand_initclear() {
}
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
case
$1
in
...
...
scripts/Bootstrap/compile_pmodules.sh
View file @
214f98fc
...
...
@@ -8,11 +8,12 @@ source "${BOOTSTRAP_DIR}/Pmodules_version.conf"
unset
PMODULES_HOME
source
"/opt/psi/config/environment.bash"
${
BOOTSTRAP_DIR
}
/gettext/build
--bootstrap
||
{
echo
"compiling 'gettext' failed!"
;
exit
1
;
}
${
BOOTSTRAP_DIR
}
/getopt/build
--bootstrap
||
{
echo
"compiling 'getopt' failed!"
;
exit
1
;
}
${
BOOTSTRAP_DIR
}
/dialog/build
--bootstrap
||
{
echo
"compiling 'dialog' 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
;
}
${
BOOTSTRAP_DIR
}
/coreutils/build
--bootstrap
||
{
echo
"compiling 'coreutils' failed!"
;
exit
1
;
}
${
BOOTSTRAP_DIR
}
/gettext/build
--bootstrap
||
{
echo
"compiling 'gettext' failed!"
;
exit
1
;
}
${
BOOTSTRAP_DIR
}
/getopt/build
--bootstrap
||
{
echo
"compiling 'getopt' failed!"
;
exit
1
;
}
${
BOOTSTRAP_DIR
}
/dialog/build
--bootstrap
||
{
echo
"compiling 'dialog' 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...
rm
-rf
"
${
PMODULES_HOME
}
/init"
...
...
scripts/Bootstrap/coreutils/build
0 → 100755
View file @
214f98fc
#!/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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment