Skip to content

Commit 3e8100c

Browse files
committed
CI macos: pkg-config install fix
THe problem seems to be that there is preinstalled [email protected] in CI but the version that is being to be installed is an alias for pkgconf. The problem seems to be cumbersome, because installing pkgconf fails, pkg-config as well (tries to install pkgconf 2.3.0; installed version of pkg-config is [email protected]). So made just a workaround, that will not be needed after the updated pkg-config (linked to pkgconf) applies to all macos runners (will be preinstalled). The problematic package is pkg-config in current macos-13 runner but [email protected] in macos-14 image.
1 parent 1edef2b commit 3e8100c

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

.github/scripts/macOS/prepare.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,18 @@ echo "PKG_CONFIG_PATH=/usr/local/lib/pkgconfig" >> "$GITHUB_ENV"
3131
echo "/usr/local/opt/qt/bin" >> "$GITHUB_PATH"
3232
echo "DYLIBBUNDLER_FLAGS=$DYLIBBUNDLER_FLAGS" >> "$GITHUB_ENV"
3333

34-
# Ensure that pkg-config is installed but unlinked.
35-
# This is to prevent interference with pkgconf - both can be installed as
36-
# a dependency of other packages so ensure a defined state (both installed;
37-
# pkgconf installed and enabled later).
38-
if ! brew list pkg-config 2>/dev/null; then
34+
# TOREMOVE: temporal CI fix, remove after a short period (let say after 2024)
35+
for n in $(brew list --formula -1 | grep -E '^(pkg-config(@.*)?|pkgconf)$'); do
36+
brew uninstall "$n"
37+
done
38+
brew install pkg-config
39+
# if pkg-config is not alias for pkgconf, install it for deps but unlink
40+
if brew list pkg-config | grep -qv pkgconf; then
41+
brew uninstall pkg-config
42+
brew install pkgconf
43+
brew unlink pkgconf
3944
brew install pkg-config
4045
fi
41-
brew unlink pkg-config
4246

4347
set -- \
4448
asciidoctor \

0 commit comments

Comments
 (0)