From owner-freebsd-ports@FreeBSD.ORG Mon Feb 7 10:46:16 2005 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D6C216A4CE for ; Mon, 7 Feb 2005 10:46:16 +0000 (GMT) Received: from goofy.cultdeadsheep.org (charon.cultdeadsheep.org [80.65.226.72]) by mx1.FreeBSD.org (Postfix) with SMTP id 0DFB343D48 for ; Mon, 7 Feb 2005 10:46:15 +0000 (GMT) (envelope-from sheep.killer@cultdeadsheep.org) Received: (qmail 86683 invoked by uid 1000); 7 Feb 2005 11:46:12 +0100 Date: Mon, 7 Feb 2005 11:46:12 +0100 From: Clement Laforet To: "Michael C. Shultz" Message-ID: <20050207104611.GB13854@goofy.cultdeadsheep.org> References: <20050206181326.GB1966@warped.org> <200502061101.08747.reso3w83@verizon.net> <20050206200521.GA4587@warped.org> <200502061259.30506.reso3w83@verizon.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200502061259.30506.reso3w83@verizon.net> User-Agent: Mutt/1.5.6i cc: freebsd-ports@freebsd.org cc: Max Baker Subject: Re: Passing make flags to a dependency X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Feb 2005 10:46:16 -0000 On Sun, Feb 06, 2005 at 12:59:29PM -0800, Michael C. Shultz wrote: > On Sunday 06 February 2005 12:05 pm, you wrote: > > Thanks Mike, > > > > On Sun, Feb 06, 2005 at 11:01:07AM -0800, Michael C. Shultz wrote: > > > This is going to be a can of worms for you to automate, here are a > > > few reasons why: > > > > > > What if apache2 is all ready installed without SSL turned on? > > > What if the user wants other features besides SSL? > > > > > > Suggestion: Test for a library that will only exist if apache2 has > > > been installed with WITH_SSL_MODULES=yes and if that library is > > > missing then have your port refuse to build with a message that > > > apache2 must be built with WITH_SSL_MODULES=yes. > > > > This is a good point. I could change the scope of this dependency to > > be "SSL would be a good idea". Going on that, is there a way that I > > could specify that SSL be turned on if apache2 does get built by my > > port, else give a warning that it's a Good Idea and/or bug out? > > > > -m > > Here are a few ideas: > > in your ports/{catagory}/{portname}/Makefile > > post-configure: > if test -e ${PREFIX}/lib/{library of apache SSL file} > then > cd ${PORTSDIR}/www/apache2;make clean;make WITH_SSL_MODULES=yes \ > install clean > fi > > Or if you do it in configure.ac > > If the test for apache2's library fails you do the following to run a > command: > > if test "x$target_os" ="FreeBSD"; then > AC_CONFIG_COMMANDS_PRE(cd ${PORTSDIR}/www/apache2;make clean;make \ > WITH_SSL_MODULES=yes install clean) > else > ### display a message about adding apache## > fi These solutions violates ports concept. Since mod_ssl is *NOT* required to make application run, any dirty hack can't be allowed. to warn users: just add at the end of the Makefile. (and remove '.include ') .include .if exists(${LOCALBASE}/libexec/apache2/mod_ssl.so) pre-everything:: @${ECHO_MSG} "${PORTNAME} should be accessed in HTTPS, please" @${ECHO_MSG} "consider using apache2 with mod_ssl." .endif .include Of course, limitations are: - message will be printed if apache2 is not installed before - you can't detect static mod_ssl. clem