At 12:31 PM -0500 4/2/12, Ryan Schmidt wrote:
On Apr 1, 2012, at 08:53, Craig Treleaven wrote:
At 10:20 AM -0400 3/31/12, Jeremy Lavergne wrote:
> cd cd
"/opt/local/var/macports/build/_Users_craigtreleaven_MacPortsTemp_Myth.25/mythtv/work/mythtv-v0.25-rc-0-g92f7d1f/mythtv"
sudo find . -name "Makefile" -exec sed -i '' 's/ -L / /g' {} \;
This is what MacPorts Reinplace extension is for, right? Would
this be the right syntax?
post-configure {
reinplace 's/ -L / /g' ${worksrcpath}/Makefile
}
Reinplace will do a recursive search from the specified
directory on down, right?
reinplace will only operate on the files you give to it. You need
to give it a complete list or you might use it in conjunction with
fs-traverse (see `man portfile`).
I'm struggling with this. Did I mention I'm new to MacPorts AND
tcl? ;) What I've got so far is this:
post-configure {
fs-traverse myfile ${configure.dir} {
if { [ file tail $myfile ] == "Makefile" } {
# ui_info "Removing any spurious -L
from ${myfile}"
reinplace "s/ -L / /g" ${myfile}
}
}
}
The trouble is that it does the reinplace on less than half the 20
or so files that need it.
Since you've subsequently noticed the same problem when running
"find", I suspect your regular expression is not correct. I will try
to build the port later and see if I can figure out what's going on.
Maybe that's the problem--it is not supposed to be a "regular
expression"; it is a literal string of 'space-hyphen-capital
ell-space'. Does hyphen have special meaning in a regex?
Craig
_______________________________________________
macports-dev mailing list
macports-dev@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev