From 4a996744bff4b9488ec22119ed70e278be149c7c Mon Sep 17 00:00:00 2001
From: Maja Reberc <maja.reberc@freedommail.ch>
Date: Tue, 2 Aug 2022 17:05:57 +0200
Subject: [PATCH] New port: rofi-emoji

---
 x11/rofi-emoji/Makefile    | 35 +++++++++++++++++++++++++++++++++++
 x11/rofi-emoji/distinfo    |  3 +++
 x11/rofi-emoji/pkg-descr   | 14 ++++++++++++++
 x11/rofi-emoji/pkg-message |  9 +++++++++
 x11/rofi-emoji/pkg-plist   |  3 +++
 5 files changed, 64 insertions(+)
 create mode 100644 x11/rofi-emoji/Makefile
 create mode 100644 x11/rofi-emoji/distinfo
 create mode 100644 x11/rofi-emoji/pkg-descr
 create mode 100644 x11/rofi-emoji/pkg-message
 create mode 100644 x11/rofi-emoji/pkg-plist

diff --git a/x11/rofi-emoji/Makefile b/x11/rofi-emoji/Makefile
new file mode 100644
index 000000000000..5dbf172706ea
--- /dev/null
+++ b/x11/rofi-emoji/Makefile
@@ -0,0 +1,35 @@
+PORTNAME=	rofi-emoji
+DISTVERSIONPREFIX=	v
+DISTVERSION=	3.0.1
+CATEGORIES=	x11
+
+MAINTAINER=	maja.reberc@freedommail.ch
+COMMENT=	Emoji selector plugin for rofi
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	rofi:x11/rofi
+RUN_DEPENDS=	rofi:x11/rofi \
+		xsel:x11/xsel-conrad \
+		xclip:x11/xclip \
+		xdotool:x11/xdotool
+
+USES=		autoreconf gettext-runtime gnome libtool
+USE_GNOME=	glib20 cairo
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	Mange
+
+GNU_CONFIGURE=	yes
+INSTALL_TARGET=	install-strip
+
+PORTDOCS=	README.md
+
+OPTIONS_DEFINE=	DOCS
+
+post-install-DOCS-on:
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_MAN} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.mk>
diff --git a/x11/rofi-emoji/distinfo b/x11/rofi-emoji/distinfo
new file mode 100644
index 000000000000..67fae24fce31
--- /dev/null
+++ b/x11/rofi-emoji/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1659445975
+SHA256 (Mange-rofi-emoji-v3.0.1_GH0.tar.gz) = a773e62acac7cb1d2e10ba838149f6508a7541e36b15b620299bd8b8f2fd2056
+SIZE (Mange-rofi-emoji-v3.0.1_GH0.tar.gz) = 364940
diff --git a/x11/rofi-emoji/pkg-descr b/x11/rofi-emoji/pkg-descr
new file mode 100644
index 000000000000..f8578455e2e8
--- /dev/null
+++ b/x11/rofi-emoji/pkg-descr
@@ -0,0 +1,14 @@
+An emoji selector plugin for Rofi that copies the selected emoji to the
+clipboard, among other things.
+
+The plugin adds a Rofi mode that displays a menu of emojis and allows
+searching by emoji names and their tags. The selected emoji can be
+copied or inserted. See the project web site or the optional port
+documentation for more features and configuration options.
+
+The plugin can be used, for example, by running Rofi with the following
+flags:
+
+  rofi -modi emoji -show emoji
+
+WWW: https://github.com/Mange/rofi-emoji
diff --git a/x11/rofi-emoji/pkg-message b/x11/rofi-emoji/pkg-message
new file mode 100644
index 000000000000..52a79ab7afce
--- /dev/null
+++ b/x11/rofi-emoji/pkg-message
@@ -0,0 +1,9 @@
+[
+{ type: install
+  message: <<EOM
+For copy and insert support on Wayland, install the following ports:
+  * x11/wl-clipboard
+  * x11/wtype
+EOM
+}
+]
diff --git a/x11/rofi-emoji/pkg-plist b/x11/rofi-emoji/pkg-plist
new file mode 100644
index 000000000000..4543356704e8
--- /dev/null
+++ b/x11/rofi-emoji/pkg-plist
@@ -0,0 +1,3 @@
+lib/rofi/emoji.so
+%%DATADIR%%/all_emojis.txt
+%%DATADIR%%/clipboard-adapter.sh
-- 
2.37.1