Skip to content

Commit 10dc059

Browse files
authored
Merge pull request #321 from dscho/etc-profile-for-arm64
Start support for MSYSTEM=ARM64
2 parents 7ca3e52 + a6b3a14 commit 10dc059

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

git-extra/git-extra.install.in

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,32 @@ test -d "$TMPDIR" || test ! -d "$TMP" || {\
230230
#
231231
# As we no longer need it, delete it.
232232
test ! -h /ssl || rm /ssl
233+
234+
# Allow an i686 version of Git for Windows, augmented by `/arm64/*`, to serve
235+
# as sort of an ARM64 version of Git for Windows (because Windows/ARM64 can run
236+
# i686 executables via a built-in emulator).
237+
test i686 != "$arch" ||
238+
grep -q '^ARM64)$' /etc/profile ||
239+
sed -i '/^MINGW64)/{
240+
# read entire `case` arm until `;;`
241+
:1;N;/[^;]$/b1;
242+
243+
# print out the MINGW64 `case` arm unchanged
244+
p;
245+
246+
# now, transmogrify it into the ARM64 `case` arm:
247+
s|^MINGW|ARM|;
248+
# change the MINGW_PREFIX
249+
s|\${MINGW_PREFIX}|/arm64|;
250+
# add the /mingw32/bin fall-back to the PATH
251+
s| PATH=[^:]*|&:/mingw32/bin|;
252+
# adjust the pkgconfig path
253+
s|/share/pkgconfig|&:/mingw32/lib/pkgconfig:/mingw32/share/pkgconfig|;
254+
# adjust autoconf path
255+
s|:/usr/share/aclocal|:/mingw32/share/aclocal&|;
256+
# add the /mingw32 fall-back paths to MANPATH
257+
s|:\${MANPATH}|:/mingw32/local/man:/mingw32/share/man&|
258+
}' /etc/profile
233259
}
234260

235261
post_upgrade () {

0 commit comments

Comments
 (0)