thanks for the clue, indeed that was on track.
this worked, in the end, once I finally remembered I had to use the “-E”
enhancement to reinplace to make it obey the regex — that took an extra hour :>
reinplace -E -q {s| --host=[^ ]+||g} ${dir}/bin/jemalloc-config
reinplace -E -q {s| host_alias=[^ ]+||g} ${dir}/bin/jemalloc-config
trying to build without the “host” parts in the first place let to the
configure script erroring out as it was unable to run the test executables
built as arm64 on Intel.
fixed!
K
> On Jun 19, 2022, at 2:47 PM, Eric Borisch <[email protected]> wrote:
>
> I would think:
> s/--host(_alias)?=[^ ]*//a
>
> On Sun, Jun 19, 2022 at 3:34 PM Ken Cunningham
> <[email protected] <mailto:[email protected]>>
> wrote:
> to fix the universal build of some ports, eg jemalloc, I would like to strip
> out the host bits from these text strings, eg convert this:
>
> echo "--prefix=/opt/local --with-jemalloc-prefix=
> --host=aarch64-apple-darwin21.5.0 host_alias=aarch64-apple-darwin21.5.0
> CC=/usr/bin/clang”
>
> to this:
>
> echo "--prefix=/opt/local --with-jemalloc-prefix= CC=/usr/bin/clang”
>
> however, my regex-fu is not strong.
>
> Anyone know the secret reinplace regex that might do that?
>
> thx