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, g...@macports.org wrote: >> >> > Revision >> > 118284 >> > Author >> > g...@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} …”. _______________________________________________ macports-dev mailing list macports-dev@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-dev