pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/security/pinentry-fltk
Module Name: pkgsrc
Committed By: wiz
Date: Wed Feb 13 17:39:36 UTC 2019
Added Files:
pkgsrc/security/pinentry-fltk: DESCR Makefile PLIST
pkgsrc/security/pinentry-fltk/patches: patch-fltk_main.cxx
Log Message:
security/pinentry-fltk: import pinentry-fltk-1.1.0
Packaged for wip by Michael Bäuerle.
This is a collection of simple PIN or passphrase entry dialogs which
utilize the Assuan protocol as described by the aegypten project.
It provides programs for several graphical toolkits, such as FLTK,
GTK+ and QT, as well as for the console, using curses.
This package contains the FLTK frontend.
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/security/pinentry-fltk/DESCR \
pkgsrc/security/pinentry-fltk/Makefile \
pkgsrc/security/pinentry-fltk/PLIST
cvs rdiff -u -r0 -r1.1 \
pkgsrc/security/pinentry-fltk/patches/patch-fltk_main.cxx
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Added files:
Index: pkgsrc/security/pinentry-fltk/DESCR
diff -u /dev/null pkgsrc/security/pinentry-fltk/DESCR:1.1
--- /dev/null Wed Feb 13 17:39:36 2019
+++ pkgsrc/security/pinentry-fltk/DESCR Wed Feb 13 17:39:36 2019
@@ -0,0 +1,6 @@
+This is a collection of simple PIN or passphrase entry dialogs which
+utilize the Assuan protocol as described by the aegypten project.
+It provides programs for several graphical toolkits, such as FLTK,
+GTK+ and QT, as well as for the console, using curses.
+
+This package contains the FLTK frontend.
Index: pkgsrc/security/pinentry-fltk/Makefile
diff -u /dev/null pkgsrc/security/pinentry-fltk/Makefile:1.1
--- /dev/null Wed Feb 13 17:39:36 2019
+++ pkgsrc/security/pinentry-fltk/Makefile Wed Feb 13 17:39:36 2019
@@ -0,0 +1,22 @@
+# $NetBSD: Makefile,v 1.1 2019/02/13 17:39:36 wiz Exp $
+
+PKGNAME= ${DISTNAME:S/pinentry-/pinentry-fltk-/}
+COMMENT= Applications for entering PINs or Passphrases, FLTK enabled
+
+.include "../../security/pinentry/Makefile.common"
+
+USE_LANGUAGES+= c c++
+USE_TOOLS+= pkg-config
+
+CONFIGURE_ARGS+= --disable-pinentry-gtk2
+CONFIGURE_ARGS+= --disable-pinentry-qt
+CONFIGURE_ARGS+= --disable-pinentry-curses
+CONFIGURE_ARGS+= --disable-pinentry-emacs
+#CONFIGURE_ARGS+= --disable-fallback-curses
+CONFIGURE_ARGS+= --disable-pinentry-gnome3
+CONFIGURE_ARGS+= --disable-libsecret
+
+INSTALL_DIRS= fltk
+
+.include "../../x11/fltk13/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/security/pinentry-fltk/PLIST
diff -u /dev/null pkgsrc/security/pinentry-fltk/PLIST:1.1
--- /dev/null Wed Feb 13 17:39:36 2019
+++ pkgsrc/security/pinentry-fltk/PLIST Wed Feb 13 17:39:36 2019
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1 2019/02/13 17:39:36 wiz Exp $
+bin/pinentry-fltk
Index: pkgsrc/security/pinentry-fltk/patches/patch-fltk_main.cxx
diff -u /dev/null pkgsrc/security/pinentry-fltk/patches/patch-fltk_main.cxx:1.1
--- /dev/null Wed Feb 13 17:39:36 2019
+++ pkgsrc/security/pinentry-fltk/patches/patch-fltk_main.cxx Wed Feb 13 17:39:36 2019
@@ -0,0 +1,87 @@
+$NetBSD: patch-fltk_main.cxx,v 1.1 2019/02/13 17:39:36 wiz Exp $
+
+Handle '_' in labels as keyboard shortcuts (used by GPG2).
+Fix format string handling (Patch from Debian).
+
+--- fltk/main.cxx.orig 2017-12-03 16:13:05.000000000 +0000
++++ fltk/main.cxx
+@@ -78,6 +78,44 @@ static std::string escape_accel_utf8(con
+ return result;
+ }
+
++// For button labels
++// Accelerator '_' (used e.g. by GPG2) is converted to '&' (for FLTK)
++// '&' is escaped as in escape_accel_utf8()
++static std::string convert_accel_utf8(const char *s)
++{
++ static bool last_was_underscore = false;
++ std::string result;
++ if (NULL != s)
++ {
++ result.reserve(strlen(s));
++ for (const char *p = s; *p; ++p)
++ {
++ // & => &&
++ if ('&' == *p)
++ result.push_back(*p);
++ // _ => & (handle '__' as escaped underscore)
++ if ('_' == *p)
++ {
++ if (last_was_underscore)
++ {
++ result.push_back(*p);
++ last_was_underscore = false;
++ }
++ else
++ last_was_underscore = true;
++ }
++ else
++ {
++ if (last_was_underscore)
++ result.push_back('&');
++ result.push_back(*p);
++ last_was_underscore = false;
++ }
++ }
++ }
++ return result;
++}
++
+ class cancel_exception
+ {
+
+@@ -111,8 +149,8 @@ static int fltk_cmd_handler(pinentry_t p
+ // TODO: Add parent window to pinentry-fltk window
+ //if (pe->parent_wid){}
+ std::string title = !is_empty(pe->title)?pe->title:PGMNAME;
+- std::string ok = escape_accel_utf8(pe->ok?pe->ok:(pe->default_ok?pe->default_ok:OK_STRING));
+- std::string cancel = escape_accel_utf8(pe->cancel?pe->cancel:(pe->default_cancel?pe->default_cancel:CANCEL_STRING));
++ std::string ok = convert_accel_utf8(pe->ok?pe->ok:(pe->default_ok?pe->default_ok:OK_STRING));
++ std::string cancel = convert_accel_utf8(pe->cancel?pe->cancel:(pe->default_cancel?pe->default_cancel:CANCEL_STRING));
+
+ if (!!pe->pin) // password (or confirmation)
+ {
+@@ -241,12 +279,12 @@ static int fltk_cmd_handler(pinentry_t p
+ if (pe->one_button)
+ {
+ fl_ok = ok.c_str();
+- fl_message(message);
++ fl_message("%s", message);
+ result = 1; // OK
+ }
+ else if (pe->notok)
+ {
+- switch (fl_choice(message, ok.c_str(), cancel.c_str(), pe->notok))
++ switch (fl_choice("%s", ok.c_str(), cancel.c_str(), pe->notok, message))
+ {
+ case 0: result = 1; break;
+ case 2: result = 0; break;
+@@ -256,7 +294,7 @@ static int fltk_cmd_handler(pinentry_t p
+ }
+ else
+ {
+- switch (fl_choice(message, ok.c_str(), cancel.c_str(), NULL))
++ switch (fl_choice("%s", ok.c_str(), cancel.c_str(), NULL, message))
+ {
+ case 0: result = 1; break;
+ default:
Home |
Main Index |
Thread Index |
Old Index