meep: add new versions and additional variants incl. dependencies (#34242)
* libctl: add new version Change-Id: I16f91cfab198c66b60407ab5bb2cb3ebeac6bc19 * New package: libgdsii Change-Id: I34b52260ab68ecc857ddf8cc63b124adc2689a51 * New package: mpb Change-Id: I6fdf5321c33d6bdbcaa1569026139a8483a3bcf8 * meep: add new version and variants Change-Id: I0b60a9a4d9a329f7bde9027514467e17376e6a39 * meep: use with_or_without Change-Id: I05584cb13df8ee153ed385e77d367cb34e39777e
This commit is contained in:
parent
9b0e79fcab
commit
35aa875762
@ -14,6 +14,7 @@ class Libctl(AutotoolsPackage):
|
||||
git = "https://github.com/NanoComp/libctl.git"
|
||||
url = "https://github.com/NanoComp/libctl/releases/download/v4.2.0/libctl-4.2.0.tar.gz"
|
||||
|
||||
version("4.5.0", sha256="621e46a238c4d5e8ce0866183f8e04abac6e1a94d90932af0d56ee61370ea153")
|
||||
version("4.2.0", sha256="0341ad6ea260ecda2efb3d4b679abb3d05ca6211792381979b036177a9291975")
|
||||
version(
|
||||
"3.2.2",
|
||||
|
30
var/spack/repos/builtin/packages/libgdsii/package.py
Normal file
30
var/spack/repos/builtin/packages/libgdsii/package.py
Normal file
@ -0,0 +1,30 @@
|
||||
# Copyright 2013-2022 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.package import *
|
||||
|
||||
|
||||
class Libgdsii(AutotoolsPackage):
|
||||
"""libGDSII is a C++ library for working with GDSII binary data files,
|
||||
intended primarily for use with the computational electromagnetism codes
|
||||
scuff-em and meep but sufficiently general-purpose to allow other uses as
|
||||
well."""
|
||||
|
||||
homepage = "https://github.com/HomerReid/libGDSII"
|
||||
url = "https://github.com/HomerReid/libGDSII/archive/refs/tags/v0.21.tar.gz"
|
||||
|
||||
version("0.21", sha256="1adc571c6b53df4c08d108f9ac4f4a7fd6fbefd4bc56f74e0b7b2801353671b8")
|
||||
|
||||
depends_on("autoconf", type="build")
|
||||
depends_on("automake", type="build")
|
||||
depends_on("libtool", type="build")
|
||||
|
||||
@run_before("autoreconf")
|
||||
def custom_prepare(self):
|
||||
mkdirp("m4")
|
||||
touch("ChangeLog")
|
||||
|
||||
def configure_args(self):
|
||||
return ["--enable-maintainer-mode"]
|
@ -16,6 +16,7 @@ class Meep(AutotoolsPackage):
|
||||
|
||||
version("master", branch="master")
|
||||
|
||||
version("1.25.0", sha256="3e5d6c6ef69a8cc7810bdd6d681ae494bfe7a4e91041abe5494f5c8a82d02e6f")
|
||||
version("1.21.0", sha256="71911cd2f38b15bdafe9a27ad111f706f24717894d5f9b6f9f19c6c10a0d5896")
|
||||
version(
|
||||
"1.3",
|
||||
@ -43,10 +44,13 @@ class Meep(AutotoolsPackage):
|
||||
variant("gsl", default=True, description="Enable GSL support")
|
||||
variant("python", default=True, description="Enable Python support")
|
||||
variant("single", default=False, description="Enable Single Precision")
|
||||
variant("libgdsii", default=True, description="Enable libGDSII support")
|
||||
variant("mpb", default=True, description="Enable MPB support")
|
||||
variant("openmp", default=True, description="Enable OpenMP support")
|
||||
|
||||
depends_on("autoconf", type="build", when="@1.21.0")
|
||||
depends_on("automake", type="build", when="@1.21.0")
|
||||
depends_on("libtool", type="build", when="@1.21.0")
|
||||
depends_on("autoconf", type="build", when="@1.21.0:")
|
||||
depends_on("automake", type="build", when="@1.21.0:")
|
||||
depends_on("libtool", type="build", when="@1.21.0:")
|
||||
|
||||
depends_on("blas", when="+blas")
|
||||
depends_on("lapack", when="+lapack")
|
||||
@ -64,6 +68,8 @@ class Meep(AutotoolsPackage):
|
||||
depends_on("py-numpy")
|
||||
depends_on("swig")
|
||||
depends_on("py-mpi4py", when="+mpi")
|
||||
depends_on("libgdsii", when="+libgdsii")
|
||||
depends_on("mpb", when="+mpb")
|
||||
|
||||
def configure_args(self):
|
||||
spec = self.spec
|
||||
@ -87,16 +93,6 @@ def configure_args(self):
|
||||
else:
|
||||
config_args.append("--without-libctl")
|
||||
|
||||
if "+mpi" in spec:
|
||||
config_args.append("--with-mpi")
|
||||
else:
|
||||
config_args.append("--without-mpi")
|
||||
|
||||
if "+hdf5" in spec:
|
||||
config_args.append("--with-hdf5")
|
||||
else:
|
||||
config_args.append("--without-hdf5")
|
||||
|
||||
if "+python" in spec:
|
||||
config_args.append("--with-python")
|
||||
else:
|
||||
@ -106,6 +102,10 @@ def configure_args(self):
|
||||
if "+single" in spec:
|
||||
config_args.append("--enable-single")
|
||||
|
||||
config_args.extend(self.with_or_without("mpi"))
|
||||
config_args.extend(self.with_or_without("hdf5"))
|
||||
config_args.extend(self.with_or_without("openmp"))
|
||||
|
||||
if spec.satisfies("@1.21.0:"):
|
||||
config_args.append("--enable-maintainer-mode")
|
||||
|
||||
|
34
var/spack/repos/builtin/packages/mpb/package.py
Normal file
34
var/spack/repos/builtin/packages/mpb/package.py
Normal file
@ -0,0 +1,34 @@
|
||||
# Copyright 2013-2022 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.package import *
|
||||
|
||||
|
||||
class Mpb(AutotoolsPackage):
|
||||
"""MPB is a free and open-source software package for computing
|
||||
electromagnetic band structures and modes."""
|
||||
|
||||
homepage = "https://github.com/NanoComp/mpb"
|
||||
url = "https://github.com/NanoComp/mpb/archive/refs/tags/v1.11.1.tar.gz"
|
||||
|
||||
version("1.11.1", sha256="7311fc525214c1184cad3e0626b8540c0b53b3c31c28e61ce6ec2860088eca46")
|
||||
|
||||
depends_on("autoconf", type="build")
|
||||
depends_on("automake", type="build")
|
||||
depends_on("libtool", type="build")
|
||||
|
||||
depends_on("blas")
|
||||
depends_on("fftw-api")
|
||||
depends_on("guile")
|
||||
depends_on("hdf5")
|
||||
depends_on("libctl")
|
||||
|
||||
def configure_args(self):
|
||||
spec = self.spec
|
||||
config_args = ["--enable-shared", "--enable-maintainer-mode"]
|
||||
config_args.append(
|
||||
"--with-libctl={0}".format(join_path(spec["libctl"].prefix.share, "libctl"))
|
||||
)
|
||||
return config_args
|
Loading…
Reference in New Issue
Block a user