commit: 0dfa7da035391fe699303acefb2c1d0da3a9b621 Author: Maciej Barć <xgqt <AT> gentoo <DOT> org> AuthorDate: Mon May 9 22:38:06 2022 +0000 Commit: Maciej Barć <xgqt <AT> gentoo <DOT> org> CommitDate: Mon May 9 22:38:26 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0dfa7da0
app-emacs/all-the-icons: install the "all-the-icons" ttf font Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org> ...-5.0.0.ebuild => all-the-icons-5.0.0-r1.ebuild} | 28 +++++++++++++++++++++- ...ild => all-the-icons-5.0.0_p20220325-r1.ebuild} | 28 +++++++++++++++++++++- 2 files changed, 54 insertions(+), 2 deletions(-) diff --git a/app-emacs/all-the-icons/all-the-icons-5.0.0.ebuild b/app-emacs/all-the-icons/all-the-icons-5.0.0-r1.ebuild similarity index 62% rename from app-emacs/all-the-icons/all-the-icons-5.0.0.ebuild rename to app-emacs/all-the-icons/all-the-icons-5.0.0-r1.ebuild index cb1873d52bb6..1caaee0f131f 100644 --- a/app-emacs/all-the-icons/all-the-icons-5.0.0.ebuild +++ b/app-emacs/all-the-icons/all-the-icons-5.0.0-r1.ebuild @@ -5,7 +5,7 @@ EAPI=8 NEED_EMACS=24.3 -inherit elisp readme.gentoo-r1 +inherit elisp font readme.gentoo-r1 DESCRIPTION="Various icon fonts propertized for Emacs" HOMEPAGE="https://github.com/domtronn/all-the-icons.el/" @@ -26,6 +26,11 @@ DOC_CONTENTS="You may need to install the required fonts by executing DOCS=( README.md logo.png ) SITEFILE="50${PN}-gentoo.el" +pkg_setup() { + elisp_pkg_setup + font_pkg_setup +} + src_compile() { elisp_src_compile elisp-compile data/*.el @@ -40,4 +45,25 @@ src_test() { src_install() { elisp_src_install elisp-install ${PN}/data data/*.el{,c} + + # Install all-the-icons.ttf, special font made explicitly for this library. + # NOTICE: "fonts" directory also contains some bundled fonts, + # that is why we need this small re-implementation of font eclass, + # to suit this specific use case. + pushd "${S}"/fonts >/dev/null || die + insinto ${FONTDIR} + doins ${PN}.ttf + font_xfont_config + font_fontconfig + popd >/dev/null || die +} + +pkg_postinst() { + elisp_pkg_postinst + font_pkg_postinst +} + +pkg_postrm() { + elisp_pkg_postrm + font_pkg_postrm } diff --git a/app-emacs/all-the-icons/all-the-icons-5.0.0_p20220325.ebuild b/app-emacs/all-the-icons/all-the-icons-5.0.0_p20220325-r1.ebuild similarity index 63% rename from app-emacs/all-the-icons/all-the-icons-5.0.0_p20220325.ebuild rename to app-emacs/all-the-icons/all-the-icons-5.0.0_p20220325-r1.ebuild index cf28205eb9e6..029e12f0222a 100644 --- a/app-emacs/all-the-icons/all-the-icons-5.0.0_p20220325.ebuild +++ b/app-emacs/all-the-icons/all-the-icons-5.0.0_p20220325-r1.ebuild @@ -6,7 +6,7 @@ EAPI=8 H=65c496d3d1d1298345beb9845840067bffb2ffd8 NEED_EMACS=24.3 -inherit elisp readme.gentoo-r1 +inherit elisp font readme.gentoo-r1 DESCRIPTION="Various icon fonts propertized for Emacs" HOMEPAGE="https://github.com/domtronn/all-the-icons.el/" @@ -27,6 +27,11 @@ DOC_CONTENTS="You may need to install the required fonts by executing DOCS=( README.md logo.png ) SITEFILE="50${PN}-gentoo.el" +pkg_setup() { + elisp_pkg_setup + font_pkg_setup +} + src_compile() { elisp_src_compile elisp-compile data/*.el @@ -41,4 +46,25 @@ src_test() { src_install() { elisp_src_install elisp-install ${PN}/data data/*.el{,c} + + # Install all-the-icons.ttf, special font made explicitly for this library. + # NOTICE: "fonts" directory also contains some bundled fonts, + # that is why we need this small re-implementation of font eclass, + # to suit this specific use case. + pushd "${S}"/fonts >/dev/null || die + insinto ${FONTDIR} + doins ${PN}.ttf + font_xfont_config + font_fontconfig + popd >/dev/null || die +} + +pkg_postinst() { + elisp_pkg_postinst + font_pkg_postinst +} + +pkg_postrm() { + elisp_pkg_postrm + font_pkg_postrm }
