DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD Ports and Packages

FreeBSD Ports and Packages Installation and upgrading of ports and packages on FreeBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 17th July 2008
jbhappy's Avatar
jbhappy jbhappy is offline
Real Name: Jeff
Port Guard
 
Join Date: Jun 2008
Location: MI, US
Posts: 30
Thanked 4 Times in 3 Posts
Default passing make args/variables to builds of prerequisite ports

I'm trying to create a port for a locally-developed apache module, and I want apache to build with LDAP support (-DWITH_LDAP_MODULES) when it's built as a prerequisite to this module's port. But I can't figure out how to get that flag to the make process that builds apache without putting it on the command line when I build the module. Reading bsd.port.mk and bsd.apache.mk didn't help at all; neither did google, as I couldn't seem to come up with the right query.

Can anyone clue me in?
Reply With Quote
  #2   (View Single Post)  
Old 18th July 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Old man from scene 24
 
Join Date: Apr 2008
Location: Eindhoven, Netherlands
Posts: 2,070
Thanked 198 Times in 156 Posts
Default

In short, there is no quick/good way.

There are a few things you can do, first of all, set WITH_LDAP_MODULES in your port so that when apache gets pulled in it's built with LDAP.

People who already have Apache installed without LDAP will need to (manually) reinstalled apache, you will need to check if apache is installed with LDAP (For example by checking if a certain file exists, or by grepping apache --version) and bail out if apache isn't built with LDAP ... Yes, I know this sucks ...
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #3   (View Single Post)  
Old 18th July 2008
jbhappy's Avatar
jbhappy jbhappy is offline
Real Name: Jeff
Port Guard
 
Join Date: Jun 2008
Location: MI, US
Posts: 30
Thanked 4 Times in 3 Posts
Default

Quote:
Originally Posted by Carpetsmoker View Post
There are a few things you can do, first of all, set WITH_LDAP_MODULES in your port so that when apache gets pulled in it's built with LDAP.
That's probably the first thing I tried (sorry, should have mentioned it), and it doesn't seem to do it. I added
WITH_LDAP_MODULES=yes
to my makefile, but apache's configure script still comes up with

checking whether to enable mod_ldap... no
checking whether to enable mod_auth_ldap... no

whereas they're both "shared" if I put "-DWITH_LDAP_MODULES" (or "WITH_LDAP_MODULES=yes") on the 'make' command line for my port.

I also tried poking around in Mk/bsd.apache.mk and setting some of those variables in my makefile, like _APACHE_MODULES, still no luck.

but *sigh* I just re-read the 'make' man page for the nth time.
.MAKEFLAGS += -DWITH_LDAP_MODULES
or
.MAKEFLAGS: -DWITH_LDAP_MODULES
is either method (target vs. internal variable) better than the other for any reason? I looked at other ports but only found one example of setting the variable. looked in /usr/src and found one example of the target method and possibly one example of setting the variable. I think that setting the variable is what I want, since it doesn't matter for my port, just apache. my port has just one other dependency, which also doesn't care about ${WITH_LDAP_MODULES} (or LDAP in general).

Quote:
People who already have Apache installed without LDAP will need to (manually) reinstalled apache, you will need to check if apache is installed with LDAP (For example by checking if a certain file exists, or by grepping apache --version) and bail out if apache isn't built with LDAP ...
yup. just taking one step at a time here, really.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
run same command many times with diff args gosha Programming 21 30th May 2009 11:51 AM
problem passing /dev/fd/n to programs TerryP Programming 2 15th April 2009 08:24 AM
ran make deinstall in /usr/ports/multimedia/ How do I undo this? kasse FreeBSD General 11 5th September 2008 08:22 AM
Passing args to port / make while installing apache robot FreeBSD Ports and Packages 2 27th August 2008 01:55 PM
passing arg from bootloadder to kernel l2fl2f FreeBSD General 16 15th May 2008 12:38 PM


All times are GMT. The time now is 06:36 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick