Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 May 2010 11:31:53 +0200 (CEST)
From:      Dan Lukes <dan@obluda.cz>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/146294: [ PATCH ] mail/cclient doesn't honor WITH_OPENSSL_PORT=yes correctly
Message-ID:  <201005040931.o449VqgS009714@master7.ms.mff.cuni.cz>
Resent-Message-ID: <201005040940.o449e3Lm078795@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         146294
>Category:       ports
>Synopsis:       [ PATCH ] mail/cclient doesn't honor WITH_OPENSSL_PORT=yes correctly
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 04 09:40:03 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Dan Lukes
>Release:        FreeBSD i386
>Organization:
Obludarium	
>Environment:
System: FreeBSD i386
mail/cclient/Makefile,v 1.44 2009/11/18 22:39:52

>Description:
	The port improperly honor WITH_OPENSSL_PORT=yes
	In link against libraries from port, but use include files from base during compilation

	The resulting product is unstable and coredumps often

>How-To-Repeat:
	1. set WITH_OPENSSL_PORT=yes
	2. rename /usr/include/openssl and /usr/bin/openssl to something else

	Try to compile.
>Fix:

--- Makefile.orig	2010-02-03 12:28:21.000000000 +0100
+++ Makefile	2010-05-04 11:26:24.000000000 +0200
@@ -26,12 +26,10 @@
 
 MAKE_JOBS_UNSAFE=	yes
 
-.include <bsd.port.pre.mk>
-
 USE_LDCONFIG=	yes
 ALL_TARGET=	bsf
 .if defined(WITHOUT_SSL)
-MAKE_ARGS+=	SSLTYPE=none SSLDIR=${OPENSSLBASE}
+MAKE_ARGS+=	SSLTYPE=none
 .else
 USE_OPENSSL=	yes
 .if defined(WITH_SSL_AND_PLAINTEXT)
@@ -40,6 +38,7 @@
 MAKE_ARGS+=	SSLTYPE=unix.nopwd
 .endif
 .endif
+MAKE_ARGS+=	SSLDIR=${OPENSSLBASE} SSLINCLUDE=${OPENSSLINC} SSLLIB=${OPENSSLLIB}
 
 WRKSRC=		${WRKDIR}/${DISTNAME}
 
@@ -54,7 +53,10 @@
 	@${REINPLACE_CMD} -e "s|/usr/local|${PREFIX}|g" ${WRKSRC}/${file}
 .endfor
 	@${REINPLACE_CMD} -e "s:/etc/ssl/certs:${PREFIX}/certs:g; \
-		s:/etc/ssl/private:${PREFIX}/certs:g" ${WRKSRC}/Makefile
+		s:/etc/ssl/private:${PREFIX}/certs:g; \
+		s:SSLINCLUDE=[^ ]*:SSLINCLUDE=\\$$\\(SSLINCLUDE\\):;  \
+		s:SSLLIB=[^ ]*:SSLLIB=\\$$\\(SSLLIB\\):;              \
+		" ${WRKSRC}/Makefile
 .if !defined(WITHOUT_IPV6)
 	@${REINPLACE_CMD} -e "s|^IP=4|IP=6|" ${WRKSRC}/Makefile \
 		${WRKSRC}/src/osdep/unix/Makefile
@@ -106,4 +108,4 @@
 	@${ECHO} "================================================================================"
 .endif
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
>Release-Note:
>Audit-Trail:
>Unformatted:



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