This is an automated email from the ASF dual-hosted git repository.

jimjag pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit d3e3951e5cee334d233bcd7d3500c46bda89d712
Author: Jim Jagielski <[email protected]>
AuthorDate: Thu Aug 6 15:11:35 2026 -0400

    Revert "RepositoryExternal.mk, libs.mk: prefer /usr/local/lib static libs 
on macOS"
    
    This reverts commit 9b92099a7350282ddfb677eafe03e37ee774e545.
---
 main/RepositoryExternal.mk | 35 ++++-------------------------------
 main/solenv/inc/libs.mk    | 37 +------------------------------------
 2 files changed, 5 insertions(+), 67 deletions(-)

diff --git a/main/RepositoryExternal.mk b/main/RepositoryExternal.mk
index 0773f902de..523065187d 100644
--- a/main/RepositoryExternal.mk
+++ b/main/RepositoryExternal.mk
@@ -160,17 +160,10 @@ ifeq ($(OS),MACOSX)
 # not a dylib, so it can't be a PLAINLIB like the else-branch below. A static
 # archive carries no transitive deps, so its own libxml-2.0.pc's
 # "Libs.private: -lpthread -liconv -lm" must be added explicitly.
-#
-# If the user already has prebuilt static libs under /usr/local/lib, prefer
-# those over the tree's own build (Apple's SDK ships no static libiconv.a,
-# only a .tbd stub for the dylib, so a /usr/local one is additive there).
-gb_libxml2_static_lib := $(if $(wildcard 
/usr/local/lib/libxml2.a),/usr/local/lib/libxml2.a,$(OUTDIR)/lib/libxml2.a)
-gb_libiconv_static_lib := $(if $(wildcard 
/usr/local/lib/libiconv.a),/usr/local/lib/libiconv.a,-liconv)
-
 define gb_LinkTarget__use_libxml2
 $(call gb_LinkTarget_add_libs,$(1),\
-       $(gb_libxml2_static_lib) \
-       -lpthread $(gb_libiconv_static_lib) -lm \
+       $(OUTDIR)/lib/libxml2.a \
+       -lpthread -liconv -lm \
 )
 endef
 
@@ -207,14 +200,10 @@ ifeq ($(OS),MACOSX)
 
 # Bundled libxslt/libexslt build as static archives on macOS (see
 # main/libxslt/makefile.mk); link by absolute path, same as libxml2 above.
-# Prefer a prebuilt /usr/local/lib copy when the user already has one.
-gb_libxslt_static_lib := $(if $(wildcard 
/usr/local/lib/libxslt.a),/usr/local/lib/libxslt.a,$(OUTDIR)/lib/libxslt.a)
-gb_libexslt_static_lib := $(if $(wildcard 
/usr/local/lib/libexslt.a),/usr/local/lib/libexslt.a,$(OUTDIR)/lib/libexslt.a)
-
 define gb_LinkTarget__use_libxslt
 $(call gb_LinkTarget_add_libs,$(1),\
-       $(gb_libxslt_static_lib) \
-       $(gb_libexslt_static_lib) \
+       $(OUTDIR)/lib/libxslt.a \
+       $(OUTDIR)/lib/libexslt.a \
 )
 endef
 
@@ -452,34 +441,18 @@ endef
 
 else # !SYSTEM_CURL
 
-ifeq ($(OS),MACOSX)
-
-# If the user already has a prebuilt static libcurl.a under /usr/local/lib,
-# prefer that copy over the tree's own (dylib) build.
-gb_curl_static_lib := $(wildcard /usr/local/lib/libcurl.a)
-
-else # !MACOSX
 ifeq ($(OS),WNT)
 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE,libcurl))
 else
 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE,curl))
 endif
-endif # MACOSX
 
 define gb_LinkTarget__use_curl
-ifeq ($(OS),MACOSX)
-ifneq ($(gb_curl_static_lib),)
-$(call gb_LinkTarget_add_libs,$(1),$(gb_curl_static_lib))
-else
-$(call gb_LinkTarget_add_linked_libs,$(1),curl)
-endif
-else
 ifeq ($(OS),WNT)
 $(call gb_LinkTarget_add_linked_libs,$(1),libcurl)
 else
 $(call gb_LinkTarget_add_linked_libs,$(1),curl)
 endif
-endif
 endef
 
 endif # SYSTEM_CURL
diff --git a/main/solenv/inc/libs.mk b/main/solenv/inc/libs.mk
index b9478bd835..ab9ba42e48 100644
--- a/main/solenv/inc/libs.mk
+++ b/main/solenv/inc/libs.mk
@@ -175,22 +175,7 @@ LIBXML2LIB=$(LIBXML_LIBS)
 .IF "$(OS)"=="MACOSX"
 # Bundled libxml2 is a static archive on macOS (main/libxml2/makefile.mk), 
which
 # carries no transitive deps -- add what its own .pc's Libs.private needs.
-# If the user already has prebuilt static libs under /usr/local/lib, prefer
-# those over the tree's own build (Apple's SDK ships no static libiconv.a,
-# only a .tbd stub for the dylib, so a /usr/local one is additive there).
-PREBUILT_LIBXML2_A:=$(shell -test -f /usr/local/lib/libxml2.a && echo yes)
-PREBUILT_LIBICONV_A:=$(shell -test -f /usr/local/lib/libiconv.a && echo yes)
-.IF "$(PREBUILT_LIBXML2_A)"=="yes"
-LIBXML2LIB_XML2A=/usr/local/lib/libxml2.a
-.ELSE
-LIBXML2LIB_XML2A=-lxml2
-.ENDIF
-.IF "$(PREBUILT_LIBICONV_A)"=="yes"
-LIBXML2LIB_ICONVA=/usr/local/lib/libiconv.a
-.ELSE
-LIBXML2LIB_ICONVA=-liconv
-.ENDIF
-LIBXML2LIB=$(LIBXML2LIB_XML2A) -lpthread $(LIBXML2LIB_ICONVA) -lm
+LIBXML2LIB=-lxml2 -lpthread -liconv -lm
 .ELSE
 LIBXML2LIB=-lxml2
 .ENDIF
@@ -260,18 +245,7 @@ NEON3RDLIB=-lneon
 .IF "$(OS)" == "FREEBSD" && "$(CPUNAME)" == "POWERPC64"
 JPEG3RDLIB=/usr/local/lib/libjpeg.so
 .ENDIF
-.IF "$(SYSTEM_CURL)"!="YES" && "$(OS)"=="MACOSX"
-# If the user already has a prebuilt static libcurl.a under /usr/local/lib,
-# prefer that copy over the tree's own (dylib) build.
-PREBUILT_LIBCURL_A:=$(shell -test -f /usr/local/lib/libcurl.a && echo yes)
-.IF "$(PREBUILT_LIBCURL_A)"=="yes"
-CURLLIB=/usr/local/lib/libcurl.a
-.ELSE
-CURLLIB=-lcurl
-.ENDIF
-.ELSE
 CURLLIB=-lcurl
-.ENDIF
 SFX2LIB=-lsfx$(DLLPOSTFIX)
 SFXLIB=-lsfx$(DLLPOSTFIX)
 EGGTRAYLIB=-leggtray$(DLLPOSTFIX)
@@ -313,17 +287,8 @@ GTESTLIB= -lgtest
 .IF "$(SYSTEM_LIBXSLT)"=="YES"
 XSLTLIB=$(LIBXSLT_LIBS)
 .ELSE
-.IF "$(OS)"=="MACOSX"
-PREBUILT_LIBXSLT_A:=$(shell -test -f /usr/local/lib/libxslt.a && echo yes)
-.IF "$(PREBUILT_LIBXSLT_A)"=="yes"
-XSLTLIB=/usr/local/lib/libxslt.a $(LIBXML2LIB)
-.ELSE
 XSLTLIB=-lxslt $(LIBXML2LIB)
 .ENDIF
-.ELSE
-XSLTLIB=-lxslt $(LIBXML2LIB)
-.ENDIF
-.ENDIF
 .IF "$(GUI)$(COM)"=="WNTGCC" || "$(GUI)"=="OS2"
 JVMFWKLIB = -ljvmfwk$(UDK_MAJOR)
 .ELSE                  # "$(GUI)$(COM)"=="WNTGCC"

Reply via email to