Skip to content

Commit 3ca04be

Browse files
committed
slashem: fix build on arm64 linux
1 parent 6ad510d commit 3ca04be

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

Formula/s/slashem.rb

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,16 @@ def install
6060
# Fix issue where ioctl is not declared and fails on Sonoma
6161
inreplace "sys/share/ioctl.c", "#include \"hack.h\"", "#include \"hack.h\"\n#include <sys/ioctl.h>"
6262

63-
system "./configure", "--with-mandir=#{man}",
64-
"--with-group=#{Etc.getpwuid.gid}",
65-
"--with-owner=#{Etc.getpwuid.name}",
66-
"--enable-wizmode=#{Etc.getpwuid.name}",
67-
*std_configure_args
63+
args = %W[
64+
--with-mandir=#{man}
65+
--with-group=#{Etc.getpwuid.gid}
66+
--with-owner=#{Etc.getpwuid.name}
67+
--enable-wizmode=#{Etc.getpwuid.name}
68+
]
69+
# Help old config scripts identify arm64 linux
70+
args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit?
71+
72+
system "./configure", *args, *std_configure_args
6873
system "make", "install"
6974

7075
man6.install "doc/slashem.6", "doc/recover.6"

0 commit comments

Comments
 (0)