Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Jan 2016 11:50:36 +0000 (UTC)
From:      Kurt Jaeger <pi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r407407 - in head/mail/mutt: . files
Message-ID:  <201601281150.u0SBoa8l051655@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pi
Date: Thu Jan 28 11:50:35 2016
New Revision: 407407
URL: https://svnweb.freebsd.org/changeset/ports/407407

Log:
  mail/mutt: provide options to build with GSSAPI variants
  
  The port rolls its own GSSAPI handling system, looking for installed
  libraries, rather than employing the "Uses" knobs (which probably
  post-date the mutt Port's GSSAPI support).
  
  When linking against OpenSSL from Ports, this results in one mutt
  process pulling in both libcrypto.so.8 from Ports and libcrypto.so.7
  from the base system (FreeBSD 10.1), leading to environ corruption
  problems when running external commands, which complain at startup
  (libc routines detect the corruption).  These look like:
  
      sh: environment corrupt; missing value for SOME_VAR
  
  and can be seen when, eg, viewing a PGP-signed mail with GnuPG
  integration turned on.
  
  This patch switches mail/mutt to use the GSSAPI "Uses" system.
  
  PR:		206220
  Submitted by:	Phil Pennock <freebsd@phil.spodhuis.org>
  Approved by:	Udo Schweigert <Udo.Schweigert@siemens.com> (maintainer)

Added:
  head/mail/mutt/files/patch-m4-gssapi.m4   (contents, props changed)
Modified:
  head/mail/mutt/Makefile

Modified: head/mail/mutt/Makefile
==============================================================================
--- head/mail/mutt/Makefile	Thu Jan 28 10:47:06 2016	(r407406)
+++ head/mail/mutt/Makefile	Thu Jan 28 11:50:35 2016	(r407407)
@@ -3,7 +3,7 @@
 
 PORTNAME=	mutt
 PORTVERSION=	1.5.24
-PORTREVISION?=	2
+PORTREVISION?=	3
 CATEGORIES+=	mail ipv6
 MASTER_SITES=	ftp://ftp.mutt.org/mutt/ \
 		ftp://ftp.fu-berlin.de/pub/unix/mail/mutt/ \
@@ -54,7 +54,7 @@ LITE=	yes
 OPTIONS_UNSET=	NLS DOCS EXAMPLES
 .else
 OPTIONS_DEFINE=	COMPRESSED_FOLDERS SASL DEBUG DOCS EXAMPLES FLOCK \
-		GPGME GREETING_PATCH GSSAPI HTML ICONV IDN IFDEF_PATCH \
+		GPGME GREETING_PATCH HTML ICONV IDN IFDEF_PATCH \
 		IMAP_HEADER_CACHE LOCALES_FIX MAILBOX_MANPAGES \
 		MAILDIR_HEADER_CACHE MAILDIR_MTIME_PATCH \
 		MIXMASTER NLS NNTP PARENT_CHILD_MATCH_PATCH \
@@ -62,9 +62,10 @@ OPTIONS_DEFINE=	COMPRESSED_FOLDERS SASL 
 		SIGNATURE_MENU SMART_DATE SMIME_OUTLOOK_COMPAT SMTP \
 		TOKYOCABINET TRASH_PATCH URLVIEW XML
 
-OPTIONS_SINGLE=	SCREEN
+OPTIONS_SINGLE=	GSSAPI SCREEN
 OPTIONS_RADIO=	SPELL
 OPTIONS_RADIO_SPELL=	ASPELL ISPELL
+OPTIONS_SINGLE_GSSAPI=	GSSAPI_BASE GSSAPI_HEIMDAL GSSAPI_MIT GSSAPI_NONE
 OPTIONS_SINGLE_SCREEN=	NCURSES SLANG
 
 COMPRESSED_FOLDERS_DESC=	Compressed folders
@@ -73,7 +74,6 @@ DEBUG_DESC=	Debugging capabilities
 FLOCK_DESC=	flock() usage
 GPGME_DESC=	Gpgme interface
 GREETING_PATCH_DESC=	Greeting support
-GSSAPI_DESC=	Use the gss API
 HTML_DESC=	HTML documentation
 IFDEF_PATCH_DESC=	ifdef feature
 IMAP_HEADER_CACHE_DESC=	IMAP header cache
@@ -141,6 +141,15 @@ NCURSES_USES=	ncurses
 NLS_USES=	gettext
 NLS_CONFIGURE_OFF=	--disable-nls
 
+# Handle GSSAPI from various places
+GSSAPI_BASE_USES=	gssapi
+GSSAPI_BASE_CONFIGURE_ON=	--with-gss=${GSSAPIBASEDIR} ${GSSAPI_CONFIGURE_ARGS}
+GSSAPI_HEIMDAL_USES=	gssapi:heimdal
+GSSAPI_HEIMDAL_CONFIGURE_ON=	--with-gss=${GSSAPIBASEDIR} ${GSSAPI_CONFIGURE_ARGS}
+GSSAPI_MIT_USES=	gssapi:mit
+GSSAPI_MIT_CONFIGURE_ON=	--with-gss=${GSSAPIBASEDIR} ${GSSAPI_CONFIGURE_ARGS}
+GSSAPI_NONE_CONFIGURE_ON=	--without-gss
+
 ICONV_USES=	iconv:translit
 ICONV_CONFIGURE_ON=	${ICONV_CONFIGURE_ARG}
 ICONV_CONFIGURE_OFF=	--disable-iconv
@@ -229,24 +238,6 @@ pre-build::
 			-e "s|^(AUTOHEADER = ).+|\1${AUTOHEADER}|" \
 		${BUILD_WRKSRC}/Makefile
 
-.if ${PORT_OPTIONS:MGSSAPI}
-.if exists(${LOCALBASE}/bin/krb5-config)
-LIB_DEPENDS+=		libgssapi_krb5.so:${PORTSDIR}/security/krb5
-CONFIGURE_ARGS+=	--with-gss=${LOCALBASE}
-.elif exists(${KRB5_HOME}/bin/krb5-config)
-LIB_DEPENDS+=		libgssapi_krb5.so:${PORTSDIR}/security/krb5
-CONFIGURE_ARGS+=	--with-gss=${KRB5_HOME}
-LDFLAGS+=		-L${KRB5_HOME}/lib -Wl,-rpath=${KRB5_HOME}/lib -ltinfow
-.elif exists(${HEIMDAL_HOME}/bin/krb5-config)
-LIB_DEPENDS+=		libgssapi_krb5.so:${PORTSDIR}/security/krb5
-CONFIGURE_ARGS+=	--with-gss=${HEIMDAL_HOME}
-LDFLAGS+=		-L${HEIMDAL_HOME}/lib -Wl,-rpath=${HEIMDAL_HOME}/lib -ltinfow
-.elif (defined(MAKE_KERBEROS5)) || exists(/usr/lib/libkrb5.a)
-CONFIGURE_ARGS+=	--with-gss
-WITH_KRB5_SYS=yes
-.endif
-.endif
-
 LDFLAGS+=		-L${LOCALBASE}/lib -Wl,-rpath=${LOCALBASE}/lib:/usr/lib -ltinfow
 CFLAGS+=		${CFLAGS_ADD}
 LDFLAGS+=		${LDFLAGS_ADD}

Added: head/mail/mutt/files/patch-m4-gssapi.m4
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/mutt/files/patch-m4-gssapi.m4	Thu Jan 28 11:50:35 2016	(r407407)
@@ -0,0 +1,10 @@
+--- m4/gssapi.m4.orig	2015-08-30 19:06:38.000000000 +0200
++++ m4/gssapi.m4	2016-01-25 15:04:37.448609000 +0100
+@@ -27,6 +27,7 @@
+     GSSAPI_LIBS="$MUTTLIBS `$KRB5CFGPATH --libs gssapi`"
+     case "`$KRB5CFGPATH --version`" in
+       "Kerberos 5 "*)	GSSAPI_IMPL="MIT";;
++      "FreeBSD heimdal"*)		GSSAPI_IMPL="Heimdal";;
+       ?eimdal*)		GSSAPI_IMPL="Heimdal";;
+       *)		GSSAPI_IMPL="Unknown";;
+    esac



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601281150.u0SBoa8l051655>