From: René Scharfe Date: Fri, 12 Dec 2025 09:16:02 GMT Subject: Re: [PATCH] config.mak.uname: use iconv from Homebrew on macOS Message-ID: <3ac57efd-a0c6-49da-b63d-825d97b3821c@web.de> In-Reply-To: On 12/12/25 3:20 AM, Junio C Hamano wrote: > Carlo Marcelo Arenas Belón writes: > >>> I am looking at relevant parts of Makefile >>> >>> # Define NO_FINK if you are building on Darwin/Mac OS X, have Fink >>> # installed in /sw, but don't want GIT to link against any libraries >>> # installed there. If defined you may specify your own (or Fink's) >>> # include directories and library directories by defining CFLAGS >>> # and LDFLAGS appropriately. >>> # >>> # Define NO_DARWIN_PORTS if you are building on Darwin/Mac OS X, >>> # have DarwinPorts installed in /opt/local, but don't want GIT to >>> # link against any libraries installed there. If defined you may >>> # specify your own (or DarwinPort's) include directories and >>> # library directories by defining CFLAGS and LDFLAGS appropriately. >>> >>> and notice that /opt/local/ is mentioned for DarwinPorts. The patch >>> that started this thread talks about defaulting ICONVDIR to that of >>> Homebrew if available, but the new code checks /opt/homebrew and >>> then /usr/local/ (and let it override it). Should the log message >>> be talking about DarwinPorts as well? >>> >>> As a workaround, set the default libiconv location to >>> /opt/homebrew when the user has one from Homebrew, or >>> to /opt/local when the user has one from MacPorts. >>> >>> or something along the line? >> >> Since the original patch was only meant to help with Homebrew it >> might not be worth mentioning the OTHER package managers IMHO. > > Meaing that the original patch should have included only > /opt/homebrew and we should drop the part about /opt/local? > > Or do you mean Homebrew may use /opt/local instead of /opt/homebrew > and both parts of the original patch are needed to give coverage to > different Homebrew installations? > > If the latter, perhaps we can say something in the proposed commit > log message to explain having both /opt/{homebrew,local}/ is > necessary (and why)? Homebrew uses /opt/homebrew for Apple Silicon and /usr/local for macOS Intel (https://docs.brew.sh/Installation). MacPorts née DarwinPorts uses /opt/local (https://trac.macports.org/wiki/FAQ#defaultprefix). Fink uses /opt/sw (https://www.finkproject.org/faq/general.php?phpLang=en#why-sw). The patch tries both Homebrew directories, the newer Apple Silicon one first. René