• [gentoo-dev] [PATCH 1/2] elisp-common.eclass: New function elisp-make-s

    From =?UTF-8?q?Ulrich=20M=C3=BCller?=@21:1/5 to All on Thu Jun 29 19:50:01 2023
    This creates and installs a site-init file for the package. The default
    case will add the package's SITELISP subdirectory to Emacs' load-path.
    This allows to remove all trivial site-init files (consisting only of a load-path line).

    More complicated cases can be handled by providing additional arguments,
    which are appended as lines to the site-init file.

    Signed-off-by: Ulrich Müller <ulm@gentoo.org>
    ---
    eclass/elisp-common.eclass | 35 +++++++++++++++++++++++++++++++++++
    1 file changed, 35 insertions(+)

    diff --git a/eclass/elisp-common.eclass b/eclass/elisp-common.eclass
    index 1f60d3c337b9..ff1b2d0da0f3 100644
    --- a/eclass/elisp-common.eclass
    +++ b/eclass/elisp-common.eclass
    @@ -132,6 +132,17 @@
    # "50${PN}-gentoo.el". If your subdirectory is not named ${PN}, give
    # the differing name as second argument.
    #
    +# For the simple case that only the package's subdirectory needs to be
    +# added to the load-path, function elisp-make-site-file() will create
    +# and install a site-init file that does just that:
    +#
    +# @CODE
    +# elisp-make-site-file "${SITEFILE}"
    +# @CODE
    +#
    +# Again, this must be called in src_install(). See the function's
    +# documentation for more details on its usage.
    +#
    # @SUBSECTION pkg_setup() usage:
    #
    # If your ebuild uses the elisp-compile eclass function to compile
    @@ -601,6 +612,30 @@ elisp-site-file-install() {
    eend ${ret} "elisp-site-file-install: doins