From: Carlo Marcelo Arenas Belón Date: Fri, 12 Dec 2025 10:02:12 GMT Subject: Re: [PATCH] config.mak.uname: use iconv from Homebrew on macOS Message-ID: In-Reply-To: <3ac57efd-a0c6-49da-b63d-825d97b3821c@web.de> On Fri, Dec 12, 2025 at 10:16:02AM -0800, René Scharfe wrote: > 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). not always; you can install it anywhere you want, and indeed you might need to (like I do) when given access to a remote instance of macOS that you have no root on. as you mentioned too, these settings are in the wrong Makefile (mainly because they predate the split and creation of config.mak.uname) but also because they are TOO peculiar of a case to be inside the latter and because changing that might break some setups. FWIW the use of "user" package managers is not unique to macOS. all other UNIX have them as well, but luckily they are far less popular and their use is declining (ex: AIX and Solaris the main two that remain once HPUX is sunset, and not counting NONSTOP which we support directly) Carlo