Skip to content

Commit 9c3ecab

Browse files
committed
Merge commit '9609a835ca2eb3089e35269a05369833e9ec0ba2'
2 parents 033e01a + 9609a83 commit 9c3ecab

File tree

4 files changed

+30
-38
lines changed

4 files changed

+30
-38
lines changed

gitstatus/build

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,20 @@ if [ -n "$gitstatus_install_tools" ]; then
9898
>&2 echo "[error] please run 'xcode-select --install' and retry"
9999
exit 1
100100
fi
101-
if ! command -v brew >/dev/null 2>&1; then
102-
>&2 echo "[error] please install homebrew from https://brew.sh/ and retry"
101+
if command -v port >/dev/null 2>&1; then
102+
sudo port -N install libiconv cmake wget
103+
elif command -v brew >/dev/null 2>&1; then
104+
for formula in libiconv cmake git wget; do
105+
if command brew list "$formula" &>/dev/null; then
106+
command brew upgrade "$formula"
107+
else
108+
command brew install "$formula"
109+
fi
110+
done
111+
else
112+
>&2 echo "[error] please install MacPorts or Homebrew and retry"
103113
exit 1
104114
fi
105-
for formula in libiconv cmake git wget; do
106-
if command brew list "$formula" &>/dev/null; then
107-
command brew upgrade "$formula"
108-
else
109-
command brew install "$formula"
110-
fi
111-
done
112115
;;
113116
msys*|mingw*)
114117
command pacman -Syu --noconfirm
@@ -165,11 +168,17 @@ case "$gitstatus_kernel" in
165168
;;
166169
darwin)
167170
command mkdir -- "$workdir"/lib
168-
brew_prefix="$(command brew --prefix)"
169-
command ln -s -- "$brew_prefix"/opt/libiconv/lib/libiconv.a "$workdir"/lib
171+
if [ -e /opt/local/lib/libiconv.a ]; then
172+
command ln -s -- /opt/local/lib/libiconv.a "$workdir"/lib
173+
libgit2_cflags="$libgit2_cflags -I/opt/local/include"
174+
gitstatus_cxxflags="$gitstatus_cxxflags -I/opt/local/include"
175+
else
176+
brew_prefix="$(command brew --prefix)"
177+
command ln -s -- "$brew_prefix"/opt/libiconv/lib/libiconv.a "$workdir"/lib
178+
libgit2_cflags="$libgit2_cflags -I"$brew_prefix"/opt/libiconv/include"
179+
gitstatus_cxxflags="$gitstatus_cxxflags -I"$brew_prefix"/opt/libiconv/include"
180+
fi
170181
libgit2_cmake_flags="$libgit2_cmake_flags -DUSE_ICONV=ON"
171-
libgit2_cflags="$libgit2_cflags -I"$brew_prefix"/opt/libiconv/include"
172-
gitstatus_cxxflags="$gitstatus_cxxflags -I"$brew_prefix"/opt/libiconv/include"
173182
gitstatus_ldlibs="$gitstatus_ldlibs -liconv"
174183
gitstatus_ldflags="$gitstatus_ldflags -L${workdir}/lib"
175184
libgit2_cmake_flags="$libgit2_cmake_flags -DENABLE_REPRODUCIBLE_BUILDS=OFF"

gitstatus/install

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,6 @@
55
_gitstatus_install_daemon_found() {
66
local installed="$1"
77
shift
8-
9-
case "$daemon" in
10-
*-darwin-x86_64)
11-
if [ "$uname_m" = arm64 ] &&
12-
[ ! -e /Library/Apple/System/Library/LaunchDaemons/com.apple.oahd.plist ] &&
13-
[ -x /usr/sbin/softwareupdate ]; then
14-
>&"$e" printf 'Please run the following command to install Rosetta:\n'
15-
>&"$e" printf '\n'
16-
>&"$e" printf ' \033[32m/usr/sbin/softwareupdate\033[0m --install-rosetta\n'
17-
>&"$e" printf '\n'
18-
>&"$e" printf 'See for details: \033[4mhttps://support.apple.com/en-us/HT211861\033[0m\n'
19-
>&"$e" printf '\n'
20-
>&"$e" printf 'Once Rosetta is installed, restart your shell.\n'
21-
return 1
22-
fi
23-
;;
24-
esac
25-
268
[ $# = 0 ] || "$@" "$daemon" "$version" "$installed"
279
}
2810

gitstatus/install.info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
# 6a3d54a5a44abb4ee46ce72a8097389364746c6a
1+
# 0
22
#
33
# This file is used by ./install and indirectly by shell bindings.
44
#
55
# The first line is read by powerlevel10k instant prompt. It must
66
# be updated whenever the content of this file changes. The actual
7-
# value doesn't matter as long as it's unique. You can use the output
8-
# of `git rev-parse HEAD`.
7+
# value doesn't matter as long as it's unique. Consecutive integers
8+
# work fine.
99

1010
# Official gitstatusd binaries.
1111
uname_s_glob="cygwin_nt-10.0"; uname_m_glob="i686"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.3.1"; sha256="c96baef70b81b5a1d46adcc9e93721eaf4bdc295562bdd2baf210a6b416b9911";
1212
uname_s_glob="cygwin_nt-10.0"; uname_m_glob="x86_64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.3.1"; sha256="18b5be49f6eb9ff1cf25e76d6f2333c7402e686e05ce5b88ca107c80504210d8";
13+
uname_s_glob="darwin"; uname_m_glob="arm64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.3.1"; sha256="0394e2ac880c1e190ace0346499d4670861297ecc2f84315ecb8ba3c98aa68d9";
1314
uname_s_glob="darwin"; uname_m_glob="x86_64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.3.1"; sha256="26d582fe9a0b2090c28e84e5e32a6d42d6988cedff51e41ec5f789512c53b0fc";
1415
uname_s_glob="freebsd"; uname_m_glob="amd64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.3.1"; sha256="54a823373458a0908187ba8d1c5b8921015c844811916451674cc09fbdff88bb";
1516
uname_s_glob="linux"; uname_m_glob="aarch64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.3.1"; sha256="4e0a506eafb14b009cf6670f0e11399ac7e765cad17b9fcf38ef65516d248bfa";
@@ -25,7 +26,6 @@ uname_s_glob="msys_nt-10.0"; uname_m_glob="x86_64"; file="gitstatusd-${uname_
2526
# Fallbacks to official gitstatusd binaries.
2627
uname_s_glob="cygwin_nt-*"; uname_m_glob="i686"; file="gitstatusd-cygwin_nt-10.0-${uname_m}"; version="v1.3.1"; sha256="c96baef70b81b5a1d46adcc9e93721eaf4bdc295562bdd2baf210a6b416b9911";
2728
uname_s_glob="cygwin_nt-*"; uname_m_glob="x86_64"; file="gitstatusd-cygwin_nt-10.0-${uname_m}"; version="v1.3.1"; sha256="18b5be49f6eb9ff1cf25e76d6f2333c7402e686e05ce5b88ca107c80504210d8";
28-
uname_s_glob="darwin"; uname_m_glob="arm64"; file="gitstatusd-${uname_s}-x86_64"; version="v1.3.1"; sha256="26d582fe9a0b2090c28e84e5e32a6d42d6988cedff51e41ec5f789512c53b0fc";
2929
uname_s_glob="mingw32_nt-*"; uname_m_glob="i686"; file="gitstatusd-msys_nt-10.0-${uname_m}"; version="v1.3.1"; sha256="618d2425c6a22fa3762fe6fe252f9ddb4ed9138df1377e48b2f119cd4875f400";
3030
uname_s_glob="mingw32_nt-*"; uname_m_glob="x86_64"; file="gitstatusd-msys_nt-10.0-${uname_m}"; version="v1.3.1"; sha256="bdfae7a7c0fd83d0214a7eabde3b7d8709336bd08697a74d48bea4a04c352676";
3131
uname_s_glob="mingw64_nt-*"; uname_m_glob="i686"; file="gitstatusd-msys_nt-10.0-${uname_m}"; version="v1.3.1"; sha256="618d2425c6a22fa3762fe6fe252f9ddb4ed9138df1377e48b2f119cd4875f400";

gitstatus/mbuild

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Usage: mbuild [-b git-ref] [kernel-arch]...
66
#
77
# Builds a bunch of gitstatusd-* binaries. Without arguments builds binaries
8-
# for all platforms. git-ref defaults to src.
8+
# for all platforms. git-ref defaults to master.
99
#
1010
# Before using this script you need to set up build servers and list them
1111
# in ~/.ssh/config. There should be a Host entry for every value of `assets`
@@ -111,6 +111,7 @@ local -rA assets=(
111111
cygwin_nt-10.0-x86_64 build-windows-x86_64
112112
msys_nt-10.0-i686 build-windows-x86_64
113113
msys_nt-10.0-x86_64 build-windows-x86_64
114+
darwin-arm64 build-macos-arm64
114115
darwin-x86_64 build-macos-x86_64
115116
freebsd-amd64 build-freebsd-amd64
116117
linux-aarch64 build-linux-aarch64
@@ -138,7 +139,7 @@ function usage() {
138139
print -r -- 'usage: mbuild [-b REF] [KERNEL-ARCH]...'
139140
}
140141

141-
local OPTARG opt git_ref=src
142+
local OPTARG opt git_ref=master
142143
local -i OPTIND
143144
while getopts ":b:h" opt; do
144145
case $opt in
@@ -183,7 +184,7 @@ function build-unix() {
183184
case $2 in
184185
linux-ppc64le) ;;
185186
linux-*) flags+=(-d docker);;
186-
darwin-arm64) intro='PATH="/opt/homebrew/bin:$PATH"';;
187+
darwin-arm64) intro='PATH="/opt/local/bin:$PATH"';;
187188
darwin-*) intro='PATH="/usr/local/bin:$PATH"';;
188189
esac
189190
ssh $1 -- /bin/sh -uex <<<"

0 commit comments

Comments
 (0)