Skip to content

Commit

Permalink
aria2: Add missing ENV.cxx11 in the install block so the `-std=c++1…
Browse files Browse the repository at this point in the history
…1` flag will be correctly passed on to GCC.

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.
  • Loading branch information
akemin-dayo committed Oct 16, 2021
1 parent 69f723b commit 4a4a1ed
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Library/Formula/aria2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 4a4a1ed

Please sign in to comment.