From 4a4a1ede98b70d091385777acbdd6b7ba9dbecc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karen/=E3=81=82=E3=81=91=E3=81=BF?= Date: Fri, 15 Oct 2021 14:27:06 -0700 Subject: [PATCH] aria2: Add missing `ENV.cxx11` in the install block so the `-std=c++11` flag will be correctly passed on to GCC. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This depends on changes to ENV (superenv / stdenv) made in PR #767. Interestingly, aria2 actually builds fine even without `ENV.cxx11` being present… but including it is a much better / "proper" way to do this. --- Library/Formula/aria2.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Library/Formula/aria2.rb b/Library/Formula/aria2.rb index 87271ad2316..0e455558044 100644 --- a/Library/Formula/aria2.rb +++ b/Library/Formula/aria2.rb @@ -21,6 +21,13 @@ class Aria2 < Formula needs :cxx11 def install + if MacOS.version > :tiger + # Specifying -std=c++11 (which is what ENV.cxx11 does) on 10.4.x with gcc-7 causes the build to fail. + # For some reason, omitting this flag allows aria2 to successfully build and run on OS X 10.4.x. + # TODO: Verify if this behaviour occurs with other versions of GCC that support C++11 (such as gcc-6 or gcc-5). + ENV.cxx11 + end + args = %W[ --disable-dependency-tracking --prefix=#{prefix}