Date: Mon, 7 Feb 2005 11:46:12 +0100 From: Clement Laforet <sheep.killer@cultdeadsheep.org> To: "Michael C. Shultz" <reso3w83@verizon.net> Cc: Max Baker <maxbaker@users.sourceforge.net> Subject: Re: Passing make flags to a dependency Message-ID: <20050207104611.GB13854@goofy.cultdeadsheep.org> In-Reply-To: <200502061259.30506.reso3w83@verizon.net> References: <20050206181326.GB1966@warped.org> <200502061101.08747.reso3w83@verizon.net> <20050206200521.GA4587@warped.org> <200502061259.30506.reso3w83@verizon.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <bsd.port.mk>') .include <bsd.port.pre.mk> .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 <bsd.port.post.mk> Of course, limitations are: - message will be printed if apache2 is not installed before - you can't detect static mod_ssl. clem
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050207104611.GB13854>