Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions repos/spack_repo/builtin/packages/ectrans/find_lapack.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
--- a/cmake/ectrans_find_lapack.cmake
+++ b/cmake/ectrans_find_lapack.cmake
@@ -13,20 +13,20 @@
if( HAVE_MKL )
set( LAPACK_LIBRARIES ${MKL_LIBRARIES} )
else()
- # Following libsci code should disappear soon, with more recent cmake versions (needs more investigation)
- set( _cray_libsci_loaded $ENV{CRAY_LIBSCI_DIR} )
- if( _cray_libsci_loaded )
- set( _CRAY_PRGENV $ENV{PE_ENV} )
- string( TOLOWER "${_CRAY_PRGENV}" _cray_prgenv )
- set( LAPACK_LIBRARIES sci_${_cray_prgenv} )
- ecbuild_debug( "LAPACK found, already loaded as part of Cray's libsci" )
- else()
+ ## Following libsci code should disappear soon, with more recent cmake versions (needs more investigation)
+ #set( _cray_libsci_loaded $ENV{CRAY_LIBSCI_DIR} )
+ #if( _cray_libsci_loaded )
+ # set( _CRAY_PRGENV $ENV{PE_ENV} )
+ # string( TOLOWER "${_CRAY_PRGENV}" _cray_prgenv )
+ # set( LAPACK_LIBRARIES sci_${_cray_prgenv} )
+ # ecbuild_debug( "LAPACK found, already loaded as part of Cray's libsci" )
+ #else()
ecbuild_find_package( NAME LAPACK REQUIRED )
if( TARGET lapack )
ecbuild_debug( "LAPACK found as CMake target lapack" )
set( LAPACK_LIBRARIES lapack )
endif()
- endif()
+ #endif()
endif()
ecbuild_debug_var( LAPACK_LIBRARIES )

8 changes: 8 additions & 0 deletions repos/spack_repo/builtin/packages/ectrans/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ class Ectrans(CMakePackage):
depends_on("cxx", type="build")
depends_on("fortran", type="build")

# Add explicit dependency on newer cmake versions in order to apply patch
# "find_lapack.patch", see below and https://github.com/ecmwf-ifs/ectrans/issues/316
# Newer versions of ectrans (1.7.0+) also require cmake@3.25: by default.
depends_on("cmake@3.25:", when="@1.5:", type="build")

depends_on("ecbuild", type="build")
depends_on("mpi", when="+mpi")
depends_on("blas")
Expand All @@ -70,6 +75,9 @@ class Ectrans(CMakePackage):
when="@1.3.1:1.5.1",
)

# https://github.com/ecmwf-ifs/ectrans/issues/316
patch("find_lapack.patch", when="@1.5:")

def cmake_args(self):
args = [
self.define_from_variant("ENABLE_MPI", "mpi"),
Expand Down
12 changes: 12 additions & 0 deletions repos/spack_repo/builtin/packages/mct/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,15 @@ class Mct(AutotoolsPackage):
depends_on("fortran", type="build") # generated

depends_on("mpi")

# MCT build is static only, need -fPIC to link in shared environment;
# unfortunately, also need to set FCFLAGS and not just FFLAGS
def flag_handler(self, name, flags):
if name == "cflags":
flags.append(self.compiler.cc_pic_flag)
elif name == "fflags":
flags.append(self.compiler.fc_pic_flag)
return (None, flags, None)

def setup_build_environment(self, env: EnvironmentModifications) -> None:
env.set("FCFLAGS", self.compiler.fc_pic_flag)
1 change: 1 addition & 0 deletions repos/spack_repo/builtin/packages/py_cartopy/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class PyCartopy(PythonPackage):
)
variant("plotting", default=False, description="Add plotting functionality")

depends_on("c", type="build")
depends_on("cxx", type="build")

# Based on wheel availability on PyPI
Expand Down
3 changes: 2 additions & 1 deletion repos/spack_repo/builtin/packages/py_kiwisolver/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ class PyKiwisolver(PythonPackage):
version("1.1.0", sha256="53eaed412477c836e1b9522c19858a8557d6e595077830146182225613b11a75")
version("1.0.1", sha256="ce3be5d520b4d2c3e5eeb4cd2ef62b9b9ab8ac6b6fedbaa0e39cdb6f50644278")

depends_on("cxx", type="build") # generated
depends_on("c", type="build")
depends_on("cxx", type="build")

depends_on("python@2.7:2.8,3.4:", type=("build", "run"))
depends_on("python@3.6:", type=("build", "run"), when="@1.2.0:")
Expand Down