Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge release/1.8.0 into spack-stack-dev #478

10 changes: 10 additions & 0 deletions var/spack/repos/builtin/packages/fms/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ class Fms(CMakePackage):
when="@2023.03",
)

variant("shared", description="Build shared libraries", when="@2024.02:", default=False)
# What the following patch is providing is available in version 2024.03
# and newer so it is only needed to 2024.02
patch(
"https://github.com/NOAA-GFDL/fms/pull/1559.patch?full_index=1",
sha256="2b12a6c35f357c3dddcfa5282576e56ab0e8e6c1ad1dab92a2c85ce3dfb815d4",
when="@2024.02",
)

variant(
"precision",
values=("32", "64"),
Expand Down Expand Up @@ -119,6 +128,7 @@ def cmake_args(self):
self.define_from_variant("GFS_PHYS"),
self.define_from_variant("OPENMP"),
self.define_from_variant("ENABLE_QUAD_PRECISION", "quad_precision"),
self.define_from_variant("SHARED_LIBS", "shared"),
self.define_from_variant("WITH_YAML", "yaml"),
self.define_from_variant("CONSTANTS"),
self.define_from_variant("LARGEFILE", "large_file"),
Expand Down
13 changes: 13 additions & 0 deletions var/spack/repos/builtin/packages/g2/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,19 @@ def cmake_args(self):

return args

# https://github.com/JCSDA/spack/issues/475
def flag_handler(self, name, flags):
if self.spec.satisfies("@3.5.1") and name == "fflags" and "gfortran" in self.compiler.fc:
with self.compiler.compiler_environment():
gfortran_major_version = int(
spack.compiler.get_compiler_version_output(
self.compiler.fc, "-dumpversion"
).split(".")[0]
)
if gfortran_major_version < 10:
flags.append("-fno-range-check")
return (None, None, flags)

def setup_run_environment(self, env):
precisions = (
self.spec.variants["precision"].value if self.spec.satisfies("@3.4.6:") else ("4", "d")
Expand Down
15 changes: 9 additions & 6 deletions var/spack/repos/builtin/packages/gettext/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ class Gettext(AutotoolsPackage, GNUMirrorPackage):
# depends_on('cvs')

conflicts("+shared~pic")
# https://savannah.gnu.org/bugs/?65811
conflicts("%gcc@:5", when="@0.22:")

patch("test-verify-parallel-make-check.patch", when="@:0.19.8.1")
patch("nvhpc-builtin.patch", when="@:0.21.0 %nvhpc")
Expand All @@ -78,12 +80,13 @@ def patch(self):
# From the configure script: "we don't want to use an external libxml, because its
# dependencies and their dynamic relocations have an impact on the startup time", well,
# *we* do.
filter_file(
"gl_cv_libxml_force_included=yes",
"gl_cv_libxml_force_included=no",
"libtextstyle/configure",
string=True,
)
if self.spec.satisfies("@20:"): # libtextstyle/configure not present prior
filter_file(
"gl_cv_libxml_force_included=yes",
"gl_cv_libxml_force_included=no",
"libtextstyle/configure",
string=True,
)

def flag_handler(self, name, flags):
# this goes together with gl_cv_libxml_force_included=no
Expand Down
4 changes: 4 additions & 0 deletions var/spack/repos/builtin/packages/grib-util/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ def cmake_args(self):
]
return args

@when("@1.4.0 %intel@:20")
def patch(self):
filter_file("stop iret", "stop 9", "src/grb2index/grb2index.F90")

def check(self):
with working_dir(self.builder.build_directory):
make("test")
2 changes: 1 addition & 1 deletion var/spack/repos/builtin/packages/py-netcdf4/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class PyNetcdf4(PythonPackage):

def flag_handler(self, name, flags):
if name == "cflags":
if self.spec.satisfies("%oneapi"):
if self.spec.satisfies("%oneapi") or self.spec.satisfies("%apple-clang@15:"):
flags.append("-Wno-error=int-conversion")

return flags, None, None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ class PyRuamelYamlClib(PythonPackage):

def flag_handler(self, name, flags):
if name == "cflags":
if self.spec.satisfies("%oneapi"):
if self.spec.satisfies("%oneapi") or self.spec.satisfies(" %apple-clang@15:"):
flags.append("-Wno-error=incompatible-function-pointer-types")
return (flags, None, None)
Loading