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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 037E1138334 for ; Fri, 20 Dec 2019 13:44:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4F8ECE09E8; Fri, 20 Dec 2019 13:43:59 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 891F2E09E5 for ; Fri, 20 Dec 2019 13:43:58 +0000 (UTC) Received: from a1i15 (a1i15.kph.uni-mainz.de [134.93.134.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: ulm) by smtp.gentoo.org (Postfix) with ESMTPSA id 5254534D7FD for ; Fri, 20 Dec 2019 13:43:57 +0000 (UTC) From: Ulrich =?utf-8?Q?M=C3=BCller?= To: Subject: [gentoo-dev] [PATCH v2 2/3] elisp-common.eclass: Update documentation. References: Date: Fri, 20 Dec 2019 14:43:54 +0100 In-Reply-To: ("Ulrich \=\?utf-8\?Q\?M\?\= \=\?utf-8\?Q\?\=C3\=BCller\=22's\?\= message of "Wed, 18 Dec 2019 12:08:16 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Archives-Salt: bf75d0f5-a753-43eb-9ae0-ee793fd0ce45 X-Archives-Hash: 2dbf2bf201369b915a2e2a7d827df2c2 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable After the package split between emacs and emacs-vcs is gone, packages can depend on app-editors/emacs directly. Deprecate function elisp-need-emacs; ebuilds should assign variable NEED_EMACS instead. Signed-off-by: Ulrich M=C3=BCller =2D-- eclass/elisp-common.eclass | 45 ++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/eclass/elisp-common.eclass b/eclass/elisp-common.eclass index 8e5d70046bc..aac50fc65f0 100644 =2D-- a/eclass/elisp-common.eclass +++ b/eclass/elisp-common.eclass @@ -23,26 +23,25 @@ # When relying on the emacs USE flag, you need to add # # @CODE =2D# emacs? ( virtual/emacs ) +# emacs? ( >=3Dapp-editors/emacs-23.1:* ) # @CODE # # to your DEPEND/RDEPEND line and use the functions provided here to # bring the files to the correct locations. # =2D# If your package requires a minimum Emacs version, e.g. Emacs 24, then =2D# the dependency should be on >=3Dvirtual/emacs-24 instead. Because the =2D# user can select the Emacs executable with eselect, you should also =2D# make sure that the active Emacs version is sufficient. This can be =2D# tested with function elisp-need-emacs(), which would typically be =2D# called from pkg_setup(), as in the following example: +# If your package requires a minimum Emacs version, e.g. Emacs 26.1, +# then the dependency should be on >=3Dapp-editors/emacs-26.1:* instead. +# Because the user can select the Emacs executable with eselect, you +# should also make sure that the active Emacs version is sufficient. +# The eclass will automatically ensure this if you assign variable +# NEED_EMACS with the Emacs version, as in the following example: # # @CODE =2D# elisp-need-emacs 24 || die "Emacs version too low" +# NEED_EMACS=3D26.1 # @CODE # =2D# Please note that such tests should be limited to packages that are =2D# known to fail with lower Emacs versions; the standard case is to =2D# depend on virtual/emacs without version. +# Please note that this should be done only for packages that are known +# to fail with lower Emacs versions. # # @ROFF .SS # src_compile() usage: @@ -134,6 +133,20 @@ # the differing name as second argument. # # @ROFF .SS +# pkg_setup() usage: +# +# If your ebuild uses the elisp-compile eclass function to compile +# its elisp files (see above), then you don't need a pkg_setup phase, +# because elisp-compile and elisp-make-autoload-file do their own sanity +# checks. On the other hand, if the elisp files are compiled by the +# package's build system, then there is often no check for the Emacs +# version. In this case, you can add an explicit check in pkg_setup: +# +# @CODE +# elisp-check-emacs-version +# @CODE +# +# @ROFF .SS # pkg_postinst() / pkg_postrm() usage: # # After that you need to recreate the start-up file of Emacs after @@ -151,10 +164,6 @@ # # When having optional Emacs support, you should prepend "use emacs &&" # to above calls of elisp-site-regen(). =2D# Don't use "has_version virtual/emacs"! When unmerging the state of =2D# the emacs USE flag is taken from the package database and not from the =2D# environment, so it is no problem when you unset USE=3Demacs between =2D# merge and unmerge of a package. =20 case ${EAPI:-0} in 4|5|6) inherit eapi7-ver ;; @@ -258,12 +267,10 @@ elisp-check-emacs-version() { fi } =20 =2D# @FUNCTION: elisp-need-emacs =2D# @USAGE: =2D# @RETURN: 0 if true, 1 if false, 2 if trouble =2D# @DESCRIPTION: # Test if the eselected Emacs version is at least the major version # of GNU Emacs specified as argument. +# Return 0 if true, 1 if false, 2 if trouble. +# Deprecated, use elisp-check-emacs-version instead. =20 elisp-need-emacs() { local need_emacs=3D$1 have_emacs =2D-=20 2.24.1 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEZlHkP3TnuTbxrN0HwwkGhRxhwnMFAl380BoACgkQwwkGhRxh wnP+bAf/bOEfnJ33krisxw5kd4HiecKSZ/TT/wLm1klvbVPfaLjzu7bPDG2Df+yN /dmvTu6vlR38NI6ldfvDsf9E5wnRSCoP8wwGxaqIL4XbwqYpM7R/ngTOaJAXj/Io 205J+uUkAKGJab4B1h/+cVwC7M8YAm8mHacC2aNzSYiVWCZ65fT3nnTzdaEpNfwm ELpkcuePyjhoYzPVJJDe3fm9M9am9LcOqUJiwWuA/NAN3nnZb5mrVU3IiNx3l9oi 58syktvFncw/EujhMm3GTmZ8tA8xWN6/f3TrxTDobdoe31VBh4Rd/v1REkeXi96t p+nmFcloERvgAaLRuZ6r4APkuMkDkA== =fTs3 -----END PGP SIGNATURE----- --=-=-=--