Date: Sun, 6 Feb 2005 12:59:29 -0800 From: "Michael C. Shultz" <reso3w83@verizon.net> To: Max Baker <maxbaker@users.sourceforge.net> Cc: freebsd-ports@freebsd.org Subject: Re: Passing make flags to a dependency Message-ID: <200502061259.30506.reso3w83@verizon.net> In-Reply-To: <20050206200521.GA4587@warped.org> References: <20050206181326.GB1966@warped.org> <200502061101.08747.reso3w83@verizon.net> <20050206200521.GA4587@warped.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 How to test for libraries in configure.ac is going to require some research on your part, the advantage to doing it here is then your port is linux/other UNIX's friendly and you keep the FreeBSD Makefile simple. NOTE: These scripts are off of the top of my head and are guaranteed not to work, they are meant only to show you how to approach the problem. -Mike
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200502061259.30506.reso3w83>