Skip to content

Commit

Permalink
Merge pull request #473 from citrus-it/crossdep
Browse files Browse the repository at this point in the history
Support resolving cross dependencies
  • Loading branch information
hadfl authored Feb 20, 2024
2 parents 8071978 + cf3b580 commit e9dba29
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions src/modules/flavor/depthlimitedmf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Software Foundation; All Rights Reserved
#
# Copyright (c) 2012, 2022, Oracle and/or its affiliates.
# Copyright 2024 OmniOS Community Edition (OmniOSce) Association.


"""A standalone version of ModuleFinder which limits the depth of exploration
Expand Down Expand Up @@ -66,9 +67,21 @@ def __init__(self, name, dirs, builtin=False):
"64/{0}module.so",
]
else:
self.patterns += [
"{{0}}{0}".format(s) for s in EXTENSION_SUFFIXES
] + ["64/{{0}}{0}".format(s) for s in EXTENSION_SUFFIXES]
try:
cross_env = os.environ["PKG_CROSS_DEPEND"]
suffixes = []
for s in EXTENSION_SUFFIXES:
if s.endswith("solaris2.so"):
s = "{}-{}.so".format(
"-".join(s.split("-")[:2]), cross_env
)
suffixes.append(s)
self.patterns += ["{{0}}{0}".format(s) for s in suffixes]
except KeyError:
suffixes = EXTENSION_SUFFIXES
self.patterns += ["{{0}}{0}".format(s) for s in suffixes] + [
"64/{{0}}{0}".format(s) for s in suffixes
]
self.dirs = sorted(dirs)

def make_package(self):
Expand Down

0 comments on commit e9dba29

Please sign in to comment.