From supraexpress@globaleyes.net  Sat Jun  2 19:30:34 2007
Return-Path: <supraexpress@globaleyes.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 1226816A46E
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  2 Jun 2007 19:30:34 +0000 (UTC)
	(envelope-from supraexpress@globaleyes.net)
Received: from MX1.ll.net (mail.globaleyes.net [209.131.230.155])
	by mx1.freebsd.org (Postfix) with ESMTP id D469113C45B
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  2 Jun 2007 19:30:33 +0000 (UTC)
	(envelope-from supraexpress@globaleyes.net)
Received: from FreeBSD2.LocalNET10 (unverified [209.131.253.11]) by MX1.ll.net
  (Vircom SMTPRS 4.4.571.23) with ESMTP id <B0711253123@MX1.ll.net> for <FreeBSD-gnats-submit@freebsd.org>;
  Sat, 2 Jun 2007 14:19:13 -0500
Message-Id: <1180811958.1026@FreeBSD2.LocalNET10>
Date: Sat, 2 Jun 2007 14:19:18 -0500
From: "User1001" <supraexpress@globaleyes.net>
To: "FreeBSD gnats submit" <FreeBSD-gnats-submit@freebsd.org>
Subject: ports/mysql51-server compilation doesn't allow for local OpenSSL port use (forces yaSSL instead)
X-Send-Pr-Version: gtk-send-pr 0.4.8 
X-GNATS-Notify:

>Number:         113264
>Category:       ports
>Synopsis:       databases/mysql51-server compilation doesn't allow for local OpenSSL port use (forces yaSSL instead)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ale
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 02 19:40:03 GMT 2007
>Closed-Date:    Fri Sep 04 13:45:00 UTC 2009
>Last-Modified:  Fri Sep 04 13:45:00 UTC 2009
>Originator:     User1001
>Release:        FreeBSD 6.2-STABLE i386
>Organization:
>Environment:


System: FreeBSD 6.2-STABLE #5: Sat May 12 09:17:19 CDT 2007




>Description:


Local OpenSSL port libraries are not used in mysql51-server compilation even when WITH_OPENSSL is selected/enabled. Instead, a packaged "yaSSL" is used ("--with-ssl=bundled"). To enable use of the (local) OpenSSL port, especially when it is newer than the base SSL, a few modifications to the port Makefile (and/or "/etc/make.conf") are necessary.

I had originally split the mods between the Makefile and /etc/make.conf, but have combined them into just one Makefile patch.

Comments:
The RPATH variable was required as simply using WITH_OPENSSL_PORT didn't prevent the base SSL libraries in /usr/lib from bein selected before the /usr/local/ OpenSSL libraries.

The #%$*^! configure script fails to initialize the internal "ssl_include" variable which then causes the base SSL libraries to be
used during the configure run, hence the additional CONFIGURE_ENV patch.

WITH_OPENSSL_LOCAL is my choice for a new option that clearly distinguishes between the default action of WITH_OPENSSL (making use of yaSSL instead of the local OpenSSL port), without changing the current behaviour of the Makefile. It would make more sense to rename "WITH_OPENSSL" to something like "WITH_BUNDLED" (which is really what it does) and then use "WITH_OPENSSL" as I have set up "WITH_OPENSSL_LOCAL", but that is somebody else's decision to make.


>How-To-Repeat:


Recompile - no local OpenSSL libraries are used.


>Fix:


--- Makefile.orig       Sat Jun  2 13:45:30 2007
+++ Makefile    Sat Jun  2 14:03:27 2007
@@ -43,6 +43,11 @@
 .endif
 .if defined(WITH_OPENSSL)
 CONFIGURE_ARGS+=--with-ssl=bundled
+.elif defined(WITH_OPENSSL_LOCAL)
+WITH_OPENSSL_PORT= yes
+USE_OPENSSL_RPATH= yes
+CONFIGURE_ARGS+=--with-ssl=/usr/local
+CONFIGURE_ENV+="ssl_include=/usr/local/include"
 .endif
 .if defined(BUILD_STATIC)
 CONFIGURE_ARGS+=--with-mysqld-ldflags=-all-static


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->ale 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sat Jun 2 22:10:40 UTC 2007 
Responsible-Changed-Why:  
Over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=113264 
State-Changed-From-To: open->closed 
State-Changed-By: ale 
State-Changed-When: Fri Sep 4 13:44:39 UTC 2009 
State-Changed-Why:  
OpenSSL support has been added. 

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