reinplace instruction and automatic line feeds

Jeremy Lavergne jeremy at lavergne.gotdns.org
Sun Jan 5 07:57:19 PST 2014


Does replace accept anchors? It might only need beginning and end of the line to allow skipping over binary files.

Also, this page says the 0A may be happening from auto translation when “fconfigure $fp -translation binary” isn’t used:
http://www2.tcl.tk/1180

On Jan 5, 2014, at 4:23, Nicolas Pavillon <nicos at macports.org> wrote:

> In particular, there is a set of instructions in the kde4-1.1 portgroup which scans all files to replace an include instruction:
> post-extract {
>    # Following the official word: Change #include ["<]Phonon...[">] to
>    # ...phonon... in all files that contain that header.
>    fs-traverse item ${worksrcpath} {
>        if {[file isfile ${item}]} {
>            reinplace -locale C "/#include/s at Phonon@phonon@" ${item}
>        }
>    }
> }
> 
> However, this way also applies reinplace to binary files, and adds a “0A” line feed at the end of the file. One obvious way would be to filter through file extensions, but this may become quite cumbersome. Would anyone have a better suggestion, or, even better, a way to prevent reinplace to add this line feed?



More information about the macports-dev mailing list