summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-emacs/emojify')
-rw-r--r--app-emacs/emojify/Manifest1
-rw-r--r--app-emacs/emojify/emojify-1.2.ebuild40
-rw-r--r--app-emacs/emojify/files/50emojify-gentoo.el5
-rw-r--r--app-emacs/emojify/files/emojify-json-data.patch25
-rw-r--r--app-emacs/emojify/metadata.xml13
5 files changed, 84 insertions, 0 deletions
diff --git a/app-emacs/emojify/Manifest b/app-emacs/emojify/Manifest
new file mode 100644
index 000000000000..cbeb30832c8a
--- /dev/null
+++ b/app-emacs/emojify/Manifest
@@ -0,0 +1 @@
+DIST emojify-1.2.tar.gz 1196775 BLAKE2B 5802e391771f93b5181584287a73d6e02b42796a065ab91c0f085debcabb8a7da3bc575e7913b754b1754d0ee5d296fd31196009bdb937babcccc29ae97cdb18 SHA512 a02249d8474f02af1f43058061fa4cfcbccdaa71e632934c6466277eef44f306ea44e0c91dcb83218d6f1f01f3e7379b6d4d82b086113b1a9a41ee5ea3971e39
diff --git a/app-emacs/emojify/emojify-1.2.ebuild b/app-emacs/emojify/emojify-1.2.ebuild
new file mode 100644
index 000000000000..b00b264af3f2
--- /dev/null
+++ b/app-emacs/emojify/emojify-1.2.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.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
+}
diff --git a/app-emacs/emojify/files/50emojify-gentoo.el b/app-emacs/emojify/files/50emojify-gentoo.el
new file mode 100644
index 000000000000..e76565b0655a
--- /dev/null
+++ b/app-emacs/emojify/files/50emojify-gentoo.el
@@ -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)
diff --git a/app-emacs/emojify/files/emojify-json-data.patch b/app-emacs/emojify/files/emojify-json-data.patch
new file mode 100644
index 000000000000..50f53f243c88
--- /dev/null
+++ b/app-emacs/emojify/files/emojify-json-data.patch
@@ -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."
diff --git a/app-emacs/emojify/metadata.xml b/app-emacs/emojify/metadata.xml
new file mode 100644
index 000000000000..92ccec1e632d
--- /dev/null
+++ b/app-emacs/emojify/metadata.xml
@@ -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>