app-emacs/emojify: new package; add version 1.2

Signed-off-by: Maciej Barć <xgqt@gentoo.org>
This commit is contained in:
Maciej Barć
2022-04-09 01:21:50 +02:00
parent aa6a892c02
commit 277855dd85
5 changed files with 84 additions and 0 deletions

View File

@@ -0,0 +1 @@
DIST emojify-1.2.tar.gz 1196775 BLAKE2B 5802e391771f93b5181584287a73d6e02b42796a065ab91c0f085debcabb8a7da3bc575e7913b754b1754d0ee5d296fd31196009bdb937babcccc29ae97cdb18 SHA512 a02249d8474f02af1f43058061fa4cfcbccdaa71e632934c6466277eef44f306ea44e0c91dcb83218d6f1f01f3e7379b6d4d82b086113b1a9a41ee5ea3971e39

View File

@@ -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.3
inherit elisp
DESCRIPTION="Display emojis in Emacs, like :smile: or plain ASCII ones like :)"
HOMEPAGE="https://github.com/iqbalansari/emacs-emojify/"
SRC_URI="https://github.com/iqbalansari/emacs-${PN}/archive/v${PV}.tar.gz
-> ${P}.tar.gz"
S="${WORKDIR}"/emacs-${P}
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64"
RESTRICT="test" # requires some (5) unpackaged Emacs testing tools
RDEPEND="app-emacs/ht"
BDEPEND="${RDEPEND}"
DOCS=( CHANGELOG.org README.org screenshots )
PATCHES=( "${FILESDIR}"/${PN}-json-data.patch )
ELISP_REMOVE=".dir-locals.el"
SITEFILE="50${PN}-gentoo.el"
src_prepare() {
elisp_src_prepare
sed -i "s|@SITEETC@|${EPREFIX}${SITEETC}/${PN}|g" ${PN}.el || die
}
src_install() {
elisp_src_install
insinto ${SITEETC}/${PN}
doins -r data
}

View File

@@ -0,0 +1,5 @@
(add-to-list 'load-path "@SITELISP@")
(autoload 'emojify-mode "emojify"
"Emojify mode" t)
(autoload 'global-emojify-mode "emojify"
"Toggle Emojify mode in all buffers." t)

View File

@@ -0,0 +1,25 @@
index 033c2f5..ca83044 100644
--- a/emojify.el
+++ b/emojify.el
@@ -290,9 +290,7 @@ current window too."
(defcustom emojify-emoji-json
(expand-file-name "data/emoji.json"
- (cond (load-file-name (file-name-directory load-file-name))
- ((locate-library "emojify") (file-name-directory (locate-library "emojify")))
- (t default-directory)))
+ "@SITEETC@")
"The path to JSON file containing the configuration for displaying emojis."
:type 'file
:group 'emojify)
@@ -301,9 +299,7 @@ current window too."
(let ((json-array-type 'list)
(json-object-type 'hash-table))
(json-read-file (expand-file-name "data/emoji-sets.json"
- (cond (load-file-name (file-name-directory load-file-name))
- ((locate-library "emojify") (file-name-directory (locate-library "emojify")))
- (t default-directory))))))
+ "@SITEETC@"))))
(defcustom emojify-emoji-set "emojione-v2.2.6-22"
"The emoji set used to display emojis."

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>gnu-emacs@gentoo.org</email>
<name>Gentoo GNU Emacs project</name>
</maintainer>
<upstream>
<bugs-to>https://github.com/iqbalansari/emacs-emojify/issues/</bugs-to>
<remote-id type="github">iqbalansari/emacs-emojify</remote-id>
</upstream>
</pkgmetadata>