crosstool-ng: add new package (#39865)

This commit is contained in:
Massimiliano Culpo 2023-09-08 08:16:39 +02:00 committed by GitHub
parent a4d2f8332f
commit 7631b5ea14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,45 @@
# Copyright 2013-2023 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)
from spack.package import *
class CrosstoolNg(AutotoolsPackage):
"""Crosstool-NG is a versatile (cross) toolchain generator.
It supports many architectures and components and has a simple yet powerful
menuconfig-style interface.
"""
homepage = "https://crosstool-ng.github.io/"
url = "https://github.com/crosstool-ng/crosstool-ng/releases/download/crosstool-ng-1.25.0/crosstool-ng-1.25.0.tar.xz"
maintainers("alalazo")
version("1.25.0", sha256="68162f342243cd4189ed7c1f4e3bb1302caa3f2cbbf8331879bd01fe06c60cd3")
depends_on("ncurses")
depends_on("bash", type=("build", "run"))
depends_on("binutils", type=("build", "run"))
depends_on("coreutils", type=("build", "run"))
depends_on("elfutils~exeprefix", type=("build", "run"))
depends_on("gawk", type=("build", "run"))
depends_on("gmake", type=("build", "run"))
depends_on("patch", type=("build", "run"))
depends_on("sed", type=("build", "run"))
depends_on("python@3.7:", type=("build", "run"))
depends_on("wget", type="run")
depends_on("curl", type="run")
depends_on("autoconf", type=("build", "run"))
depends_on("automake", type=("build", "run"))
depends_on("libtool", type=("build", "run"))
depends_on("bison", type="build")
depends_on("flex", type="build")
depends_on("pkgconfig", type="build")
depends_on("grep", type="build")
depends_on("help2man", type="build")

View File

@ -48,6 +48,7 @@ class Elfutils(AutotoolsPackage, SourcewarePackage):
# Native language support from libintl.
variant("nls", default=True, description="Enable Native Language Support.")
variant("exeprefix", default=True, description="Add a prefix to generated executables.")
# libdebuginfod support
# NB: For 0.181 and newer, this enables _both_ the client and server
@ -115,6 +116,11 @@ def configure_args(self):
"--with-zlib=%s" % spec["zlib-api"].prefix,
]
if spec.satisfies("+exeprefix"):
args.append("--program-prefix='eu-'")
else:
args.append("--program-prefix=''")
if "@0.182:" in spec:
args.append("--with-zstd=%s" % spec["zstd"].prefix)