summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/build_environment.py14
-rw-r--r--lib/spack/spack/cmd/location.py1
-rw-r--r--var/spack/packages/Mitos/package.py18
-rw-r--r--var/spack/packages/dbus/package.py4
-rw-r--r--var/spack/packages/gperf/package.py19
-rw-r--r--var/spack/packages/libpng/package.py4
-rw-r--r--var/spack/packages/memaxes/package.py20
-rw-r--r--var/spack/packages/qt/package.py24
-rw-r--r--var/spack/packages/vtk/package.py40
9 files changed, 139 insertions, 5 deletions
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py
index 45353ec640..70b5c89411 100644
--- a/lib/spack/spack/build_environment.py
+++ b/lib/spack/spack/build_environment.py
@@ -183,6 +183,10 @@ def set_module_variables_for_package(pkg):
if platform.mac_ver()[0]:
m.std_cmake_args.append('-DCMAKE_FIND_FRAMEWORK=LAST')
+ # Set up CMake rpath
+ m.std_cmake_args.append('-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE')
+ m.std_cmake_args.append('-DCMAKE_INSTALL_RPATH=%s' % ":".join(get_rpaths(pkg)))
+
# Emulate some shell commands for convenience
m.pwd = os.getcwd
m.cd = os.chdir
@@ -202,6 +206,16 @@ def set_module_variables_for_package(pkg):
m.prefix = pkg.prefix
+def get_rpaths(pkg):
+ """Get a list of all the rpaths for a package."""
+ rpaths = [pkg.prefix.lib, pkg.prefix.lib64]
+ rpaths.extend(d.prefix.lib for d in pkg.spec.traverse(root=False)
+ if os.path.isdir(d.prefix.lib))
+ rpaths.extend(d.prefix.lib64 for d in pkg.spec.traverse(root=False)
+ if os.path.isdir(d.prefix.lib64))
+ return rpaths
+
+
def setup_package(pkg):
"""Execute all environment setup routines."""
set_compiler_environment_variables(pkg)
diff --git a/lib/spack/spack/cmd/location.py b/lib/spack/spack/cmd/location.py
index 810c34d0a6..709e894b7f 100644
--- a/lib/spack/spack/cmd/location.py
+++ b/lib/spack/spack/cmd/location.py
@@ -23,6 +23,7 @@
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
import os
+import sys
from external import argparse
import llnl.util.tty as tty
diff --git a/var/spack/packages/Mitos/package.py b/var/spack/packages/Mitos/package.py
new file mode 100644
index 0000000000..272360a55c
--- /dev/null
+++ b/var/spack/packages/Mitos/package.py
@@ -0,0 +1,18 @@
+from spack import *
+
+class Mitos(Package):
+ """Mitos is a library and a tool for collecting sampled memory
+ performance data to view with MemAxes"""
+
+ homepage = "https://github.com/scalability-llnl/Mitos"
+ url = "https://github.com/scalability-llnl/Mitos"
+
+ version('0.7', git='https://github.com/scalability-llnl/Mitos.git', tag='v0.7')
+
+ depends_on('dyninst')
+
+ def install(self, spec, prefix):
+ with working_dir('spack-build', create=True):
+ cmake('..', *std_cmake_args)
+ make()
+ make("install")
diff --git a/var/spack/packages/dbus/package.py b/var/spack/packages/dbus/package.py
index 5fee103f03..f7f394498c 100644
--- a/var/spack/packages/dbus/package.py
+++ b/var/spack/packages/dbus/package.py
@@ -23,3 +23,7 @@ class Dbus(Package):
configure("--prefix=%s" % prefix)
make()
make("install")
+
+ # dbus needs a machine id generated after install
+ dbus_uuidgen = Executable(join_path(prefix.bin, 'dbus-uuidgen'))
+ dbus_uuidgen('--ensure')
diff --git a/var/spack/packages/gperf/package.py b/var/spack/packages/gperf/package.py
new file mode 100644
index 0000000000..32551b67b4
--- /dev/null
+++ b/var/spack/packages/gperf/package.py
@@ -0,0 +1,19 @@
+from spack import *
+
+class Gperf(Package):
+ """GNU gperf is a perfect hash function generator. For a given
+ list of strings, it produces a hash function and hash table, in
+ form of C or C++ code, for looking up a value depending on the
+ input string. The hash function is perfect, which means that the
+ hash table has no collisions, and the hash table lookup needs a
+ single string comparison only."""
+
+ homepage = "https://www.gnu.org/software/gperf/"
+ url = "http://ftp.gnu.org/pub/gnu/gperf/gperf-3.0.4.tar.gz"
+
+ version('3.0.4', 'c1f1db32fb6598d6a93e6e88796a8632')
+
+ def install(self, spec, prefix):
+ configure("--prefix=%s" % prefix)
+ make()
+ make("install")
diff --git a/var/spack/packages/libpng/package.py b/var/spack/packages/libpng/package.py
index a6d9bf0b46..affc14ea92 100644
--- a/var/spack/packages/libpng/package.py
+++ b/var/spack/packages/libpng/package.py
@@ -3,9 +3,9 @@ from spack import *
class Libpng(Package):
"""libpng graphics file format"""
homepage = "http://www.libpng.org/pub/png/libpng.html"
- url = "http://sourceforge.net/projects/libpng/files/libpng16/1.6.14/libpng-1.6.14.tar.gz/download"
+ url = "http://prdownloads.sourceforge.net/libpng/libpng-1.6.16.tar.gz?download"
- version('1.6.14', '2101b3de1d5f348925990f9aa8405660')
+ version('1.6.16', '1a4ad377919ab15b54f6cb6a3ae2622d')
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
diff --git a/var/spack/packages/memaxes/package.py b/var/spack/packages/memaxes/package.py
new file mode 100644
index 0000000000..afa62009a6
--- /dev/null
+++ b/var/spack/packages/memaxes/package.py
@@ -0,0 +1,20 @@
+from spack import *
+
+class Memaxes(Package):
+ """MemAxes is a visualizer for sampled memory trace data."""
+
+ homepage = "https://github.com/scalability-llnl/MemAxes"
+
+ version('0.5', 'b0f561d48aa7301e028d074bc4b5751b',
+ url='https://github.com/scalability-llnl/MemAxes/archive/v0.5.tar.gz')
+
+ depends_on("cmake@2.8.9:")
+ depends_on("qt@5:")
+ depends_on("vtk")
+
+ def install(self, spec, prefix):
+ with working_dir('spack-build', create=True):
+ cmake('..', *std_cmake_args)
+ make()
+ make("install")
+
diff --git a/var/spack/packages/qt/package.py b/var/spack/packages/qt/package.py
index 6a55c89701..96e484b995 100644
--- a/var/spack/packages/qt/package.py
+++ b/var/spack/packages/qt/package.py
@@ -3,7 +3,16 @@ from spack import *
class Qt(Package):
"""Qt is a comprehensive cross-platform C++ application framework."""
homepage = "http://qt.io"
+ list_url = 'http://download.qt-project.org/official_releases/qt/'
+ list_depth = 2
+ version('5.4.0', 'e8654e4b37dd98039ba20da7a53877e6',
+ url='http://download.qt-project.org/official_releases/qt/5.4/5.4.0/single/qt-everywhere-opensource-src-5.4.0.tar.gz')
+ version('5.3.2', 'febb001129927a70174467ecb508a682',
+ url='http://download.qt.io/archive/qt/5.3/5.3.2/single/qt-everywhere-opensource-src-5.3.2.tar.gz')
+
+ version('5.2.1', 'a78408c887c04c34ce615da690e0b4c8',
+ url='http://download.qt.io/archive/qt/5.2/5.2.1/single/qt-everywhere-opensource-src-5.2.1.tar.gz')
version('4.8.6', '2edbe4d6c2eff33ef91732602f3518eb',
url="http://download.qt-project.org/official_releases/qt/4.8/4.8.6/qt-everywhere-opensource-src-4.8.6.tar.gz")
@@ -20,11 +29,20 @@ class Qt(Package):
depends_on("libmng")
depends_on("jpeg")
+ depends_on("gperf") # Needed to build Qt with webkit.
+
def patch(self):
+ if self.spec.satisfies('@4'):
+ qmake_conf = 'mkspecs/common/g++-base.conf'
+ elif self.spec.satisfies('@5'):
+ qmake_conf = 'qtbase/mkspecs/common/g++-base.conf'
+ else:
+ return
+
# Fix qmake compilers in the default mkspec
- qmake_conf = 'mkspecs/common/g++-base.conf'
- filter_file(r'^QMAKE_CC *=.*$', 'QMAKE_CC = cc', qmake_conf)
- filter_file(r'^QMAKE_CXX *=.*$', 'QMAKE_CXX = c++', qmake_conf)
+ filter_file(r'^QMAKE_COMPILER *=.*$', 'QMAKE_COMPILER = cc', qmake_conf)
+ filter_file(r'^QMAKE_CC *=.*$', 'QMAKE_CC = cc', qmake_conf)
+ filter_file(r'^QMAKE_CXX *=.*$', 'QMAKE_CXX = c++', qmake_conf)
def install(self, spec, prefix):
diff --git a/var/spack/packages/vtk/package.py b/var/spack/packages/vtk/package.py
new file mode 100644
index 0000000000..4a27a8fedb
--- /dev/null
+++ b/var/spack/packages/vtk/package.py
@@ -0,0 +1,40 @@
+from spack import *
+
+class Vtk(Package):
+ """The Visualization Toolkit (VTK) is an open-source, freely
+ available software system for 3D computer graphics, image
+ processing and visualization. """
+ homepage = "http://www.vtk.org"
+ url = "http://www.vtk.org/files/release/6.1/VTK-6.1.0.tar.gz"
+
+ version('6.1.0', '25e4dfb3bad778722dcaec80cd5dab7d')
+
+ depends_on("qt")
+
+ def install(self, spec, prefix):
+ with working_dir('spack-build', create=True):
+ cmake_args = [
+ "..",
+ "-DBUILD_SHARED_LIBS=ON",
+ # Disable wrappers for other languages.
+ "-DVTK_WRAP_PYTHON=OFF",
+ "-DVTK_WRAP_JAVA=OFF",
+ "-DVTK_WRAP_TCL=OFF"]
+ cmake_args.extend(std_cmake_args)
+
+ # Enable Qt support here.
+ cmake_args.extend([
+ "-DQT_QMAKE_EXECUTABLE:PATH=%s/qmake" % spec['qt'].prefix.bin,
+ "-DVTK_Group_Qt:BOOL=ON",
+ # Ignore webkit because it's hard to build w/Qt
+ "-DVTK_Group_Qt=OFF",
+ "-DModule_vtkGUISupportQt:BOOL=ON",
+ "-DModule_vtkGUISupportQtOpenGL:BOOL=ON"
+ ])
+
+ if spec['qt'].satisfies('@5'):
+ cmake_args.append("-DVTK_QT_VERSION:STRING=5")
+
+ cmake(*cmake_args)
+ make()
+ make("install")