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
14 changes: 11 additions & 3 deletions lib/spack/spack/relocate.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import collections
import itertools
import multiprocessing.pool
import os
import re
Expand Down Expand Up @@ -299,17 +300,24 @@ def modify_macho_object(cur_path, rpaths, deps, idpath, paths_to_paths):
if idpath:
new_idpath = paths_to_paths.get(idpath, None)
if new_idpath and not idpath == new_idpath:
args += ["-id", new_idpath]
args += [("-id", new_idpath)]

for dep in deps:
new_dep = paths_to_paths.get(dep)
if new_dep and dep != new_dep:
args += ["-change", dep, new_dep]
args += [("-change", dep, new_dep)]

new_rpaths = []
for orig_rpath in rpaths:
new_rpath = paths_to_paths.get(orig_rpath)
if new_rpath and not orig_rpath == new_rpath:
args += ["-rpath", orig_rpath, new_rpath]
args_to_add = ("-rpath", orig_rpath, new_rpath)
if args_to_add not in args and new_rpath not in new_rpaths:
args += [args_to_add]
new_rpaths.append(new_rpath)

# Deduplicate and flatten
args = list(itertools.chain.from_iterable(llnl.util.lang.dedupe(args)))
if args:
args.append(str(cur_path))
install_name_tool = executable.Executable("install_name_tool")
Expand Down
5 changes: 5 additions & 0 deletions var/spack/repos/builtin/packages/bufr/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ class Bufr(CMakePackage):
depends_on("py-numpy", type="build", when="+python")
depends_on("py-pip", type="build", when="+python")

# Need to make the lines shorter at least on some systems
def patch(self):
with when("@:11.7.1"):
filter_file("_lenslmax 120", "_lenslmax 60", "CMakeLists.txt")

def cmake_args(self):
args = [
self.define_from_variant("ENABLE_PYTHON", "python"),
Expand Down
13 changes: 7 additions & 6 deletions var/spack/repos/builtin/packages/libelf/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,16 @@ class Libelf(AutotoolsPackage):

provides("elf@0")

# configure: error: neither int nor long is 32-bit
depends_on("automake", when="platform=darwin target=aarch64:", type="build")
depends_on("autoconf", when="platform=darwin target=aarch64:", type="build")
depends_on("libtool", when="platform=darwin target=aarch64:", type="build")
depends_on("m4", when="platform=darwin target=aarch64:", type="build")
# configure: error: neither int nor long is 32-bit on aarch64
# and on x86_64 in Rosetta2 emulator mode
depends_on("automake", when="platform=darwin", type="build")
depends_on("autoconf", when="platform=darwin", type="build")
depends_on("libtool", when="platform=darwin", type="build")
depends_on("m4", when="platform=darwin", type="build")

@property
def force_autoreconf(self):
return self.spec.satisfies("platform=darwin target=aarch64:")
return self.spec.satisfies("platform=darwin")

def configure_args(self):
args = ["--enable-shared", "--disable-debug"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class GlobalWorkflowEnv(BundlePackage):

version("1.0.0")
variant("python", default=True, description="Build Python dependencies")
variant("ncl", default=True, description="Build NCL (NCAR Command Language)")

depends_on("ufs-pyenv", when="+python")
depends_on("prod-util")
Expand All @@ -42,7 +43,9 @@ class GlobalWorkflowEnv(BundlePackage):
depends_on("met")
depends_on("metplus")
depends_on("gsi-ncdiag")
depends_on("ncl")
depends_on("ncl", when="+ncl")
depends_on("crtm@2.4.0")

conflicts("platform=darwin", when="+ncl", msg="NCL doesn't build on macOS")

# There is no need for install() since there is no code.