[110954] trunk/dports/_resources/port1.0/group/apache2-1.0.tcl
Bradley Giesbrecht
pixilla at macports.org
Wed Sep 11 09:11:45 PDT 2013
On Sep 11, 2013, at 2:13 AM, Joshua Root wrote:
> On 2013-9-11 17:56 , Ryan Schmidt wrote:
>> On Sep 10, 2013, at 23:05, pixilla at macports.org wrote:
>>
>>> +proc apxsInstall { moduleName activate dylibs } {
>>
>>> + if { ${activate} == "yes" } {
>>> + exec "${apache.sbindir}/a2enmod" ${moduleName}
>>> + }
>>
>> If $activate is supposed to be a boolean-type variable, then it should be checked using the [tbool] procedure, not by checking for string equality with "yes".
>
> But tbool itself does a string comparison. The point of tbool is that it
> works on possibly-nonexistent variables (and considers ones that don't
> exist to be false).
>
> If activate will always exist and be a boolean, then this is fine:
> if {$activate} { ... }
The apxsInstall proc was authored by Bjarne and I have not tested it. If a2enmod modifies httpd.conf then this seems fragile.
I'd like to have a /etc/apache2/conf.d type dir where we drop files and have something like "Include etc/apache2/conf.d/*.conf" at the end of httpd.
Perhaps we should look how other distributions are doing this.
This PortGroup is a work in progress so contributions and improvements are encouraged by any interested parties.
Regards,
Bradley Giesbrecht (pixilla)
More information about the macports-dev
mailing list