gnupg conditionalizes all but one uses of LDAP in #ifdef USE_LDAP - the one unconditionalized use (the call to ks_ldap_help_varaiables in dirmngr/server.c) breaks the build because the definition of said function is removed, but the call is not.
- Try building gnupg without openldap
- watch it fail
- apply the patch
- try building it again
- watch it succeed