[MacPorts] #31821: reinplace -E doesn't work when /usr/bin/sed switches from BSD sed to GNU sed or vice versa (was: [minor issue] sed issue while building arm-none-eabi-binutils)
MacPorts
noreply at macports.org
Fri Oct 28 22:03:10 PDT 2011
#31821: reinplace -E doesn't work when /usr/bin/sed switches from BSD sed to GNU
sed or vice versa
---------------------------------+------------------------------------------
Reporter: ekawahyu@… | Owner: macports-tickets@…
Type: enhancement | Status: closed
Priority: Low | Milestone:
Component: base | Version: 2.0.3
Resolution: invalid | Keywords:
Port: |
---------------------------------+------------------------------------------
Changes (by ryandesign@…):
* cc: ryandesign@… (added)
* component: ports => base
* port: arm-none-eabi-binutils =>
Comment:
In the specific case you found above, it's not arm-none-eabi-binutils'
configuration program; it's MacPorts base itself, which has a
"`reinplace`" command which portfiles can use, which is basically a
wrapper to sed. The relevant reinplace that's demonstrating the problem is
in the crossbinutils portgroup that the arm-none-eabi-binutils port (and
the other cross-compiled binutils ports) use:
browser:trunk/dports/_resources/port1.0/group/crossbinutils-1.0.tcl?rev=69962#L89
The `-E` switch that this `reinplace` is using means "use extended (i.e.
modern) regular expressions". With BSD sed, the way to do that is to pass
it the argument `-E`. With GNU sed, the argument is `-r`. MacPorts base's
configure script will detect whether your sed is BSD sed or GNU sed and
pass the correct argument:
browser:trunk/base/aclocal.m4?rev=80222#L912
So the only reason this failed for you is that you configured and
installed MacPorts base back when you had BSD sed, and then later you
replaced sed with GNU sed -- or you installed MacPorts base from one of
our pre-compiled disk images, which are built on such a system.
--
Ticket URL: <https://trac.macports.org/ticket/31821#comment:2>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list