From 1a4cbb74b15cd8ab291c7398fc787ac164487256 Mon Sep 17 00:00:00 2001 From: filipecosta90 Date: Thu, 21 Nov 2024 22:45:11 +0000 Subject: [PATCH] Fixed brew link step for pkgconf --- .github/workflows/ci.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd8d387..394d879 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -111,6 +111,7 @@ jobs: - name: Install dependencies run: | brew install autoconf automake libtool libevent pkg-config openssl@${{ matrix.openssl }} + # Handle OpenSSL 3.0 keg-only setup if [ "${{ matrix.openssl }}" == "3.0" ]; then echo 'export PATH="/opt/homebrew/opt/openssl@3.0/bin:$PATH"' >> $HOME/.bash_profile echo 'export LDFLAGS="-L/opt/homebrew/opt/openssl@3.0/lib"' >> $HOME/.bash_profile @@ -119,7 +120,12 @@ jobs: source $HOME/.bash_profile /opt/homebrew/opt/openssl@3.0/bin/c_rehash fi - brew unlink pkg-config@0.29.2 || true + + # Handle missing pkg-config or pkgconf + if ! brew list --versions pkgconf > /dev/null; then + brew install pkgconf + fi + brew unlink pkg-config || true brew link --overwrite pkgconf - name: Build run: autoreconf -ivf && PKG_CONFIG_PATH=`brew --prefix openssl@${{ matrix.openssl }}`/lib/pkgconfig ./configure && make @@ -134,7 +140,10 @@ jobs: - name: Install dependencies run: | brew install autoconf automake libtool libevent pkg-config - brew unlink pkg-config@0.29.2 || true + if ! brew list --versions pkgconf > /dev/null; then + brew install pkgconf + fi + brew unlink pkg-config || true brew link --overwrite pkgconf - name: Install openssl v1.0.2 run: brew install rbenv/tap/openssl@1.0