-
Notifications
You must be signed in to change notification settings - Fork 7
42 lines (38 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
class BinutilsAT231 < Formula
desc "FSF/GNU ld, ar, readelf, etc. for native development"
homepage "https://www.gnu.org/software/binutils/binutils.html"
url "https://ftp.gnu.org/gnu/binutils/binutils-2.31.1.tar.gz"
mirror "https://ftpmirror.gnu.org/binutils/binutils-2.31.1.tar.gz"
sha256 "e88f8d36bd0a75d3765a4ad088d819e35f8d7ac6288049780e2fefcad18dde88"
revision 2
keg_only :provided_by_macos,
"because Apple provides the same tools and binutils is poorly supported on macOS"
# Adds support for macOS 10.14's new load commands.
# Will be in the next release.
# https://github.com/Homebrew/homebrew-core/issues/32516
patch do
url "https://raw.githubusercontent.com/Homebrew/formula-patches/91dc37fa4609cf1d040b5ede9f2eb971f3730597/binutils/add_mach_o_command.patch"
sha256 "abb053663a56c5caef35685ee60badf57e321b18f308e7cbd11626b48c876e8c"
end
def install
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--enable-deterministic-archives",
"--prefix=#{prefix}",
"--infodir=#{info}",
"--mandir=#{man}",
"--disable-werror",
"--enable-interwork",
"--enable-multilib",
"--enable-64-bit-bfd",
"--enable-targets=all"
system "make"
system "make", "install"
Dir["#{bin}/*"].each do |f|
bin.install_symlink f => "g" + File.basename(f)
end
end
test do
assert_match "Usage:", shell_output("#{bin}/strings #{bin}/strings")
end
end