From nobody@FreeBSD.ORG  Sat Sep 23 03:37:06 2000
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 7D28B37B424; Sat, 23 Sep 2000 03:37:06 -0700 (PDT)
Message-Id: <20000923103706.7D28B37B424@hub.freebsd.org>
Date: Sat, 23 Sep 2000 03:37:06 -0700 (PDT)
From: odip@bionet.nsc.ru
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] can't building curl-7.2.1 with openssl
X-Send-Pr-Version: www-1.0

>Number:         21498
>Category:       ports
>Synopsis:       [patch] can't building curl-7.2.1 with openssl
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 23 03:40:01 PDT 2000
>Closed-Date:    Sat Sep 23 20:42:55 PDT 2000
>Last-Modified:  Sat Sep 23 20:43:15 PDT 2000
>Originator:     Dmitry Grigorovich
>Release:        3.5.1-RELEASE
>Organization:
ICiG
>Environment:
FreeBSD cyclop.bionet.nsc.ru 3.5.1-RELEASE FreeBSD 3.5.1-RELEASE #0: Thu Jul 2003:22:42 GMT 2000     jkh@monster.osd.bsdi.com:/usr/src/sys/compile/GENERIC  i386
>Description:
When building new curl port ( 7.2.1 ) with OPENSSL
we are get error messages on configure stage

When building same curl port without OPENSSL
all it ok

I found problem found in following lines
in file /usr/ports/ftp/curl/Makefile
======================
.include <bsd.port.pre.mk>

.if defined(WITH_SSL)
USE_OPENSSL=    YES
CONFIGURE_ENV+= CPPFLAGS='-I${OPENSSLINC} -I${OPENSSLINC}/openssl' \
                LDFLAGS='-L${OPENSSLLIB}'
.endif
======================

If we define WITH_SSL variable, then CONFIGURE_ENV are expanded namely:
CPPFLAGS='-I -I/openssl' LDFLAGS='-L' (!!!)
That is variables OPENSSLINC and OPENSSLLIB are empty or undefined

Solution: Move line '.include <bsd.port.pre.mk>' lower then .if/.endif

Thus variables OPENSSLINC & OPENSSLLIB will be defined correctly

>How-To-Repeat:
cd /usr/ports/ftp/curl
WITH_SSL=YES make configure

After this we are get error messages

>Fix:
Apply following patch to file /usr/ports/ftp/curl/Makefile
Clean and rebuild port of curl

--- Makefile.orig       Sat Sep 23 14:04:35 2000
+++ Makefile    Sat Sep 23 17:10:11 2000
@@ -26,13 +26,13 @@
 MAKE_ENV=      SHLIB_VER="${SHLIB_VER}"
 PLIST_SUB=     SHLIB_VER="${SHLIB_VER}"

-.include <bsd.port.pre.mk>
-
 .if defined(WITH_SSL)
 USE_OPENSSL=   YES
 CONFIGURE_ENV+=        CPPFLAGS='-I${OPENSSLINC} -I${OPENSSLINC}/openssl' \
                LDFLAGS='-L${OPENSSLLIB}'
 .endif
+
+.include <bsd.port.pre.mk>

 GNU_CONFIGURE= yes
 USE_AUTOMAKE=  yes


>Release-Note:
>Audit-Trail:

From: odip@bionet.nsc.ru
To: freebsd-gnats-submit@FreeBSD.ORG
Cc:  
Subject: ports/21498: [patch] can't building curl-7.2.1 with openssl
Date: Sat, 23 Sep 2000 03:37:06 -0700 (PDT)

 >Number:         21498
 >Category:       ports
 >Synopsis:       [patch] can't building curl-7.2.1 with openssl
 >Confidential:   no
 >Severity:       critical
 >Priority:       medium
 >Responsible:    freebsd-ports
 >State:          open
 >Quarter:        
 >Keywords:       
 >Date-Required:
 >Class:          change-request
 >Submitter-Id:   current-users
 >Arrival-Date:   Sat Sep 23 03:40:01 PDT 2000
 >Closed-Date:
 >Last-Modified:
 >Originator:     Dmitry Grigorovich
 >Release:        3.5.1-RELEASE
 >Organization:
 ICiG
 >Environment:
 FreeBSD cyclop.bionet.nsc.ru 3.5.1-RELEASE FreeBSD 3.5.1-RELEASE #0: Thu Jul 2003:22:42 GMT 2000     jkh@monster.osd.bsdi.com:/usr/src/sys/compile/GENERIC  i386
 >Description:
 When building new curl port ( 7.2.1 ) with OPENSSL
 we are get error messages on configure stage
 
 When building same curl port without OPENSSL
 all it ok
 
 I found problem found in following lines
 in file /usr/ports/ftp/curl/Makefile
 ======================
 .include <bsd.port.pre.mk>
 
 .if defined(WITH_SSL)
 USE_OPENSSL=    YES
 CONFIGURE_ENV+= CPPFLAGS='-I${OPENSSLINC} -I${OPENSSLINC}/openssl' \
                 LDFLAGS='-L${OPENSSLLIB}'
 .endif
 ======================
 
 If we define WITH_SSL variable, then CONFIGURE_ENV are expanded namely:
 CPPFLAGS='-I -I/openssl' LDFLAGS='-L' (!!!)
 That is variables OPENSSLINC and OPENSSLLIB are empty or undefined
 
 Solution: Move line '.include <bsd.port.pre.mk>' lower then .if/.endif
 
 Thus variables OPENSSLINC & OPENSSLLIB will be defined correctly
 
 >How-To-Repeat:
 cd /usr/ports/ftp/curl
 WITH_SSL=YES make configure
 
 After this we are get error messages
 
 >Fix:
 Apply following patch to file /usr/ports/ftp/curl/Makefile
 Clean and rebuild port of curl
 
 --- Makefile.orig       Sat Sep 23 14:04:35 2000
 +++ Makefile    Sat Sep 23 17:10:11 2000
 @@ -26,13 +26,13 @@
  MAKE_ENV=      SHLIB_VER="${SHLIB_VER}"
  PLIST_SUB=     SHLIB_VER="${SHLIB_VER}"
 
 -.include <bsd.port.pre.mk>
 -
  .if defined(WITH_SSL)
  USE_OPENSSL=   YES
  CONFIGURE_ENV+=        CPPFLAGS='-I${OPENSSLINC} -I${OPENSSLINC}/openssl' \
                 LDFLAGS='-L${OPENSSLLIB}'
  .endif
 +
 +.include <bsd.port.pre.mk>
 
  GNU_CONFIGURE= yes
  USE_AUTOMAKE=  yes
 
 
 >Release-Note:
 >Audit-Trail:
 >Unformatted:
 
 
 To Unsubscribe: send mail to majordomo@FreeBSD.org
 with "unsubscribe freebsd-ports" in the body of the message
 
 
State-Changed-From-To: open->closed 
State-Changed-By: kris 
State-Changed-When: Sat Sep 23 20:42:55 PDT 2000 
State-Changed-Why:  
Problem resolved 

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