using apxs

Ryan Schmidt ryandesign at macports.org
Tue Sep 29 15:12:01 PDT 2009


On Sep 29, 2009, at 17:08, Bradley Giesbrecht wrote:

> On Sep 29, 2009, at 1:20 PM, Ryan Schmidt wrote:
>
>> On Sep 29, 2009, at 15:17, Bradley Giesbrecht wrote:
>>
>>> I need to skip configure and make and use the following command  
>>> instead.
>>>
>>> apxs -i -a -c mod_bw.c
>>>
>>> How can I do this?
>>
>> You could do:
>>
>> use_configure no
>> build {
>>    system "apxs -i -a -c mod_bw.c"
>> }
>
> Looks like this approach does not cd to worksrcpath so I did this:
> build {
>     system "apxs -c -A ${worksrcpath}/mod_bw.c"
> }

Yes, sorry, most ports that use system do so like this:

     system "cd ${worksrcpath} && apxs -c -A mod_bw.c"


> The -A flag adds the module to /opt/local/apache2/conf/httpd.conf  
> but does not activate it. But if someone does activate it and then  
> uninstalls mod_bw apache2 will error on next start/restart.
>
> I couldn't find a good example of a better way in the mp tree.
>
> Does anyone know of a good example?

php5 handles this by not executing apxs automatically at all, and  
instead advising the user to do so.




More information about the macports-dev mailing list