Created attachment 189762 [details] pinentry-1.1.0.patch * Update to 1.1.0 * Add FLTK frontend * Remove files/patch-configure (merged upstream) Changes: https://github.com/gpg/pinentry/blob/master/NEWS QA: poudriere testport: OK (11a, 10i)
Thanks for the patch! Could you give me a summary of the patch you added for the fltk front end? Was upstream notified about the problem?
Without the patch, build fails on 10.4-RELEASE/i386: pinwindow.cxx:49:18: error: redefinition of 'encrypt' as different kind of symbol static Fl_Pixmap encrypt(encrypt_xpm); ^ /usr/include/unistd.h:452:6: note: previous definition is here int encrypt(char *, int); ^ I'm not sure if it's a problem with older 10.4's clang or pinentry-fltk or FLTK itself so I haven't submitted this to upstream yet.
Looks like a namespace conflict. encrypt() was removed from unistd.h in r306651, so that is why it is only a problem on 10.x. Renaming the object locally until 10.x is EOL is probably the right thing to do.
Confusingly, it builds fine on 11.1-RELEASE-p6 where unistd.h is at r304977 and encrypt() is still present. Renaming variable would be a less invasive fix though, I'll update the patch.
Created attachment 189772 [details] pinentry-1.1.0.patch
Patch looks good. I'll run a few more tests and commit it soon. It's interesting because I had to do something similar with an object named "encrypt" in security/gpgme-qt5 a while back: https://svnweb.freebsd.org/ports/head/security/gpgme/files/patch-lang_qt_src_qgpgmeencryptjob.cpp?revision=426284&view=markup Perhaps it is a clang bug that was introduced in FreeBSD 10.2 when the C++ stack was updated (10.1 worked fine with unmodified code). I never was able to fully track down the root of the problem, though.
A commit references this bug: Author: jhale Date: Sun Jan 21 00:38:29 UTC 2018 New revision: 459560 URL: https://svnweb.freebsd.org/changeset/ports/459560 Log: Update security/pinentry* to 1.1.0 [1] Add security/pinentry-fltk, fltk frontend [2] PR: 225190 [1], 225191 [2] Submitted by: Dmitri Goutnik <dg@syrec.org> Changes: head/security/Makefile head/security/pinentry/Makefile head/security/pinentry/distinfo head/security/pinentry/files/patch-configure head/security/pinentry/files/patch-fltk_pinwindow.cxx head/security/pinentry-fltk/ head/security/pinentry-fltk/Makefile
Committed, thanks!