[118284] trunk/dports/devel/wemux/Portfile

Ryan Schmidt ryandesign at macports.org
Fri Mar 28 17:19:28 PDT 2014


The default patch phase patches files in ${patch.dir} (and the default for ${patch.dir} is ${worksrcpath}), but there is no guarantee about what the current directory will be when you run a Tcl command in a portfile; that, along with the “cd” Tcl command for changing the current directory, were removed from MacPorts something like 6 years ago. You’re now supposed to specify all paths absolutely, or, on commands like system, reinplace and xinstall where it’s available, use the -W argument.

On Mar 28, 2014, at 16:49, Aljaž 'g5pw' Srebrnič wrote:

> Thanks! Why is that, though? Isn’t the patch phase evaluated with worksrcdir as current directory?
> 
> On 28 marzo 2014 at 22:46:53, Ryan Schmidt wrote:
> 
>> 
>> On Mar 28, 2014, at 16:31, g5pw at macports.org wrote: 
>> 
>> > Revision 
>> > 118284 
>> > Author 
>> > g5pw at macports.org 
>> > Date 
>> > 2014-03-28 14:31:27 -0700 (Fri, 28 Mar 2014) 
>> > Log Message 
>> > 
>> > devel/wemux: 
>> > fix conf file location (closes #43096) 
>> > change prefix in documentation, too. 
>> > 
>> > Modified Paths 
>> > 
>> > • trunk/dports/devel/wemux/Portfile 
>> 
>> 
>> > @@ -23,7 +23,7 @@ 
>> > use_configure no 
>> > 
>> > patch { 
>> > - reinplace "s|/etc/wemux|${prefix}&|g" ${worksrcpath}/wemux 
>> > + reinplace "s|/usr/local|${prefix}|g" wemux README.md man/wemux.1 
>> > } 
>> > 
>> > build {} 
>> 
>> You should not assume that the current directory is ${worksrcpath}; you should specify it, e.g. by using “reinplace -W ${worksrcpath} …”. 




More information about the macports-dev mailing list