I just tried to build gnupg 2.1.22 on macOS 10.12.6. It built, but the tests failed with the following:
Making check in openpgp LC_ALL=C EXEEXT= PATH=../gpgscm:/usr/local/hb/Library/Homebrew/shims/super:/usr/bin:/bin:/usr/sbin:/sbin abs_top_srcdir=/Users/chdiza/.tmp/tmpdir/gnoopeegee-20170729-18272-ck4mgd/gnupg-2.1.22 objdir=/Users/chdiza/.tmp/tmpdir/gnoopeegee-20170729-18272-ck4mgd/gnupg-2.1.22 GPGSCM_PATH=/Users/chdiza/.tmp/tmpdir/gnoopeegee-20170729-18272-ck4mgd/gnupg-2.1.22/tests/gpgscm /Users/chdiza/.tmp/tmpdir/gnoopeegee-20170729-18272-ck4mgd/gnupg-2.1.22/tests/gpgscm/gpgscm \ /Users/chdiza/.tmp/tmpdir/gnoopeegee-20170729-18272-ck4mgd/gnupg-2.1.22/tests/openpgp/run-tests.scm /Users/chdiza/.tmp/tmpdir/gnoopeegee-20170729-18272-ck4mgd/gnupg-2.1.22/tests/gpgscm/init.scm:11: cdr: argument 1 must be: pair, got: boolean 0: init.scm:11: (cdr x) 1: defs.scm:194: (:gc:c:pgmname (assoc (symbol->string which) gpg-components)) 2: defs.scm:355: (tool 'scdaemon) FAIL: tests/openpgp/setup.scm Setup failed. make[2]: *** [xcheck] Error 1 make[1]: *** [check-recursive] Error 1 make: *** [check-recursive] Error 1
2.1.21 passes all the tests, provided the patch to ""Suppress error for card availability check" is applied.
Please let me know if you need further information.