From b7e227800416ed843966acd1b97ddd99df5f77aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 14 Feb 2026 07:39:30 +0100 Subject: [PATCH] sys-devel/clang-crossdev-wrappers: Add 22 & 23 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- .../clang-crossdev-wrappers-22.ebuild | 42 +++++++++++++++++++ .../clang-crossdev-wrappers-23.ebuild | 42 +++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-22.ebuild create mode 100644 sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-23.ebuild diff --git a/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-22.ebuild b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-22.ebuild new file mode 100644 index 0000000000000..c05a4a20ab1a0 --- /dev/null +++ b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-22.ebuild @@ -0,0 +1,42 @@ +# Copyright 2022-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit crossdev + +DESCRIPTION="Symlinks to a Clang crosscompiler" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" +S=${WORKDIR} + +LICENSE="public-domain" +SLOT="${PV}" +PROPERTIES="live" + +RDEPEND=" + llvm-core/clang:${SLOT} + llvm-core/lld:${SLOT} +" + +src_install() { + local llvm_path="/usr/lib/llvm/${SLOT}" + into "${llvm_path}" + + for exe in "clang" "clang++" "clang-cpp"; do + newbin - "${CTARGET}-${exe}" <<-EOF + #!/bin/sh + exec ${exe}-${SLOT} --no-default-config --config="/etc/clang/cross/${CTARGET}.cfg" "\${@}" + EOF + done + + local tools=( + ${CTARGET}-clang-${SLOT}:${CTARGET}-clang + ${CTARGET}-clang-cpp-${SLOT}:${CTARGET}-clang-cpp + ${CTARGET}-clang++-${SLOT}:${CTARGET}-clang++ + ) + + local t + for t in "${tools[@]}"; do + dosym "${t#*:}" "${llvm_path}/bin/${t%:*}" + done +} diff --git a/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-23.ebuild b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-23.ebuild new file mode 100644 index 0000000000000..c05a4a20ab1a0 --- /dev/null +++ b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-23.ebuild @@ -0,0 +1,42 @@ +# Copyright 2022-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit crossdev + +DESCRIPTION="Symlinks to a Clang crosscompiler" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" +S=${WORKDIR} + +LICENSE="public-domain" +SLOT="${PV}" +PROPERTIES="live" + +RDEPEND=" + llvm-core/clang:${SLOT} + llvm-core/lld:${SLOT} +" + +src_install() { + local llvm_path="/usr/lib/llvm/${SLOT}" + into "${llvm_path}" + + for exe in "clang" "clang++" "clang-cpp"; do + newbin - "${CTARGET}-${exe}" <<-EOF + #!/bin/sh + exec ${exe}-${SLOT} --no-default-config --config="/etc/clang/cross/${CTARGET}.cfg" "\${@}" + EOF + done + + local tools=( + ${CTARGET}-clang-${SLOT}:${CTARGET}-clang + ${CTARGET}-clang-cpp-${SLOT}:${CTARGET}-clang-cpp + ${CTARGET}-clang++-${SLOT}:${CTARGET}-clang++ + ) + + local t + for t in "${tools[@]}"; do + dosym "${t#*:}" "${llvm_path}/bin/${t%:*}" + done +}