From 6ac35ffe4310faaef4de03dce8cc43f143dafd85 Mon Sep 17 00:00:00 2001 From: richardg867 Date: Thu, 7 Apr 2022 15:48:07 -0300 Subject: [PATCH] Jenkins: Search for MacPorts prefix when building --- .ci/build.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.ci/build.sh b/.ci/build.sh index 437f06b95..590119cc4 100644 --- a/.ci/build.sh +++ b/.ci/build.sh @@ -330,15 +330,20 @@ then # macOS lacks nproc, but sysctl can do the same job. alias nproc='sysctl -n hw.logicalcpu' + # Locate the MacPorts prefix. + macports="/opt/local" + [ -e "/opt/$arch/bin/port" ] && macports="/opt/$arch" + [ "$arch" = "x86_64" -a -e "/opt/intel/bin/port" ] && macports="/opt/intel" + # Install dependencies. echo [-] Installing dependencies through MacPorts - sudo port selfupdate - sudo port install $(cat .ci/dependencies_macports.txt) + sudo $macports/bin/port selfupdate + sudo $macports/bin/port install $(cat .ci/dependencies_macports.txt) # Point CMake to the toolchain file. [ -e "cmake/$toolchain.cmake" ] && cmake_flags_extra="$cmake_flags_extra -D \"CMAKE_TOOLCHAIN_FILE=cmake/$toolchain.cmake\"" - # Use OpenAL. + # Use OpenAL as MacPorts doesn't package FAudio. cmake_flags_extra="$cmake_flags_extra -D OPENAL=ON" else # Determine Debian architecture.