Skip to content

Commit

Permalink
libffi: use std_configure_args (#67402)
Browse files Browse the repository at this point in the history
  • Loading branch information
SeekingMeaning authored Dec 22, 2020
1 parent 6fd8712 commit 92f5e82
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Formula/libffi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,16 @@ class Libffi < Formula
keg_only :provided_by_macos

def install
# This can be removed in the future when libffi properly detects the CPU on ARM.
# https://github.com/libffi/libffi/issues/571#issuecomment-655223391
extra_args = []
extra_args << "--build=aarch64-apple-darwin#{OS.kernel_version}" if Hardware::CPU.arm?
args = std_configure_args

on_macos do
# This can be removed in the future when libffi properly detects the CPU on ARM.
# https://github.com/libffi/libffi/issues/571#issuecomment-655223391
args << "--build=aarch64-apple-darwin#{OS.kernel_version}" if Hardware::CPU.arm?
end

system "./autogen.sh" if build.head?
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}", *extra_args
system "./configure", *args
system "make", "install"
end

Expand Down

0 comments on commit 92f5e82

Please sign in to comment.