diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2015-01-13 00:53:04 -0800 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2015-01-13 00:53:04 -0800 |
commit | fa67d695851878f0601afdfe1660b84829678b50 (patch) | |
tree | a9cb52cfdab809a95b4b640ea410e0546e7eddc0 | |
parent | 917d82be0de261d3d211960749f0dba469253edf (diff) | |
parent | 36198c525b8e58ca1d609c70910d6b97428a9845 (diff) | |
download | spack-fa67d695851878f0601afdfe1660b84829678b50.tar.gz spack-fa67d695851878f0601afdfe1660b84829678b50.tar.bz2 spack-fa67d695851878f0601afdfe1660b84829678b50.tar.xz spack-fa67d695851878f0601afdfe1660b84829678b50.zip |
Merge branch 'develop' of github.com:scalability-llnl/spack into develop
-rw-r--r-- | var/spack/packages/jdk/package.py | 46 | ||||
-rw-r--r-- | var/spack/packages/rose/add_spack_compiler_recognition.patch | 13 | ||||
-rw-r--r-- | var/spack/packages/rose/package.py | 39 |
3 files changed, 98 insertions, 0 deletions
diff --git a/var/spack/packages/jdk/package.py b/var/spack/packages/jdk/package.py new file mode 100644 index 0000000000..8f8076dd14 --- /dev/null +++ b/var/spack/packages/jdk/package.py @@ -0,0 +1,46 @@ +#------------------------------------------------------------------------------ +# Author: Justin Too <too1@llnl.gov> +#------------------------------------------------------------------------------ +import distutils +from distutils import dir_util +from subprocess import call + +import spack +from spack import * +import llnl.util.tty as tty + +class Jdk(Package): + """The Java Development Kit (JDK) released by Oracle Corporation + in the form of a binary product aimed at Java developers.""" + homepage = "http://www.oracle.com/technetwork/java/javase/downloads/index.html" + + version('8u25-linux-x64', 'e145c03a7edc845215092786bcfba77e', + url="http://download.oracle.com/otn-pub/java/jdk/8u25-b17/jdk-8u25-linux-x64.tar.gz") + + # Oracle requires that you accept their License Agreement in order + # to access the Java packages in download.oracle.com. In order to + # automate this process, we need to utilize these additional curl + # commandline options. + # + # See http://stackoverflow.com/questions/10268583/how-to-automate-download-and-installation-of-java-jdk-on-linux + curl_options=[ + '-j', # junk cookies + '-H', # specify required License Agreement cookie + 'Cookie: oraclelicense=accept-securebackup-cookie'] + + def do_fetch(self): + # Add our custom curl commandline options + tty.msg( + "[Jdk] Adding required commandline options to curl " + + "before performing fetch: %s" % + (self.curl_options)) + + for option in self.curl_options: + spack.curl.add_default_arg(option) + + # Now perform the actual fetch + super(Jdk, self).do_fetch() + + + def install(self, spec, prefix): + distutils.dir_util.copy_tree(".", prefix) diff --git a/var/spack/packages/rose/add_spack_compiler_recognition.patch b/var/spack/packages/rose/add_spack_compiler_recognition.patch new file mode 100644 index 0000000000..ce61ae4e4c --- /dev/null +++ b/var/spack/packages/rose/add_spack_compiler_recognition.patch @@ -0,0 +1,13 @@ +diff --git a/config/compiler-defs.m4 b/config/compiler-defs.m4 +index d7d85d2..780c8de 100644 +--- a/config/compiler-defs.m4 ++++ b/config/compiler-defs.m4 +@@ -28,7 +28,7 @@ dnl predefined by a specific compiler + # g++|gcc|mpicc|mpic++|mpicxx|mpiCC) + # TOO (2/16/2011): added support for tensilica compilers, assuming they are + # like GCC (they use a GCC front-end) +- g++*|gcc*|mpicc|mpic++|mpicxx|mpiCC|xt-xc++|xt-xcc) ++ cc*|c++*|g++*|gcc*|mpicc|mpic++|mpicxx|mpiCC|xt-xc++|xt-xcc) + BACKEND_GCC_MAJOR=`echo|$BACKEND_CXX_COMPILER -dumpversion | cut -d\. -f1` + BACKEND_GCC_MINOR=`echo|$BACKEND_CXX_COMPILER -dumpversion | cut -d\. -f2` + BACKEND_GCC_PATCHLEVEL=`echo|$BACKEND_CXX_COMPILER -dumpversion | cut -d\. -f3` diff --git a/var/spack/packages/rose/package.py b/var/spack/packages/rose/package.py new file mode 100644 index 0000000000..1d7294acab --- /dev/null +++ b/var/spack/packages/rose/package.py @@ -0,0 +1,39 @@ +#------------------------------------------------------------------------------ +# Author: Justin Too <too1@llnl.gov> +#------------------------------------------------------------------------------ + +from spack import * + +class Rose(Package): + """A compiler infrastructure to build source-to-source program + transformation and analysis tools. + (Developed at Lawrence Livermore National Lab)""" + + homepage = "http://rosecompiler.org/" + url = "https://github.com/rose-compiler/edg4x-rose" + + version('master', branch='master', git='https://github.com/rose-compiler/edg4x-rose.git') + + patch('add_spack_compiler_recognition.patch') + + depends_on("autoconf@2.69") + depends_on("automake@1.14") + depends_on("libtool@2.4") + depends_on("boost@1.54.0") + depends_on("jdk@8u25-linux-x64") + + def install(self, spec, prefix): + # Bootstrap with autotools + bash = which('bash') + bash('build') + + # Configure, compile & install + with working_dir('rose-build', create=True): + boost = spec['boost'] + + configure = Executable('../configure') + configure("--prefix=" + prefix, + "--with-boost=" + boost.prefix, + "--disable-boost-version-check") + make("install-core") + |