Skip to content

Commit bf8724f

Browse files
authored
Merge pull request Homebrew#218649 from Homebrew/s-arm-linux
s*: fix build on arm64 linux
2 parents 573c5ed + 5acb91f commit bf8724f

File tree

9 files changed

+54
-22
lines changed

9 files changed

+54
-22
lines changed

Formula/s/sblim-sfcc.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ def install
4848
ENV.append "LDFLAGS", "-Wl,-ld_classic"
4949
end
5050

51-
system "./configure", *std_configure_args
51+
args = []
52+
# Help old config scripts identify arm64 linux
53+
args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit?
54+
55+
system "./configure", *args, *std_configure_args
5256
system "make", "install"
5357
end
5458

Formula/s/sc68.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,11 @@ def install
5353
ENV.append_to_cflags "-Wno-incompatible-function-pointer-types" if DevelopmentTools.clang_build_version >= 1500
5454
end
5555

56-
system "./configure", "--mandir=#{man}",
57-
"--infodir=#{info}",
58-
*std_configure_args
56+
args = ["--mandir=#{man}", "--infodir=#{info}"]
57+
# Help old config scripts identify arm64 linux
58+
args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit?
59+
60+
system "./configure", *args, *std_configure_args
5961
system "make", "install"
6062
end
6163

Formula/s/schroedinger.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,12 @@ class Schroedinger < Formula
3737
depends_on "orc"
3838

3939
def install
40+
args = []
41+
# Help old config scripts identify arm64 linux
42+
args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit?
43+
4044
system "autoreconf", "--force", "--install", "--verbose" if build.head?
41-
system "./configure", *std_configure_args
45+
system "./configure", *args, *std_configure_args
4246

4347
# The test suite is known not to build against Orc >0.4.16 in Schroedinger 1.0.11.
4448
# A fix is in upstream, so test when pulling 1.0.12 if this is still needed. See:

Formula/s/scrub.rb

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,15 @@ class Scrub < Formula
3333
end
3434

3535
def install
36-
system "./autogen.sh" if build.head?
37-
system "./configure", "--disable-dependency-tracking",
38-
"--prefix=#{prefix}"
36+
args = []
37+
if build.head?
38+
system "./autogen.sh"
39+
elsif OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit?
40+
# Help old config scripts identify arm64 linux
41+
args << "--build=aarch64-unknown-linux-gnu"
42+
end
43+
44+
system "./configure", *args, *std_configure_args
3945
system "make", "install"
4046
end
4147

Formula/s/shntool.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ class Shntool < Formula
2828
end
2929

3030
def install
31-
system "./configure", "--disable-dependency-tracking",
32-
"--prefix=#{prefix}"
31+
args = []
32+
# Help old config scripts identify arm64 linux
33+
args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit?
34+
35+
system "./configure", *args, *std_configure_args
3336
system "make", "install"
3437
end
3538

Formula/s/skymaker.rb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,15 @@ class Skymaker < Formula
3030
depends_on "fftw"
3131

3232
def install
33+
# Work around failure from GCC 10+ using default of `-fno-common`
34+
ENV.append_to_cflags "-fcommon" if OS.linux?
35+
36+
args = []
37+
# Help old config scripts identify arm64 linux
38+
args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit?
39+
3340
system "autoconf"
34-
system "./configure", "--disable-debug",
35-
"--disable-dependency-tracking",
36-
"--disable-silent-rules",
37-
"--prefix=#{prefix}"
41+
system "./configure", *args, *std_configure_args
3842
system "make"
3943
system "make", "install"
4044
end

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"

Formula/s/smpeg.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ def install
5050
--disable-opengl-player
5151
--disable-sdltest
5252
]
53+
# Help old config scripts identify arm64 linux
54+
args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit?
5355

5456
system "./autogen.sh"
5557
system "./configure", *args, *std_configure_args

Formula/s/smpeg2.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,12 @@ class Smpeg2 < Formula
4141
patch :DATA
4242

4343
def install
44+
args = ["--with-sdl-prefix=#{Formula["sdl2"].opt_prefix}", "--disable-sdltest"]
45+
# Help old config scripts identify arm64 linux
46+
args << "--build=aarch64-unknown-linux-gnu" if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit?
47+
4448
system "./autogen.sh"
45-
system "./configure", "--with-sdl-prefix=#{Formula["sdl2"].opt_prefix}",
46-
"--disable-sdltest",
47-
*std_configure_args
49+
system "./configure", *args, *std_configure_args
4850
system "make"
4951
system "make", "install"
5052

0 commit comments

Comments
 (0)