x.org: mirror mixin
According to my nightly CI/CD tests, x.org is another large provider of software in common build chains that is often down. Added a hand-selected amount of mirrors that is well up-to-sync. Tested with `util-macros` that has a quite "recent" patch release. Other packages to follow in an individual PR.
This commit is contained in:
parent
a563884af3
commit
7e5257e44a
37
lib/spack/spack/build_systems/xorg.py
Normal file
37
lib/spack/spack/build_systems/xorg.py
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
|
||||||
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
import spack.util.url
|
||||||
|
import spack.package
|
||||||
|
|
||||||
|
|
||||||
|
class XorgPackage(spack.package.PackageBase):
|
||||||
|
"""Mixin that takes care of setting url and mirrors for x.org
|
||||||
|
packages."""
|
||||||
|
#: Path of the package in a x.org mirror
|
||||||
|
xorg_mirror_path = None
|
||||||
|
|
||||||
|
#: List of x.org mirrors used by Spack
|
||||||
|
base_mirrors = [
|
||||||
|
'https://www.x.org/archive/individual/',
|
||||||
|
'https://mirrors.ircam.fr/pub/x.org/individual/',
|
||||||
|
'http://xorg.mirrors.pair.com/individual/'
|
||||||
|
]
|
||||||
|
|
||||||
|
@property
|
||||||
|
def urls(self):
|
||||||
|
self._ensure_xorg_mirror_path_is_set_or_raise()
|
||||||
|
return [
|
||||||
|
spack.util.url.join(m, self.xorg_mirror_path,
|
||||||
|
resolve_href=True)
|
||||||
|
for m in self.base_mirrors
|
||||||
|
]
|
||||||
|
|
||||||
|
def _ensure_xorg_mirror_path_is_set_or_raise(self):
|
||||||
|
if self.xorg_mirror_path is None:
|
||||||
|
cls_name = type(self).__name__
|
||||||
|
msg = ('{0} must define a `xorg_mirror_path` attribute'
|
||||||
|
' [none defined]')
|
||||||
|
raise AttributeError(msg.format(cls_name))
|
@ -32,6 +32,7 @@
|
|||||||
from spack.build_systems.sip import SIPPackage
|
from spack.build_systems.sip import SIPPackage
|
||||||
from spack.build_systems.gnu import GNUMirrorPackage
|
from spack.build_systems.gnu import GNUMirrorPackage
|
||||||
from spack.build_systems.sourceware import SourcewarePackage
|
from spack.build_systems.sourceware import SourcewarePackage
|
||||||
|
from spack.build_systems.xorg import XorgPackage
|
||||||
|
|
||||||
from spack.mixins import filter_compiler_wrappers
|
from spack.mixins import filter_compiler_wrappers
|
||||||
|
|
||||||
|
@ -6,13 +6,13 @@
|
|||||||
from spack import *
|
from spack import *
|
||||||
|
|
||||||
|
|
||||||
class UtilMacros(AutotoolsPackage):
|
class UtilMacros(AutotoolsPackage, XorgPackage):
|
||||||
"""This is a set of autoconf macros used by the configure.ac scripts in
|
"""This is a set of autoconf macros used by the configure.ac scripts in
|
||||||
other Xorg modular packages, and is needed to generate new versions
|
other Xorg modular packages, and is needed to generate new versions
|
||||||
of their configure scripts with autoconf."""
|
of their configure scripts with autoconf."""
|
||||||
|
|
||||||
homepage = "http://cgit.freedesktop.org/xorg/util/macros/"
|
homepage = "http://cgit.freedesktop.org/xorg/util/macros/"
|
||||||
url = "https://www.x.org/archive/individual/util/util-macros-1.19.1.tar.bz2"
|
xorg_mirror_path = "util/util-macros-1.19.1.tar.bz2"
|
||||||
|
|
||||||
version('1.19.1', sha256='18d459400558f4ea99527bc9786c033965a3db45bf4c6a32eefdc07aa9e306a6')
|
version('1.19.1', sha256='18d459400558f4ea99527bc9786c033965a3db45bf4c6a32eefdc07aa9e306a6')
|
||||||
version('1.19.0', sha256='2835b11829ee634e19fa56517b4cfc52ef39acea0cd82e15f68096e27cbed0ba')
|
version('1.19.0', sha256='2835b11829ee634e19fa56517b4cfc52ef39acea0cd82e15f68096e27cbed0ba')
|
||||||
|
Loading…
Reference in New Issue
Block a user