From dm@home.dinoex.sub.org  Sat Jun  8 21:01:54 2002
Return-Path: <dm@home.dinoex.sub.org>
Received: from net2.dinoex.sub.org (net2.dinoex.de [212.184.201.182])
	by hub.freebsd.org (Postfix) with ESMTP id 964C637B400
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  8 Jun 2002 21:01:50 -0700 (PDT)
Received: from home.dinoex.sub.org (home [217.6.200.196])
	by net2.dinoex.sub.org (8.12.4/8.12.4) with ESMTP id g5941eOh013505
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 9 Jun 2002 06:01:41 +0200 (CEST)
	(envelope-from dm@home.dinoex.sub.org)
Received: (from dm@localhost)
	by home.dinoex.sub.org (8.12.3/8.12.4/Submit) id g5941dM8041437;
	Sun, 9 Jun 2002 06:01:39 +0200 (CEST)
	(envelope-from dm)
Message-Id: <200206090401.g5941dM8041437@home.dinoex.sub.org>
Date: Sun, 9 Jun 2002 06:01:39 +0200 (CEST)
From: dirk.meyer@dinoex.sub.org
Reply-To: dirk.meyer@dinoex.sub.org
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Support USE_OPENSSL=yes in bsd.port.mk
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         39054
>Category:       ports
>Synopsis:       [PATCH] Support USE_OPENSSL=yes in bsd.port.mk
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    portmgr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 08 21:10:01 PDT 2002
>Closed-Date:    Tue Aug 26 21:44:31 PDT 2003
>Last-Modified:  Tue Aug 26 21:44:31 PDT 2003
>Originator:     Dirk Meyer
>Release:        FreeBSD 4.6-RC i386
>Organization:
privat
>Environment:
System: FreeBSD 4.6-RC i386

>Description:

	SSL was updated in the ports,
	opennsh and other ports depends on the newer version of SSL

>How-To-Repeat:

	USE_OPENSSL is not maintained, some open PR#

>Fix:

	move this out of bad.port.mk and give user the choice.
	apply or approve the patch:

diff -u -r1.413 bsd.port.mk
--- bsd.port.mk	7 Jun 2002 21:30:47 -0000	1.413
+++ bsd.port.mk	9 Jun 2002 03:56:01 -0000
@@ -731,47 +731,7 @@
 .endif
 
 .if defined(USE_OPENSSL)
-.if ${OSVERSION} >= 400014
-.if !exists(/usr/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"
-	@${ECHO_CMD} "machine. Please see the \"OpenSSL\" section in the handbook"
-	@${ECHO_CMD} "(at \"http://www.FreeBSD.org/handbook/openssl.html\", for instance)"
-	@${ECHO_CMD} "for instructions on how to obtain and install the FreeBSD"
-	@${ECHO_CMD} "OpenSSL distribution."
-	@${FALSE}
-.else
-OPENSSLBASE=	/usr
-OPENSSLDIR=		/etc/ssl
-# OpenSSL in the base system may not include IDEA for patent licensing reasons.
-.if defined(MAKE_IDEA) && !defined(OPENSSL_IDEA)
-OPENSSL_IDEA=	${MAKE_IDEA}
-.else
-OPENSSL_IDEA?=	NO
-.endif
-.if ${OPENSSL_IDEA} == "NO"
-# XXX This is a hack to work around the fact that /etc/make.conf clobbers
-#     our CFLAGS. It might not be enough for all future ports.
-.if defined(HAS_CONFIGURE)
-CFLAGS+=		-DNO_IDEA
-.else
-OPENSSL_CFLAGS+=-DNO_IDEA
-.endif
-MAKE_ARGS+=		OPENSSL_CFLAGS="${OPENSSL_CFLAGS}"
-.endif
-.endif
-.else
-LIB_DEPENDS+=	crypto.2:${PORTSDIR}/security/openssl
-OPENSSLBASE?=	${LOCALBASE}
-OPENSSLDIR?=	${OPENSSLBASE}/openssl
-.endif
-OPENSSLLIB=		${OPENSSLBASE}/lib
-OPENSSLINC=		${OPENSSLBASE}/include
-MAKE_ENV+=		OPENSSLLIB=${OPENSSLLIB} OPENSSLINC=${OPENSSLINC} \
-				OPENSSLBASE=${OPENSSLBASE} OPENSSLDIR=${OPENSSLDIR}
-### crypto
-#RESTRICTED=		"Contains cryptography."
+.include "${PORTSDIR}/Mk/bsd.openssl.mk"
 .endif
 
 .if defined(EMACS_PORT_NAME)
diff -Nu bsd.openssl.mk.orig ./bsd.openssl.mk
--- bsd.openssl.mk.orig	Thu Jan  1 01:00:00 1970
+++ bsd.openssl.mk	Sun Jun  9 05:51:55 2002
@@ -0,0 +1,56 @@
+# makefile for use of:	OpenSSH
+# Date created:		31 May 2002
+# Whom:			dinoex
+#
+# $FreeBSD$
+#
+
+.if defined(USE_OPENSSL_BASE)
+OPENSSLBASE=		/usr
+OPENSSLDIR=		/etc/ssl
+
+.if !exists(/usr/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"
+	@${ECHO_CMD} "machine. Please see the \"OpenSSL\" section in the handbook"
+	@${ECHO_CMD} "(at \"http://www.FreeBSD.org/handbook/openssl.html\", for instance)"
+	@${ECHO_CMD} "for instructions on how to obtain and install the FreeBSD"
+	@${ECHO_CMD} "OpenSSL distribution."
+	@${FALSE}
+.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}
+.else
+OPENSSL_IDEA?=		NO
+.endif
+
+.if ${OPENSSL_IDEA} == "NO"
+# XXX This is a hack to work around the fact that /etc/make.conf clobbers
+#     our CFLAGS. It might not be enough for all future ports.
+.if defined(HAS_CONFIGURE)
+CFLAGS+=		-DNO_IDEA
+.else
+OPENSSL_CFLAGS+=	-DNO_IDEA
+.endif
+MAKE_ARGS+=		OPENSSL_CFLAGS="${OPENSSL_CFLAGS}"
+.endif
+
+.else
+
+OPENSSLBASE=		${LOCALBASE}
+OPENSSLDIR=		${OPENSSLBASE}/openssl
+LIB_DEPENDS+=		crypto.3:${PORTSDIR}/security/openssl
+
+.endif
+
+OPENSSLLIB=		${OPENSSLBASE}/lib
+OPENSSLINC=		${OPENSSLBASE}/include
+MAKE_ENV+=		OPENSSLLIB=${OPENSSLLIB} OPENSSLINC=${OPENSSLINC} \
+			OPENSSLBASE=${OPENSSLBASE} OPENSSLDIR=${OPENSSLDIR}
+
+### crypto
+#RESTRICTED=		"Contains cryptography."
+
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports->portmgr 
Responsible-Changed-By: lioux 
Responsible-Changed-When: Sat Jun 8 21:17:41 PDT 2002 
Responsible-Changed-Why:  
Over to maintainers 

http://www.freebsd.org/cgi/query-pr.cgi?pr=39054 

From: dirk.meyer@dinoex.sub.org (Dirk Meyer)
To: FreeBSD-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: ports/39054: [PATCH] Support USE_OPENSSL=yes in bsd.port.mk
Date: Mon, 24 Mar 2003 21:36:04 +0100

 suggestion to use "bsd.openssl.mk" found no apprival?
 
 This update to use the existing makefile:
 ${PORTSDIR}/security/openssl/Makefile.ssl
 
 kind regards Dirk
 
 - Dirk Meyer, Im Grund 4, 34317 Habichtswald, Germany
 - [dirk.meyer@dinoex.sub.org],[dirk.meyer@guug.de],[dinoex@FreeBSD.org]
 
 Index: bsd.port.mk
 ===================================================================
 RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v
 retrieving revision 1.444
 diff -u -r1.444 bsd.port.mk
 --- bsd.port.mk	22 Mar 2003 04:45:24 -0000	1.444
 +++ bsd.port.mk	24 Mar 2003 20:30:31 -0000
 @@ -927,45 +927,7 @@
  .endif # !defined(PERL_LEVEL) && defined(PERL_VERSION)
  
  .if defined(USE_OPENSSL)
 -.if ${OSVERSION} >= 400014
 -.if !exists(/usr/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"
 -	@${ECHO_CMD} "machine. Please see the \"OpenSSL\" section in the handbook"
 -	@${ECHO_CMD} "(at \"http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/openssl.html\", for instance)"
 -	@${ECHO_CMD} "for instructions on how to obtain and install the FreeBSD"
 -	@${ECHO_CMD} "OpenSSL distribution."
 -	@${FALSE}
 -.else
 -OPENSSLBASE=	/usr
 -OPENSSLDIR=		/etc/ssl
 -# OpenSSL in the base system may not include IDEA for patent licensing reasons.
 -.if defined(MAKE_IDEA) && !defined(OPENSSL_IDEA)
 -OPENSSL_IDEA=	${MAKE_IDEA}
 -.else
 -OPENSSL_IDEA?=	NO
 -.endif
 -.if ${OPENSSL_IDEA} == "NO"
 -# XXX This is a hack to work around the fact that /etc/make.conf clobbers
 -#     our CFLAGS. It might not be enough for all future ports.
 -.if defined(HAS_CONFIGURE)
 -CFLAGS+=		-DNO_IDEA
 -.else
 -OPENSSL_CFLAGS+=-DNO_IDEA
 -.endif
 -MAKE_ARGS+=		OPENSSL_CFLAGS="${OPENSSL_CFLAGS}"
 -.endif
 -.endif
 -.else
 -LIB_DEPENDS+=	crypto.2:${PORTSDIR}/security/openssl
 -OPENSSLBASE?=	${LOCALBASE}
 -OPENSSLDIR?=	${OPENSSLBASE}/openssl
 -.endif
 -OPENSSLLIB=		${OPENSSLBASE}/lib
 -OPENSSLINC=		${OPENSSLBASE}/include
 -MAKE_ENV+=		OPENSSLLIB=${OPENSSLLIB} OPENSSLINC=${OPENSSLINC} \
 -				OPENSSLBASE=${OPENSSLBASE} OPENSSLDIR=${OPENSSLDIR}
 +.include "${PORTSDIR}/security/openssl/Makefile.ssl"
  .endif
  
  .if defined(EMACS_PORT_NAME)
State-Changed-From-To: open->closed 
State-Changed-By: marcus 
State-Changed-When: Tue Aug 26 21:44:20 PDT 2003 
State-Changed-Why:  
Committed, thanks! 

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