dev-libs/cyrus-sasl: Fix cross-compilation

cyrus-sasl is bad at supporting cross compilation. Make that work.
This commit is contained in:
Matthew Garrett 2016-04-05 18:28:56 -07:00
parent 0e5de7a261
commit d624880eae
2 changed files with 42 additions and 1 deletions

View File

@ -14,7 +14,7 @@ SRC_URI="ftp://ftp.cyrusimap.org/cyrus-sasl/${P}.tar.gz"
LICENSE="BSD-with-attribution"
SLOT="2"
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
IUSE="authdaemond berkdb gdbm kerberos ldapdb openldap mysql pam postgres sample selinux sqlite
srp ssl static-libs urandom"
@ -57,6 +57,7 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-2.1.26-send-imap-logout.patch
epatch "${FILESDIR}"/${PN}-2.1.26-canonuser-ldapdb-garbage-in-out-buffer.patch
epatch "${FILESDIR}"/${PN}-2.1.26-fix_dovecot_authentication.patch
epatch "${FILESDIR}"/${PN}-2.1.26-fix-cross-compiling.patch
# Get rid of the -R switch (runpath_switch for Sun)
# >=gcc-4.6 errors out with unknown option

View File

@ -0,0 +1,40 @@
diff -ur cyrus-sasl-2.1.26.orig/cmulocal/sasl2.m4 cyrus-sasl-2.1.26/cmulocal/sasl2.m4
--- cyrus-sasl-2.1.26.orig/cmulocal/sasl2.m4 2016-04-05 17:38:41.181743471 -0700
+++ cyrus-sasl-2.1.26/cmulocal/sasl2.m4 2016-04-05 17:48:43.137754169 -0700
@@ -287,35 +287,7 @@
AC_CHECK_FUNCS(gss_get_name_attribute)
LIBS="$cmu_save_LIBS"
- cmu_save_LIBS="$LIBS"
- LIBS="$LIBS $GSSAPIBASE_LIBS"
- AC_MSG_CHECKING([for SPNEGO support in GSSAPI libraries])
- AC_TRY_RUN([
-#ifdef HAVE_GSSAPI_H
-#include <gssapi.h>
-#else
-#include <gssapi/gssapi.h>
-#endif
-
-int main(void)
-{
- gss_OID_desc spnego_oid = { 6, (void *) "\x2b\x06\x01\x05\x05\x02" };
- gss_OID_set mech_set;
- OM_uint32 min_stat;
- int have_spnego = 0;
-
- if (gss_indicate_mechs(&min_stat, &mech_set) == GSS_S_COMPLETE) {
- gss_test_oid_set_member(&min_stat, &spnego_oid, mech_set, &have_spnego);
- gss_release_oid_set(&min_stat, &mech_set);
- }
-
- return (!have_spnego); // 0 = success, 1 = failure
-}
-],
- [ AC_DEFINE(HAVE_GSS_SPNEGO,,[Define if your GSSAPI implementation supports SPNEGO])
- AC_MSG_RESULT(yes) ],
- AC_MSG_RESULT(no))
- LIBS="$cmu_save_LIBS"
+ AC_DEFINE(HAVE_GSS_SPNEGO,,[1])
else
AC_MSG_RESULT([disabled])