From patrick@server.mindstep.com Tue Aug 17 19:46:34 1999
Return-Path: <patrick@server.mindstep.com>
Received: from server.mindstep.com (cr480472-a.slnt1.on.wave.home.com [24.112.33.138])
	by hub.freebsd.org (Postfix) with SMTP id 9524F14C33
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 17 Aug 1999 19:46:33 -0700 (PDT)
	(envelope-from patrick@server.mindstep.com)
Received: (qmail 58575 invoked by alias); 18 Aug 1999 02:45:57 -0000
Received: (qmail 58571 invoked by uid 0); 18 Aug 1999 02:45:56 -0000
Message-Id: <19990818024556.58570.qmail@server.mindstep.com>
Date: 18 Aug 1999 02:45:56 -0000
From: patrick@server.mindstep.com
Reply-To:
To: freefall-gnats@server.mindstep.com
Cc: martti.kuparinen@ericsson.com
Subject: stunnel does not build from the port collection
X-Send-Pr-Version: 3.110

>Number:         13216
>Category:       ports
>Synopsis:       stunnel does not build from the port collection
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 17 19:50:02 PDT 1999
>Closed-Date:    Mon Sep 6 12:31:10 PDT 1999
>Last-Modified:  Mon Sep  6 12:31:31 PDT 1999
>Originator:     Patrick Bihan-Faou
>Release:        freebsd-3.2-STABLE
>Organization:
MindStep Corporation
>Environment:
System: FreeBSD penpro.local.mindstep.com 3.2-STABLE FreeBSD 3.2-STABLE #14: Wed Jul 28 12:13:59 EDT 1999 serge@penpro.local.mindstep.com:/usr/src/sys/compile/PENPRO i386

Current version of the stunnel port (checked-out on August 17, 1999)

>Description:

The autoconf script generates a makefile with an incorrect order for the
openSSL libraries. This prevents the port from linking properly.

>How-To-Repeat:

cd /usr/ports/security/stunnel
make

>Fix:

The following patch corrects the autoconf script (configure.in) from the source
distribution and re-runs autoconf.

This also means that for now this port depends on autoconf being installed
(this is verified by the patched port Makefile).



diff -ruN stunnel.orig/Makefile stunnel/Makefile
--- stunnel.orig/Makefile	Tue Aug 17 22:38:08 1999
+++ stunnel/Makefile	Tue Aug 17 17:06:47 1999
@@ -18,7 +18,8 @@
 
 BUILD_DEPENDS=	openssl:${PORTSDIR}/security/openssl \
 		${PREFIX}/lib/libssl.a:${PORTSDIR}/security/openssl \
-		${PREFIX}/lib/libcrypto.a:${PORTSDIR}/security/openssl
+		${PREFIX}/lib/libcrypto.a:${PORTSDIR}/security/openssl \
+		autoconf:${PORTSDIR}/devel/autoconf:install
 RUN_DEPENDS=	openssl:${PORTSDIR}/security/openssl
 
 .if defined(USA_RESIDENT) && ${USA_RESIDENT} == YES
@@ -31,6 +32,9 @@
 
 cert:
 	@(cd ${WRKSRC}; make cert)
+
+post-patch:
+	@(cd ${WRKSRC}; autoconf)
 
 post-build:
 	@${ECHO} ""
diff -ruN stunnel.orig/patches/patch-aa stunnel/patches/patch-aa
--- stunnel.orig/patches/patch-aa	Wed Dec 31 19:00:00 1969
+++ stunnel/patches/patch-aa	Tue Aug 17 17:01:32 1999
@@ -0,0 +1,11 @@
+--- configure.in.orig	Wed Jun  9 10:57:32 1999
++++ configure.in	Tue Aug 17 16:58:58 1999
+@@ -50,7 +50,7 @@
+ 
+ AC_MSG_CHECKING([for RSAref library])
+ saved_LIBS="$LIBS"
+-LIBS="-lRSAglue -lrsaref $saved_LIBS"
++LIBS="$saved_LIBS -lRSAglue -lrsaref"
+ AC_TRY_LINK([], [],
+ [AC_MSG_RESULT(yes); ],
+ [AC_MSG_RESULT(no)]; LIBS="$saved_LIBS")

>Release-Note:
>Audit-Trail:

From: Bill Fumerola <billf@jade.chc-chimes.com>
To: patrick@server.mindstep.com
Cc: freefall-gnats@server.mindstep.com, martti.kuparinen@ericsson.com
Subject: Re: ports/13216: stunnel does not build from the port collection
Date: Tue, 17 Aug 1999 23:10:21 -0400 (EDT)

 On 18 Aug 1999 patrick@server.mindstep.com wrote:
 
 > >Severity:       critical
 > >Priority:       high
 
 Not really, please be realistic.
 
 > >Description:
 > 
 > The autoconf script generates a makefile with an incorrect order for the
 > openSSL libraries. This prevents the port from linking properly.
 
 Thankfully we have USE_AUTOCONF which does what your modifications do,
 however it's normally overkill and can be fixed with a patch to the
 configure script.
 
 -- 
 - bill fumerola - billf@chc-chimes.com - BF1560 - computer horizons corp -
 - ph:(800) 252-2421 - bfumerol@computerhorizons.com - billf@FreeBSD.org  -
 
 

From: "Patrick Bihan-Faou" <patrick@mindstep.com>
To: freebsd-gnats-submit@freebsd.org, patrick@server.mindstep.com
Cc:  
Subject: Re: ports/13216: stunnel does not build from the port collection
Date: Wed, 18 Aug 1999 00:38:44 -0400

 Sorry for the wrong severity/priorities.
 
 Here is a patch that uses the USE_AUTOCONF variable.
 
 
 diff -ruN stunnel.orig/Makefile stunnel/Makefile
 --- stunnel.orig/Makefile       Tue Aug 17 22:38:08 1999
 +++ stunnel/Makefile    Wed Aug 18 00:19:36 1999
 @@ -18,8 +18,11 @@
 
  BUILD_DEPENDS= openssl:${PORTSDIR}/security/openssl \
                 ${PREFIX}/lib/libssl.a:${PORTSDIR}/security/openssl \
 -               ${PREFIX}/lib/libcrypto.a:${PORTSDIR}/security/openssl
 +               ${PREFIX}/lib/libcrypto.a:${PORTSDIR}/security/openssl \
 +               autoconf:${PORTSDIR}/devel/autoconf:install
  RUN_DEPENDS=   openssl:${PORTSDIR}/security/openssl
 +
 +USE_AUTOCONF=  yes
 
  .if defined(USA_RESIDENT) && ${USA_RESIDENT} == YES
  LIB_DEPENDS=   rsaref.2:${PORTSDIR}/security/rsaref
 diff -ruN stunnel.orig/patches/patch-aa stunnel/patches/patch-aa
 --- stunnel.orig/patches/patch-aa       Wed Dec 31 19:00:00 1969
 +++ stunnel/patches/patch-aa    Tue Aug 17 17:01:32 1999
 @@ -0,0 +1,11 @@
 +--- configure.in.orig  Wed Jun  9 10:57:32 1999
 ++++ configure.in       Tue Aug 17 16:58:58 1999
 +@@ -50,7 +50,7 @@
 +
 + AC_MSG_CHECKING([for RSAref library])
 + saved_LIBS="$LIBS"
 +-LIBS="-lRSAglue -lrsaref $saved_LIBS"
 ++LIBS="$saved_LIBS -lRSAglue -lrsaref"
 + AC_TRY_LINK([], [],
 + [AC_MSG_RESULT(yes); ],
 + [AC_MSG_RESULT(no)]; LIBS="$saved_LIBS")
 
 --
 Et les Shadoks pompaient...
 
 

From: patrick@server.mindstep.com
To: freebsd-gnats-submit@freebsd.org
Cc: patrick@mindstep.com
Subject: Re: ports/13216: stunnel does not build from the port collection
Date: Wed, 18 Aug 1999 01:36:25 -0400 (EDT)

 Corrected patch for the port's Makefile. This patch uses the 
 "USE_AUTOCONF" feature but removes the bogus "BUILD_DEPEND" on
 autoconf.
 
 --- stunnel.orig/Makefile	Tue Aug 17 22:38:08 1999
 +++ stunnel/Makefile	Wed Aug 18 01:34:22 1999
 @@ -21,6 +21,8 @@
  		${PREFIX}/lib/libcrypto.a:${PORTSDIR}/security/openssl
  RUN_DEPENDS=	openssl:${PORTSDIR}/security/openssl
  
 +USE_AUTOCONF=	yes
 +
  .if defined(USA_RESIDENT) && ${USA_RESIDENT} == YES
  LIB_DEPENDS=	rsaref.2:${PORTSDIR}/security/rsaref
  MAKE_ENV+=	EXTRA_SSL_LIBS="-lRSAglue -lrsaref"
 
 
State-Changed-From-To: open->closed  
State-Changed-By: cpiazza 
State-Changed-When: Mon Sep 6 12:31:10 PDT 1999 
State-Changed-Why:  
Fixed with the upgrade of stunnel to 3.4a 
>Unformatted:
