summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rwxr-xr-xlib/spack/env/cc15
-rw-r--r--lib/spack/spack/package.py7
-rw-r--r--lib/spack/spack/packages/graphlib.py14
-rw-r--r--lib/spack/spack/packages/launchmon/__init__.py45
-rw-r--r--lib/spack/spack/packages/launchmon/patch.lmon_install_dir147
-rw-r--r--lib/spack/spack/packages/mrnet.py14
-rw-r--r--lib/spack/spack/packages/spindle.py39
-rw-r--r--lib/spack/spack/packages/stat.py34
8 files changed, 314 insertions, 1 deletions
diff --git a/lib/spack/env/cc b/lib/spack/env/cc
index 06592febaa..0711c873e3 100755
--- a/lib/spack/env/cc
+++ b/lib/spack/env/cc
@@ -28,7 +28,16 @@ spack_env_path = get_path("SPACK_ENV_PATH")
# Figure out what type of operation we're doing
command = os.path.basename(sys.argv[0])
-cpp, cc, ccld, ld = range(4)
+
+cpp, cc, ccld, ld, version_check = range(5)
+
+########################################################################
+# TODO: this can to be removed once JIRA issue SPACK-16 is resolved
+#
+if command == 'CC':
+ command = 'c++'
+########################################################################
+
if command == 'cpp':
mode = cpp
elif command == 'ld':
@@ -40,6 +49,9 @@ elif '-c' in sys.argv:
else:
mode = ccld
+if '-V' in sys.argv or '-v' in sys.argv or '--version' in sys.argv:
+ mode = version_check
+
# Parse out the includes, libs, etc. so we can adjust them if need be.
parser = argparse.ArgumentParser(add_help=False)
parser.add_argument("-I", action='append', default=[], dest='include_path')
@@ -90,6 +102,7 @@ for item in ['.'] + spack_env_path:
os.environ["PATH"] = ":".join(clean_path)
full_command = [command] + arguments
+
if spack_debug:
input_log = os.path.join(spack_build_root, 'spack_cc_in.log')
output_log = os.path.join(spack_build_root, 'spack_cc_out.log')
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py
index a88fbc4863..68e4e30b3b 100644
--- a/lib/spack/spack/package.py
+++ b/lib/spack/spack/package.py
@@ -326,6 +326,9 @@ class Package(object):
"""Controls whether install and uninstall check deps before running."""
ignore_dependencies = False
+ """Dirty hack for forcing packages with uninterpretable URLs"""
+ force_url = False
+
def __init__(self, spec):
# These attributes are required for all packages.
@@ -557,11 +560,15 @@ class Package(object):
override this, e.g. for boost versions where you need to ensure that there
are _'s in the download URL.
"""
+ if self.force_url:
+ return self.default_version
return str(version)
def url_for_version(self, version):
"""Gives a URL that you can download a new version of this package from."""
+ if self.force_url:
+ return self.url
return url.substitute_version(self.__class__.url, self.url_version(version))
diff --git a/lib/spack/spack/packages/graphlib.py b/lib/spack/spack/packages/graphlib.py
new file mode 100644
index 0000000000..c959135147
--- /dev/null
+++ b/lib/spack/spack/packages/graphlib.py
@@ -0,0 +1,14 @@
+from spack import *
+
+class Graphlib(Package):
+ """Library to create, manipulate, and export graphs Graphlib."""
+ homepage = "http://https://github.com/lee218llnl/graphlib"
+ url = "https://github.com/lee218llnl/graphlib/archive/v2.0.0.tar.gz"
+
+ versions = { '2.0.0' : '43c6df84f1d38ba5a5dce0ae19371a70', }
+
+ def install(self, spec, prefix):
+ cmake(".", *std_cmake_args)
+
+ make()
+ make("install")
diff --git a/lib/spack/spack/packages/launchmon/__init__.py b/lib/spack/spack/packages/launchmon/__init__.py
new file mode 100644
index 0000000000..e2b82610fd
--- /dev/null
+++ b/lib/spack/spack/packages/launchmon/__init__.py
@@ -0,0 +1,45 @@
+##############################################################################
+# Copyright (c) 2014, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Written by Matthew LeGendre, legendre1@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://scalability-llnl.github.io/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License (as published by
+# the Free Software Foundation) version 2.1 dated February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+class Launchmon(Package):
+ homepage = "http://sourceforge.net/projects/launchmon"
+ url = "http://sourceforge.net/code-snapshots/svn/l/la/launchmon/code/launchmon-code-481-branches-launchmon-1.0-release.zip"
+ force_url = True
+ list_url = "http://sourceforge.net/p/launchmon/code/HEAD/tree"
+
+ #versions = {'1.0.0' : 'a0e5bfb7d82dc708d58bdbf93697886c'}
+ versions = {'1.0.0' : '9d1184397d3081b94e2c0577c3c605e5'}
+ patch('patch.lmon_install_dir', level=0)
+
+ def install(self, spec, prefix):
+ configure("--prefix=" + prefix)
+
+ # TODO: remove once Jira SPACK-19 is fixed
+ import shutil
+ shutil.copy2('/usr/bin/libtool', 'libtool')
+
+ make()
+ make("install")
diff --git a/lib/spack/spack/packages/launchmon/patch.lmon_install_dir b/lib/spack/spack/packages/launchmon/patch.lmon_install_dir
new file mode 100644
index 0000000000..8a1d93fdc9
--- /dev/null
+++ b/lib/spack/spack/packages/launchmon/patch.lmon_install_dir
@@ -0,0 +1,147 @@
+Index: launchmon/src/linux/lmon_api/Makefile.am
+===================================================================
+--- launchmon/src/linux/lmon_api/Makefile.am (revision 481)
++++ launchmon/src/linux/lmon_api/Makefile.am (working copy)
+@@ -80,13 +80,10 @@
+ libmonfeapi_la_CFLAGS = $(AM_CFLAGS)
+ libmonfeapi_la_CXXFLAGS = $(AM_CXXFLAGS)
+
+-libmonfeapi_la_LDFLAGS = -L$(top_srcdir)/@COMMLOC@ \
+- -L$(top_srcdir)/@GCRYPTLOC@ \
+- -L$(top_srcdir)/@GPGERRLOC@ \
+- $(AM_LDFLAGS) \
+- -version-info @LMON_CURRENT@:@LMON_REVISION@:@LMON_AGE@
++libmonfeapi_la_LDFLAGS = $(AM_LDFLAGS) \
++ -version-info @LMON_CURRENT@:@LMON_REVISION@:@LMON_AGE@
+
+-libmonfeapi_la_LIBADD = @LIBPTHREAD@ @LIBCOMM@ @LIBGCRYPT@ @LIBGPGERR@ @LIBRT@
++libmonfeapi_la_LIBADD = @LIBPTHREAD@ $(top_builddir)/@COMMLOC@/@LIBCOMM@ $(top_builddir)/@GCRYPTLOC@/@LIBGCRYPT@ $(top_builddir)/@GPGERRLOC@/@LIBGPGERR@ @LIBRT@
+
+ libmonbeapi_la_SOURCES = lmon_be.cxx \
+ lmon_daemon_internal.cxx \
+@@ -113,13 +110,10 @@
+ libmonbeapi_la_CFLAGS = $(AM_CFLAGS)
+ libmonbeapi_la_CXXFLAGS = $(AM_CXXFLAGS)
+
+-libmonbeapi_la_LDFLAGS = -L$(top_srcdir)/@COMMLOC@ \
+- -L$(top_srcdir)/@GCRYPTLOC@ \
+- -L$(top_srcdir)/@GPGERRLOC@ \
+- $(AM_LDFLAGS) \
++libmonbeapi_la_LDFLAGS = $(AM_LDFLAGS) \
+ -version-info @LMON_CURRENT@:@LMON_REVISION@:@LMON_AGE@
+
+-libmonbeapi_la_LIBADD = @LIBCOMM@ @LIBGCRYPT@ @LIBGPGERR@
++libmonbeapi_la_LIBADD = $(top_builddir)/@COMMLOC@/@LIBCOMM@ $(top_builddir)/@GCRYPTLOC@/@LIBGCRYPT@ $(top_builddir)/@GPGERRLOC@/@LIBGPGERR@
+
+
+ #
+@@ -146,10 +140,8 @@
+
+ libmonmwapi_la_CXXFLAGS = $(AM_CXXFLAGS)
+
+-libmonmwapi_la_LDFLAGS = -L$(top_srcdir)/@COMMLOC@ \
+- -L$(top_srcdir)/@GCRYPTLOC@ \
+- -L$(top_srcdir)/@GPGERRLOC@ \
+- $(AM_LDFLAGS) \
++libmonmwapi_la_LDFLAGS = $(AM_LDFLAGS) \
+ -version-info @LMON_CURRENT@:@LMON_REVISION@:@LMON_AGE@
+
+-libmonmwapi_la_LIBADD = @LIBCOMM@ @LIBGCRYPT@ @LIBGPGERR@
++
++libmonmwapi_la_LIBADD = $(top_builddir)/@COMMLOC@/@LIBCOMM@ $(top_builddir)/@GCRYPTLOC@/@LIBGCRYPT@ $(top_builddir)/@GPGERRLOC@/@LIBGPGERR@
+Index: tools/cobo/test/Makefile.am
+===================================================================
+--- tools/cobo/test/Makefile.am (revision 481)
++++ tools/cobo/test/Makefile.am (working copy)
+@@ -37,12 +37,12 @@
+
+ client_SOURCES = client.c
+
+-client_LDFLAGS = -L$(top_srcdir)/@COMMLOC@
++client_LDFLAGS =
+
+-client_LDADD = @LIBCOMM@
++client_LDADD = $(top_srcdir)/@COMMLOC@/@LIBCOMM@
+
+ server_rsh_SOURCES = server_rsh.c
+
+-server_rsh_LDFLAGS = -L$(top_srcdir)/@COMMLOC@
++server_rsh_LDFLAGS =
+
+-server_rsh_LDADD = @LIBCOMM@
++server_rsh_LDADD = $(top_srcdir)/@COMMLOC@/@LIBCOMM@
+Index: tools/pmgr_collective/test/Makefile.am
+===================================================================
+--- tools/pmgr_collective/test/Makefile.am (revision 481)
++++ tools/pmgr_collective/test/Makefile.am (working copy)
+@@ -31,18 +31,18 @@
+ ## Jun 10 2008 DHA: Copied from the old Makefile.
+ ##
+
+-INCLUDES = -I$(top_srcdir)/@COMMLOC@
++INCLUDES =
+
+ noinst_PROGRAMS = client mpirun_rsh
+
+ client_SOURCES = client.c
+
+-client_LDFLAGS = -L$(top_srcdir)/@COMMLOC@
++client_LDFLAGS =
+
+-client_LDADD = @LIBCOMM@
++client_LDADD = @COMMLOC@/@LIBCOMM@
+
+ mpirun_rsh_SOURCES = mpirun_rsh.c
+
+-mpirun_rsh_LDFLAGS = -L$(top_srcdir)/@COMMLOC@
++mpirun_rsh_LDFLAGS =
+
+-mpirun_rsh_LDADD = @LIBCOMM@
++mpirun_rsh_LDADD = @COMMLOC@/@LIBCOMM@
+Index: config/x_ac_bootfabric.m4
+===================================================================
+--- config/x_ac_bootfabric.m4 (revision 481)
++++ config/x_ac_bootfabric.m4 (working copy)
+@@ -63,7 +63,7 @@
+ #AC_DEFINE(TOOL_SS_ENV, "LMON_SHARED_SECRET", [Define TOOL_SS_ENV])
+ #AC_DEFINE(TOOL_SCH_ENV, "LMON_SEC_CHK", [Define TOOL_SCH_ENV])
+ #AC_SUBST(COMMLOC, tools/pmgr_collective/src)
+- #AC_SUBST(LIBCOMM, -lpmgr_collective)
++ #AC_SUBST(LIBCOMM, libcobo.la)
+ #else
+ commfab_found="no"
+ AC_MSG_ERROR([--with-bootfabric=pmgr is given, but pmgr_collective has been deprecated])
+@@ -87,7 +87,7 @@
+ AC_DEFINE(TOOL_SS_ENV, "LMON_SHARED_SECRET", [Define TOOL_SS_ENV])
+ AC_DEFINE(TOOL_SCH_ENV, "LMON_SEC_CHK", [Define TOOL_SCH_ENV])
+ AC_SUBST(COMMLOC, tools/cobo/src)
+- AC_SUBST(LIBCOMM, -lcobo)
++ AC_SUBST(LIBCOMM, libcobo.la)
+
+ if test "x$with_cobo_port" != "xcheck" -a "x$with_cobo_port" != "xyes"; then
+ AC_DEFINE(COBO_BEGIN_PORT, $with_cobo_port, [Define a beginning port for COBO_BASED])
+@@ -117,7 +117,7 @@
+ AC_DEFINE(TOOL_SS_ENV, "LMON_SHARED_SECRET", [Define TOOL_SS_ENV])
+ AC_DEFINE(TOOL_SCH_ENV, "LMON_SEC_CHK", [Define TOOL_SCH_ENV])
+ AC_SUBST(COMMLOC, tools/cobo/src)
+- AC_SUBST(LIBCOMM, -lcobo)
++ AC_SUBST(LIBCOMM, libcobo.la)
+
+ if test "x$with_cobo_port" != "xcheck" -a "x$with_cobo_port" != "xyes"; then
+ AC_DEFINE(COBO_BEGIN_PORT, $with_cobo_port, [Define a beginning port for COBO_BASED])
+Index: config/x_ac_gcrpyt.m4
+===================================================================
+--- config/x_ac_gcrypt.m4 2011-10-22 00:50:38.000000000 -0700
++++ config/x_ac_gcrypt.patched.m4 2014-03-14 11:33:59.189220000 -0700
+@@ -55,8 +55,8 @@
+ AC_CONFIG_SUBDIRS([tools/libgpg-error])
+ AC_SUBST(GPGERRLOC, [tools/libgpg-error/src])
+ AC_SUBST(GCRYPTLOC, [tools/libgcrypt/src])
+- AC_SUBST(LIBGCRYPT, [-lgcrypt])
+- AC_SUBST(LIBGPGERR, [-lgpg-error])
++ AC_SUBST(LIBGCRYPT, [libgcrypt.la])
++ AC_SUBST(LIBGPGERR, [libgpg-error.la])
+ gcrypt_configured="yes"
+ else
+ AC_MSG_ERROR([tools/libgpg-error or tools/libgcrypt not found])
+
diff --git a/lib/spack/spack/packages/mrnet.py b/lib/spack/spack/packages/mrnet.py
new file mode 100644
index 0000000000..0fcbe68ee3
--- /dev/null
+++ b/lib/spack/spack/packages/mrnet.py
@@ -0,0 +1,14 @@
+from spack import *
+
+class Mrnet(Package):
+ """The MRNet Multi-Cast Reduction Network."""
+ homepage = "http://paradyn.org/mrnet"
+ url = "ftp://ftp.cs.wisc.edu/paradyn/mrnet/mrnet_4.0.0.tar.gz"
+
+ versions = { '4.0.0' : 'd00301c078cba57ef68613be32ceea2f', }
+
+ def install(self, spec, prefix):
+ configure("--prefix=%s" %prefix, "--enable-shared")
+
+ make(parallel=False)
+ make("install", parallel=False)
diff --git a/lib/spack/spack/packages/spindle.py b/lib/spack/spack/packages/spindle.py
new file mode 100644
index 0000000000..0d106221d8
--- /dev/null
+++ b/lib/spack/spack/packages/spindle.py
@@ -0,0 +1,39 @@
+##############################################################################
+# Copyright (c) 2014, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Written by Matthew LeGendre, legendre1@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://scalability-llnl.github.io/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License (as published by
+# the Free Software Foundation) version 2.1 dated February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+class Spindle(Package):
+ homepage = "https://computation-rnd.llnl.gov/spindle"
+ url = "https://github.com/hpc/Spindle/archive/v0.8.1.tar.gz"
+ list_url = "https://github.com/hpc/Spindle/releases"
+
+ versions = {'0.8.1' : 'f11793a6b9d8df2cd231fccb2857d912' }
+
+ depends_on("launchmon")
+
+ def install(self, spec, prefix):
+ configure("--prefix=" + prefix)
+ make()
+ make("install")
diff --git a/lib/spack/spack/packages/stat.py b/lib/spack/spack/packages/stat.py
new file mode 100644
index 0000000000..8d9d9f406a
--- /dev/null
+++ b/lib/spack/spack/packages/stat.py
@@ -0,0 +1,34 @@
+from spack import *
+
+class Stat(Package):
+ """Library to create, manipulate, and export graphs Graphlib."""
+ homepage = "http://paradyn.org/STAT/STAT.html"
+ url = "https://github.com/lee218llnl/stat/archive/v2.0.0.tar.gz"
+
+ versions = { '2.0.0' : 'c7494210b0ba26b577171b92838e1a9b', }
+
+ depends_on('libdwarf')
+ depends_on('dyninst')
+ depends_on('graphlib')
+ #depends_on('launchmon') # TODO: when added, path gets too long (Jira SPACK-21)!
+ depends_on('mrnet')
+
+ def install(self, spec, prefix):
+ my_mrnet = spec['mrnet']
+ my_graphlib = spec['graphlib']
+ #my_launchmon = spec['launchmon']
+ my_dyninst = spec['dyninst']
+ my_libdwarf = spec['libdwarf']
+
+ # TODO: this uses the launchmon package, but path is too long (see depends_on above) (Jira SPACK-21)
+ #configure("--enable-gui", "--prefix=%s" %prefix, "--with-launchmon=%s" %my_launchmon.prefix, "--with-mrnet=%s" %my_mrnet.prefix, "--with-graphlib=%s" %my_graphlib.prefix, "--with-stackwalker=%s" %my_dyninst.prefix, "--with-libdwarf=%s" %my_libdwarf.prefix)
+
+ # TODO: the configure line above is the proper one once Jira SPACK-21 is fixed
+ configure("--enable-gui", "--prefix=%s" %prefix, "--with-launchmon=/collab/usr/global/tools/launchmon/chaos_5_x86_64_ib/launchmon-1.0.0-20140312", "--with-mrnet=%s" %my_mrnet.prefix, "--with-graphlib=%s" %my_graphlib.prefix, "--with-stackwalker=%s" %my_dyninst.prefix, "--with-libdwarf=%s" %my_libdwarf.prefix)
+
+ # TODO: remove once Jira SPACK-19 is fixed
+ import shutil
+ shutil.copy2('/usr/bin/libtool', 'libtool')
+
+ make(parallel=False)
+ make("install")