From owner-freebsd-ports Fri Jan 28 2:44:43 2000 Delivered-To: freebsd-ports@freebsd.org Received: from shale.csir.co.za (shale.csir.co.za [146.64.46.5]) by hub.freebsd.org (Postfix) with ESMTP id 46F0515915; Fri, 28 Jan 2000 02:44:09 -0800 (PST) (envelope-from reg@shale.csir.co.za) Received: from granite.hip.berkeley.edu (granite.hip.berkeley.edu [136.152.155.25]) by shale.csir.co.za (8.9.3/8.9.3) with ESMTP id MAA11913; Fri, 28 Jan 2000 12:25:20 +0200 (SAT) (envelope-from reg@shale.csir.co.za) Received: (from reg@localhost) by granite.hip.berkeley.edu (8.9.3/8.9.3) id CAA98795; Fri, 28 Jan 2000 02:24:42 -0800 (PST) (envelope-from reg) Date: Fri, 28 Jan 2000 02:24:42 -0800 From: Jeremy Lea To: Kris Kennaway Cc: ports@FreeBSD.org Subject: Re: USE_OPENSSL patch Message-ID: <20000128022442.M10368@shale.csir.co.za> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from kris@hub.FreeBSD.ORG on Fri, Jan 28, 2000 at 12:39:25AM -0800 Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi, On Fri, Jan 28, 2000 at 12:39:25AM -0800, Kris Kennaway wrote: > --- Mk/bsd.port.mk 2000/01/21 11:08:06 1.326 > +++ Mk/bsd.port.mk 2000/01/28 07:03:11 > @@ -571,6 +571,42 @@ > PREFIX?= ${LOCALBASE} > .endif > > +.if defined(USE_OPENSSL) > +.if ${OSVERSION} >= 400014 && exists(/usr/lib/libcrypto.a) > +.if ${USE_OPENSSL} == RSA > +_HASRSA= "`/usr/bin/nm /usr/lib/libcrypto.a | /usr/bin/grep RSA_free`" > +.if empty(_HASRSA) > +.BEGIN: > + @${ECHO} "This port requires RSA crypto, which is not present in your" > + @${ECHO} "version of OpenSSL. Please see Chapter XX in the FAQ for" > + @${ECHO} "a description of the problem and alternative solutions." > + @${FALSE} > +.elif defined(USA_RESIDENT) && ${USA_RESIDENT} == YES > +LIB_DEPENDS+= rsaref.2:${PORTSDIR}/security/rsaref > +# We set this so ports can decide whether or not to link against librsaref > +# and libRSAglue > +OPENSSL_RSAREF= yes > +.endif > +.endif > +OPENSSLBASE= /usr > +OPENSSLDIR= /etc/ssl > +# OpenSSL in the base system doesn't include IDEA for patent reasons. > +OPENSSL_IDEA= no > +# XXX Won't always work > +CFLAGS+= -DNO_IDEA > +MAKE_ARGS+= CFLAGS="${CFLAGS}" > +.else > +LIB_DEPENDS+= crypto.1:${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} > +RESTRICTED= "Contains cryptography." > +.endif I thought I'd sent this to you, but I've been doing to many things lately and I must have forgotten. We also need to set OPENSSL_RSAREF for the case where we're using the openssl port. Either that or my pre-openssl current is broken... .else +.if defined(USA_RESIDENT) && ${USA_RESIDENT} == YES +LIB_DEPENDS+= rsaref.2:${PORTSDIR}/security/rsaref +# We set this so ports can decide whether or not to link against librsaref +# and libRSAglue +OPENSSL_RSAREF= yes +.endif LIB_DEPENDS+= crypto.1:${PORTSDIR}/security/openssl Regards, -Jeremy -- FreeBSD - Because the best things in life are free... http://www.freebsd.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message