Bug 45495

Summary: Fix port bsd.port.mk to build when there is no system ssl
Product: Ports & Packages Reporter: Marc Recht <marc>
Component: Individual Port(s)Assignee: Dirk Meyer <dinoex>
Status: Closed FIXED    
Severity: Affects Only Me CC: knu
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Marc Recht 2002-11-19 22:00:06 UTC
If ${OSVERSION} >= 400014 then bsd.port.mk tries to use the system ssl and 
fails
if none is available. Since it could be that the openssl port is installed, 
it
should check for it, too. The attached patch fixes that problem.

Fix: 

.if defined(USE_OPENSSL)
 .if ${OSVERSION} >= 400014
-.if !exists(/usr/lib/libcrypto.so)
+.if !exists(/usr/lib/libcrypto.so) && 
!exists(${LOCALBASE}/lib/libcrypto.so)
 .BEGIN:
 	@${ECHO_CMD} "This port requires the OpenSSL library, which is part of"
 	@${ECHO_CMD} "the FreeBSD crypto distribution but not installed on your"
@@ -744,8 +744,14 @@
 	@${ECHO_CMD} "OpenSSL distribution."
 	@${FALSE}
 .else
+.if exists(/usr/lib/libcrypto.so)
 OPENSSLBASE=	/usr
 OPENSSLDIR=		/etc/ssl
+.else
+LIB_DEPENDS+=	crypto.3:${PORTSDIR}/security/openssl
+OPENSSLBASE?=	${LOCALBASE}
+OPENSSLDIR?=	${OPENSSLBASE}/openssl
+.endif
 # OpenSSL in the base system may not include IDEA for patent licensing 
reasons.
 .if defined(MAKE_IDEA) && !defined(OPENSSL_IDEA)
 OPENSSL_IDEA=	${MAKE_IDEA}
@@ -764,7 +770,7 @@
 .endif
 .endif
 .else
-LIB_DEPENDS+=	crypto.2:${PORTSDIR}/security/openssl
+LIB_DEPENDS+=	crypto.3:${PORTSDIR}/security/openssl
 OPENSSLBASE?=	${LOCALBASE}
 OPENSSLDIR?=	${OPENSSLBASE}/openssl
 .endif--pFI06npBeYxM5Q6xBnxdHEntxJzBpYDdARgHGgvpaEsAf0PX
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- bsd.port.mk.orig	Tue Nov 19 20:19:21 2002
+++ bsd.port.mk	Tue Nov 19 20:23:56 2002
@@ -734,7 +734,7 @@
How-To-Repeat: Remove system ssl and try to build a port with USE_SSL.
Comment 1 dirk.meyer 2002-11-20 06:29:22 UTC
Marc Recht worte:

> >How-To-Repeat:
> Remove system ssl and try to build a port with USE_SSL.

noted in ports/39054

my workaround is to delete "USE_SSL"
and used instead:

.include "${PORTSDIR}/security/openssl/Makefile.ssl"

regards Dirk

- Dirk Meyer, Im Grund 4, 34317 Habichtswald, Germany
- [dirk.meyer@dinoex.sub.org],[dirk.meyer@guug.de],[dinoex@FreeBSD.org]
Comment 2 Christian Weisgerber freebsd_committer freebsd_triage 2002-11-20 11:30:25 UTC
Responsible Changed
From-To: freebsd-ports->portmgr

Over to infrastructure maintainers.
Comment 3 Dirk Meyer freebsd_committer freebsd_triage 2003-08-27 08:32:56 UTC
State Changed
From-To: open->feedback

Dioes the problem still exist with the new bsd.port.mk? 

Please update to: 
ports/Mk/bsd.port.mk,v 1.464 2003/08/27 04:42:45 marcus Exp $ 

and check again. 


Comment 4 Dirk Meyer freebsd_committer freebsd_triage 2003-08-27 08:32:56 UTC
Responsible Changed
From-To: portmgr->dinoex

bsd.openssl.mk issue
Comment 5 Dirk Meyer freebsd_committer freebsd_triage 2003-09-05 18:07:35 UTC
State Changed
From-To: feedback->closed

current detection will use openssl in ports if non in base is found