summaryrefslogtreecommitdiff
path: root/security/pinentry-emacs
diff options
context:
space:
mode:
Diffstat (limited to 'security/pinentry-emacs')
-rw-r--r--security/pinentry-emacs/Makefile33
-rw-r--r--security/pinentry-emacs/distinfo3
-rw-r--r--security/pinentry-emacs/files/patch-pinentry-emacs12
-rw-r--r--security/pinentry-emacs/pkg-descr9
4 files changed, 57 insertions, 0 deletions
diff --git a/security/pinentry-emacs/Makefile b/security/pinentry-emacs/Makefile
new file mode 100644
index 0000000..b27fe1d
--- /dev/null
+++ b/security/pinentry-emacs/Makefile
@@ -0,0 +1,33 @@
+PORTNAME= pinentry-emacs
+DISTVERSION= g20171127
+CATEGORIES= security
+
+MAINTAINER= cashmere@autistici.org
+COMMENT= Emacs pinentry helper for GnuPG
+WWW= https://github.com/ecraven/pinentry-emacs
+
+LICENSE= GPLv3+
+LICENSE_FILE= ${WRKSRC}/COPYING
+
+RUN_DEPENDS= bash:shells/bash \
+ emacs:editors/emacs \
+ pinentry-curses:security/pinentry-curses
+
+USE_GITHUB= yes
+GH_ACCOUNT= ecraven
+GH_PROJECT= pinentry-emacs
+GH_TAGNAME= b6afcb01c5c43653c8d504309df13e58f8247b06
+
+NO_ARCH= yes
+NO_BUILD= yes
+
+PLIST_FILES= bin/pinentry-emacs
+
+post-patch:
+ @${REINPLACE_CMD} -e '1s|/bin/bash|${LOCALBASE}/bin/bash|' \
+ ${WRKSRC}/pinentry-emacs
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/pinentry-emacs ${STAGEDIR}${PREFIX}/bin/pinentry-emacs
+
+.include <bsd.port.mk>
diff --git a/security/pinentry-emacs/distinfo b/security/pinentry-emacs/distinfo
new file mode 100644
index 0000000..ea76208
--- /dev/null
+++ b/security/pinentry-emacs/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1783771432
+SHA256 (ecraven-pinentry-emacs-g20171127-b6afcb01c5c43653c8d504309df13e58f8247b06_GH0.tar.gz) = b498bc2799c7001a2f1145845d11b649028dff17cdc64b91c41197a48f554313
+SIZE (ecraven-pinentry-emacs-g20171127-b6afcb01c5c43653c8d504309df13e58f8247b06_GH0.tar.gz) = 14259
diff --git a/security/pinentry-emacs/files/patch-pinentry-emacs b/security/pinentry-emacs/files/patch-pinentry-emacs
new file mode 100644
index 0000000..923dec5
--- /dev/null
+++ b/security/pinentry-emacs/files/patch-pinentry-emacs
@@ -0,0 +1,12 @@
+--- pinentry-emacs.orig 2026-07-11 14:01:00 UTC
++++ pinentry-emacs
+@@ -31,7 +31,8 @@
+ RES=$(emacsclient -e "(pinentry-emacs \"$DESC\" \"$PROMPT\" \"$OK\" \"$ERROR\")" | sed -e 's/^"//' -e 's/"$//')
+ if [ $? -ne 0 ]
+ then
+- RES=$(lukspinentry)
++ echo ERR 83886179 Operation cancelled
++ exit 1
+ fi
+ echo D $RES
+ echo OK
diff --git a/security/pinentry-emacs/pkg-descr b/security/pinentry-emacs/pkg-descr
new file mode 100644
index 0000000..32ee58b
--- /dev/null
+++ b/security/pinentry-emacs/pkg-descr
@@ -0,0 +1,9 @@
+Emacs pinentry helper for GnuPG.
+
+This script talks to gpg-agent via the Assuan pinentry protocol and
+forwards passphrase requests to Emacs via emacsclient. It is intended
+for users who run Emacs in a terminal (emacs -nw) and want passphrase
+prompts to appear in the Emacs minibuffer instead of an external
+curses/GUI dialog.
+
+WWW: https://github.com/ecraven/pinentry-emacs