diff --git a/security/py-kerberos/Makefile b/security/py-kerberos/Makefile index 1a20f9ec5899..b3923e162432 100644 --- a/security/py-kerberos/Makefile +++ b/security/py-kerberos/Makefile @@ -3,23 +3,38 @@ PORTNAME= kerberos PORTVERSION= 1.1.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} -MAINTAINER= roland@micite.net +MAINTAINER= dvl@FreeBSD.org COMMENT= Kerberos bindings for python LICENSE= APACHE20 -LIB_DEPENDS= libkrb5support.so:${PORTSDIR}/security/krb5 +OPTIONS_DEFAULT= GSSAPI_BASE +OPTIONS_SINGLE= GSSAPI +OPTIONS_SINGLE_GSSAPI= GSSAPI_BASE GSSAPI_HEIMDAL GSSAPI_MIT + +GSSAPI_BASE_USES= gssapi +GSSAPI_HEIMDAL_USES= gssapi:heimdal +GSSAPI_MIT_USES= gssapi:mit USES= python USE_PYTHON= distutils autoplist +GSSAPI_BASE_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-src_kerberosbasic.h \ + ${PATCHDIR}/extra-patch-src_kerberosgss.c \ + ${PATCHDIR}/extra-patch-src_kerberosgss.h \ + ${PATCHDIR}/extra-patch-src_kerberospw.h + +GSSAPI_HEIMDAL_EXTRA_PATCHES= ${GSSAPI_BASE_EXTRA_PATCHES} + post-patch: - @${REINPLACE_CMD} -e 's|krb5|${PREFIX}/bin/krb5|g' ${WRKSRC}/setup.py - @${REINPLACE_CMD} -e 's|split|replace("/usr/lib:", "").split|g' ${WRKSRC}/setup.py + @${REINPLACE_CMD} -e 's|commands.getoutput("krb5-config|commands.getoutput("${GSSAPIBASEDIR}/bin/krb5-config|g' ${WRKSRC}/setup.py + +post-install: + ${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/kerberos.so .include diff --git a/security/py-kerberos/files/extra-patch-src_kerberosbasic.h b/security/py-kerberos/files/extra-patch-src_kerberosbasic.h new file mode 100644 index 000000000000..04d567942d39 --- /dev/null +++ b/security/py-kerberos/files/extra-patch-src_kerberosbasic.h @@ -0,0 +1,12 @@ +--- src/kerberosbasic.h.orig 2015-03-29 03:39:10 UTC ++++ src/kerberosbasic.h +@@ -14,8 +14,8 @@ + * limitations under the License. + **/ + ++#include + #include +-#include + #include + + #define krb5_get_err_text(context,code) error_message(code) diff --git a/security/py-kerberos/files/extra-patch-src_kerberosgss.c b/security/py-kerberos/files/extra-patch-src_kerberosgss.c new file mode 100644 index 000000000000..ba7d091643ea --- /dev/null +++ b/security/py-kerberos/files/extra-patch-src_kerberosgss.c @@ -0,0 +1,39 @@ +--- src/kerberosgss.c.orig 2015-03-29 03:40:20 UTC ++++ src/kerberosgss.c +@@ -38,7 +38,7 @@ char* server_principal_details(const cha + int code; + krb5_context kcontext; + krb5_keytab kt = NULL; +- krb5_kt_cursor cursor = NULL; ++ krb5_kt_cursor cursor; + krb5_keytab_entry entry; + char* pname = NULL; + +@@ -81,13 +81,13 @@ char* server_principal_details(const cha + { + result = malloc(strlen(pname) + 1); + strcpy(result, pname); +- krb5_free_unparsed_name(kcontext, pname); +- krb5_free_keytab_entry_contents(kcontext, &entry); ++ krb5_xfree(pname); ++ krb5_kt_free_entry(kcontext, &entry); + break; + } + +- krb5_free_unparsed_name(kcontext, pname); +- krb5_free_keytab_entry_contents(kcontext, &entry); ++ krb5_xfree(pname); ++ krb5_kt_free_entry(kcontext, &entry); + } + + if (result == NULL) +@@ -97,8 +97,7 @@ char* server_principal_details(const cha + } + + end: +- if (cursor) +- krb5_kt_end_seq_get(kcontext, kt, &cursor); ++ krb5_kt_end_seq_get(kcontext, kt, &cursor); + if (kt) + krb5_kt_close(kcontext, kt); + krb5_free_context(kcontext); diff --git a/security/py-kerberos/files/extra-patch-src_kerberosgss.h b/security/py-kerberos/files/extra-patch-src_kerberosgss.h new file mode 100644 index 000000000000..b4f162c2982b --- /dev/null +++ b/security/py-kerberos/files/extra-patch-src_kerberosgss.h @@ -0,0 +1,13 @@ +--- src/kerberosgss.h.orig 2015-03-29 03:41:32 UTC ++++ src/kerberosgss.h +@@ -14,8 +14,9 @@ + * limitations under the License. + **/ + ++#include ++#define gss_krb5_nt_service_name GSS_KRB5_NT_PRINCIPAL_NAME + #include +-#include + #include + + #define krb5_get_err_text(context,code) error_message(code) diff --git a/security/py-kerberos/files/extra-patch-src_kerberospw.h b/security/py-kerberos/files/extra-patch-src_kerberospw.h new file mode 100644 index 000000000000..9f2741b74c67 --- /dev/null +++ b/security/py-kerberos/files/extra-patch-src_kerberospw.h @@ -0,0 +1,12 @@ +--- src/kerberospw.h.orig 2015-03-29 03:42:28 UTC ++++ src/kerberospw.h +@@ -15,8 +15,8 @@ + * + **/ + ++#include + #include +-#include + #include + + #define krb5_get_err_text(context,code) error_message(code)