net/yafc fails to build on Leopard
Tim Clem
tim.clem at gmail.com
Wed Nov 7 19:43:26 PST 2007
On 29/10/2007, Ryan Schmidt <ryandesign at ...> wrote:
> You should submit a bug for this problem in Trac. Unfortunately the
> port has no maintainer so someone will have to come up with a
> solution for this.
I looked into it. Some of the header files are throwing yafc into
thinking Leopard's using the Heimdal version of Kerberos which has a
different location for one of its headers. This patch takes care of
that problem (even if it is a little heavy-handed):
--- lib/gssapi.c.orig.c 2002-12-05 17:12:36.000000000 -0500
+++ lib/gssapi.c 2007-11-07 21:40:14.000000000 -0500
@@ -35,25 +35,8 @@
#include "ftp.h"
#include "base64.h"
-#if defined(HAVE_GSSAPI_H)
-# include <gssapi.h>
- /* if we have gssapi.h (not gssapi/gssapi.h) we assume we link
- * against Heimdal, which needs krb5_err.h to define *
- * KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN
- */
-# include <krb5_err.h>
-#elif defined(HAVE_GSSAPI_GSSAPI_H)
-# include <gssapi/gssapi.h>
- /* if we have gssapi/gssapi.h it might be safe to assume we have the
- * other two that are part of MIT's krb5 as well, but this will work
- * even if they one day do away with one of those two header files.
- */
-# if defined(HAVE_GSSAPI_GSSAPI_KRB5_H)
-# include <gssapi/gssapi_krb5.h>
-# endif
-#else
-# error "Need gssapi.h from either Heimdal or MIT krb5"
-#endif
+#include <gssapi/gssapi.h>
+#include <gssapi/gssapi_krb5.h>
Once that's taken care of, there's an issue with some newfangled
password routine checking a non-existent macro and as a result trying
to use the non-existent termio.h. This patch handles that (and I
submitted a bug upstream):
--- src/input.c.orig 2005-10-05 15:31:25.000000000 -0400
+++ src/input.c 2007-11-07 21:59:37.000000000 -0500
@@ -56,7 +56,7 @@
#if 0
char *getpass_hook(const char *prompt)
{
-#ifdef KERBEROS
+#ifdef HAVE_KERBEROS
char tmp[80];
des_read_pw_string(tmp, sizeof(tmp), (char *)prompt, 0);
tmp[79] = 0;
@@ -74,13 +74,15 @@
/* this compiles ok now, fixes ctrl+c and doesn't use obsolete
getpass() */
+#ifndef HAVE_KERBEROS
# include <fcntl.h>
# include <sys/ioctl.h>
# include <termio.h>
+#endif
char *getpass_hook(const char *prompt)
{
-#ifdef KERBEROS
+#ifdef HAVE_KERBEROS
char tmp[80];
des_read_pw_string(tmp, sizeof(tmp), (char *)prompt,
0);
I don't really know how to roll this all up into a portfile to test
it, but it's compiling for me manually now.
More information about the macports-users
mailing list