Port review of pure-ftpd

Scott Haneda talklists at newgeo.com
Tue Oct 27 16:00:15 PDT 2009


On Oct 27, 2009, at 1:03 AM, Ryan Schmidt wrote:

> On Oct 27, 2009, at 01:19, Scott Haneda wrote:
>
>> All the ui_msg in the port-install, is that the right place?
>
> You might want the instructions to be post-activate.

I will look into this.

>> The software only allows one language to be compiled in, but I  
>> suspect that MP would allow as many + variants as were listed, is  
>> there a way to solve this?
>
> MacPorts has been a bit English-centric so far. In my minivmac  
> portfile, I didn't even attempt to offer options to compile for  
> different languages. I could have offered variants, but nobody has  
> requested it so far, so I haven't worried about it.

for the sake of port simplicity, I am tempted to remove them.  They  
only offer language of a few server messages.  I suppose it best to  
leave them in though.

>> Is there any way to order the variants as shown by `port info`, and  
>> if not, is it a bad idea to prefix the language variants with a "z"  
>> so they do not get in the way of letting people know there is myqsl  
>> and tls available for this?
>
> The variants used to be listed in the order specified in the  
> portfile. MacPorts 1.8.0 changed this to alphabetical order. I would  
> not recommend using a "z" prefix or anything like that. Prefixing  
> them with "lang_" like you've done is what I would do.

It is still a bummer, as the tls and mysql variants get lost.  I guess  
there is very little I can do about it.  It says they are available in  
the description, so I will leave it at that.

> As your comment says, you still need to make them conflict with one  
> another. You could construct the variants dynamically, like the swig  
> port does. The below seems to work. Unfortunately it makes the  
> output of "port variants" rather hard to read.

Yeah, not a huge fan of that, and if I can not readily grok it, I  
certainly do not want to maintain it :)

If one was to do this:
port install +foo +bar +baz

In any of the most initial of phases, which I am not sure that is, but  
before anything happens, how can I grab ahold of the variant names  
passed on the command line?

Here is what I am thinking, and I also need help with how to abort out  
of a port install, but I think the php5 port should show me that well.

Given this:
port install +foo +bar +baz I actually will have port install  
+lang_foo +lang_bar +lang_baz

repeat with aVariant in variantList
	if aVariant starts with lang_ then counter++
	if counter > 1 then abort with message
end repeat

That seems short and to the point to me.

> #   Language name           Configure arg
> set languages {
>    {Brazilian}             brazilian
>    {Czech}                 czech
>    {Danish}                danish
>    {Dutch}                 dutch
>    {French}                french
>    {funny French}          french-funny
>    {German}                german
>    {Italian}               italian
>    {Korean}                korean
>    {Norwegian}             norwegian
>    {Polish}                polish
>    {Romanian}              romanian
>    {Russian}               russian
>    {simplified Chinese}    simplified-chinese
>    {Slovak}                slovak
>    {Spanish}               spanish
>    {Swedish}               swedish
>    {traditional Chinese}   traditional-chinese
> }
>
> # Add langugage variants
> foreach {language arg} ${languages} {
>    set variant lang_[strsed ${arg} {g/-/_/}]
>    set conflicts {}
>    foreach {ignore conflicting_arg} ${languages} {
>        if {${conflicting_arg} != ${arg}} {
>            set conflicting_variant lang_[strsed ${conflicting_arg}  
> {g/-/_/}]
>            lappend conflicts ${conflicting_variant}
>        }
>    }
>    eval [subst {
>        variant ${variant} conflicts ${conflicts} description "Use $ 
> {language} language for server messages" {
>            configure.args-append   --with-language=${arg}
>        }
>    }]
> }


>> description         Pure-FTPd is a fast, production-quality,  
>> standard-conformant FTP (SSL/TLS)
>
> Missing backslash at end of the above line.

Do I need one after the last hash in the checksums also then?

> Some typos:
> privelages should be privileges
> Langugage should be Language
> Bazilian should be Brazilian
> simpple_chinese should be simplified_chinese

Thanks for those, good catches.
-- 
Scott * If you contact me off list replace talklists@ with scott@ *



More information about the macports-dev mailing list