summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author0t1s1 <65258917+0t1s1@users.noreply.github.com>2020-05-29 00:37:12 -0700
committerGitHub <noreply@github.com>2020-05-29 09:37:12 +0200
commit2aca0cf56575bcf31fffb1dbf294092ead006c5f (patch)
tree5761ad29f90c7c9bbcabce97068438098d4808c8
parent38ac78489aa688327412c81ecc9799576ba98e7e (diff)
downloadspack-2aca0cf56575bcf31fffb1dbf294092ead006c5f.tar.gz
spack-2aca0cf56575bcf31fffb1dbf294092ead006c5f.tar.bz2
spack-2aca0cf56575bcf31fffb1dbf294092ead006c5f.tar.xz
spack-2aca0cf56575bcf31fffb1dbf294092ead006c5f.zip
gridlab-d: added new package. (#16816)
-rw-r--r--var/spack/repos/builtin/packages/gridlab-d/package.py59
1 files changed, 59 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/gridlab-d/package.py b/var/spack/repos/builtin/packages/gridlab-d/package.py
new file mode 100644
index 0000000000..d7942d2d21
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gridlab-d/package.py
@@ -0,0 +1,59 @@
+# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack import *
+
+
+class GridlabD(AutotoolsPackage):
+ """
+ Autotools package for Gridlab-D, a new power distribution system simulation
+ and analysis tool that provides valuable information to users who design
+ and operate distribution systems, and to utilities that wish to take
+ advantage of the latest energy technologies. Gridlab-D is a flexible
+ simulation environment that can be integrated with a variety of third-party
+ data management and analysis tools.
+ """
+
+ homepage = "https://www.gridlabd.org/"
+ git = "https://github.com/gridlab-d/gridlab-d"
+
+ maintainers = ['0t1s1', 'yee29', 'afisher1']
+
+ # Using only develop as other branches and releases did not build properly.
+ version('develop', branch='develop')
+
+ variant("mysql",
+ default=False,
+ description="Enable MySQL support for Gridlab-D.")
+ variant('helics',
+ default=False,
+ description='Enable Helics support for Gridlab-D.')
+
+ # Add dependencies.
+ depends_on('autoconf', type='build')
+ depends_on('automake', type='build')
+ depends_on('libtool', type='build')
+ depends_on('m4', type='build')
+ depends_on("xerces-c")
+ depends_on("superlu-mt")
+ depends_on('helics', when='+helics')
+
+ def configure_args(self):
+ args = []
+
+ if '+helics' in self.spec:
+ # Taken from
+ # https://github.com/GMLC-TDC/HELICS-Tutorial/tree/master/setup
+ args.append('--with-helics=' + self.spec['helics'].prefix)
+ args.append('CFLAGS=-g -O0 -w')
+ args.append('CXXFLAGS=-g -O0 -w -std=c++14')
+ args.append('LDFLAGS=-g -O0 -w')
+
+ return args
+
+ def setup_run_environment(self, env):
+ # Need to add GLPATH otherwise Gridlab-D will not run.
+ env.set('GLPATH', join_path(self.prefix, 'lib', 'gridlabd'))
+ env.prepend_path('GLPATH', join_path(self.prefix, 'share', 'gridlabd'))