summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2023-09-08 08:16:39 +0200
committerGitHub <noreply@github.com>2023-09-08 08:16:39 +0200
commit7631b5ea14fb48f8859015b48fc379e06c9d4141 (patch)
tree6957402a32fe7ab19d7c23667e410afc9da8b03f
parenta4d2f8332f11ec8c7488354e9a5d9780bd05ef05 (diff)
downloadspack-7631b5ea14fb48f8859015b48fc379e06c9d4141.tar.gz
spack-7631b5ea14fb48f8859015b48fc379e06c9d4141.tar.bz2
spack-7631b5ea14fb48f8859015b48fc379e06c9d4141.tar.xz
spack-7631b5ea14fb48f8859015b48fc379e06c9d4141.zip
crosstool-ng: add new package (#39865)
-rw-r--r--var/spack/repos/builtin/packages/crosstool-ng/package.py45
-rw-r--r--var/spack/repos/builtin/packages/elfutils/package.py6
2 files changed, 51 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/crosstool-ng/package.py b/var/spack/repos/builtin/packages/crosstool-ng/package.py
new file mode 100644
index 0000000000..de1ed5648e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/crosstool-ng/package.py
@@ -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")
diff --git a/var/spack/repos/builtin/packages/elfutils/package.py b/var/spack/repos/builtin/packages/elfutils/package.py
index 231bb9a4c3..c7417da21d 100644
--- a/var/spack/repos/builtin/packages/elfutils/package.py
+++ b/var/spack/repos/builtin/packages/elfutils/package.py
@@ -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 @@ class Elfutils(AutotoolsPackage, SourcewarePackage):
"--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)