path dependency

2013-06-12 Thread David Strubbe
Hi all, I wonder if there is a way in a Portfile to see if a particular port is active or not, or alternately, to see if a path dependency was fulfilled by the file or the port. To be concrete, the arpack port, with +mpich, has depends_lib-append path:bin/mpif77:mpich I want to write an err

Re: modern Tcl and correct quoting

2013-06-12 Thread Poor Yorick
On Wed, Jun 12, 2013 at 10:18:54PM +, Poor Yorick wrote: > > Putting [expr] arguments in braces can result in much better performance as it > allows Tcl to cache a byte-coded version of the expression. It can also > avoid unintended processing that might occur via double substitution. Ref

Re: [106975] trunk/dports/finance/abtransfers/Portfile

2013-06-12 Thread MK-MacPorts
On Jun 13, 2013, at 12:01 AM, Ryan Schmidt wrote: >> -PortGroup qt41.0 >> +PortGroup qmake 1.0 > The whole point of using a portgroup is that it should simplify the port. So > now that you're using the qmake portgroup, shouldn't you be able to remove > the parts of the po

Re: modern Tcl and correct quoting

2013-06-12 Thread Poor Yorick
On Wed, Jun 12, 2013 at 04:57:38PM -0500, Ryan Schmidt wrote: > > I would guess that most programmers who wrote "==" in Tcl didn't realize it > was a numeric comparison operator. It certainly wasn't clear to me, since it > works correctly on most strings. That kind of thing trips me up in bash

Re: modern Tcl and correct quoting

2013-06-12 Thread Poor Yorick
On Thu, Jun 13, 2013 at 02:53:41AM +, Poor Yorick wrote: > On Wed, Jun 12, 2013 at 10:17:10PM -0400, Lawrence Velázquez wrote: > > On Jun 12, 2013, at 6:18 PM, Poor Yorick > > wrote: > > > > > [eval] concatenates its arguments and passes them through the interpreter > > > again > > > to be

openmpi enhancement

2013-06-12 Thread David Strubbe
Hello, Can this patch Portfile-openmpi.diff2 (the one all the way at the bottom) I submitted at https://trac.macports.org/ticket/38319 be evaluated and committed please? It has been 6 days. Thanks, David ___ macports-dev mailing list macports-dev@lists.

Re: modern Tcl and correct quoting

2013-06-12 Thread Poor Yorick
On Wed, Jun 12, 2013 at 10:17:10PM -0400, Lawrence Velázquez wrote: > On Jun 12, 2013, at 6:18 PM, Poor Yorick > wrote: > > > [eval] concatenates its arguments and passes them through the interpreter > > again > > to be parsed and executed as a script. This results in double substitution. > >

Re: modern Tcl and correct quoting

2013-06-12 Thread Lawrence Velázquez
On Jun 12, 2013, at 6:18 PM, Poor Yorick wrote: > [eval] concatenates its arguments and passes them through the interpreter > again > to be parsed and executed as a script. This results in double substitution. > Here's an example from the patch: > >$workername eval "package ifneeded $pkgN

Re: modern Tcl and correct quoting

2013-06-12 Thread Lawrence Velázquez
On Jun 12, 2013, at 5:57 PM, Ryan Schmidt wrote: > I would guess that most programmers who wrote "==" in Tcl didn't realize it > was a numeric comparison operator. It certainly wasn't clear to me, since it > works correctly on most strings. That kind of thing trips me up in bash > scripting as

Re: modern Tcl and correct quoting

2013-06-12 Thread Joshua Root
On 2013-6-13 06:58 , Clemens Lang wrote: > Hi, > > On Wed, Jun 12, 2013 at 04:33:56PM -0400, Lawrence Velázquez wrote: >> Note that changing something like >> if {$whatever == "yes"} { foo } else { bar } >> into >> if {$whatever} { foo } else { bar } >> subtly changes the semantics of the

Re: modern Tcl and correct quoting

2013-06-12 Thread Poor Yorick
On Wed, Jun 12, 2013 at 02:00:17PM +0200, Rainer Müller wrote: [SNIP] > Good work! Nice to see you digged right into one of the core source file > there. > > However, many different things are changed in this single patch. With > regard to my comment above, could you please split it into the parts

Re: [106975] trunk/dports/finance/abtransfers/Portfile

2013-06-12 Thread Ryan Schmidt
On Jun 12, 2013, at 16:23, m...@macports.org wrote: > Revision: 106975 > https://trac.macports.org/changeset/106975 > Author: m...@macports.org > Date: 2013-06-12 14:23:29 -0700 (Wed, 12 Jun 2013) > Log Message: > --- > abtransfers: use qmake portgroup instead of qt4 (see t

Re: modern Tcl and correct quoting

2013-06-12 Thread Ryan Schmidt
On Jun 12, 2013, at 16:46, Gustaf Neumann wrote: > In a related but different area, the expression "?:" can be dangerous: > > set x nan > expr {1 ? $x : 0} I've long wondered why we don't use the ternary operator in MacPorts. For the longest time I thought Tcl didn't have one, but it does. The

Re: modern Tcl and correct quoting

2013-06-12 Thread Gustaf Neumann
Am 12.06.13 18:39, schrieb Joshua Root: On 2013-6-13 01:24 , Poor Yorick wrote: On Wed, Jun 12, 2013 at 10:58:50PM +1000, Joshua Root wrote: On 2013-6-12 22:00 , Rainer Müller wrote: On 2013-06-12 08:05, Poor Yorick wrote: use "eq" instead of "==" where appropriate Fine as well. Wha

Re: modern Tcl and correct quoting

2013-06-12 Thread Poor Yorick
On Wed, Jun 12, 2013 at 10:58:12PM +0200, Clemens Lang wrote: > Hi, > > On Wed, Jun 12, 2013 at 04:33:56PM -0400, Lawrence Velázquez wrote: > > Note that changing something like > > if {$whatever == "yes"} { foo } else { bar } > > into > > if {$whatever} { foo } else { bar } > > subtly cha

Re: modern Tcl and correct quoting

2013-06-12 Thread Clemens Lang
Hi, On Wed, Jun 12, 2013 at 04:33:56PM -0400, Lawrence Velázquez wrote: > Note that changing something like > if {$whatever == "yes"} { foo } else { bar } > into > if {$whatever} { foo } else { bar } > subtly changes the semantics of the conditional. This transformation > is only valid if

Re: modern Tcl and correct quoting

2013-06-12 Thread Lawrence Velázquez
On Jun 12, 2013, at 3:47 PM, Poor Yorick wrote: > On Thu, Jun 13, 2013 at 02:39:52AM +1000, Joshua Root wrote: >> OK. Some of the places changed in the patch are comparing boolean values >> though, so it's not clear that we should even be doing an equality check >> in the first place. > > That'

Re: modern Tcl and correct quoting

2013-06-12 Thread Poor Yorick
On Thu, Jun 13, 2013 at 02:39:52AM +1000, Joshua Root wrote: > On 2013-6-13 01:24 , Poor Yorick wrote: > > On Wed, Jun 12, 2013 at 10:58:50PM +1000, Joshua Root wrote: > >> On 2013-6-12 22:00 , Rainer Müller wrote: > >>> On 2013-06-12 08:05, Poor Yorick wrote: > use "eq" instead of "==" where

Re: modern Tcl and correct quoting

2013-06-12 Thread Lawrence Velázquez
On Jun 12, 2013, at 8:00 AM, Rainer Müller wrote: >> remove quotes around values when they are not needed > > The style that evolved in the MacPorts community is to use ${foo} for > expansion instead of $foo both in Portfiles and in base. I don't think > there is a technical reason for this

Re: modern Tcl and correct quoting

2013-06-12 Thread Joshua Root
On 2013-6-13 01:24 , Poor Yorick wrote: > On Wed, Jun 12, 2013 at 10:58:50PM +1000, Joshua Root wrote: >> On 2013-6-12 22:00 , Rainer Müller wrote: >>> On 2013-06-12 08:05, Poor Yorick wrote: use "eq" instead of "==" where appropriate >>> >>> Fine as well. >> >> What is the benefit of this?

Re: modern Tcl and correct quoting

2013-06-12 Thread Poor Yorick
On Wed, Jun 12, 2013 at 10:58:50PM +1000, Joshua Root wrote: > On 2013-6-12 22:00 , Rainer Müller wrote: > > On 2013-06-12 08:05, Poor Yorick wrote: > >>use "eq" instead of "==" where appropriate > > > > Fine as well. > > What is the benefit of this? Is it just that the operands could > poten

Re: modern Tcl and correct quoting

2013-06-12 Thread Joshua Root
On 2013-6-12 22:00 , Rainer Müller wrote: > On 2013-06-12 08:05, Poor Yorick wrote: >> use "eq" instead of "==" where appropriate > > Fine as well. What is the benefit of this? Is it just that the operands could potentially be numerically equal but different strings, in cases where we want a

Re: macports-dev Digest, Vol 82, Issue 17

2013-06-12 Thread Artemio González López
On Jun 12, 2013, at 2:00 PM, macports-dev-requ...@lists.macosforge.org wrote: > On 2013-06-12 09:06, Artemio Gonz?lez L?pez wrote: >> Thanks a lot for your help. I tried installing from trunk (with svn), >> but in the configure phase I got the following error message: >> >> checking for Tcl confi

Re: modern Tcl and correct quoting

2013-06-12 Thread Rainer Müller
Hello, On 2013-06-12 08:05, Poor Yorick wrote: > macport.tcl appears to have originally been written prior to Tcl 8.5, which > was > released in 2007, and uses idioms that are now considered obsolete. There are > also instances where curly brackets are used in combination with variable > interpo

Re: Buildbot failures after migrating from Distribute to Setuptools

2013-06-12 Thread Joshua Root
On 2013-6-12 09:30 , Blair Zajac wrote: > How about, if there's no update to a port in the commit you made, we > bump the rev? If we do that, let's review them to make sure the dependency type is correct at the same time. I suspect some of them don't actually need setuptools at runtime. - Josh __

Re: modern Tcl and correct quoting

2013-06-12 Thread Clemens Lang
On Wed, Jun 12, 2013 at 06:05:22AM +, Poor Yorick wrote: > macport.tcl appears to have originally been written prior to Tcl 8.5, > which was released in 2007, and uses idioms that are now considered > obsolete. There are also instances where curly brackets are used in > combination with variabl

Re: modern Tcl and correct quoting

2013-06-12 Thread Ryan Schmidt
On Jun 12, 2013, at 01:05, Poor Yorick wrote: > macport.tcl appears to have originally been written prior to Tcl 8.5, which > was > released in 2007, and uses idioms that are now considered obsolete. There are > also instances where curly brackets are used in combination with variable > interpo

Re: problem with MacPorts under Mavericks/Xcode5

2013-06-12 Thread Rainer Müller
On 2013-06-12 09:06, Artemio González López wrote: > Thanks a lot for your help. I tried installing from trunk (with svn), > but in the configure phase I got the following error message: > > checking for Tcl configuration... configure: error: Can't find Tcl > configuration definitions I guess it'

Re: problem with MacPorts under Mavericks/Xcode5

2013-06-12 Thread Artemio González López
On 12 Jun 2013, at 07:07, Jeremy Huddleston Sequoia wrote: > 1) You are under NDA. > > 2) Use trunk. Thanks a lot for your help. I tried installing from trunk (with svn), but in the configure phase I got the following error message: checking for Tcl configuration... configure: error: Can't f