34e8448fb29e6fd0bf3e6c48e00d53aa8ffdc4ed
hiram
  Thu Feb 20 10:38:04 2025 -0800
a couple of updates for building on Mac OSX no redmine

diff --git src/inc/common.mk src/inc/common.mk
index f2c71f621c0..4a3c3b14098 100644
--- src/inc/common.mk
+++ src/inc/common.mk
@@ -69,54 +69,70 @@
     ZLIB=-lz
   endif
 endif
 
 # for Darwin (Mac OSX), use static libs when they can be found
 ifeq ($(UNAME_S),Darwin)
   ifneq ($(wildcard /opt/local/include/openssl/ssl.h),)
     HG_INC += -I/opt/local/include
   endif
   ifneq ($(wildcard /opt/local/lib/libz.a),)
     ZLIB = /opt/local/lib/libz.a
   endif
   ifneq ($(wildcard /opt/local/lib/libpng.a),)
     PNGLIB = /opt/local/lib/libpng.a
   endif
+  ifeq (${BZ2LIB},)
+    ifneq ($(wildcard /opt/local/lib/libbz2.a),)
+      BZ2LIB=/opt/local/lib/libbz2.a
+    endif
+  endif
   ifneq ($(wildcard /opt/local/lib/libfreetype.a),)
-    FREETYPELIBS = /opt/local/lib/libfreetype.a /opt/local/lib/libbz2.a /opt/local/lib/libbrotlidec.a /opt/local/lib/libbrotlicommon.a
+    FREETYPELIBS = /opt/local/lib/libfreetype.a
+  endif
+  ifneq ($(wildcard /opt/local/lib/libbrotlidec.a),)
+    FREETYPELIBS += /opt/local/lib/libbrotlidec.a /opt/local/lib/libbrotlicommon.a
+  else
+    ifneq ($(wildcard /usr/local/Cellar/brotli/1.1.0/lib/libbrotlidec.a),)
+      FREETYPELIBS += /usr/local/Cellar/brotli/1.1.0/lib/libbrotlidec.a /usr/local/Cellar/brotli/1.1.0/lib/libbrotlicommon.a
+    endif
   endif
   ifneq ($(wildcard /usr/local/opt/openssl@3/lib/libssl.a),)
     SSLLIB = /usr/local/opt/openssl@3/lib/libssl.a
   else
     ifneq ($(wildcard /opt/local/libexec/openssl3/lib/libssl.a),)
       SSLLIB = /opt/local/libexec/openssl3/lib/libssl.a
     endif
   endif
   ifneq ($(wildcard /usr/local/opt/openssl@3/lib/libcrypto.a),)
     CRYPTOLIB = /usr/local/opt/openssl@3/lib/libcrypto.a
   else
     ifneq ($(wildcard /opt/local/libexec/openssl3/lib/libcrypto.a),)
       CRYPTOLIB = /opt/local/libexec/openssl3/lib/libcrypto.a
     endif
   endif
   ifneq ($(wildcard /opt/local/lib/libiconv.a),)
     ICONVLIB = /opt/local/lib/libiconv.a
   endif
+  ifneq ($(wildcard /usr/local/Cellar/mariadb/11.6.2/lib/libmariadbclient.a),)
+      MYSQLLIBS = /usr/local/Cellar/mariadb/11.6.2/lib/libmariadbclient.a
+  else
     ifneq ($(wildcard /opt/homebrew/lib/libmysqlclient.a),)
       MYSQLLIBS = /opt/homebrew/lib/libmysqlclient.a
     endif
   endif
+endif
 
 ifeq (${HOSTNAME},cirm-01)
   FULLWARN = yes
   ifeq (${MYSQLLIBS},)
     ifneq ($(wildcard /data/home/galt/lib64/libmariadb.a),)
       MYSQLLIBS = /data/home/galt/lib64/libmariadb.a
     endif
   endif
   ifeq (${SSLLIB},)
     ifneq ($(wildcard /data/home/galt/lib64/libssl.a),)
       SSLLIB = /data/home/galt/lib64/libssl.a
     endif
   endif
   ifeq (${CRYPTOLIB},)
     ifneq ($(wildcard /data/home/galt//lib64/libcrypto.a),)
@@ -168,31 +184,31 @@
   FREETYPECFLAGS += -DUSE_FREETYPE
   endif
 
   HG_INC += ${FREETYPECFLAGS}
   L += ${FREETYPELIBS}
 endif
 
 ifeq (${PTHREADLIB},)
   PTHREADLIB=-lpthread
 endif
 
 ifneq ($(UNAME_S),Darwin)
   L+=${PTHREADLIB}
   ifneq ($(filter 3.%, ${KERNEL_REL}),)
      # older linux needed libconv
-    ICONVLIB=-liconv
+    XXXICONVLIB=-liconv
   endif
 else
   ifeq (${ICONVLIB},)
     ICONVLIB=-liconv
   endif
 endif
 
 # autodetect UCSC installation of hal:
 ifeq (${HALDIR},)
     # ONLY on hgwdev, not any other machine here (i.e. hgcompute-01)
     ifeq (${IS_HGWDEV},yes)
       HALDIR = /hive/groups/browser/hal/build/hal.2024-12-12
       #HALDIR = /hive/groups/browser/hal/build/rocky9/hal.2024-12-18
       ifneq ($(wildcard ${HALDIR}),)
         ifeq (${USE_HAL},)
@@ -343,31 +359,31 @@
        ifneq (${SSLLIB},)
           L+=${SSLLIB}
        else
           L+=-lssl
        endif
        ifneq (${CRYPTOLIB},)
           L+=${CRYPTOLIB}
        else
           L+=-lcrypto
        endif
    endif
 endif
 
 #global external libraries
 L += $(kentSrc)/htslib/libhts.a
-L+=${PNGLIB} ${ZLIB} ${BZ2LIB} ${ICONVLIB}
+L+=${PNGLIB} ${MLIB} ${ZLIB} ${BZ2LIB} ${ICONVLIB}
 HG_INC+=${PNGINCL}
 
 # NOTE: these must be last libraries and must be dynamic.
 # We switched by to dynamic with SEMI_STATIC
 ifeq (${SEMI_STATIC},yes)
     # switch back to dynamic libraries
     DYNAMIC_PRE = -Wl,-Bdynamic
 endif
 DYNAMIC_LIBS =  ${DYNAMIC_PRE} -ldl -lm -lc
 
 L+= ${DYNAMIC_LIBS}
 
 
 # pass through COREDUMP
 ifneq (${COREDUMP},)