Skip to content

Commit

Permalink
aria2: Updated to 1.36.0. Added OS X 10.4.x build support. Fixed buil…
Browse files Browse the repository at this point in the history
…ding on 10.5.x as well as issue #394.

This commit also includes some minor formula-level changes:
* Updated the homepage URL to aria2's new GitHub Pages URL (which is where the previous one now redirects to).
* Use `assert_predicate` instead of `assert` in the `test` block.
  • Loading branch information
akemin-dayo committed Oct 15, 2021
1 parent 69f723b commit a198835
Showing 1 changed file with 10 additions and 18 deletions.
28 changes: 10 additions & 18 deletions Library/Formula/aria2.rb
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
class Aria2 < Formula
desc "Download with resuming and segmented downloading"
homepage "http://aria2.sourceforge.net/"
url "https://downloads.sourceforge.net/project/aria2/stable/aria2-1.19.0/aria2-1.19.0.tar.bz2"
mirror "https://mirrors.kernel.org/debian/pool/main/a/aria2/aria2_1.19.0.orig.tar.bz2"
sha256 "ae2b6fce7a0974c9156415cccf2395cd258580ab34eec2b34a8e76120b7240ce"
homepage "https://aria2.github.io/"
url "https://github.com/aria2/aria2/releases/download/release-1.36.0/aria2-1.36.0.tar.xz"
sha256 "58d1e7608c12404f0229a3d9a4953d0d00c18040504498b483305bcb3de907a5"

bottle do
cellar :any_skip_relocation
sha256 "eb19d43e1bb8c6b44505881d8f49943ca781a8bf04c558d0916dcbcdd4a0fc8e" => :leopard_g3
sha256 "1a0e3c43309c5a3cbfa294b983e29a2db3e1e5ac6ab17dca27dd1c1bfc5929cf" => :leopard_altivec
end

# configure can't get C++11 working with new GCC on Tiger
# TODO figure this out
depends_on :macos => :leopard
depends_on "pkg-config" => :build
# Apple TLS doesn't work on Leopard
# AppleTLS (Security.framework's SecureTransport) doesn't work on Leopard
depends_on "gnutls" if MacOS.version < :snow_leopard

needs :cxx11
Expand All @@ -31,9 +21,11 @@ def install
]

if MacOS.version < :snow_leopard
args << "--with-gnutls" << "--without-appletls"
args << "--with-gnutls"
args << "--without-appletls"
else
args << "--without-gnutls" << "--with-appletls"
args << "--without-gnutls"
args << "--with-appletls"
end

system "./configure", *args
Expand All @@ -43,7 +35,7 @@ def install
end

test do
system "#{bin}/aria2c", "http://brew.sh"
assert File.exist? "index.html"
system "#{bin}/aria2c", "https://brew.sh/"
assert_predicate testpath/"index.html", :exist?, "Failed to create index.html!"
end
end

0 comments on commit a198835

Please sign in to comment.