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 B890A15A7D9 for ; Fri, 17 Mar 2023 22:04:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 775D22BC30A; Fri, 17 Mar 2023 22:04:48 +0000 (UTC) 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 pigeon.gentoo.org (Postfix) with ESMTPS id 48A352BC30A for ; Fri, 17 Mar 2023 22:04:48 +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 62792335C20 for ; Fri, 17 Mar 2023 22:04:47 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0C1E0907 for ; Fri, 17 Mar 2023 22:04:44 +0000 (UTC) From: "David Seifert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Seifert" Message-ID: <1679090670.b5240fb0f593fc3c45885125682d33069cfb45c8.soap@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/xdg.eclass X-VCS-Directories: eclass/ X-VCS-Committer: soap X-VCS-Committer-Name: David Seifert X-VCS-Revision: b5240fb0f593fc3c45885125682d33069cfb45c8 X-VCS-Branch: master Date: Fri, 17 Mar 2023 22:04: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: a3d2cbaf-9a5d-4937-abbc-bc34eb29703b X-Archives-Hash: 0ab41f01807161b09cb82f9c32446a5f commit: b5240fb0f593fc3c45885125682d33069cfb45c8 Author: David Seifert gentoo org> AuthorDate: Fri Mar 17 22:04:30 2023 +0000 Commit: David Seifert gentoo org> CommitDate: Fri Mar 17 22:04:30 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5240fb0 xdg.eclass: remove EAPI 5 Signed-off-by: David Seifert gentoo.org> eclass/xdg.eclass | 65 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/eclass/xdg.eclass b/eclass/xdg.eclass index a3e75103a046..14c56047af45 100644 --- a/eclass/xdg.eclass +++ b/eclass/xdg.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: xdg.eclass @@ -6,56 +6,54 @@ # freedesktop-bugs@gentoo.org # @AUTHOR: # Original author: Gilles Dartiguelongue -# @SUPPORTED_EAPIS: 5 6 7 8 +# @SUPPORTED_EAPIS: 6 7 8 # @PROVIDES: xdg-utils # @BLURB: Provides phases for XDG compliant packages. # @DESCRIPTION: # Utility eclass to update the desktop, icon and shared mime info as laid # out in the freedesktop specs & implementations -inherit xdg-utils - -_DEFINE_XDG_SRC_PREPARE=false -case "${EAPI}" in - 5|6|7) - # src_prepare is only exported in EAPI < 8. - EXPORT_FUNCTIONS src_prepare - _DEFINE_XDG_SRC_PREPARE=true - ;; - 8) - ;; - *) die "${ECLASS}: EAPI=${EAPI} is not supported" ;; +case ${EAPI} in + 6|7|8) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac -EXPORT_FUNCTIONS pkg_preinst pkg_postinst pkg_postrm + +if [[ -z ${_XDG_ECLASS} ]]; then +_XDG_ECLASS=1 + +inherit xdg-utils # Avoid dependency loop as both depend on glib-2 -if [[ ${CATEGORY}/${P} != dev-libs/glib-2.* ]] ; then -_XDG_DEPEND=" +[[ ${CATEGORY}/${P} != dev-libs/glib-2.* ]] && _XDG_DEPEND=" dev-util/desktop-file-utils x11-misc/shared-mime-info " -case "${EAPI}" in - 5|6|7) +case ${EAPI} in + 6|7) + # src_prepare is only exported in EAPI < 8. + # @FUNCTION: xdg_src_prepare + # @DESCRIPTION: + # Prepare sources to work with XDG standards. + # Note that this function is only defined and exported in EAPIs < 8. + xdg_src_prepare() { + xdg_environment_reset + default + } + + EXPORT_FUNCTIONS src_prepare + DEPEND="${_XDG_DEPEND}" ;; *) + xdg_src_prepare() { + die "Called xdg_src_prepare in EAPI >= 8" + } + IDEPEND="${_XDG_DEPEND}" ;; esac -fi - -if ${_DEFINE_XDG_SRC_PREPARE}; then -# @FUNCTION: xdg_src_prepare -# @DESCRIPTION: -# Prepare sources to work with XDG standards. -# Note that this function is only defined and exported in EAPIs < 8. -xdg_src_prepare() { - xdg_environment_reset - - [[ ${EAPI} != 5 ]] && default -} -fi +unset _XDG_DEPEND # @FUNCTION: xdg_pkg_preinst # @DESCRIPTION: @@ -127,3 +125,6 @@ xdg_pkg_postrm() { fi } +fi + +EXPORT_FUNCTIONS pkg_preinst pkg_postinst pkg_postrm