summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2016-04-01 12:23:08 -0500
committerAdam J. Stewart <ajstewart426@gmail.com>2016-05-11 11:27:11 -0500
commit240c0643f214006ecf0321e3466fa3d5db7eb092 (patch)
tree469baa882158e1582ecfb5dec035207631b2d624 /var
parent82ce798f41951741e552086534c60af5e3e3c464 (diff)
downloadspack-240c0643f214006ecf0321e3466fa3d5db7eb092.tar.gz
spack-240c0643f214006ecf0321e3466fa3d5db7eb092.tar.bz2
spack-240c0643f214006ecf0321e3466fa3d5db7eb092.tar.xz
spack-240c0643f214006ecf0321e3466fa3d5db7eb092.zip
Add NAG Fortran compiler package
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/nag/package.py26
-rw-r--r--var/spack/repos/builtin/packages/pgi/package.py45
2 files changed, 32 insertions, 39 deletions
diff --git a/var/spack/repos/builtin/packages/nag/package.py b/var/spack/repos/builtin/packages/nag/package.py
new file mode 100644
index 0000000000..840b79c66b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/nag/package.py
@@ -0,0 +1,26 @@
+from spack import *
+import os
+
+class Nag(Package):
+ """The NAG Fortran Compiler."""
+ homepage = "http://www.nag.com/nagware/np.asp"
+
+ version('6.1', '1e29d9d435b7ccc2842a320150b28ba4',
+ url='http://www.nag.com/downloads/impl/npl6a61na_amd64.tgz')
+
+ # Licensing
+ license_required = True
+ license_files = ['lib/nag.key',
+ 'lib/nag.licence',
+ 'lib/nagware.licence']
+ license_vars = ['NAG_KUSARI_FILE']
+ license_url = 'http://www.nag.com/doc/inun/np61/lin-mac/klicence.txt'
+
+ def install(self, spec, prefix):
+ # Set installation directories
+ os.environ['INSTALL_TO_BINDIR'] = prefix.bin
+ os.environ['INSTALL_TO_LIBDIR'] = prefix.lib
+ os.environ['INSTALL_TO_MANDIR'] = prefix + '/share/man/man'
+
+ # Run install script
+ os.system('./INSTALLU.sh')
diff --git a/var/spack/repos/builtin/packages/pgi/package.py b/var/spack/repos/builtin/packages/pgi/package.py
index 66aef571f1..649c7dbee2 100644
--- a/var/spack/repos/builtin/packages/pgi/package.py
+++ b/var/spack/repos/builtin/packages/pgi/package.py
@@ -1,6 +1,4 @@
from spack import *
-import spack
-import llnl.util.tty as tty
import os
class Pgi(Package):
@@ -27,46 +25,18 @@ class Pgi(Package):
variant('java', default=False, description="Enable installation of Java Runtime Environment")
variant('mpi', default=False, description="Enable installation of Open MPI")
-
- def set_up_license(self, prefix):
- license_path = "%s/license.dat" % prefix
-
- with open(license_path, "w") as license:
- license.write("""\
-# The PGI compilers require a license to use. There are two ways to set this up.
-#
-# 1. (Recommended) Store your license key in this license.dat file. Example:
-#
-# SERVER <hostname> 0123456789ab 27000
-# DAEMON pgroupd
-# PACKAGE PGI2015-<PGI_PIN> pgroupd <subscription end date> A13AB920D570 \\
-# <...>
-# 6167 7015 3F05 9C37 2315 ACDF 1B73 DAA9 FBAE"
-#
-# 2. Use the environment variable PGROUPD_LICENSE_FILE or LM_LICENSE_FILE.
-#
-# If you choose to store your license in a non-standard location, you may
-# set either one of these variables to a full pathname to the license
-# file, or port@host if you store your license keys on a dedicated
-# license server. You will likely want to set this variable in a module
-# file so that it gets loaded every time someone wants to use PGI.
-#
-# For further information on how to acquire a license, please refer to:
-# http://www.pgroup.com/doc/pgiinstall.pdf
-#
-# You may enter your license below.
-
-""")
-
- #spack.editor(license_path)
- tty.msg("Set up license file %s" % license_path)
+ # Licensing
+ license_required = True
+ license_files = ['license.dat']
+ license_vars = ['PGROUPD_LICENSE_FILE', 'LM_LICENSE_FILE']
+ license_url = 'http://www.pgroup.com/doc/pgiinstall.pdf'
def install(self, spec, prefix):
# Enable the silent installation feature
os.environ['PGI_SILENT'] = "true"
os.environ['PGI_ACCEPT_EULA'] = "accept"
- os.environ['PGI_INSTALL_DIR'] = "%s" % prefix
+ os.environ['PGI_INSTALL_DIR'] = prefix
if '+network' in spec and '~single' in spec:
os.environ['PGI_INSTALL_TYPE'] = "network"
@@ -92,6 +62,3 @@ class Pgi(Package):
# Run install script
os.system("./install")
-
- # Prompt user to set up license file
- self.set_up_license(prefix)