From os@brain.cc.rsu.ru  Thu Apr 17 04:28:11 2003
Return-Path: <os@brain.cc.rsu.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id D5EEB37B405; Thu, 17 Apr 2003 04:28:11 -0700 (PDT)
Received: from brain.cc.rsu.ru (brain.cc.rsu.ru [195.208.252.154])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id 7B88A43FAF; Thu, 17 Apr 2003 04:28:09 -0700 (PDT)
	(envelope-from os@brain.cc.rsu.ru)
Received: from brain.cc.rsu.ru (os@localhost [127.0.0.1])
	by brain.cc.rsu.ru (8.12.6/8.12.6) with ESMTP id h3HBRv8D059718;
	Thu, 17 Apr 2003 15:27:57 +0400 (MSD)
	(envelope-from os@brain.cc.rsu.ru)
Received: (from os@localhost)
	by brain.cc.rsu.ru (8.12.6/8.12.6/Submit) id h3HBRuRU059717;
	Thu, 17 Apr 2003 15:27:56 +0400 (MSD)
Message-Id: <200304171127.h3HBRuRU059717@brain.cc.rsu.ru>
Date: Thu, 17 Apr 2003 15:27:56 +0400 (MSD)
From: Oleg Sharoiko <os@rsu.ru>
Reply-To: Oleg Sharoiko <os@rsu.ru>
To: FreeBSD-gnats-submit@freebsd.org, ume@freebsd.org
Cc: and@rsu.ru
Subject: Cyrus-sasl can not be built with openssl from ports
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         51090
>Category:       ports
>Synopsis:       Cyrus-sasl can not be built with openssl from ports
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    ume
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 17 04:30:15 PDT 2003
>Closed-Date:    Thu Apr 24 09:39:25 PDT 2003
>Last-Modified:  Thu Apr 24 09:39:25 PDT 2003
>Originator:     Oleg Sharoiko
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
>Environment:
System: FreeBSD brain.cc.rsu.ru 4.7-STABLE FreeBSD 4.7-STABLE #1: Mon Mar 17 16:02:48 MSK 2003 os@brain.cc.rsu.ru:/usr/src/sys/compile/brain.k7.RELENG_4.2002-11-06 i386


	
>Description:
	Two bugs found:

	1. USE_OPENSSL (from bsd.port.mk) does not allow to build
	with openssl from ports. It always tries to build against
	openssl from base system and complains when system was built
	without openssl, although openssl is installed from ports

	2. cyrus-sasl 2.1.13 incorrectly handles openssl location when
	building saslauthd. It can not use openssl in /usr/local

>How-To-Repeat:
	
>Fix:

	The following patch will solve both of the problems.
	1. It switches from USE_OPENSSL to security/openssl/bsd.openssl.mk
	for purposes of openssl identification
	2. It passes paths to include and lib files of openssl as
	CPPFLAGS and LDFLAGS

--- Makefile	15 Apr 2003 17:03:27 -0000	1.68
+++ Makefile	17 Apr 2003 11:27:01 -0000
@@ -17,7 +17,6 @@
 COMMENT=	RFC 2222 SASL (Simple Authentication and Security Layer)
 
 USE_SUBMAKE=	yes
-USE_OPENSSL=	yes
 
 INSTALLS_SHLIB=	yes
 
@@ -97,7 +96,8 @@
 CONFIGURE_ENV+=	LOCALBASE=${LOCALBASE} \
 		OPENSSLINC=${OPENSSLINC} \
 		OPENSSLLIB=${OPENSSLLIB} \
-		LDFLAGS=${LDFLAGS}
+		LDFLAGS="${LDFLAGS}" \
+		CPPFLAGS="${CPPFLAGS}"
 
 CYRUS_USER?=	cyrus
 CYRUS_GROUP?=	cyrus
@@ -193,4 +193,14 @@
 post-clean:
 	@${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc
 
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+.include "${PORTSDIR}/security/openssl/bsd.openssl.mk"
+#
+# Workaround the bug in cyrus-sasl (saslauthd) configure not being able to find
+# openssl from ports
+#
+.if !defined(WITH_OPENSSL_BASE)
+LDFLAGS+=	-L${OPENSSLLIB}
+CPPFLAGS+=	-I${OPENSSLINC}
+.endif
+.include <bsd.port.post.mk>

	


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: ume 
State-Changed-When: Thu Apr 24 09:37:29 PDT 2003 
State-Changed-Why:  
Thanks!  I've just commited it with some modification. 


Responsible-Changed-From-To: freebsd-ports-bugs->ume 
Responsible-Changed-By: ume 
Responsible-Changed-When: Thu Apr 24 09:37:29 PDT 2003 
Responsible-Changed-Why:  
Thanks!  I've just commited it with some modification. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=51090 
>Unformatted:
