Skip to content

Commit 3b6667e

Browse files
authored
Merge pull request #543 from Bartel-C8/macos-arm [skip ci]
2 parents 6cccfcb + af8f5c4 commit 3b6667e

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

.github/workflows/CI.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ jobs:
115115
if: ${{ contains(matrix.os, 'macos') && matrix.ARCH == 'arm64' }}
116116
run: |
117117
brew uninstall libsodium --force --ignore-dependencies
118-
chmod +x ./script/macos-arm-deps.sh
119118
source ./script/macos-arm-deps.sh
120119
121120
- name: Install Dependencies and Build

script/macos-arm-deps.sh

100644100755
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ export PATH="$HOME/arm-target/bin:$PATH"
1414
# Download Homebrew under ~/arm-target
1515
PREV_PWD="$PWD"
1616
cd ~/arm-target
17-
mkdir arm-homebrew
17+
mkdir -p arm-homebrew
1818
curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C arm-homebrew
1919
cd "$PREV_PWD"
2020

2121
# Add arm-brew binary
22-
ln -s ~/arm-target/arm-homebrew/bin/brew ~/arm-target/bin/arm-brew
22+
ln -sf ~/arm-target/arm-homebrew/bin/brew ~/arm-target/bin/arm-brew
2323

2424
# Homebrew env variables
2525
export HOMEBREW_CACHE=~/arm-target/brew-cache
@@ -28,18 +28,20 @@ export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
2828
# Install the given dependencies for the given bottle_tag
2929
arm-brew fetch --deps --bottle-tag=$bottle_tag $dependencies |
3030
grep -E "(Downloaded to:|Already downloaded:)" |
31+
grep -E ".tar.gz" |
3132
grep -v pkg-config |
3233
awk '{ print $3 }' |
33-
xargs -n 1 arm-brew install --force-bottle
34+
xargs -n 1 arm-brew install --force-bottle || true
3435

3536
# Install host version of pkg-config so we can call it in the build system
36-
arm-brew install pkg-config
37+
arm-brew install pkg-config || true
3738

3839
# Add the installed binaries/libraries to the path
39-
export PATH="$HOME/arm-target/arm-homebrew/bin/:$PATH"
40-
export PATH="$HOME/arm-target/arm-homebrew/lib/:$PATH"
40+
export PATH="$HOME/arm-target/bin/:$PATH"
41+
export PATH="$HOME/arm-target/lib/:$PATH"
4142

4243
# libsodium
43-
SODIUM_PATH=$(~/arm-target/arm-homebrew/bin/pkg-config libsodium --libs)
44+
SODIUM_PATH=$(~/arm-target/bin/pkg-config libsodium --libs-only-L | sed -e 's/-L//g') # print only -L and replace "-L" itself
4445
export PATH="$SODIUM_PATH:$PATH"
4546
export PKG_CONFIG_PATH="$SODIUM_PATH:$PKG_CONFIG_PATH"
47+
export npm_config_target_arch=arm64

0 commit comments

Comments
 (0)