[MacPorts] #27310: Feature request: -u option to reinplace, to facilitate \[0-9] copy into replacement
MacPorts
noreply at macports.org
Sat Nov 13 20:43:14 PST 2010
#27310: Feature request: -u option to reinplace, to facilitate \[0-9] copy into
replacement
---------------------------------------------+------------------------------
Reporter: james.from.wellington@… | Owner: macports-tickets@…
Type: enhancement | Status: new
Priority: Normal | Milestone:
Component: base | Version: 1.9.2
Keywords: haspatch | Port:
---------------------------------------------+------------------------------
In the course of updating firefox-x11-devel, I wanted reinplace commands
that look like this (modulo the new option):
{{{
reinplace -u -E "s:(libplayback-1).so.0:${prefix}/lib/\1.dylib:" \
${worksrcpath}/modules/plugin/base/src/nsPluginNativeWindowGtk2.cpp
}}}
where the \1 copies the library name into the replacement text.
They work fine in sed, but did not work in macports because \1 is a tcl
escape sequence for control-A.
This patch provides the -u option (shown above) to convert control-A to
control-H into \1 to \7, assuming that they are the remains of escape
sequences, enabling the command in the Portfile to be tested by copy-
pasting into command-line sed without a lot of editing.
This ticket is a continuation of https://trac.macports.org/ticket/27299
--
Ticket URL: <https://trac.macports.org/ticket/27310>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list