summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/package.py7
-rw-r--r--lib/spack/spack/packages/launchmon/__init__.py45
-rw-r--r--lib/spack/spack/packages/launchmon/patch.lmon_install_dir147
3 files changed, 199 insertions, 0 deletions
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/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])
+