From 6fb4723cd6c3c757837cde805da1702e72d73616 Mon Sep 17 00:00:00 2001 From: George Talusan Date: Sat, 30 Jul 2022 12:18:43 -0400 Subject: [PATCH] fix homebrew dependency detection --- Makefile.defs | 10 +++++++--- client/Makefile | 5 ++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Makefile.defs b/Makefile.defs index 9b6947094..5a131c971 100644 --- a/Makefile.defs +++ b/Makefile.defs @@ -78,9 +78,13 @@ else endif ifeq ($(USE_BREW),1) - BREW_PREFIX = $(shell brew --prefix 2>/dev/null) - ifeq ($(strip $(BREW_PREFIX)),) - USE_BREW = 0 + ifneq ($(strip $(HOMEBREW_PREFIX)),) + BREW_PREFIX = $(HOMEBREW_PREFIX) + else + BREW_PREFIX = $(shell brew --prefix 2>/dev/null) + ifeq ($(strip $(BREW_PREFIX)),) + USE_BREW = 0 + endif endif endif diff --git a/client/Makefile b/client/Makefile index b1d7bb671..64c35eff8 100644 --- a/client/Makefile +++ b/client/Makefile @@ -37,8 +37,7 @@ OBJDIR = obj ifeq ($(USE_BREW),1) INCLUDES += -I$(BREW_PREFIX)/include LDLIBS += -L$(BREW_PREFIX)/lib - PKG_CONFIG_ENV := PKG_CONFIG_PATH=$(BREW_PREFIX)/opt/qt/lib/pkgconfig - PKG_CONFIG_ENV := PKG_CONFIG_PATH=$(BREW_PREFIX)/opt/qt5/lib/pkgconfig + PKG_CONFIG_ENV := PKG_CONFIG_PATH=$(BREW_PREFIX)/lib/pkgconfig:$(BREW_PREFIX)/opt/qt/lib/pkgconfig:$(BREW_PREFIX)/opt/qt5/lib/pkgconfig endif ifdef ($(USE_MACPORTS),1) @@ -479,7 +478,7 @@ ifeq ($(SKIPPYTHON),1) $(info Python3 library: skipped) else ifeq ($(PYTHON_FOUND),1) - $(info Python3 library: Python3 v$(shell pkg-config --modversion python3) found, enabled) + $(info Python3 library: Python3 v$(shell $(PKG_CONFIG_ENV) pkg-config --modversion python3) found, enabled) else $(info Python3 library: Python3 not found, disabled) endif