Skip to content

Commit

Permalink
util-macros: ensure url_for_version works for older versions (spack#4…
Browse files Browse the repository at this point in the history
…4421)

* util-macros: ensure url_for_version only used for older versions
* util-macros: use url.substitute_version after xz -> bz2
* util-macros: mv url_for_version down the file
  • Loading branch information
wdconinc authored May 31, 2024
1 parent 8dde7f3 commit 29d39d1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions var/spack/repos/builtin/packages/util-macros/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ class UtilMacros(AutotoolsPackage, XorgPackage):
homepage = "https://gitlab.freedesktop.org/xorg/util/macros"
xorg_mirror_path = "util/util-macros-1.19.1.tar.xz"

# note: url_for_version can only return a single url, no mirrors
def url_for_version(self, version):
if self.spec.satisfies("@:1.19"):
return self.urls[0].replace("xz", "bz2")

maintainers("robert-mijakovic", "wdconinc")

license("MIT")
Expand All @@ -29,6 +24,11 @@ def url_for_version(self, version):
version("1.19.1", sha256="18d459400558f4ea99527bc9786c033965a3db45bf4c6a32eefdc07aa9e306a6")
version("1.19.0", sha256="2835b11829ee634e19fa56517b4cfc52ef39acea0cd82e15f68096e27cbed0ba")

# note: url_for_version can only return a single url, no mirrors
def url_for_version(self, version):
if self.spec.satisfies("@:1.19"):
return spack.url.substitute_version(self.urls[0].replace("xz", "bz2"), version)

def setup_dependent_build_environment(self, env, dependent_spec):
"""Adds the ACLOCAL path for autotools."""
env.append_path("ACLOCAL_PATH", self.prefix.share.aclocal)

0 comments on commit 29d39d1

Please sign in to comment.