Skip to content

Commit

Permalink
crosstool-ng: add new package (spack#39865)
Browse files Browse the repository at this point in the history
  • Loading branch information
alalazo authored Sep 8, 2023
1 parent a4d2f83 commit 7631b5e
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
45 changes: 45 additions & 0 deletions var/spack/repos/builtin/packages/crosstool-ng/package.py
Original file line number Diff line number Diff line change
@@ -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("[email protected]:", 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")
6 changes: 6 additions & 0 deletions var/spack/repos/builtin/packages/elfutils/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 7631b5e

Please sign in to comment.