reinplace has no effect

Brandon Allbery allbery.b at gmail.com
Mon Jul 7 11:59:33 PDT 2014


On Mon, Jul 7, 2014 at 2:30 PM, Mark Brethen <mark.brethen at gmail.com> wrote:

> I only need to replace the uncommented line. So I tried
>
> post-configure {
>     reinplace {:^#:!s:Inventor/scxml:scxml:g} \
>         ${worksrcpath}/src/3rdParty/CMakeLists.txt
> }
>
> But this had no effect, when it should work in sed. Am I missing something?
>

That looks wrong to me; in sed, to use a pattern delimiter other than / *as
an address* you need to start it with a backslash so it knows it's a
pattern delimiter coming up and not a command without an address. That is,

    :foo:p

is an illegal command, but

    \:foo:p

uses : as the delimiter for an address pattern. This does not apply to the
"s" command, since it knows after the "s" verb that a pattern follows.

(Note that ":" is a valid sed command, although not widely used; it's a
label for a branch instruction. You just gave it a rather odd-looking
label, and the reinplace does nothing as a result.)

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-dev/attachments/20140707/da5fdafe/attachment.html>


More information about the macports-dev mailing list