Skip to content

Commit

Permalink
Apply fixes for macos builds
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisroberts committed Jul 8, 2024
1 parent 4a40764 commit b970fdd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-x86-substrate:
if: github.repository == 'hashicorp/vagrant-builders' && needs.info.outputs.substrate-x86-unsigned-exists != 'true'
runs-on: macos-13
runs-on: macos-latest
permissions:
contents: write
needs: [info]
Expand Down Expand Up @@ -561,7 +561,7 @@ jobs:
- name: Upgrade bash
run: brew install bash
- name: Install dmgbuild
run: pip3 install dmgbuild && pip3 install biplist
run: pip3 install --break-system-packages dmgbuild && pip3 install --break-system-packages biplist
- name: Code Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Fetch Vagrant installer
Expand Down
5 changes: 0 additions & 5 deletions package/darwin/generate_package_contents
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ if [ ! -f "${vagrant_gem}" ]; then
error "Invalid path provided for Vagrant gem (%s)" "${vagrant_gem}"
fi

# Make sure the go modules are installed
pushd "${root}" > /dev/null || exit
go mod download || exit
popd > /dev/null || exit

# Create a working directory for unpacking
# the substrate
substrate_dir="$(mktemp -d vagrant-substrate.XXXXXX)" || exit
Expand Down
5 changes: 3 additions & 2 deletions substrate/deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@ libxcrypt_version="4.4.18"
# Only used for macOS
# NOTE: The 10.12 SDK was the earliest version of the
# SDK which could properly build all the dependencies
macos_sdk_file="MacOSX10.12.sdk.tgz"
macos_deployment_target="10.12"
# NOTE: Old SDK does not appear to work on arm, disable for now
#macos_sdk_file="MacOSX10.12.sdk.tgz"
#macos_deployment_target="10.12"
6 changes: 2 additions & 4 deletions substrate/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ if [ "${target_os}" = "linux" ] && [ -n "${forced_arch}" ]; then
if [ "${target_arch}" = "386" ]; then
export CFLAGS="${CFLAGS} -m32 -march=${forced_arch}"
export LDFLAGS="${LDFLAGS} -m32"

fi

info " ** Build host: %s" "${build_host}"
Expand Down Expand Up @@ -263,7 +262,6 @@ if [[ "${target_os}" = "darwin" ]]; then
"--includedir=${embed_dir}/include"
"--oldincludedir=${embed_dir}/include"
"--enable-rpath"
"--enable-rb_cv_function_name_string=__func__"
)

# Set the host system value
Expand Down Expand Up @@ -864,8 +862,8 @@ if needs_build "${tracker_file}" "ruby"; then
unset CFLAGS
unset CPPFLAGS
unset CXXFLAGS
./configure --prefix="${embed_dir}" --disable-debug --disable-dependency-tracking --disable-install-doc --disable-install-rdoc \
--enable-shared --disable-static --with-opt-dir="${embed_dir}" --enable-load-relative --with-sitedir=no \
./configure --prefix="${embed_dir}" --disable-debug --disable-install-doc --disable-install-rdoc \
--disable-install-capi --enable-shared --disable-static --enable-load-relative --with-sitedir=no \
--with-vendordir=no --with-sitearchdir=no --with-vendorarchdir=no --with-openssl-dir="${embed_dir}" \
"${cross_configure[@]}" "${cross_configure_ruby[@]}" || exit
make miniruby || exit
Expand Down

0 comments on commit b970fdd

Please sign in to comment.