Bug 231160

Summary: devel/libsoup: add options for mit/heimdal/base GSSAPI
Product: Ports & Packages Reporter: Sergey Akhmatov <sergey>
Component: Individual Port(s)Assignee: freebsd-gnome mailing list <gnome>
Status: New ---    
Severity: Affects Only Me CC: lantw44
Priority: --- Keywords: patch
Version: LatestFlags: bugzilla: maintainer-feedback? (gnome)
Hardware: Any   
OS: Any   
Attachments:
Description Flags
GSSAPI options
none
GSSAPI options
none
GSSAPI options none

Description Sergey Akhmatov 2018-09-04 19:30:04 UTC
Created attachment 196870 [details]
GSSAPI options

The attached patch adds options to build devel/libsoup with different GSSAPI implementations: base, security/heimdal, security/krb5 and without GSSAPI.

QA:
poudriere testport on 11.2-RELEASE with all options.
Comment 1 Ting-Wei Lan 2018-09-05 14:27:12 UTC
Comment on attachment 196870 [details]
GSSAPI options

>Index: devel/libsoup/Makefile
>===================================================================
>--- devel/libsoup/Makefile	(revision 478960)
>+++ devel/libsoup/Makefile	(working copy)
>@@ -3,7 +3,7 @@
> 
> PORTNAME=	libsoup
> PORTVERSION=	2.54.1
>-PORTREVISION=	0
>+PORTREVISION=	1
> CATEGORIES=	devel gnome
> MASTER_SITES=	GNOME
> DIST_SUBDIR=	gnome2
>@@ -11,6 +11,9 @@
> MAINTAINER=	gnome@FreeBSD.org
> COMMENT=	SOAP (Simple Object Access Protocol) implementation in C
> 
>+LICENSE=	GPLv2
>+LICENSE_FILE=	${WRKSRC}/COPYING
>+

libsoup is licensed under LGPLv2+, not GPLv2.

>@@ -43,6 +46,27 @@
> CONFIGURE_ARGS+=--without-gnome
> .endif
> 
>+OPTIONS_SINGLE=	GSSAPI
>+OPTIONS_SINGLE_GSSAPI=	GSSAPI_BASE GSSAPI_HEIMDAL GSSAPI_MIT GSSAPI_NONE
>+OPTIONS_DEFAULT=	GSSAPI_${${SSL_DEFAULT} == base :?BASE :NONE}
>+
>+GSSAPI_BASE_CONFIGURE_ON=	--with-gssapi=${GSSAPIBASEDIR} ${GSSAPI_CONFIGURE_ARGS}
>+GSSAPI_BASE_CPPFLAGS=	${GSSAPICPPFLAGS}
>+GSSAPI_BASE_LDFLAGS=	${GSSAPILDFLAGS}
>+GSSAPI_BASE_LIBS=	${GSSAPILIBS}
>+GSSAPI_BASE_USES=	gssapi

Does --with-gssapi work in this way? By searching for the usage of 'with_gssapi' variable in configure.ac, the only two special values of it are 'yes' and 'no'. I think you probably want to use --with-krb5-config here.
Comment 2 Sergey Akhmatov 2018-09-05 15:37:36 UTC
Created attachment 196887 [details]
GSSAPI options

Fixed LICENSE
Fixed configure args
Comment 3 Sergey Akhmatov 2018-09-05 15:51:42 UTC
(In reply to Ting-Wei Lan from comment #1)
Thanks for the review! I've updated the patch.

My bad with the license, fixed it.
As for configure args, it worked somehow, but approach you've proposed seems to be the right one, we should not rely on magic.
Comment 4 Sergey Akhmatov 2018-09-05 16:00:29 UTC
Created attachment 196889 [details]
GSSAPI options

Cleanup further: (LD|CP)FLAGS are detected by krb5-config
Comment 5 Ting-Wei Lan 2018-09-09 14:29:50 UTC
I am not a maintainer and I haven't tested your patch, but the new version looks much better to me.