From 8b85c29a41964b220eefb29f07173158787aab8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Bar=C4=87?= Date: Tue, 25 Oct 2022 03:05:54 +0200 Subject: [PATCH] app-emacs/systemd-mode: new package; add 1.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maciej Barć --- app-emacs/systemd-mode/Manifest | 1 + .../files/50systemd-mode-gentoo.el | 2 + ...systemd-mode-1.6-directive-txt-files.patch | 29 ++++++++++++++ app-emacs/systemd-mode/metadata.xml | 13 ++++++ .../systemd-mode/systemd-mode-1.6.ebuild | 40 +++++++++++++++++++ 5 files changed, 85 insertions(+) create mode 100644 app-emacs/systemd-mode/Manifest create mode 100644 app-emacs/systemd-mode/files/50systemd-mode-gentoo.el create mode 100644 app-emacs/systemd-mode/files/systemd-mode-1.6-directive-txt-files.patch create mode 100644 app-emacs/systemd-mode/metadata.xml create mode 100644 app-emacs/systemd-mode/systemd-mode-1.6.ebuild diff --git a/app-emacs/systemd-mode/Manifest b/app-emacs/systemd-mode/Manifest new file mode 100644 index 0000000000000..db06291b1510a --- /dev/null +++ b/app-emacs/systemd-mode/Manifest @@ -0,0 +1 @@ +DIST systemd-mode-1.6.tar.gz 21986 BLAKE2B 05278d86a6df9b5e95c75c1d1ebee182653f760e12639d4a260cf757fee3236988d5f8de671fe9a4724bc0338e08d6f10c405a1d42691f5d83c0efdc516da178 SHA512 2461e07287c1dbe5990eaae83484e98f4e8f2e89ece4b2f5f53f3c9174fc20a0cdf2e930c356bfb6a84587595d66ac353f4f85b5a96507c5344a615d4516f646 diff --git a/app-emacs/systemd-mode/files/50systemd-mode-gentoo.el b/app-emacs/systemd-mode/files/50systemd-mode-gentoo.el new file mode 100644 index 0000000000000..01b8ef7e6e34a --- /dev/null +++ b/app-emacs/systemd-mode/files/50systemd-mode-gentoo.el @@ -0,0 +1,2 @@ +(add-to-list 'load-path "@SITELISP@") +(load "systemd-mode-autoloads" nil t) diff --git a/app-emacs/systemd-mode/files/systemd-mode-1.6-directive-txt-files.patch b/app-emacs/systemd-mode/files/systemd-mode-1.6-directive-txt-files.patch new file mode 100644 index 0000000000000..c85d78a102000 --- /dev/null +++ b/app-emacs/systemd-mode/files/systemd-mode-1.6-directive-txt-files.patch @@ -0,0 +1,29 @@ +--- a/systemd.el ++++ b/systemd.el +@@ -89,7 +89,7 @@ + (insert-file-contents + (let ((f "unit-directives.txt")) + (if (null load-file-name) f +- (expand-file-name f (file-name-directory load-file-name))))) ++ (expand-file-name f (file-name-directory "@SITEETC@"))))) + (split-string (buffer-string)))) + "Configuration directives for systemd.") + +@@ -105,7 +105,7 @@ + (insert-file-contents + (let ((f "network-directives.txt")) + (if (null load-file-name) f +- (expand-file-name f (file-name-directory load-file-name))))) ++ (expand-file-name f (file-name-directory "@SITEETC@"))))) + (split-string (buffer-string)))) + "Network configuration directives for systemd.") + +@@ -119,7 +119,7 @@ + (insert-file-contents + (let ((f "nspawn-directives.txt")) + (if (null load-file-name) f +- (expand-file-name f (file-name-directory load-file-name))))) ++ (expand-file-name f (file-name-directory "@SITEETC@"))))) + (split-string (buffer-string)))) + "Namespace container configuration directives for systemd.") + diff --git a/app-emacs/systemd-mode/metadata.xml b/app-emacs/systemd-mode/metadata.xml new file mode 100644 index 0000000000000..9c2714e05bcef --- /dev/null +++ b/app-emacs/systemd-mode/metadata.xml @@ -0,0 +1,13 @@ + + + + + + gnu-emacs@gentoo.org + Gentoo GNU Emacs project + + + https://github.com/holomorph/systemd-mode/issues/ + holomorph/systemd-mode + + diff --git a/app-emacs/systemd-mode/systemd-mode-1.6.ebuild b/app-emacs/systemd-mode/systemd-mode-1.6.ebuild new file mode 100644 index 0000000000000..801fb5effd594 --- /dev/null +++ b/app-emacs/systemd-mode/systemd-mode-1.6.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +NEED_EMACS=24.4 + +inherit elisp + +DESCRIPTION="Major mode for editing systemd units in GNU Emacs" +HOMEPAGE="https://github.com/holomorph/systemd-mode/" +SRC_URI="https://github.com/holomorph/${PN}/archive/v${PV}.tar.gz + -> ${P}.tar.gz" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +PATCHES=( "${FILESDIR}"/${P}-directive-txt-files.patch ) + +DOCS=( README ) +SITEFILE="50${PN}-gentoo.el" + +src_prepare() { + elisp_src_prepare + + sed "s|@SITEETC@|${EPREFIX}${SITEETC}/${PN}|" -i systemd.el || die +} + +src_compile() { + elisp_src_compile + elisp-make-autoload-file +} + +src_install() { + elisp_src_install + + insinto "${SITEETC}/${PN}" + doins "${S}"/*.txt +}