Subject: pkg/23634: sasl2 in pkgsrc depends on obsolete krb5-types.h
To: None <gnats-bugs@gnats.netbsd.org>
From: None <lguillaume@berklee.edu>
List: netbsd-bugs
Date: 11/22/2003 18:29:36
>Number:         23634
>Category:       pkg
>Synopsis:       sasl2 in pkgsrc depends on obsolete krb5-types.h
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 03 06:30:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Louis Guillaume
>Release:        NetBSD 1.6ZF
>Organization:
>Environment:
System: NetBSD creator.berklee.net 1.6ZF NetBSD 1.6ZF (GENERIC.MP) #9: Thu Nov 20 19:13:43 UTC 2003 louis@creator.berklee.net:/usr/obj/sys/arch/i386/compile.i386/GENERIC.MP i386
Architecture: i386
Machine: i386
>Description:
The package security/cyrus-sasl2 fails to build with SASL_USE_GSSAPI=YES

This package has the following in the Makefile...

.if defined(SASL_USE_GSSAPI) && !empty(SASL_USE_GSSAPI:M[yY][eE][sS])
CONFIGURE_ARGS+=        --enable-gssapi=/usr    # GSSAPI
PLIST_SRC+=             ${PKGDIR}/PLIST.krb5
.  if exists(/usr/include/krb5/krb5-types.h)
CPPFLAGS+=              -I/usr/include/krb5
.  endif
.endif

... but /usr/include/krb5/krb5-types.h has been obsolete for a long time.
This causes the build to break as it cannot find /usr/include/krb5/krb5.h.

Also we need to add LIBS+=-lcrypto because heimdal uses openssl's libcrypto
and it looks like the sasl2 package isn't aware of that.

I'm not sure in the patch below if I should test for the existence of
/usr/include/krb5/krb5.h. I figure it's part of the core NetBSD system so 
it should always be there; however this may not be a fair assumption, someone
who knows more about this should check.

>How-To-Repeat:
	Try to build pkgsrc/security/cyrus-sasl2  with SASL_USE_GSSAPI=YES
>Fix:
--- Makefile.orig       2003-11-15 06:11:03.000000000 +0000
+++ Makefile    2003-11-22 18:11:20.000000000 +0000
@@ -35,9 +35,8 @@
 .if defined(SASL_USE_GSSAPI) && !empty(SASL_USE_GSSAPI:M[yY][eE][sS])
 CONFIGURE_ARGS+=       --enable-gssapi=/usr    # GSSAPI
 PLIST_SRC+=            ${PKGDIR}/PLIST.krb5
-.  if exists(/usr/include/krb5/krb5-types.h)
 CPPFLAGS+=             -I/usr/include/krb5
-.  endif
+LIBS+=                 -lcrypto
 .endif
 
 PLIST_SRC+=            ${PKGDIR}/PLIST.plugins


>Release-Note:
>Audit-Trail:
>Unformatted: