From 973e323e511dca084f8691ffa85d492daaf209fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulrich=20M=C3=BCller?= Date: Mon, 19 Aug 2024 13:41:21 +0200 Subject: [PATCH] app-emacs/zenburn-theme: Add theme to custom-safe-themes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ulrich Müller --- app-emacs/zenburn-theme/files/50zenburn-theme-gentoo.el | 1 + ...n-theme-2.7.0.ebuild => zenburn-theme-2.7.0-r1.ebuild} | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) rename app-emacs/zenburn-theme/{zenburn-theme-2.7.0.ebuild => zenburn-theme-2.7.0-r1.ebuild} (78%) diff --git a/app-emacs/zenburn-theme/files/50zenburn-theme-gentoo.el b/app-emacs/zenburn-theme/files/50zenburn-theme-gentoo.el index 002aaf5462935..0f3b6bf3b24a0 100644 --- a/app-emacs/zenburn-theme/files/50zenburn-theme-gentoo.el +++ b/app-emacs/zenburn-theme/files/50zenburn-theme-gentoo.el @@ -1 +1,2 @@ (add-to-list 'custom-theme-load-path "@SITEETC@") +(add-to-list 'custom-safe-themes "@SHA256@") diff --git a/app-emacs/zenburn-theme/zenburn-theme-2.7.0.ebuild b/app-emacs/zenburn-theme/zenburn-theme-2.7.0-r1.ebuild similarity index 78% rename from app-emacs/zenburn-theme/zenburn-theme-2.7.0.ebuild rename to app-emacs/zenburn-theme/zenburn-theme-2.7.0-r1.ebuild index 4b8491dc01119..c84c101ecdcce 100644 --- a/app-emacs/zenburn-theme/zenburn-theme-2.7.0.ebuild +++ b/app-emacs/zenburn-theme/zenburn-theme-2.7.0-r1.ebuild @@ -20,7 +20,11 @@ SITEFILE="50${PN}-gentoo.el" src_install() { insinto "${SITEETC}/${PN}" doins zenburn-theme.el - elisp-site-file-install "${FILESDIR}/${SITEFILE}" + + local sha256=$(sha256sum zenburn-theme.el) || die + sed "s:@SHA256@:${sha256%% *}:" "${FILESDIR}/${SITEFILE}" \ + > "${T}/${SITEFILE}" || die + elisp-site-file-install "${T}/${SITEFILE}" dodoc CHANGELOG.md CONTRIBUTING.md README.md dodoc -r screenshots @@ -28,6 +32,6 @@ src_install() { local DOC_CONTENTS="To enable zenburn by default, initialise it in your ~/.emacs: - \n\t(load-theme 'zenburn 'no-confirm)" + \n\t(load-theme 'zenburn)" readme.gentoo_create_doc }