Re: [PATCH] config.mak.uname: use iconv from Homebrew on macOS
- From
Torsten Bögershausen <tboegi@web.de>
- Date
- Dec 10, 2025, 16:42 UTC
- Message-ID
- <20251210164256.GA30949@tb-raspi4>
- In-Reply-To
- <16efc726-34be-44f5-aa92-4e82b663ab3d@web.de>
On Tue, Dec 09, 2025 at 08:35:34PM +0100, René Scharfe wrote:
Show 37 quoted lines
> The library function iconv(3) supplied with macOS versions 15.7.2 > (Sequoia) and 26.1 (Tahoe) is unreliable when doing conversions from > ISO-2022-JP to UTF-8 in multiple steps; t3900 reports this breakage: > > not ok 17 - ISO-2022-JP should be shown in UTF-8 now > not ok 25 - ISO-2022-JP should be shown in UTF-8 now > not ok 38 - commit --fixup into ISO-2022-JP from UTF-8 > > As a workaround, use libiconv from Homebrew, if available. > > Helped-by: Koji Nakamaru <koji.nakamaru@gree.net> > Signed-off-by: René Scharfe <l.s.r@web.de> > --- > config.mak.uname | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/config.mak.uname b/config.mak.uname > index 1691c6ae6e..1b305e38c6 100644 > --- a/config.mak.uname > +++ b/config.mak.uname > @@ -182,6 +182,13 @@ ifeq ($(uname_S),Darwin) > endif > endif > > + ifeq ($(shell test -d /opt/homebrew/opt/libiconv/ && echo y),y) > + ICONVDIR ?= /opt/homebrew/opt/libiconv > + endif > + ifeq ($(shell test -d /usr/local/opt/libiconv/ && echo y),y) > + ICONVDIR ?= /usr/local/opt/libiconv > + endif > + > BASIC_LDFLAGS += -framework CoreServices > endif > ifeq ($(uname_S),SunOS) > -- > 2.52.0 >
(Probaly a stupid question:) Does libiconv from homebrew provide UTF-8-MAC ? And does t3910 pass ?
I just realized that I am building against libiconv from mac ports, since years. Digging into the Makefile shows that we have a switch: NO_DARWIN_PORTS (and another one for FINK) Does it make sense to have a switch here as well ?