From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A1D0215823F for ; Fri, 17 Nov 2023 21:44:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CC4A52BC013; Fri, 17 Nov 2023 21:44:46 +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)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B74C82BC013 for ; Fri, 17 Nov 2023 21:44:46 +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 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id ED8D3335D02 for ; Fri, 17 Nov 2023 21:44:45 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6BDBE1356 for ; Fri, 17 Nov 2023 21:44:44 +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: <1700254443.aa4dca9af20224f56c25937f9f979ddba7ca8dac.a.horodniceanu@gentoo> Subject: [gentoo-commits] repo/user/dlang:master commit in: eclass/ X-VCS-Repository: repo/user/dlang X-VCS-Files: eclass/dmd.eclass X-VCS-Directories: eclass/ X-VCS-Committer: a.horodniceanu X-VCS-Committer-Name: Horodniceanu Andrei X-VCS-Revision: aa4dca9af20224f56c25937f9f979ddba7ca8dac X-VCS-Branch: master Date: Fri, 17 Nov 2023 21:44:44 +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: 7f2b4776-890b-48d4-b9aa-5f3a7c334864 X-Archives-Hash: d154f9a03b7f48375a99e2c6a15767c7 commit: aa4dca9af20224f56c25937f9f979ddba7ca8dac Author: Horodniceanu Andrei proton me> AuthorDate: Wed Oct 11 10:05:12 2023 +0000 Commit: Horodniceanu Andrei proton me> CommitDate: Fri Nov 17 20:54:03 2023 +0000 URL: https://gitweb.gentoo.org/repo/user/dlang.git/commit/?id=aa4dca9a dmd.eclass: support EAPI 7 and 8 Signed-off-by: Horodniceanu Andrei proton.me> eclass/dmd.eclass | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/eclass/dmd.eclass b/eclass/dmd.eclass index 0555f47..7d9e1f5 100644 --- a/eclass/dmd.eclass +++ b/eclass/dmd.eclass @@ -1,6 +1,7 @@ # @ECLASS: dmd.eclass # @MAINTAINER: # Marco Leise +# @SUPPORTED_EAPIS: 6 7 8 # @BLURB: Captures most of the logic for installing DMD # @DESCRIPTION: # Helps with the maintenance of the various DMD versions by capturing common @@ -21,9 +22,11 @@ if [[ ${_ECLASS_ONCE_DMD} != "recur -_+^+_- spank" ]] ; then _ECLASS_ONCE_DMD="recur -_+^+_- spank" -if has ${EAPI:-0} 0 1 2 3 4 5; then - die "EAPI must be >= 6 for dmd packages." -fi +case ${EAPI:-0} in + 6) inherit eapi7-ver ;; + 7|8) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac DESCRIPTION="Reference compiler for the D programming language" HOMEPAGE="http://dlang.org/" @@ -32,7 +35,7 @@ HTML_DOCS="html/*" # DMD supports amd64/x86 exclusively MULTILIB_COMPAT=( abi_x86_{32,64} ) -inherit multilib-build eapi7-ver toolchain-funcs +inherit desktop edos2unix multilib-build toolchain-funcs # @FUNCTION: dmd_eq # @DESCRIPTION: @@ -271,7 +274,7 @@ EOF einfo "Installing ${PN}..." # From version 2.066 on, dmd will find dmd.conf in the executable directory, if we # call it through a symlink in /usr/bin - dmd_ge 2.066 && dosym "../../${PREFIX}/bin/dmd" "${ROOT}/usr/bin/dmd-${SLOT}" + dmd_ge 2.066 && dosym "../../${PREFIX}/bin/dmd" "/usr/bin/dmd-${SLOT}" into ${PREFIX} dobin "$(dmd_gen_exe_dir)/dmd" @@ -319,7 +322,7 @@ EOF einstalldocs insinto "/usr/share/doc/${PF}/html" doins "${FILESDIR}/dmd-doc.png" - make_desktop_entry "xdg-open ${ROOT}usr/share/doc/${PF}/html/d/index.html" "DMD ${PV}" "${ROOT}usr/share/doc/${PF}/html/dmd-doc.png" "Development" + make_desktop_entry "xdg-open ${EPREFIX}/usr/share/doc/${PF}/html/d/index.html" "DMD ${PV}" "${EPREFIX}/usr/share/doc/${PF}/html/dmd-doc.png" "Development" fi if use examples; then insinto ${PREFIX}/samples @@ -330,14 +333,14 @@ EOF dmd_pkg_postinst() { # Update active dmd - "${ROOT}"/usr/bin/eselect dlang update dmd + "${ROOT%/}"/usr/bin/eselect dlang update dmd use examples && elog "Examples can be found in: /${PREFIX}/samples" use doc && elog "HTML documentation is in: /usr/share/doc/${PF}/html" } dmd_pkg_postrm() { - "${ROOT}"/usr/bin/eselect dlang update dmd + "${ROOT%/}"/usr/bin/eselect dlang update dmd } dmd_foreach_abi() {