From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B7AA6158074 for ; Wed, 02 Jul 2025 03:12:14 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 79518341FD3 for ; Wed, 02 Jul 2025 03:12:14 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 86E4B11055C; Wed, 02 Jul 2025 03:12:09 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 7E87811055C for ; Wed, 02 Jul 2025 03:12:09 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3B1B1341DAD for ; Wed, 02 Jul 2025 03:12:09 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C3D862CB0 for ; Wed, 02 Jul 2025 03:12:07 +0000 (UTC) From: "Horodniceanu Andrei" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Horodniceanu Andrei" Message-ID: <1751425715.8f80f5bada2ac38ec4cd93338c130f39e3b88cbd.a.horodniceanu@gentoo> Subject: [gentoo-commits] repo/user/dlang:master commit in: dev-util/gdmd/ X-VCS-Repository: repo/user/dlang X-VCS-Files: dev-util/gdmd/gdmd-14.20250517.ebuild X-VCS-Directories: dev-util/gdmd/ X-VCS-Committer: a.horodniceanu X-VCS-Committer-Name: Horodniceanu Andrei X-VCS-Revision: 8f80f5bada2ac38ec4cd93338c130f39e3b88cbd X-VCS-Branch: master Date: Wed, 02 Jul 2025 03:12:07 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 9f0c6e9f-32fd-4689-8f82-77c8ec569851 X-Archives-Hash: 24decd8bfd1c4a2b12af8b3dec0f801e commit: 8f80f5bada2ac38ec4cd93338c130f39e3b88cbd Author: Andrei Horodniceanu proton me> AuthorDate: Wed Jul 2 03:08:35 2025 +0000 Commit: Horodniceanu Andrei proton me> CommitDate: Wed Jul 2 03:08:35 2025 +0000 URL: https://gitweb.gentoo.org/repo/user/dlang.git/commit/?id=8f80f5ba dev-util/gdmd: add 14.20250517 Closes: https://bugs.gentoo.org/959368 Signed-off-by: Andrei Horodniceanu proton.me> dev-util/gdmd/gdmd-14.20250517.ebuild | 75 +++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/dev-util/gdmd/gdmd-14.20250517.ebuild b/dev-util/gdmd/gdmd-14.20250517.ebuild new file mode 100644 index 0000000..7c5971a --- /dev/null +++ b/dev-util/gdmd/gdmd-14.20250517.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit prefix + +DESCRIPTION="Wrapper script for gdc that emulates the dmd command" +HOMEPAGE="https://www.gdcproject.org/" + +COMMIT="b3b72f59252f09275941f706806ed80d68308db1" +SRC_URI="https://github.com/D-Programming-GDC/gdmd/archive/${COMMIT}.tar.gz -> gdmd-${COMMIT}.tar.gz" +S="${WORKDIR}/gdmd-${COMMIT}" +LICENSE="GPL-3+" + +SLOT="$(ver_cut 1)" +KEYWORDS="~amd64 ~arm64 ~x86" +RESTRICT="test" # no tests + +RDEPEND=" + dev-lang/perl + sys-devel/gcc:${SLOT}[d] +" + +PATCHES="${FILESDIR}/${PN}-no-dmd-conf.patch" + +src_prepare() { + hprefixify dmd-script + default +} + +src_compile() { + : +} + +src_install() { + local binPath="/usr/${CHOST}/gcc-bin/${SLOT}" + exeinto "${binPath}" + newexe dmd-script "${CHOST}-gdmd" + dosym "${CHOST}-gdmd" "${binPath}/gdmd" + + dosym -r "${binPath}/${CHOST}-gdmd" "/usr/bin/${CHOST}-gdmd-${SLOT}" + dosym -r "${binPath}/${CHOST}-gdmd" "/usr/bin/gdmd-${SLOT}" +} + +pkg_postinst() { + maybe_update_gcc_config +} + +# We can't really call gcc-config in postrm since it won't know which +# symlinks under /usr/bin were left by us. If it turns out to be a +# problem we could try to remove the symlink manually. + +maybe_update_gcc_config() { + # Call gcc-config if the current configuration if for the same slot + # we are installing to. This is needed to make gdmd available in + # $PATH. + + local CTARGET=${CTARGET:-${CHOST}} + + # Logic taken from toolchain.eclass and simplified a little + local curr_config + curr_config=$(gcc-config -c ${CTARGET} 2>&1) || return 0 + + local curr_config_ver=$(gcc-config -S ${curr_config} | awk '{print $2}') + local curr_specs=$(gcc-config -S ${curr_config} | awk '{print $3}') + + if [[ ${curr_config_ver} == ${SLOT} && ! ${curr_specs} ]]; then + # We should call gcc-config to make sure the addition of gdmd is + # propagated in $PATH. Don't do anything if not on a traditional + # layout, the risk of breaking something outweights having the + # script in $PATH. + gcc-config "${CTARGET}-${SLOT}" + fi +}