diff options
author | Maciej Barć <xgqt@gentoo.org> | 2022-05-10 00:38:06 +0200 |
---|---|---|
committer | Maciej Barć <xgqt@gentoo.org> | 2022-05-10 00:38:26 +0200 |
commit | 0dfa7da035391fe699303acefb2c1d0da3a9b621 (patch) | |
tree | 1e7b8f8ff259e4fa4c7b6f720751b838f43c0856 | |
parent | app-emulation/wine-staging: Sync with ::wine (diff) | |
download | gentoo-0dfa7da035391fe699303acefb2c1d0da3a9b621.tar.gz gentoo-0dfa7da035391fe699303acefb2c1d0da3a9b621.tar.bz2 gentoo-0dfa7da035391fe699303acefb2c1d0da3a9b621.zip |
app-emacs/all-the-icons: install the "all-the-icons" ttf font
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
-rw-r--r-- | app-emacs/all-the-icons/all-the-icons-5.0.0-r1.ebuild (renamed from app-emacs/all-the-icons/all-the-icons-5.0.0.ebuild) | 28 | ||||
-rw-r--r-- | app-emacs/all-the-icons/all-the-icons-5.0.0_p20220325-r1.ebuild (renamed from app-emacs/all-the-icons/all-the-icons-5.0.0_p20220325.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 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 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 } |