Skip to content

Commit

Permalink
Update udunits
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderRichert-NOAA committed Oct 18, 2023
1 parent a0ddb03 commit a1eb085
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions var/spack/repos/builtin/packages/udunits/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,24 @@ class Udunits(AutotoolsPackage):
depends_on("expat")

variant("shared", default=True, description="Build shared library")
variant(
"pic",
default=True,
description="Enable position-independent code (PIC)",
when="~shared",
)

@property
def libs(self):
return find_libraries(["libudunits2"], root=self.prefix, recursive=True, shared=True)
return find_libraries(
"libudunits2",
root=self.prefix,
recursive=True,
shared=self.spec.satisfies("+shared")
)

def configure_args(self):
return self.enable_or_disable("shared")
config_args = []
config_args.extend(self.enable_or_disable("shared"))
config_args.extend(self.with_or_without("pic"))
return config_args

0 comments on commit a1eb085

Please sign in to comment.