Skip to content

Commit

Permalink
[macOS] Pin version for tcl/tk and pkg-config
Browse files Browse the repository at this point in the history
  • Loading branch information
sarathrajsrinivasan committed Nov 15, 2024
1 parent d29e71f commit 58e2f2e
Show file tree
Hide file tree
Showing 13 changed files with 40 additions and 11 deletions.
7 changes: 6 additions & 1 deletion images/macos/scripts/build/install-common-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ for package in $common_packages; do
# Packer has been deprecated in Homebrew. Use tap to install Packer.
brew install hashicorp/tap/packer
else
brew_smart_install "$package"
if [[ $package == "tcl-tk" ]]; then
# Pin the version for tcl/tk to 8 as a temporary measure.
brew_smart_install "tcl-tk@8"
else
brew_smart_install "$package"
fi
fi
fi
done
Expand Down
15 changes: 15 additions & 0 deletions images/macos/scripts/build/install-pkg-config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-pkg-config.sh
## Desc: Install pkg-config
################################################################################

source ~/utils/utils.sh

echo "Installing pkg-config..."

brew tap-new my-org/old-formulas
brew extract pkg-config my-org/old-formulas --version=0.29.2
brew install my-org/old-formulas/[email protected]

invoke_tests "Common" "pkg-config"
2 changes: 1 addition & 1 deletion images/macos/scripts/docs-gen/SoftwareReport.Common.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ function Get-LibXextVersion {
}

function Get-TclTkVersion {
$tcltkVersion = (Run-Command "brew info --json tcl-tk" | ConvertFrom-Json).installed.version
$tcltkVersion = (Run-Command "brew info --json tcl-tk@8" | ConvertFrom-Json).installed.version
return $tcltkVersion
}

Expand Down
6 changes: 6 additions & 0 deletions images/macos/scripts/tests/Common.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,9 @@ Describe "Unxip" {
"unxip --version" | Should -ReturnZeroExitCode
}
}

Describe "pkg-config" {
It "pkg-config" {
"pkg-config --version" | Should -ReturnZeroExitCode
}
}
3 changes: 2 additions & 1 deletion images/macos/templates/macOS-13.anka.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ build {
"${path.root}/../scripts/build/install-git.sh",
"${path.root}/../scripts/build/install-node.sh",
"${path.root}/../scripts/build/install-common-utils.sh",
"${path.root}/../scripts/build/install-unxip.sh"
"${path.root}/../scripts/build/install-unxip.sh",
"${path.root}/../scripts/build/install-pkg-config.sh"
]
}

Expand Down
3 changes: 2 additions & 1 deletion images/macos/templates/macOS-13.arm64.anka.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ build {
"${path.root}/../scripts/build/install-git.sh",
"${path.root}/../scripts/build/install-node.sh",
"${path.root}/../scripts/build/install-common-utils.sh",
"${path.root}/../scripts/build/install-unxip.sh"
"${path.root}/../scripts/build/install-unxip.sh",
"${path.root}/../scripts/build/install-pkg-config.sh"
]
}

Expand Down
3 changes: 2 additions & 1 deletion images/macos/templates/macOS-14.anka.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ build {
"${path.root}/../scripts/build/install-rubygems.sh",
"${path.root}/../scripts/build/install-git.sh",
"${path.root}/../scripts/build/install-node.sh",
"${path.root}/../scripts/build/install-common-utils.sh"
"${path.root}/../scripts/build/install-common-utils.sh",
"${path.root}/../scripts/build/install-pkg-config.sh"
]
}

Expand Down
3 changes: 2 additions & 1 deletion images/macos/templates/macOS-14.arm64.anka.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ build {
"${path.root}/../scripts/build/install-rubygems.sh",
"${path.root}/../scripts/build/install-git.sh",
"${path.root}/../scripts/build/install-node.sh",
"${path.root}/../scripts/build/install-common-utils.sh"
"${path.root}/../scripts/build/install-common-utils.sh",
"${path.root}/../scripts/build/install-pkg-config.sh"
]
}

Expand Down
3 changes: 2 additions & 1 deletion images/macos/templates/macOS-15.anka.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ build {
"${path.root}/../scripts/build/install-rubygems.sh",
"${path.root}/../scripts/build/install-git.sh",
"${path.root}/../scripts/build/install-node.sh",
"${path.root}/../scripts/build/install-common-utils.sh"
"${path.root}/../scripts/build/install-common-utils.sh",
"${path.root}/../scripts/build/install-pkg-config.sh"
]
}

Expand Down
3 changes: 2 additions & 1 deletion images/macos/templates/macOS-15.arm64.anka.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ build {
"${path.root}/../scripts/build/install-rubygems.sh",
"${path.root}/../scripts/build/install-git.sh",
"${path.root}/../scripts/build/install-node.sh",
"${path.root}/../scripts/build/install-common-utils.sh"
"${path.root}/../scripts/build/install-common-utils.sh",
"${path.root}/../scripts/build/install-pkg-config.sh"
]
}

Expand Down
1 change: 0 additions & 1 deletion images/macos/toolsets/toolset-13.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
"p7zip",
"packer",
"perl",
"pkg-config",
"swiftformat",
"tcl-tk",
"zstd",
Expand Down
1 change: 0 additions & 1 deletion images/macos/toolsets/toolset-14.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
"p7zip",
"packer",
"perl",
"pkg-config",
"swiftformat",
"tcl-tk",
"zstd",
Expand Down
1 change: 0 additions & 1 deletion images/macos/toolsets/toolset-15.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
"p7zip",
"packer",
"perl",
"pkg-config",
"swiftformat",
"zstd",
"gmp",
Expand Down

0 comments on commit 58e2f2e

Please sign in to comment.